Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(ephemeris): Use ch_ephem #77

Merged
merged 1 commit into from
Aug 1, 2024
Merged

refactor(ephemeris): Use ch_ephem #77

merged 1 commit into from
Aug 1, 2024

Conversation

ketiltrout
Copy link
Member

This re-imports stuff moved to ch_ephem. It both re-imports everything that was moved back into ch_util.ephemeris for backwards compatibility, but also removes references to ch_util.epheremis from the code, using the newly-exported versions of things directly.

This PR requires both:

Catalogs:

All the catalogs have been moved to ch_ephem, which provides a standard interface to them via ch_ephem.catalogs.load. To make this change, fluxcat.FluxCatalog.load has been broken into two pieces. The new fluxcat.FluxCatalog.load_dict imports a catalog from an already-parsed JSON dict (which is what ch_ephem provides). The original fluxcat.FluxCatalog.load works as it used to, but tail-calls load_dict to do most of the importing.

Position data:

Position data (lat, lon, alt) is now obtained by fetching the parameter out of the caput.time.Observer objects provided by ch_ephem. The constants in ch_util.ephemeris are populated by doing this.

Instrument rotation:

ch_ephem has also taken on the rotation data that was in tools (where it's been re-imported from ch_ephem). Not sure this is ideal. Please comment on the ch_ephem PR if you can provide an opinion on this.

Private objects deleted:

I've also deleted a number of private objects which are no longer being used (i.e. objects whose names start with a leading underscore).

Notable among these is the unused ch_util.tools._LAT_LON which had position data for various instruments which differed from the position data provided by ch_util.ephemeris.

Also removed are the long-deprectated ch_util.ephemeris._get_chime and ch_util.ephemeris.transit_RA.

@ketiltrout ketiltrout requested review from ljgray and rikvl July 25, 2024 23:04
@ketiltrout
Copy link
Member Author

The checks won't work until the other PRs are merged.

@ketiltrout ketiltrout force-pushed the ch_ephem branch 4 times, most recently from c03fe4c to a4ad3f2 Compare July 31, 2024 22:14
@rikvl
Copy link
Contributor

rikvl commented Aug 1, 2024

I had a look at moving the HFB catalog. That looks fine to me. Apologies for the delay!

@ketiltrout ketiltrout force-pushed the ch_ephem branch 3 times, most recently from 5da720d to 8ee69f6 Compare August 1, 2024 22:23
This re-imports stuff moved to `ch_ephem`.  It both
re-imports everything that was moved back into `ch_util.ephemeris` for
backwards compatibility, but also removes references to
`ch_util.epheremis` from the code, using the newly-exported versions
of things directly.

This PR requires both:

* radiocosmology/caput#271
* chime-experiment/ch_ephem#1

Catalogs:

All the catalogs have been moved to `ch_ephem`, which provides a
standard interface to them via `ch_ephem.catalogs.load`.  To make this
change, `fluxcat.FluxCatalog.load` has been broken into two pieces.  The
new `fluxcat.FluxCatalog.load_dict` imports a catalog from an
already-parsed JSON dict (which is what `ch_ephem` provides).  The
original `fluxcat.FluxCatalog.load` works as it used to, but tail-calls
`load_dict` to do most of the importing.

Position data:

Position data (lat, lon, alt) is now obtained by fetching the parameter
out of the `caput.time.Observer` objects provided by `ch_ephem`.  The
constants in `ch_util.ephemeris` are populated by doing this.

Instrument geormetry:

`ch_ephem` has also taken on the geometry data (rotation, roll, offset)
that was in `tools` (where it's been re-imported from `ch_ephem`).

Private objects deleted:

I've also deleted a number of private objects which are no longer
being used (i.e. objects whose names start with a leading underscore).

Notable among these are the geometry constants from `ch_util.tools`
and the unused`ch_util.tools._LAT_LON` which had position data for
various instruments which differed from the position data provided
by `ch_util.ephemeris`.

Also removed are the long-deprectated `ch_util.ephemeris._get_chime` and
`ch_util.ephemeris.transit_RA`.
@ketiltrout ketiltrout merged commit 0736990 into master Aug 1, 2024
4 checks passed
@ketiltrout ketiltrout deleted the ch_ephem branch August 1, 2024 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants