Skip to content

Create AstrometricFrame #4339

Closed
Closed

Description

@eteq

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.

From one my comments in #4209 proposing this:

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

Activity

  1. added this to the v1.2.0 milestone on Nov 23, 2015
  2. Kevtron commented on Dec 15, 2015

    @Kevtron

    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.

  3. mhvk commented on Dec 15, 2015

    @mhvk
    Contributor

    Great! Don't hesitate to ask if things are unclear.

  4. Kevtron commented on Dec 15, 2015

    @Kevtron

    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?

  5. Kevtron commented on Dec 22, 2015

    @Kevtron

    @eteq said

    This would be a frame with one frame attribute: the "origin" coordinate.

    would it make sense to have something like

    origin_distance = FrameAttribute()
    origin_ra = FrameAttribute()
    origin_dec = FrameAttribute()

    Should I use QuantityFrameAttribute? Also, Galactocentric has a note to update the FrameAttributes to QuantityFrameAttributes once #3217 is merged

  6. Kevtron commented on Jan 2, 2016

    @Kevtron

    Hold on, looking at this again after the break, do we even need the distance?

  7. mhvk commented on Jan 3, 2016

    @mhvk
    Contributor

    @Kevtron - yes, in principle, the distance could be useful too, though for most applications the coordinates will just be UnitSpherical.

  8. Kevtron commented on Jan 4, 2016

    @Kevtron

    I believe I've got it working, I'll make a PR once I've written up some tests

  9. r-owen commented on Mar 31, 2016

    @r-owen

    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.

  10. eteq commented on Apr 4, 2016

    @eteq
    MemberAuthor

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

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions