These are chat archives for astropy/astropy
setup.py. Should/Will this be changed to setup.cfg?
preferred_representation. But I also see what it might be nice, so I’m contemplating what else might make sense
represent_asstill returns a representation, not a coordinate (SkyCoord or frame)
represent_asdoesn't have to, and in fact should not.
preferred_representaionis the representation that the frame is most-commonly represented.
representationas the way that users access or change the representation of a given coord object.
preferred_representationwould go back to being a static thing that could also be called
SkyCoord(l=…,b=…, frame=‘galactic’)- without the
preferred_representation, there’s no way to know that l and b are
SkyCoord(x=.., y=..., frame='galactic')
preferred_representationis the only one that is convenient to use.
Quantity: 1000 m and 1 km should act exactly the same in any actual calculation, until you ask for them in a specific unit
b, they have to also know
w, and possibly much more
I think it would be less confusing because a user can explore and find this:
sc = SkyCoord(..., frame='galactic') sc.representation = 'cartesian' sc <SkyCoord Galactic w=.. v=.. w=..>
Voila, they learned about this without any docs!
u, v, wvalues and wants to make a SkyCoord. They might have to do
c = Cartesian(x=u, y=v, z=w)
.cartesiangets something different to a frame, something that is one step away from a list
__repr__et al, but it allows the same functionality in the end
xfrom your coord, you need to add the
cartesian. So then you end up doing
sc_cart = sc.cartesianand mostly working with
sc_cart,which is not a coordinate. So you have to carry two objects instead of one.
preferred_represeation. The latter will be essentially fixed as the default.
preferred_representationmakes sense for the way we will be using it.
default_representation, but then it has a different meaning
default_representationmakes sense for the fixed one, so then
preferredwould go away?
representationis provided. That is a pretty standard use of
preferredeverything, and instead just have a representation dict like what’s in the PR (although not hidden), and
default_representationjust is which one to use if one isn’t given