|
1 | 1 | #! /usr/bin/env python |
2 | 2 | """ Create files for ext unit test """ |
3 | 3 |
|
| 4 | +from subprocess import check_output |
| 5 | + |
4 | 6 | import nmrglue.fileio.pipe as pipe |
5 | 7 | import nmrglue.process.pipe_proc as p |
6 | 8 |
|
|
31 | 33 | d, a = pipe.read("time_complex.fid") |
32 | 34 | d, a = p.ext(d, a, x1=5, xn=200, round=10) |
33 | 35 | pipe.write("ext7.glue", d, a, overwrite=True) |
| 36 | + |
| 37 | + |
| 38 | +pipe_command = """\ |
| 39 | +nmrPipe -in ./time_complex.fid \ |
| 40 | +| nmrPipe -fn FT -auto \ |
| 41 | +-ov -out time-freq.c.ft1""" |
| 42 | +check_output(pipe_command, shell=True) |
| 43 | + |
| 44 | +d, a = pipe.read("time-freq.c.ft1") |
| 45 | +d, a = p.ext(d, a, left=True, sw=True) |
| 46 | +pipe.write("ext8.glue", d, a, overwrite=True) |
| 47 | + |
| 48 | +d, a = pipe.read("time-freq.c.ft1") |
| 49 | +d, a = p.ext(d, a, right=True, sw=True) |
| 50 | +pipe.write("ext9.glue", d, a, overwrite=True) |
| 51 | + |
| 52 | +os.remove("time-freq.c.ft1") |
| 53 | + |
| 54 | + |
| 55 | +pipe_command = """\ |
| 56 | +nmrPipe -in ./time_complex.fid \ |
| 57 | +| nmrPipe -fn FT -auto -di \ |
| 58 | +-ov -out time-freq.r.ft1""" |
| 59 | +check_output(pipe_command, shell=True) |
| 60 | + |
| 61 | +d, a = pipe.read("time-freq.r.ft1") |
| 62 | +d, a = p.ext(d, a, left=True, sw=True) |
| 63 | +pipe.write("ext10.glue", d, a, overwrite=True) |
| 64 | + |
| 65 | +d, a = pipe.read("time-freq.r.ft1") |
| 66 | +d, a = p.ext(d, a, right=True, sw=True) |
| 67 | +pipe.write("ext11.glue", d, a, overwrite=True) |
| 68 | + |
| 69 | +os.remove("time-freq.r.ft1") |
0 commit comments