Skip to content

Commit

Permalink
Simplify converting units to strings (#508)
Browse files Browse the repository at this point in the history
  • Loading branch information
eerovaher authored Sep 4, 2024
1 parent e634b1f commit 8cc50d9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions gwcs/wcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import astropy.io.fits as fits
import numpy as np
import numpy.linalg as npla
from astropy import units as u
from astropy.modeling import fix_inputs, projections
from astropy.modeling.bounding_box import CompoundBoundingBox
from astropy.modeling.bounding_box import ModelBoundingBox as Bbox
Expand Down Expand Up @@ -2031,16 +2030,12 @@ def find_frame(axis_number):

# index of the axis in this frame's
fidx = frame.axes_order.index(axno)
if hasattr(frame.unit[fidx], 'get_format_name'):
cunit = frame.unit[fidx].get_format_name(u.format.Fits).upper()
else:
cunit = ''

axis_info = _WorldAxisInfo(
axis=axno,
frame=frame,
world_axis_order=self.output_frame.axes_order.index(axno),
cunit=cunit,
cunit=frame.unit[fidx].to_string('fits', fraction=True).upper(),
ctype=cf.get_ctype_from_ucd(self.world_axis_physical_types[axno]),
input_axes=mapping[axno]
)
Expand Down

0 comments on commit 8cc50d9

Please sign in to comment.