def __add__(self, other):
        """
        Adds two theoretical spectra by simply merging masses and intensities of both.
        """
        if type(other) is not TheoreticalSpectrum:
            raise TypeError("can't add TheoreticalSpectrum and {}".format(str(type(other))))
        s = self.copy()
        ims.spectrum_add_inplace(s.ptr, other.ptr)
        return s
def __add__ ( self , other ) : if type ( other ) is not TheoreticalSpectrum : raise TypeError ( "can't add TheoreticalSpectrum and {}" . format ( str ( type ( other ) ) ) ) s = self . copy ( ) ims . spectrum_add_inplace ( s . ptr , other . ptr ) return s
Adds two theoretical spectra by simply merging masses and intensities of both.