HERA-Team / hera-validation

Archive of formal software pipeline validation tests
http://hera.pbworks.com/w/page/130621356/Validation
0 stars 3 forks source link

Step -1.0: healvis validation #25

Open aelanman opened 5 years ago

aelanman commented 5 years ago

Validation of healvis simulator against pyuvsim and against analytic models. This issue is to begin the process of defining the tests and conditions for success.

Setup


Telesope:

Sky model:

Source model conversion

pyuvsim and healvis handle sources differently:

The input model is defined as 1 Jy at all frequencies. For healvis, this means each pixel value is scaled by 1/(Ων), for pixel area Ω in steradians and frequency ν in Hz. The healvis model therefore has a spectral dependence so that the pyuvsim model can be spectrally-flat.

Comparison


uvsim_healvis_diff

The above plot shows the difference of corresponding visibilities in pyuvsim and healvis in the complex plane. Deviations appear to reach as high as 10% in some cases. A few potential sources of this error have been investigated but so far the cause is unknown.

Selecting only the first time step and coloring each point by the frequency gives the following:

singletime_uvsim-healvis_err_wfreq

Clearly, the error is specific to each baseline and varies with frequency. However, it doesn't seem to have a regular behavior with baseline angle or length.

Replacing the healvis alt/az calculation with the astropy equivalent (which is what pyuvsim uses) yields the same discrepancies (or, very very nearly).

Comparison with Analytic Models


Steven and I have come up with a handful of exact solutions for the visibility of a diffuse sky. For instance, the very simple (and unphysical...) case of a uniform beam with a uniform sky model yields a sinc-function visibility:

analytic_comparison_monopole

In the above, the visibilities simulated for a random layout of 80 antennas are binned in baseline length (u). This solution is real, so the imaginary component is expected to be zero. This plot is to illustrate the similarity, since the binning introduces some discrepancies, especially for mostly empty bins.

Direction Forward


The cause of the remaining discrepancy between pyuvsim and healvis needs to be tracked down and understood. The frequency dependence suggests that some error in the fringe term is introducing a frequency-dependent phase.

Comparing the two codes has already revealed a difference azimuth conventions between the two codes, which can lead to some errors when using beams with azimuthal dependence. Fixing it, there is still a slight disagreement in azimuth with astropy, which is maximized at the southern horizon where it reaches about half an arcminute.

Coming up with a good way to analytic models will also help. This can also test the limits of the point-source approximation, which pyuvsim cannot evaluate.

steven-murray commented 5 years ago

This is great!

Some thoughts:

steven-murray commented 4 years ago

It may be wise to step back from this a bit, and get a proper reference sim done in pyuvsim (see https://github.com/RadioAstronomySoftwareGroup/pyuvsim/issues/254).

Then we have something formal to compare to.