Skip to content

Commit

Permalink
fixing wavelength dtype in RSS object
Browse files Browse the repository at this point in the history
  • Loading branch information
ajmejia committed Dec 9, 2024
1 parent 1fcb18d commit 591fa98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/lvmdrp/core/rss.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def from_channels(cls, rss_b, rss_r, rss_z, use_weights=True):
# optionally interpolate if the merged wavelengths are not monotonic
fluxes, errors, masks, lsfs, skies, sky_errors = [], [], [], [], [], []
skies_e, skies_w, sky_e_errors, sky_w_errors = [], [], [], []
if numpy.all(numpy.isclose(sampling, sampling[0], atol=1e-6)):
if numpy.all(numpy.isclose(sampling, sampling[0], atol=1e-2)):
log.info(f"current wavelength sampling: min = {sampling.min():.2f}, max = {sampling.max():.2f}")
# extend rss._data to new_wave filling with NaNs
for rss in rsss:
Expand Down Expand Up @@ -1100,7 +1100,7 @@ def get_wave_from_header(self):
if wcs.spectral.array_shape:
res_elements = wcs.spectral.array_shape[0]
wl = wcs.spectral.all_pix2world(numpy.arange(res_elements), 0)[0]
wave = (wl * u.m).to(u.AA).value
wave = (wl * u.m).to(u.AA).value.astype("float32")
wave_disp = wave[1] - wave[0]
wave_start = wave[0]

Expand Down

0 comments on commit 591fa98

Please sign in to comment.