Skip to content

rename offset_to to offset_byand have it use units #139

Closed
@eteq

Description

@eteq

This idea was triggered by looking at the implementation of another astrowidgets-conforming API in spacetelescope/jdaviz#705 :

  1. I think the offset_to method is better named offset_by. This aligns better with astropy.coordinates and I think it makes it just a bit clearer that you are giving the delta coordinates instead of actual coordinates
  2. I think we can dispense with the skycoord_offset keyword by instead using the units of dx/dy - if they are either pixel or dimensionless that can be interpreted as pixel offsets, and any other unit can assume SkyCoord/other WCS ("other wcs" can be implemented in the future, but I'm just trying not to accidentally specify ourselves out of it)

My proposal would be to keep in offset_to with its current API but have it start raising a deprecation warning (and internally it would call the new offset_by)

And yes, offset_to was my original suggestion. But I think it was wrong after seeing it in action!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions