Skip to content

Commit

Permalink
Remove correct ("less-extreme") minimum in adjacent pairs of minima i…
Browse files Browse the repository at this point in the history
…n get_extrema()
  • Loading branch information
DBerke committed Dec 6, 2023
1 parent b2e09ea commit 1e446ae
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions gempy/library/tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,8 +659,7 @@ def get_extrema(profile, prof_mask=None, min_snr=3, remove_edge_maxima=True):
i = 0
while i < len(extrema) - 1:
if extrema[i][2] == extrema[i+1][2]:
# All minima have -ve the minimum value
if extrema[i][1] > extrema[i+1][1]:
if (extrema[i][1] > extrema[i+1][1]) == extrema[i][2]:
del extrema[i+1]
else:
del extrema[i]
Expand Down

0 comments on commit 1e446ae

Please sign in to comment.