chime-experiment / ch_util

CHIME utilities
https://chime-experiment.github.io/ch_util
MIT License
2 stars 3 forks source link

Generalize ephemeris code for multiple observatories #2

Closed nritsche closed 1 year ago

nritsche commented 3 years ago

Originally from @leungcalvin: Generalized tools.py and ephemeris.py to handle arbitrary outrigger stations in addition to CHIME in preparation for CHIME/FRB outriggers (later), and to support the GBO/TONE twelve-dish Outrigger (now). This should be done after https://github.com/chime-experiment/ch_util/issues/16 is complete.

If this were to be implemented now, the general pattern is just to change some of the function definitions to default to CHIME but to allow for the input of an optional site which would override that default. This means making the following changes, which should preserve existing functionality.

chime_observer that return a caput.time.Observer -> also implement allenby_observer(), for instance _get_chime() methods that return a SkyfieldObserverWrapper -> also implement _get_allenby() method (grr, this class is poorly organized/designed!!) Allowing lsa_to_unix, unix_to_lsa, csa_to_unix, unix_to_csa,csd to accept an optional obs argument that would allow us to pass in the requisite Observer object. Allowing ephemeris.fringestop_time to accept an obs argument which defaults to chime_observer().