pyuvsim
pyuvsim copied to clipboard
Dealing With the Horizon
I'm writing up this issue to discuss how we should deal with the horizon in simulation.
There are a lot of factors to consider here, and I'm just going to mention a few of them, and hopefully we generate some discussion that leads to implementation. Factors include:
- How the beam behaves at the horizon. Is it correct to say that the beam has a hard cut at the "horizon". A compact beam in real space is non-compact in UV space. In which space is it more physical to be compact?
- What is the horizon? Should we be more careful about defining the local horizon given terrain etc?
- How do point sources behave at the horizon? Is there diffraction? Is there some (small) smoothing scale over which the point source disappears? Do we need to account for the extended nature of point sources when we're this close to the horizon?
- How do we represent diffuse structure in terms of the horizon? Having "pixels" that gradually move over the horizon means we should really only account for a fraction of their flux when they straddle the horizon.
- Are there "effective" ways of dealing with some of these issues that could be applied as something like modifications to the beam and could be simulator-agnostic?
In terms of 4 and 5, I wrote up some basic ideas in the attached document. vissim-horizon.pdf
Tagging in @jaguirre , @bhazelton , @AaronParsons and @jpober as people I think would be interested.
Another factor throw into the mix is brought up by this recent paper: https://ui.adsabs.harvard.edu/abs/2021ApJ...923...33B/abstract. They have a publicly available code for calculating the local horizon topography. I haven't looked at it, but if it's good code, it could be an interesting study to implement in our simulators.
Tagging @miguelfmorales who is also interested in this.
I personally don't know how to accurately model sources near the horizon, and the physics is really fascinating but confusing. I have no idea which effects are leading vs. next-to-leading order, but a few of them:
- Sources near and over the horizon refract to appear above the horizon. You can see this if you think of a plane wave coming at the telescope from the horizon, with your telescope on a thick uniform ground. There is the electric field above the ground, and the electric field traveling through the dielectric ground. The wave is required to be continuous across this boundary, but because it travels slower in the ground than space it trips the wave traveling above the ground and bends it down. So a source on the horizon appears to be coming in at an angle thus is refracted to appear above the horizon. If we improve the model so the earth is spherical, you can see this will refract sources below the horizon to being visible. Then you add real ground with depth and water, then terrain. In short a mess, but it is a bad approximation to think that the terrain cuts sources neatly off, they diffract over features, and even sources that are just above the terrain are distorted due to the continuity of the E-field and a not perfectly conductive ground.
- At the horizon neighboring antennas see each other, in both a reflective and diffractive sense.
- Antenna models near the horizon are notoriously unreliable. I think this might be associated with the diffractive effects above but I'm not at all sure. Effectively assuming a large ground plane becomes a poor assumption.
- Poles and cuts in the math. Essentially to get it right you have to abandon the ideas of a uv plane and half-hemisphere sky. This is most cleanly seen with spacecraft constellations, where you just model 4pi sky and correlations (and 9 polarization products since you need a tripole antenna...). There the math at least works, but as you put all the spacecraft in a plane you end up with a degeneracy in your image reconstruction (mirror across spacecraft plane), and the propagation of waves through the plane of the spacecraft becomes a mess. So I don't even know how to simulate in the case of no ground and a planar antenna array!
This is just all to say it is tricky.
Another factor throw into the mix is brought up by this recent paper: https://ui.adsabs.harvard.edu/abs/2021ApJ...923...33B/abstract. They have a publicly available code for calculating the local horizon topography. I haven't looked at it, but if it's good code, it could be an interesting study to implement in our simulators.
There are no unit tests at all in the repo. Also, as far as I can tell, the code only accounts for a spherical (or possibly ellipsoidal) earth, not local topography. But maybe my quick read of the code is incorrect. Not a ton of documentation.
I'm not surprised to hear the code is bad, but I'd be surprised if it really doesn't account for local topography (since they claim it does exactly that in the paper).
yeah, I'm confused about that. I probably missed something reading the code but it certainly doesn't make clear in the documentation where that information comes from.
It does read in elevation data from a file (on this line), but they don't share the file in the repository. The data are accessed with SRTM through the elevation
package (https://pypi.org/project/elevation/)
This looks like a potentially good tool for modeling the shape of the horizon (to Steven's point 2)! We'll still need to think about how to include the horizon cutoff in the RIME integral, though.