#!/bin/csh
#note this is an example of how to process Z first and still lp for a corrupt point in Y
 
var2pipe -in ./fid -noaswap -aqORD 1 \
  -xN              2048  -yN               104  -zN                56  \
  -xT              1024  -yT                52  -zT                28  \
  -xMODE        Complex  -yMODE        Complex  -zMODE      Rance-Kay  \
  -xSW        12500.000  -ySW        11000.000  -zSW         1264.023  \
  -xOBS         599.737  -yOBS         150.811  -zOBS          60.778  \
  -xCAR           4.821  -yCAR          52.941  -zCAR         121.785  \
  -xLAB              H1  -yLAB             C13  -zLAB             N15  \
  -ndim               3  -aq2D          States                         \
  -out ./data/test%03d.fid -verb -ov
 
 
xyz2pipe -in data/test%03d.fid -x  -verb  -first 1 -last 28       \
| nmrPipe  -fn SOL                                  \
| nmrPipe  -fn SP -off 0.5 -end 0.98 -pow 2 -c 0.5  \
| nmrPipe  -fn ZF -auto                             \
| nmrPipe  -fn FT                                   \
| nmrPipe  -fn PS -p0 33.6  -p1 0.0 -di               \
| nmrPipe  -fn EXT -x1 10ppm -xn 6ppm -sw                        \
| pipe2xyz -out lp/test%03d.ft1 -x


#this is the bad plane in Y so we read it in FT X and TP to Y
#then LP corrupted point and then TP back to X
xyz2pipe -in data/test%03d.fid -x  -verb  -first 29 -last 30      \
| nmrPipe  -fn SOL                                  \
| nmrPipe  -fn SP -off 0.5 -end 0.98 -pow 2 -c 0.5  \
| nmrPipe  -fn ZF -auto                             \
| nmrPipe  -fn FT                                   \
| nmrPipe  -fn PS -p0 33.6  -p1 0.0 -di               \
| nmrPipe  -fn EXT -x1 10ppm -xn 6ppm -sw                        \
| nmrPipe -fn TP                                               \
| nmrPipe -fn LP -before -x1 16 -pred 1 \
| nmrPipe -fn TP                                               \
| pipe2xyz -out lp/test%03d.ft1 -x
 
xyz2pipe -in data/test%03d.fid -x  -verb  -first 31 -last 58       \
| nmrPipe  -fn SOL                                  \
| nmrPipe  -fn SP -off 0.5 -end 0.98 -pow 2 -c 0.5  \
| nmrPipe  -fn ZF -auto                             \
| nmrPipe  -fn FT                                   \
| nmrPipe  -fn PS -p0 33.6  -p1 0.0 -di               \
| nmrPipe  -fn EXT -x1 10ppm -xn 6ppm -sw                        \
| pipe2xyz -out lp/test%03d.ft1 -x
 
 
xyz2pipe -in lp/test%03d.ft1 -z -verb               \
| nmrPipe  -fn SP -off 0.5 -end 0.95 -pow 2 -c 0.5  \
| nmrPipe  -fn ZF -auto                             \
| nmrPipe  -fn FT                                   \
| nmrPipe  -fn PS -p0 0.0 -p1 0.0 -di               \
| pipe2xyz -out lp/test%03d.ft2 -z
 
xyz2pipe -in lp/test%03d.ft2 -y -verb              \
| nmrPipe  -fn LP -fb -ord 10                       \
| nmrPipe  -fn SP -off 0.5 -end 0.98 -pow 2 -c 0.5  \
| nmrPipe  -fn ZF -auto                             \
| nmrPipe  -fn FT                                   \
| nmrPipe  -fn PS -p0 0 -p1 0 -di              \
| pipe2xyz -out lp/test%03d.ft3 -y