Esempio n. 1
0
    def test_spectrum_NLargest(self):
        thisfilter = pyopenms.NLargest()

        new_firstspec = self.exp[0]
        thisfilter.filterSpectrum(new_firstspec)

        self.assertNotEqual(new_firstspec.size(), 0)
        self.assertNotEqual(new_firstspec, self.exp[0])

        # in most cases, a different spectrum is returned
        self.assertNotEqual(new_firstspec[10].getMZ(), self.exp[0][10].getMZ())
        self.assertNotEqual(new_firstspec[10].getIntensity(),
                            self.exp[0][10].getIntensity())
Esempio n. 2
0
    def test_map_NLargest(self):
        thisfilter = pyopenms.NLargest()

        old_firstspec = self.exp[0]
        thisfilter.filterPeakMap(self.exp)

        self.assertNotEqual(self.exp.size(), 0)
        self.assertNotEqual(old_firstspec, self.exp[0])

        # in most cases, a different spectrum is returned
        self.assertNotEqual(old_firstspec[10].getMZ(), self.exp[0][10].getMZ())
        self.assertNotEqual(old_firstspec[10].getIntensity(),
                            self.exp[0][10].getIntensity())