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

Fill delta and phase angle from rh and solar elongation #339

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

mkelley
Copy link
Member

@mkelley mkelley commented May 26, 2022

Ephem objects can be manually populated with arbitrary data. Add a method that helps users generate geometrically sound values:

>>> import astropy.units as u
>>> from sbpy.data import Ephem
>>> eph = Ephem.from_dict({'rh': [2] * u.au,
...                        'solar_elongation': [90] * u.deg})
>>> eph.fill_delta_and_phase()
>>> print(eph)
<QTable length=1>
   rh   solar_elongation       delta              phase       
   AU         deg                AU                deg        
float64     float64           float64            float64      
------- ---------------- ------------------ ------------------
    2.0             90.0 1.7320508075688772 30.000000000000004

@pep8speaks
Copy link

pep8speaks commented May 26, 2022

Hello @mkelley! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2022-07-07 02:19:34 UTC

@mkelley mkelley added this to the v0.4 milestone May 26, 2022
@mkelley mkelley requested a review from jianyangli May 26, 2022 18:36
@mkelley mkelley removed the request for review from jianyangli June 4, 2022 17:30
@mkelley
Copy link
Member Author

mkelley commented Jun 4, 2022

First needs PR #337

@mkelley
Copy link
Member Author

mkelley commented Jun 4, 2022

Maybe I could rework this into fill(field), where field is rh, delta, phase, or solar elongation?

@mkelley mkelley mentioned this pull request Jun 7, 2022
3 tasks
@mkelley mkelley removed this from the v0.4 milestone May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants