Coordinate Representation Classes#10
Conversation
|
ping @astrofrog |
|
@eteq - there are a few changes compared to the API document:
Transformations are implemented in a simple way - by default, all transformations go through cartesian, but one can add short cuts by overloading Also, what exactly is the physics spherical representation? At the moment, it simply renames |
Implemented CartesianRepresentation, SphericalRepresentation and CylindricalRepresentation. Implemented transformations between the three Representations by to_cartesian and from_cartesian methods. Contains contributions by @astrofrog.
Achievement Unlocked: 100% test coverage
… only apply conversion if self.distance is a Distance object.
|
I'm going to punt on the |
|
@astrofrog - I'm fine on punting on |
|
@eteq - absolutely, I think slicing should work. Do we want to allow scalar representation objects, and if so, should slicing just return an exception? |
|
@astrofrog - yeah, I would say so... or similar, and then let the initializer decide if that's valid? But maybe its more complicated then that... |
|
@astrofrog - agree to keep it simple for now. My guess would be that in the end we want an underlying vector class, which also allows addition, etc. I was also thinking of writing a quick |
Implemented __getitem__ on all the coordinate representation objects
|
@mhvk send a pull request to Cadair/astropy:ape5-repr |
|
@mhvk @astrofrog - I'm actually marginally against implementing
EDIT: Oh, I see @astrofrog added that already - awesome! |
|
I think I'm missing something, but did we ever discuss adding |
|
@astrofrog - thats what I thought @mhvk was saying in his last comment? And are you done making changes now, @astrofrog and @Cadair ? If so, I can merge this and @mhvk can issue a PR against eteq/astropy:coordinates-ape5 . That will make it easier to start hooking this into the frames stuff. |
|
Ah I see - sorry for the confusion. I need to make one more commit to address a comment @mhvk made, then we are good to go. |
|
No worry about |
Ensure that distance=[1 * u.m, 10 * u.m] gets converted to a Distance object
|
@eteq - this is good to merge! |
|
Alright, merging now! @mhvk - you can issue your |
Representation Classes for Coordinates
Minor re-wording/linking of overview about coordinates
Have a very merry Friday.