sbpy
sbpy copied to clipboard
Fill delta and phase angle from rh and solar elongation
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
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! :beers:
Comment last updated at 2022-07-07 02:19:34 UTC
First needs PR #337
Maybe I could rework this into fill(field), where field is rh, delta, phase, or solar elongation?