Open
Conversation
added 5 commits
March 3, 2015 10:26
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.
Contributor
|
@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? |
Contributor
|
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. |
Contributor
|
I thought of this too... I'll let @mauch decide. |
Contributor
ludwigschwardt
left a comment
There was a problem hiding this comment.
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?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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