diff --git a/src/depiction/spectrum/peak_picking/findmf_peak_picker.py b/src/depiction/spectrum/peak_picking/findmf_peak_picker.py index d3952c8..e002b44 100644 --- a/src/depiction/spectrum/peak_picking/findmf_peak_picker.py +++ b/src/depiction/spectrum/peak_picking/findmf_peak_picker.py @@ -37,9 +37,12 @@ def pick_peaks( area=self.area, max_peaks=self.max_peaks, ) - return self.peak_filtering.filter_peaks( - spectrum_mz_arr=mz_arr, - spectrum_int_arr=int_arr, - peak_mz_arr=peak_mz_arr, - peak_int_arr=peak_int_arr, - ) + if self.peak_filtering is not None: + return self.peak_filtering.filter_peaks( + spectrum_mz_arr=mz_arr, + spectrum_int_arr=int_arr, + peak_mz_arr=peak_mz_arr, + peak_int_arr=peak_int_arr, + ) + else: + return peak_mz_arr, peak_int_arr