Ejemplo n.º 1
0
 def test_apod_sp(self):
     spec = fromBruker(self.filename, False, False)
     spec = apod(spec, w=lambda s: SP(s, off=0.5, power=2))
     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.sp(pipe_dic, pipe_data, off=0.5, pow=2)[1]        
     ts.assert_allclose(spec, test_data, 1e-7,1e-3, 'SP apodization not equal to NMRPipe processed one.')
Ejemplo n.º 2
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.sp(d, a, off=0.35, end=0.98, pow=2.0, c=1.0)
pipe.write("sp.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.sp(d, a, off=0.10, end=0.75, pow=1.0, c=0.5, size=200, one=True)
pipe.write("sp2.glue", d, a, overwrite=True)
Ejemplo n.º 3
0
# HT
# ps90-180 mode doesn't match
d, a = pipe.read("1D_freq_real.dat")
d, a = p.ht(d, a, mode="ps90-180")
pipe.write("ht4.glue", d, a, overwrite=True)

# Integration tests
# process 2D mixed mode data
d, a = pipe.read("time_real.fid")
d, a = p.gmb(d, a, gb=0.1, lb=-8, c=0.5)
d, a = p.zf(d, a, auto=True)
d, a = p.ft(d, a, alt=True)  # BUG glue seems to double the data...?
d, a = p.ps(d, a, p0=0, p1=0)
d, a = p.tp(d, a, hyper=True)
d, a = p.sp(d, a, off=0.5, pow=2, c=0.5)
d, a = p.zf(d, a, auto=True)
d, a = p.ft(d, a, auto=True)
d, a = p.ps(d, a, p0=0, p1=0)
d, a = p.di(d, a)
pipe.write("2d_mixed_processing1.glue", d, a, overwrite=True)

# process 2D mixed mode data
d, a = pipe.read("time_real.fid")
d, a = p.em(d, a, lb=8)
d, a = p.zf(d, a, auto=True)
d, a = p.ft(d, a, auto=True)
d, a = p.di(d, a)
d, a = p.tp(d, a)
d, a = p.sp(d, a, off=0.5, pow=1, c=0.5)
d, a = p.zf(d, a, auto=True)
Ejemplo n.º 4
0
#! /usr/bin/env python
""" Create files for sp unit test """

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

d, a = pipe.read("time_complex.fid")
d, a = p.sp(d, a, off=0.35, end=0.98, pow=2.0, c=1.0)
pipe.write("sp1.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.sp(d, a, off=0.10, end=0.75, pow=1.0, c=0.5, size=200, one=True)
pipe.write("sp2.glue", d, a, overwrite=True)