Skip to content

Commit

Permalink
Fix resample_combine_spectra.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Kaplan committed Feb 6, 2024
1 parent d49f9c4 commit 979270e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/muler/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def resample_combine_spectra(input_spec, spec_to_match, weights=1.0):
resampled_spec = resample_list(input_spec, spec_to_match) #Resample spectrum
else:
resampled_spec = LinInterpResampler(input_spec, spec_to_match.spectral_axis)
resampled_spec = spec_to_match.__class__( #Ensure resampled_spec is the same object as spec_to_match
spectral_axis=resampled_spec.spectral_axis, flux=resampled_spec.flux, meta=resampled_spec.meta, wcs=None)
resampled_spec = spec_to_match.__class__( #Ensure resampled_spec is the same object as spec_to_match
spectral_axis=resampled_spec.spectral_axis, flux=resampled_spec.flux, meta=resampled_spec.meta, wcs=None)

if is_list(spec_to_match): #Propogate nans from spec_to_match to avoid wierd errors
for i in range(len(spec_to_match)):
Expand Down

0 comments on commit 979270e

Please sign in to comment.