Exemple #1
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.add(d, a, r=2.0, i=-1.0)
pipe.write("add1.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.add(d, a, c=10.0)
pipe.write("add2.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.add(d, a, c=10.0, x1=10, xn=400)
pipe.write("add3.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.add(d, a, ri=True, x1=50, xn=300)
pipe.write("add4.glue", d, a, overwrite=True)
Exemple #2
0
d,a = pipe.read("freq_real.ft2")
d,a = p.rft(d,a)
pipe.write("rft11.glue",d,a,overwrite=True)

# HT
# ps90-180 mode doesn't match
d,a = pipe.read("1D_time_real.fid")
d,a = p.ht(d,a,mode="ps90-180")
pipe.write("ht4.glue",d,a,overwrite=True)

# ADD
# the following show the difference way NMRPipe and pipe_proc handle
# when c and r or i (or both) are defined.
d,a = pipe.read("time_complex.fid")
d,a = p.add(d,a,c=10.0,r=5.0,i=3.0)
pipe.write("add5.glue",d,a,overwrite=True)

# the following show the difference way NMRPipe and pipe_proc handle
# when c and r or i (or both) are defined.
d,a = pipe.read("time_complex.fid")
d,a = p.add(d,a,c=1.8,r=2.0,i=1.2)
pipe.write("mult4.glue",d,a,overwrite=True)

# SHUF
# NMRPipe does not ignore imaginary data when passed -rr2ri which can
# results in a double sized file, pipe_proc refuses to do this instead
# choosing to ignore imaginary data.
d,a = pipe.read("time_complex.fid")
d,a = p.shuf(d,a,mode="rr2ri")
pipe.write("s8.glue",d,a,overwrite=True)
Exemple #3
0
#! /usr/bin/env python
""" Create files for add 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.add(d, a, r=2.0, i=-1.0)
pipe.write("add1.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.add(d, a, c=10.0)
pipe.write("add2.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.add(d, a, c=10.0, x1=10, xn=400)
pipe.write("add3.glue", d, a, overwrite=True)

d, a = pipe.read("time_complex.fid")
d, a = p.add(d, a, ri=True, x1=50, xn=300)
pipe.write("add4.glue", d, a, overwrite=True)

Exemple #4
0
#! /usr/bin/env python
""" A collection of test which are known to fail.  These tests fail because of
design differences between NMRPipe and nmrglue, they should not be fixed. """

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

# ADD
# the following show the difference way NMRPipe and pipe_proc handle
# when c and r or i (or both) are defined.
d, a = pipe.read("time_complex.fid")
d, a = p.add(d, a, c=10.0, r=5.0, i=3.0)
pipe.write("add5.glue", d, a, overwrite=True)

# MULT
# the following show the difference way NMRPipe and pipe_proc handle
# when c and r or i (or both) are defined.
d, a = pipe.read("time_complex.fid")
d, a = p.add(d, a, c=1.8, r=2.0, i=1.2)
pipe.write("mult4.glue", d, a, overwrite=True)

# SHUF
# NMRPipe does not ignore imaginary data when passed -rr2ri which can
# results in a double sized file, pipe_proc refuses to do this instead
# choosing to ignore the imaginary data.
d, a = pipe.read("time_complex.fid")
d, a = p.shuf(d, a, mode="rr2ri")
pipe.write("shuf8.glue", d, a, overwrite=True)

# this test will match pipe in the data portion, but NMRPipe mis-sets the
# FDMIN and FDDISPMIN parameters