Skip to content

Commit

Permalink
Use edges in new unit for comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
rosteen committed Nov 4, 2024
1 parent c4b90ed commit 3f30051
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion specutils/manipulation/resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def resample1d(self, orig_spectrum, fin_spec_axis):
if self.extrapolation_treatment == 'zero_fill':
fill_val = 0

orig_edges = orig_spectrum.spectral_axis.bin_edges
orig_edges = orig_axis_in_new.bin_edges
off_edges = (fin_spec_axis < np.min(orig_edges)) | (np.max(orig_edges) < fin_spec_axis)
out_flux_val[off_edges] = fill_val
if new_unc is not None:
Expand Down

0 comments on commit 3f30051

Please sign in to comment.