Skip to content

Commit

Permalink
ensure units are units
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadair committed Sep 26, 2024
1 parent a3fe415 commit 2cdaf7b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions gwcs/coordinate_frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,13 +584,12 @@ def __init__(self, axes_order=(0,), reference_frame=None, unit=None,

if not isiterable(unit):
unit = (unit,)

unit = [u.Unit(un) for un in unit]
pht = axis_physical_types or self._default_axis_physical_types(unit)

super().__init__(naxes=1, axes_type="SPECTRAL", axes_order=axes_order,
axes_names=axes_names, reference_frame=reference_frame,
unit=unit, name=name,
#axis_physical_types="em.wl")
axis_physical_types=pht)

def _default_axis_physical_types(self, unit):
Expand Down

0 comments on commit 2cdaf7b

Please sign in to comment.