diff --git a/becquerel/core/peakfinder.py b/becquerel/core/peakfinder.py index c3ebf82a..e3dfe7a8 100644 --- a/becquerel/core/peakfinder.py +++ b/becquerel/core/peakfinder.py @@ -273,7 +273,11 @@ def add_peak(self, xpeak): / bw**2 ) if d2 >= 0: - raise PeakFinderError("Second derivative must be negative at peak") + warnings.warn( + f"Second derivative must be negative at peakposition {xbin}", + PeakFinderWarning, + ) + return d2 *= -1 fwhm = 2 * np.sqrt(self.snr[xbin] / d2) # add the peak if it has a similar FWHM to the kernel's FWHM