示例#1
0
 def test_apod_multiple(self):
     spec = fromBruker(self.filename, False, False)
     spec = apod(spec, w=lambda s: EM(s, 0.), w2=lambda s: GM(s))
     
     test_data = ngp.em(self.data)
     test_data = ngp.gm(test_data)
     
     ts.assert_array_equal(spec, test_data, 'Multiple apodization (EM + GM) failed')
     self.assertEqual("apodization" in spec.history._stepnames, True, 'Apodization not added to Spec history')
示例#2
0
 def test_apod_with_fft(self):
     spec = fromBruker(self.filename, False, False)
     spec = fft1d(spec, 'fft')
     spec = apod(spec, w=lambda s: EM(s, 0.))
     
     test_data = ngp.fft( ngp.em(self.data) )
     ts.assert_array_equal(spec, test_data, 'Apodization with zero filling and FFT failed.')
     self.assertEqual("apodization" in spec.history._stepnames, True, 'Apodization not added to Spec history')
     self.assertEqual(spec.history._stepnames, ['apodization', 'FFT'], 'Spec history not in the correct order (See fapplyBefore)')
示例#3
0
 def test_apod(self):
     spec = fromBruker(self.filename, False, False)
     spec = apod(spec, w=lambda s: EM(s, 0.))
     
     ts.assert_array_equal(spec, ngp.em(self.data), 'Simple EM apodization failed')
     self.assertEqual("apodization" in spec.history._stepnames, True, 'Apodization not added to Spec history %s' %str(spec.history._stepnames))