Skip to content

Commit

Permalink
Fix a apt bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadair committed Nov 20, 2024
1 parent f8cad99 commit dd5e514
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions gwcs/coordinate_frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def __post_init__(self, naxes):
self.axis_physical_types = tuple(ph_type)

@property
def _default_axis_physical_type(self):
def _default_axis_physical_types(self):
"""
The default physical types to use for this frame if none are specified
by the user.
Expand Down Expand Up @@ -416,12 +416,12 @@ def __init__(self, naxes, axes_type, axes_order, reference_frame=None,
axes_type,
unit,
axes_names,
axis_physical_types or self._default_axis_physical_type(axes_type)
axis_physical_types or self._default_axis_physical_types(axes_type)
)

super().__init__()

def _default_axis_physical_type(self, axes_type):
def _default_axis_physical_types(self, axes_type):
"""
The default physical types to use for this frame if none are specified
by the user.
Expand Down Expand Up @@ -494,8 +494,7 @@ def axis_physical_types(self):
These physical types are the types in frame order, not transform order.
"""
apt = self._prop.axis_physical_types or self._default_axis_physical_types
return self._sort_property(apt)
return self._sort_property(self._prop.axis_physical_types)

@property
def world_axis_object_classes(self):
Expand Down
2 changes: 1 addition & 1 deletion gwcs/tests/test_coordinate_systems.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def test_coordinate_to_quantity_error():
coordinate_to_quantity(1, frame=frame)


def test_axis_physical_type():
def test_axis_physical_types():
assert icrs.axis_physical_types == ("pos.eq.ra", "pos.eq.dec")
assert spec1.axis_physical_types == ("em.freq",)
assert spec2.axis_physical_types == ("em.wl",)
Expand Down

0 comments on commit dd5e514

Please sign in to comment.