Skip to content

Commit

Permalink
Fix bug handling subregions in true_excise
Browse files Browse the repository at this point in the history
  • Loading branch information
rosteen committed Sep 19, 2024
1 parent 173d806 commit 8edb04c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion specutils/manipulation/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def true_exciser(spectrum, region):

for subregion in region:
# Find the indices of the spectral_axis array corresponding to the subregion
region_mask = (spectral_axis >= region.lower) & (spectral_axis < region.upper)
region_mask = (spectral_axis >= subregion.lower) & (spectral_axis < subregion.upper)
temp_indices = np.nonzero(region_mask)[0]
if excise_indices is None:
excise_indices = temp_indices
Expand Down

0 comments on commit 8edb04c

Please sign in to comment.