From dd5e5140362d99d8d946178b6412026f89ddffae Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Wed, 20 Nov 2024 15:43:12 +0000 Subject: [PATCH] Fix a apt bug --- gwcs/coordinate_frames.py | 9 ++++----- gwcs/tests/test_coordinate_systems.py | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/gwcs/coordinate_frames.py b/gwcs/coordinate_frames.py index dae9b586..b7581a69 100644 --- a/gwcs/coordinate_frames.py +++ b/gwcs/coordinate_frames.py @@ -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. @@ -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. @@ -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): diff --git a/gwcs/tests/test_coordinate_systems.py b/gwcs/tests/test_coordinate_systems.py index 41040906..61c55f41 100644 --- a/gwcs/tests/test_coordinate_systems.py +++ b/gwcs/tests/test_coordinate_systems.py @@ -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",)