MWATelescope / Birli

A Rust library for preprocessing tasks in the Murchison Widefield Array (MWA) data pipeline.
Mozilla Public License 2.0
16 stars 3 forks source link

can't supply a negative phase centre coordinate. #129

Closed d3v-null closed 1 year ago

d3v-null commented 1 year ago

a negative value can't be supplied to the --phase-centre cli argument:

        --phase-centre <RA> <DEC>    Override Phase centre from metafits (degrees)

e.g.

Args { inner: ["/opt/cargo/bin/birli", "--max-memory", "300", "--avg-freq-res", "40", "--avg-time-res", "4", "--flag-edge-width", "80", "--phase-centre", "220", "-45"

error: Found argument '-4' which wasn't expected, or isn't valid in this context

    If you tried to supply `-4` as a value rather than a flag, use `-- -4`

adding the -- doesn't help.

birli --metafits 1352206016.metafits  --dry-run --phase-centre -- -1 -1 1352206016_20221111124638_ch151_000.fits

and adding 360 to the negative degree values gives different results in the uvfits file, compared to just using the pointing centre.

birli --metafits 1352206016.metafits --phase-centre 358.9233 333.1709 1352206016_20221111124638_ch151_000.fits -u pctest.phase.uvfits
#    Phase centre:         (358.9233°, 333.1709°) => (23h55m41.5919s, 255d10m15.2400s)
#    Pointing centre:      (358.9233°, -26.8291°) => (23h55m41.5838s, -26d49m44.7774s)
python -c 'from astropy.io import fits; fits.open('pctest.phase.uvfits')[0].header
#    OBSRA   =             358.9233                                                  
#    OBSDEC  =             333.1709             
birli --metafits 1352206016.metafits --pointing-centre 1352206016_20221111124638_ch151_000.fits -u pctest.point.uvfits
python -c 'from astropy.io import fits; fits.open('pctest.point.uvfits')[0].header
#    OBSRA   =     358.923265883196                                                  
#    OBSDEC  =    -26.8291048533211