diff --git a/orangecontrib/spectroscopy/preprocess/integrate.py b/orangecontrib/spectroscopy/preprocess/integrate.py index 75af3ee2e..59f0b09bd 100644 --- a/orangecontrib/spectroscopy/preprocess/integrate.py +++ b/orangecontrib/spectroscopy/preprocess/integrate.py @@ -90,10 +90,10 @@ def compute_baseline(self, x, y): return edge_baseline(x, y) def compute_integral(self, x, y_s): - y_s = y_s - self.compute_baseline(x, y_s) if np.any(np.isnan(y_s)): # interpolate unknowns as trapz can not handle them y_s, _ = nan_extend_edges_and_interpolate(x, y_s) + y_s = y_s - self.compute_baseline(x, y_s) return np.trapz(y_s, x, axis=1) def compute_draw_info(self, x, ys):