RadioAstronomySoftwareGroup / pyuvsim

A ultra-high precision package for simulating radio interferometers in python on compute clusters.
https://pyuvsim.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
43 stars 7 forks source link

Dealing With the Horizon #385

Open steven-murray opened 2 years ago

steven-murray commented 2 years ago

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:

  1. 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?
  2. What is the horizon? Should we be more careful about defining the local horizon given terrain etc?
  3. 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?
  4. 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.
  5. 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

steven-murray commented 2 years ago

Tagging in @jaguirre , @bhazelton , @AaronParsons and @jpober as people I think would be interested.

jpober commented 2 years ago

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.

bhazelton commented 2 years ago

Tagging @miguelfmorales who is also interested in this.

miguelfmorales commented 2 years ago

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:

This is just all to say it is tricky.

bhazelton commented 2 years ago

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.

jpober commented 2 years ago

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).

bhazelton commented 2 years ago

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.

aelanman commented 2 years ago

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.

jpober commented 2 months ago

This paper describes a machine-learning based beam emulator that, among other things, seems to interface with horizon profiles: https://arxiv.org/abs/2408.16135

dannyjacobs commented 2 months ago

Yeah, @zacharymartinot ran Neil Basset's program for HERA and got the following. image (I assume the y axis is degrees)

steven-murray commented 2 months ago

This paper describes a machine-learning based beam emulator that, among other things, seems to interface with horizon profiles: https://arxiv.org/abs/2408.16135

This is very interesting!