Skip to content

Commit

Permalink
Add a multi-dimensional PixelFrame
Browse files Browse the repository at this point in the history
And deprecate Frame2D
  • Loading branch information
Cadair committed Jun 20, 2023
1 parent eadae51 commit 1c20498
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions gwcs/coordinate_frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,30 @@ def _world_axis_object_components(self):
return [(f"{at}{i}" if i != 0 else at, 0, 'value') for i, at in enumerate(self._axes_type)]


class PixelFrame(CoordinateFrame):
"""
A coordinate frame describing pixels.
Parameters
----------
naxes : int
The number of pixel dimensions described by the frame.
name : str, optional
The name of this frame.
axes_names : list of str, optional
The names of the pixel axes.
"""
def __init__(self, naxes, axes_names=None, name=None):
super().__init__(
naxes,
["PIXEL"]*naxes,
axes_order=list(range(naxes)),
unit=[u.pix]*naxes,
axes_names=axes_names,
name=name,
)


class CelestialFrame(CoordinateFrame):
"""
Celestial Frame Representation
Expand Down

0 comments on commit 1c20498

Please sign in to comment.