Skip to content

Commit 66b03df

Browse files
fix a slicing error where a -1 on the end-bound index was missing causing an occasional crash.
1 parent 39edf2d commit 66b03df

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

gempy/library/telluric.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ def make_stellar_mask(self, threshold=0.9, grow=1, max_contiguous=40,
312312
self.waves, mask=stellar_mask))
313313
stellar_mask = np.zeros_like(stellar_mask)
314314
for _slice in masked_slices:
315-
if abs(self.waves[_slice.stop] -
315+
if abs(self.waves[_slice.stop - 1] -
316316
self.waves[_slice.start]) <= max_contiguous:
317317
stellar_mask[_slice] = True
318318
if grow > 0:

0 commit comments

Comments
 (0)