From 64a5dc5327b4ff4c4c58498b79d6c63b534f52aa Mon Sep 17 00:00:00 2001 From: Soren Wacker Date: Tue, 22 Aug 2023 11:34:29 -0600 Subject: [PATCH] fix issue with peak_rt_of_max --- ms_mint/processing.py | 2 +- tests/test__processing.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ms_mint/processing.py b/ms_mint/processing.py index f4a4bd8..974495d 100644 --- a/ms_mint/processing.py +++ b/ms_mint/processing.py @@ -231,7 +231,7 @@ def extract_ms1_properties(array, mz_mean): peak_max = intensities.max() peak_min = intensities.min() peak_median = np.median(intensities) - + peak_rt_of_max = times[intensities.argmax()] peak_delta_int = np.abs(intensities[0] - intensities[-1]) diff --git a/tests/test__processing.py b/tests/test__processing.py index 4bdd0b5..1bfede9 100644 --- a/tests/test__processing.py +++ b/tests/test__processing.py @@ -48,7 +48,7 @@ def test__process_ms1(): }, # The only value in the extraction window is 3, therefore the expected value is 1 "peak_n_datapoints": {0: 1}, "peak_max": {0: 3}, - "peak_rt_of_max": {0: 3}, + "peak_rt_of_max": {0: 2}, "peak_min": {0: 3}, "peak_median": {0: 3.0}, "peak_mean": {0: 3.0},