Open aewallwi opened 3 years ago
The function for converting enu to az_za in vis_cpu (a standard HERA simulator method)
enu
az_za
vis_cpu
https://github.com/HERA-Team/vis_cpu/blob/b602819508dee05742014b99dfce363a57cc4ffd/src/vis_cpu/conversions.py#L10
which is used to produce azimuths to be interpolated by uvbeam
uvbeam
https://github.com/HERA-Team/vis_cpu/blob/b602819508dee05742014b99dfce363a57cc4ffd/src/vis_cpu/conversions.py#L286
outputs azimuths between -pi and pi.
Many uvbeam objects can be expected to only have positive azimuths (for example, cst beams only run from 0 to 2pi) and this raises the error in uvbeam at
https://github.com/RadioAstronomySoftwareGroup/pyuvdata/blob/4c66208245db29be8b9920434d6d48d23b29e367/pyuvdata/uvbeam/uvbeam.py#L1387
This could be avoided if uvbeam recognized negative azimuth values as being identical to positive azimuth values (mod 2 pi).
I've added a fix in vis_cpu for the specific problem that raised this
https://github.com/HERA-Team/vis_cpu/pull/17
but this should probably also be fixed in pyuvdata.
pyuvdata
The function for converting
enu
toaz_za
invis_cpu
(a standard HERA simulator method)https://github.com/HERA-Team/vis_cpu/blob/b602819508dee05742014b99dfce363a57cc4ffd/src/vis_cpu/conversions.py#L10
which is used to produce azimuths to be interpolated by
uvbeam
https://github.com/HERA-Team/vis_cpu/blob/b602819508dee05742014b99dfce363a57cc4ffd/src/vis_cpu/conversions.py#L286
outputs azimuths between -pi and pi.
Many
uvbeam
objects can be expected to only have positive azimuths (for example, cst beams only run from 0 to 2pi) and this raises the error inuvbeam
athttps://github.com/RadioAstronomySoftwareGroup/pyuvdata/blob/4c66208245db29be8b9920434d6d48d23b29e367/pyuvdata/uvbeam/uvbeam.py#L1387
This could be avoided if
uvbeam
recognized negative azimuth values as being identical to positive azimuth values (mod 2 pi).