Skip to content

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