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

Document additional usage of closest_apparition #241

Open
mkelley opened this issue Mar 25, 2020 · 0 comments
Open

Document additional usage of closest_apparition #241

mkelley opened this issue Mar 25, 2020 · 0 comments

Comments

@mkelley
Copy link
Member

mkelley commented Mar 25, 2020

astroquery's Horizons.ephemerides has a closest_apparition parameter that selects the orbit closest to the epoch(s) being requested. The default is to select the most recent orbit when closest_apparition is True. According to JPL Horizons's documentation other orbits can be selected:

     CAP;         (return last apparition before current date)
     CAP < JD#;   (return last apparition before specified Julian Day Number)
     CAP < YEAR;  (return last apparition before given integer year)

This is possible with astroquery, but undocumented. We should update astroquery's documentation and provide examples in sbpy's documentation.

>>> e1 = Ephem.from_horizons('90000083', epochs=Time('1975-01-01'))  # 90000083 is the record number for the 1974 orbit at the time of writing
>>> e2 = Ephem.from_horizons('2P', id_type='designation', epochs=Time('1975-01-01'), closest_apparition='<1975')
>>> e1['ra'] - e2['ra']                                                                                       
<Quantity [0.] deg>
>>> e1['dec'] - e2['dec']                                                                                     
<Quantity [0.] deg>

# e3 will be based on the 2015 orbit
>>> e3 = Ephem.from_horizons('2P', id_type='designation', epochs=Time('1975-01-01'), closest_apparition=True)
>>> e1['ra'] - e3['ra']
<Quantity [0.01268] deg>
>>> e1['dec'] - e3['dec']
<Quantity [0.00359] deg>
mkelley added a commit to mkelley/sbpy that referenced this issue Jun 4, 2022
Includes adding headers, summarize from_horizons's main options first,
and address Issue NASA-Planetary-Science#241.
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

No branches or pull requests

1 participant