Skip to content

Add R_earth and R_jupiter to astropy.units.astrophys #4813

Closed

Description

@MNGuenther

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.

Activity

  1. pllim commented on Apr 28, 2016

    @pllim
    Member

    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?

  2. bsipocz commented on Apr 28, 2016

    @bsipocz
    Member

    @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.

  3. astrofrog commented on Apr 28, 2016

    @astrofrog
    Member

    👍 from me, but someone like @mhvk should comment on this.

  4. mhvk commented on Apr 28, 2016

    @mhvk
    Contributor

    Yes, it seems a good idea to expose all constants where it makes sense as units; and earth and jupiter radius certainly qualify!

  5. astrofrog commented on May 11, 2016

    @astrofrog
    Member

    Done in #4818! (by @bsipocz)

  6. bsipocz commented on May 11, 2016

    @bsipocz
    Member

    (so I realize "address" isn't one of the github magic verbs to autoclose issues.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions