-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add arbitrary epoch #17
base: master
Are you sure you want to change the base?
Conversation
When creating a target the epoch of the coordinates can be specified as a tag. 'B1900' or 'B1950' will use the inbuilt ephem dates for those epochs. Other epochs can be specified with a decimal string, specifying the Gregorian date of the epoch desired. These changes have been made for both 'radec' and 'gal' targets. The construct_radec_target method now allows the user to specify the epoch of the coordinates as well, which can be in any format accepted by ephem.Date(). J2000 is the default epoch in all cases.
The user can now specify an epoch using the besselian dates B1900, or B1950- which are both ephem defaults. Otherwise the user can specify an arbitrary epoch using the string Jxxxx.xx. An epoch specified in such a way is defined (using a convention that is typically obscure for astronomers) as the date corresponding to the difference in Julian years of the specified epoch from the Gregorian date of J2000.
Allow changes of epoch when converting to astrometric_radec or galactic coordinates.
Check precessed coordinates to 9 decimal places in tests.
@ludwigschwardt is it maybe time to close this now that katpoint is moving to astropy and will hopefully be able to construct targets from arbitrary SkyCoords? |
Actually I see from the PR description that it will allow an epoch to be specified as a tag, which I guess would still be missing in astropy katpoint. |
I thought of this too... I'll let @mauch decide. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realise that this is a somewhat stale PR, but I want to resolve the review request 😂
Katpoint v1 supports arbitrary epochs via Astropy, but this PR also makes the case for doing epochs with J/B target tags. What sayeth thou, @mauch?
Allow katpoint targets to be specified with an arbitrary epoch. Epochs are specified using the ephem builtins (B1950 or B1900) or using a string of the form Jxxxx.xxx, to specify the Julian epoch (ie. Julian date relative to J2000 epoch). When constructing a Target from a string, arbitrary epochs can be specified by adding a correctly formatted epoch to the list of target tags. Targets can be converted between epochs using the 'astrometric_radec' and 'galactic' methods. The epoch can also be specified by the 'construct_radec_target' function - which takes the same input as ephem.Date to specify the epoch. J2000 is the default epoch throughout.
To convert a Jxxxx.xx string to an ephem.Date object, a function 'epoch_to_ephem' has been added to timestamp.py.
Tests as well.
Please comment @ludwigschwardt