You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add R_earth and R_jupiter to astropy.units.astrophys #4813
The radii of Earth and Jupiter are contained in astropy.units.cds as Rgeo and Rjup, but would it be possible to include them also in astropy.units.astrophys (like M_earth and M_jupiter are)? This would make it more conveniently usable with u.M_earth and u.R_earth at the same time.
@MNGuenther - OK, so I misremembered, and the radius didn't come up in the discussion while the masses were added in #3907.
Since both R_earth and R_jupiter is defined in the constants module, I wonder whether there is any objection including these here, too, following the logic of #3907.
It definitely more consistent than using u.M_earth (which is Allen's Astrophysical Quantities 4th Ed) with the u.cds.Rgeo that is CDS defined.
Activity
pllim commentedon Apr 28, 2016
I am not sure if I understand. Why can't you use them at the same time in their current state? Can you please give an example?
bsipocz commentedon Apr 28, 2016
@MNGuenther - OK, so I misremembered, and the radius didn't come up in the discussion while the masses were added in #3907.
Since both R_earth and R_jupiter is defined in the constants module, I wonder whether there is any objection including these here, too, following the logic of #3907.
It definitely more consistent than using u.M_earth (which is Allen's Astrophysical Quantities 4th Ed) with the u.cds.Rgeo that is CDS defined.
I can open a PR if this gets the thump up.
astrofrog commentedon Apr 28, 2016
👍 from me, but someone like @mhvk should comment on this.
mhvk commentedon Apr 28, 2016
Yes, it seems a good idea to expose all constants where it makes sense as units; and earth and jupiter radius certainly qualify!
astrofrog commentedon May 11, 2016
Done in #4818! (by @bsipocz)
bsipocz commentedon May 11, 2016
(so I realize "address" isn't one of the github magic verbs to autoclose issues.)