示例#1
0
 def test_apod_gm(self):
     spec = fromBruker(self.filename, False, False)
     spec = apod(spec, w=lambda s: GM(s, 1, 10, 5))
     C = converter()
     u = guess_udic(self.dic,self.data)
     C.from_bruker(self.dic, self.data, u)
     
     pipe_dic, pipe_data = C.to_pipe()
     test_data = pipep.gm(pipe_dic, pipe_data, g1=1, g2=10, g3=5)[1]        
     ts.assert_allclose(spec, test_data, 1e-7,1e-3, 'GM apodization not equal to NMRPipe processed one.')
示例#2
0
 def test_apod_different_F1F2(self):
     dic, data = self.dic, self.data
     spec2d = fromPipe(self.filename)
     
     
     # 2D FFT using pipe_proc functions
     dic3, data3 = pipep.em(dic, data, 0.2)
     dic3, data3 = pipep.tp(dic3, data3, auto=True)
     dic3, data3 = pipep.gm(dic3, data3, 1, 0.5, 0.5)
     dic3, data3 = pipep.tp(dic3, data3, auto=True)
     
     # test auto class implementation
     apoded = apod(spec2d, F2_w1=lambda s: EM(s, 0.2), F1_w2=lambda s: GM(s, 1, 0.5, 0.5))
     ts.assert_equal(data3, apoded, '2D Apodized spectrum doesnt match pipe_proc.em and gm on F1 and F2')
示例#3
0
#! /usr/bin/env python

import nmrglue.fileio.pipe as pipe
import nmrglue.process.pipe_proc as p

d,a = pipe.read("time_complex.fid")
d,a = p.gm(d,a,g1=5.0,g2=2.0,g3=0.0,c=1.0)
pipe.write("gm.glue",d,a,overwrite=True)

d,a = pipe.read("time_complex.fid")
d,a = p.gm(d,a,g1=2.0,g2=5.0,g3=0.5,c=1.5,start=100,size=654,one=True)
pipe.write("gm2.glue",d,a,overwrite=True)


d,a = pipe.read("time_complex.fid")
d,a = p.gm(d,a,g1=2.0,g2=5.0,g3=0.5,c=1.5,start=100)
pipe.write("gm3.glue",d,a,overwrite=True)