:param n_peaks: number of peaks to keep
        :returns: an isotope pattern with removed low-intensity peaks
        :rtype: CentroidedSpectrum

def trimmed(self, n_peaks):
        """
        :param n_peaks: number of peaks to keep
        :returns: an isotope pattern with removed low-intensity peaks
        :rtype: CentroidedSpectrum
        """
        result = self.copy()
        result.trim(n_peaks)
        return result