Skip to content

Plan to make .representation in coordinates less confusing #6591

Description

@eteq

This is an issue with a plan for resolving the question raised in #6247 - I'm creating it as a new issue (and closing #6247) because it's a more concrete proposal. We (me, @adrn, @astrofrog, @taldcroft) came up with it during the Astropy coordination meeting 2017.

The idea to resolve the concern of the ambiguous name .representation by doing the following:

  • Change the .representation attribute to .representation_type, and have the docs exclusively use that
  • Have .representation remain, now but just point to .representation_type (both setter and getter). In a future version we may deprecate it (There's some disagreement on that point, to be resolved later)
  • Have the SkyCoord and frame object constructors continue to accept the representation keyword as they do now for backwards compatibility, but change the documented use to instead use data and representation_type keywords, in parallel structure with the above.

Activity

  1. added this to the v3.0.0 milestone on Sep 21, 2017
  2. mhvk commented on Sep 21, 2017

    @mhvk
    Contributor

    👍 I particularly like the re-use of data, which is the attribute pointing to the representation data, as the default argument to pass in such data.

    One question: would representation_type be the class or the string describing it? I guess the former still, correct?

  3. taldcroft commented on Sep 21, 2017

    @taldcroft
    Member

    One question: would representation_type be the class or the string describing it? I guess the former still, correct?

    No change from the current representation, as I understand. The point of type (as opposed to _cls) was to make setting with a string or class seem sensible. Presumably the getter still returns a class.

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions