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
This issue is the second part of #4209, along side #4338 : this issue is about creating a new frame (tentatively called AstrometricFrame) that is a rotation of some other frame to be centered at a specific point.
Also implement a new frame - lets call it AstrometricFrame? This would be a frame with one frame attribute: the "origin" coordinate. This would along the lines of what @mhvk and @smaret are proposing, although it has to be a full rotation (rather than just cos(dec) flattening) to account for positions that might be farther away than the small angle approximation allows. Note that the code to do this is already in the GalactocentricFrame transformation - that's actually even more complicated than this because it allows an additional "roll" angle (whereas here we're saying the new y-axis has to point in the same direction as the old y-axis at the astrometric point). We could also add a SkyCoord convenience method to get the astrometric frame of a coordinate, allowing use like coord1.transform_to(coord2.astrometric_frame()), which would then trivially give us the angles we'd need for spherical_offsets.
Perhaps @mhvk, @smaret, or @taldcroft would be interested in implementing this (based on the #4209 conversation)? Although certainly other volunteers are welcome...
I'm confused about the need for a new object AstrometricFrame. It seems to me that if you support the following you have everything:
A function that gives angular separation between two points along the arc of a great circle (which you have)
A function that gives the angle of that great circle at one point, given the other point (which I think you have). If this angle is measured from the direction of increasing longitude to the arc at the first point, (call it theta) then...
Then dlat = arclength*cos(theta) and dlong = arclength*sin(theta). I'm skeptical a function is required to return these values, but if so, surely a new object is not required?
The missing component may be a way to apply that offset, e.g. given dlong, dlat and a starting point, compute the second point (or offset based on arc length and theta if you prefer, but the former is often more user-friendly). Then you have a self-consistent way to offset a point and compute the offset between two points.
@r-owen - that's true in principal, as @PBarmby mentioned in #4209 (comment) . That's what touched off this whole topic in the first place, though: a fair number of users felt this is a valuable convenience method to have.
More importantly for this, though, the AstrometricFrame idea is useful in other contexts as a frame "centered on" a particular point in a particular frame. So if you specify the center of the AstrometricFrame in galactic coordinates, you get a frame centered on that point and aligned to the galactic axes. @cdeil in particular recently mentioned that this is a valuable use case because it makes it easy to convert between "field of view" coordinates in e.g. ICRS and AltAz. So the idea is that this would allow a coordinate to be specified basically as an offset and then transform to just about any other frame.
Activity
Kevtron commentedon Dec 15, 2015
I think I'd like to take a stab at this, but I'll poke around the the code and read over #4209 tomorrow to make sure I understand.
mhvk commentedon Dec 15, 2015
Great! Don't hesitate to ask if things are unclear.
Kevtron commentedon Dec 15, 2015
To clarify the frame, are we looking for essentially a "generalized" galacocentric frame? A la http://docs.astropy.org/en/stable/coordinates/galactocentric.html, but with arbitrary RA and Dec of an object that's not the galactic centre, and without the roll transformation?
Kevtron commentedon Dec 22, 2015
@eteq said
would it make sense to have something like
Should I use QuantityFrameAttribute? Also,
Galactocentrichas a note to update theFrameAttributestoQuantityFrameAttributesonce #3217 is mergedKevtron commentedon Jan 2, 2016
Hold on, looking at this again after the break, do we even need the distance?
mhvk commentedon Jan 3, 2016
@Kevtron - yes, in principle, the distance could be useful too, though for most applications the coordinates will just be
UnitSpherical.Kevtron commentedon Jan 4, 2016
I believe I've got it working, I'll make a PR once I've written up some tests
r-owen commentedon Mar 31, 2016
I'm confused about the need for a new object
AstrometricFrame. It seems to me that if you support the following you have everything:theta) then...Then
dlat = arclength*cos(theta)anddlong = arclength*sin(theta). I'm skeptical a function is required to return these values, but if so, surely a new object is not required?The missing component may be a way to apply that offset, e.g. given
dlong,dlatand a starting point, compute the second point (or offset based on arc length andthetaif you prefer, but the former is often more user-friendly). Then you have a self-consistent way to offset a point and compute the offset between two points.eteq commentedon Apr 4, 2016
@r-owen - that's true in principal, as @PBarmby mentioned in #4209 (comment) . That's what touched off this whole topic in the first place, though: a fair number of users felt this is a valuable convenience method to have.
More importantly for this, though, the
AstrometricFrameidea is useful in other contexts as a frame "centered on" a particular point in a particular frame. So if you specify the center of theAstrometricFramein galactic coordinates, you get a frame centered on that point and aligned to the galactic axes. @cdeil in particular recently mentioned that this is a valuable use case because it makes it easy to convert between "field of view" coordinates in e.g. ICRS and AltAz. So the idea is that this would allow a coordinate to be specified basically as an offset and then transform to just about any other frame.