Introduction
The NMRPipe system consists of a collection of programs and scripts for manipulating spectral data and molecular structures. Some scripts are written for the UNIX CShell interpreter, while others are written in the TCL scripting language. In particular, spectral processing is performed via Cshell pipeline scripts, using a series of nmrPipe processing functions. Applications written as TCL scripts are executed via nmrWish, our customized version of the "wish" interpreter. TCL scripts can make use of builtin functions that have been added to the interpreter. TCL scripts can also make use of procedures in the NMRPipe TCL/TK library. These are functions written in TCL that provide useful utilities for construction of other scripts.
This reference page lists the following:
Many of these programs and scripts are used frequently in typical sessions with the software. Some facilities, however, may rarely be used, were added only for development purposes, or may be superseded by more recent additions to the software. In an attempt to indicate which commands and options are used most frequently, the reference list includes an instance count. In the current version of this Reference List, the instance count tallies how often NMRPipe's developer Frank Delaglio has used a command or option in a script during both routine use and research and development of the software. Note that this scheme will underestimate the importance of interactive commands like "nmrDraw", which are used often, but seldom included in another script.
Name  Instances  Description  Common Arguments (Instances) 
ACME  2  Graphical interface of the ACME system for extraction of COSY couplings; actually a script which invokes view2D.tcl with appropriate arguments.  
DC  49  Standalone program for fitting or simulating dipolar couplings or protein backbone chemical shifts. See Also: NMRWish/DYNAMO TCL commands dynSimulate dc and dynSimulate cs. 
pdb (28)
verb (28)
inD (25)
outD (25)
euler (8)
svd (5)
inCS (4)
outCS (4)
nofixed (3)

IMATH  4  Print the results of a mathematical expression as an integer, for performing math in Cshell scripts. Actually a script which invokes the M macro interpreter.  
M  8  Standalone version of the NMRPipe MAC macro language interpreter. 
quit (8)
str (6)
var (3)

MATH  20  Print the results of a mathematical expression as a floating point value, for performing math in Cshell scripts. Actually a script which invokes the M macro interpreter.  
addNMR  50  Combine NMRPipeformat files by addition, subtraction, etc. 
in1 (50)
in2 (50)
out (50)
sub (35)
add (7)
c1 (4)
c2 (4)
mul (4)
il (1)

addNoise  7  Add Gaussianrandom noise to NMRPipeformat data.  
addTabVar  76  Add a variable (new column) to an NMRPipeformat table. 
in (76)
var (76)
start (76)
col (4)

bin2pipe  41  Generic utility to convert binary data to NMRPipeformat data. 
xN (39)
xT (39)
xMODE (39)
xSW (39)
xOBS (39)
xLAB (39)
xCAR (37)
ndim (37)
in (35)

bruk2pipe  212  Convert Bruker timedomain data to NMRPipeformat data; see also the bruker command for creating format conversion scripts. 
xN (206)
xT (206)
xMODE (206)
xSW (206)
xOBS (206)
xCAR (206)
xLAB (206)
ndim (206)
aq2D (193)

bruker  212  Graphical interface for Bruker spectrometer format conversion; actually a script which invokes conv.tcl to produce a bruk2pipe conversion script.  
byteAdjust  9  Manipulate binary data for format conversion, such as integertofloat conversion. 
in (9)
iws (5)
ows (5)
out (5)
is (4)
bo (4)
last (3)
s2f (2)
d2f (2)

byteSwap  1  Byteswap binary data for format conversion.  
clustTab  10  Identify clusters (overlapping groups) of objects based on their coordinates in an NMRPipeformat table. OBSOLETE: replaced by clustTab.tcl. 
in (10)
out (10)
x (10)
dist (10)

delta  2  Graphical interface for JEOL Delta spectrometer format conversion; actually a script which invokes conv.tcl to produce a delta2pipe conversion script.  
delta2pipe  2  Convert JEOL Delta timedomain data to NMRPipeformat data; see also the delta command for creating format conversion scripts. 
in (2)
out (2)

extract2D  1  Extract a smaller 2D region from an NMRPipeformat 2D plane. OBSOLETE: replaced by standalone command readROI.  
flagLoc  1  Utility for extracting commandline arguments from a Cshell script; returns the location of a flag on the command line.  
getArgD  3  Utility for extracting commandline arguments from a Cshell script; sets the value of a variable according to a flag on the command line. 
pdb (1)
r1 (1)
rN (1)

getCols  4  Extract one or more columns from a text table. See also getTabCol.tcl and getTabInfo.tcl. 
 (1)

getListArgD  1  Utility for extracting commandline arguments from a Cshell script; extracts a list of values associated with a flag on the command line.  
getParm  1  Standalone program to extract parameters such as size and spectral width from NMRPipeformat data, commonly used to make spectral parameters available to Cshell scripts.  
imClassify  1  Image analysis utility; creates a single binarized image acording to values in an image series.  
interp2D  1  Increase the size of an NMRPipeformat allreal spectrum using Fourier interpolation.  
killShell  1  Utility to kill a group of UNIX processes associated with the given program name.  
lst  1  Utility for listing or removing files according to their age.  
modelXY  233  Standalone program for fitting and monte carlo error analysis of X/Y data pairs, using a function specified via the NMRPipe MAC macro language. See Also: the NMRWish TCL command of the same name, modelXY 
macro (232)
gc (232)
p (230)
tol (230)
cf (227)
noise (225)
x (224)
y (224)
id (214)

mstat  4  Print summary statistics (such as average and standard deviation) of a column in a text table.  
nlinLS  47  General purpose multidimensional lineshape fitting of NMRPipeformat data. Usually invoked via autoFit.tcl. 
in (47)
out (47)
maxf (47)
iter (47)
noise (47)
mod (47)
norm (46)
w (44)
data (25)

nmr2Mask  1  Create a thresholdbased binary mask from an NMRPipeformat allreal spectrum, with optional labeling of contiguous regions in the result.  
nmrCsh  1  Utility used to launch NMRPipe parallel processing scripts on a single multiCPU computer. See also: nmrShell, waitFor.  
nmrDraw  334  Interactive interface for displaying NMRPipeformat spectral data, with facilites for processing, phasing, and peak detection. NOTE: nmrDraw (with uppercase D) is a script which runs the program nmrdraw with an appropriate collection of arguments; the nmrdraw program is generally NOT invoked directly.  
nmrPipe  9768  Spectral processing of NMRPipeformat spectral data stream. Generally NOT invoked directly, but instead used in a UNIX pipeline via a Cshell script. 
fn (9201)
di (1329)
verb (993)
out (691)
in (639)
ov (631)
noWr (86)
noRd (77)
inPlace (62)

nmrRecon  11  Reconstruct NMRPipeformat data from vector decomposition results, for example from program pcaNMR. 
score (11)
load (11)
out (11)
ndim (7)

nmrShell  1  Utility for networkbased parallel processing with NMRPipe. NOTE: use simpler script nmrCsh For processing on a multiCPU computer. See also: program waitFor  
nmrTerm  1  Utility script for creating a terminal window; usually not invoked directly, but instead used by other NMRPipe scripts to run programs in the background.  
nmrWish  420  NMRPipe's customized version of the TCL/TK interpreter wish, augmented with over 200 commands for manipulation of spectral and structural data. NOTE: not usually invoked directly, but instead used via a TCL script with the .tcl extension.  
nocr  1  Utility for removing carriagereturn characters so that Windowsformat text files can be used with UNIX commands and NMRPipe.  
pcaNMR  17  Principal Component Analysis for vector decomposition of NMRPipeformat data. 
nc (17)
in (17)
load (17)
pca (9)
score (8)
noavg (8)
nomask (8)
noverb (7)
noise (1)

pcaTab  1  Principal Component Analysis of data in an NMRPipeformat table.  
pipe2ft  1  Convert NMRPipeformat data to the FTNMR format.  
pipe2spiff  3  Convert NMRPipeformat data to the SPIFF image data format. 
out (3)
verb (3)
ov (3)
in (1)

pipe2xyz  465  Write the results of a 3D or 4D NMRPipeformat stream as an NMRPipeformat file series. Also used to write NMRPipeformat 1D4D data stream as an NMRViewformat file (See One Moon Scientific for more information about Bruce Johnson's NMRView) 
out (464)
z (149)
x (135)
y (134)
ov (113)
inPlace (82)
verb (41)
to (20)
a (15)

plotXY  1  Crude X/Y text plot of two columns from a text table.  
printf  29  Commandline utility for formatted printing in the style of the Cprogramming language, often used in Cshell scripts to generate NMRPipestyle data file names. 
stdout (12)
stderr (12)

readROI  16  Utility for extracting and saving a regionofinterest (ROI) from NMRPipe format spectral data. Actually a TCL script which invokes the NMRWish BuiltIn Function of the same name, readROI. 
in (16)
x (16)
ndim (14)
dy (11)
silent (10)
out (6)
real (5)
imag (5)
y (5)

scale2D  31  Extract and print the minimum and maximum intensity values in an NMRPipeformat data file.  
seriesTab  17  Extract maximum intensities or summations for peak regions in an NMRPipeformat 2D spectral series, using an NMRPipeformat 2D peak table as input. 
in (17)
list (17)
out (17)
dx (17)
dy (17)
verb (17)
max (15)
xzf (13)
yzf (13)

setfdata  1  Set the value of a location in the header of an NMRPipeformat data file. See Also: sethdr.  
sethdr  35  Set the value of a named parameter in the header of an NMRPipeformat data file. See Also: NMRPipe program getparm. 
ndim (14)
tau (11)
zN (11)
zT (10)
zMODE (10)
zFT (10)
zSW (10)
zOBS (10)
zCAR (10)

showApod  1  Estimate the noise level in an NMRPipeformat spectrum, and backcalculate the timedomain noise level according to the window functions (apodization) that were applied during processing. See Also: NMRPipe Processing Function MEM (Maximum Entropy Reconstruction).  
showfdata  1  List the values in each location of the header in an NMRPipeformat data file. See Also: NMRPipe programs getParm, setfdata, and showhdr.  
showhdr  7  Summarize the parameters in the header of an NMRPipeformat data file. 
verb (4)

simSpecND  30  Add simulated multidimensional signals to an existing NMRPipeformat allreal spectrum, given an NMRPipeformat peak table as input. 
in (30)
mod (30)
w (30)
data (22)
apod (19)
list (8)

simTD  31  Create simulated NMRPipeformat 2D timedomain data. OBSOLETE: replaced by simTimeND. 
xt (30)
yt (30)
off (22)
in (8)
out (8)
xf (6)
yf (6)
rms (5)
ov (4)

simTimeND  11  Create simulated NMRPipeformat multidimensional timedomain data, given an NMRPipeformat peak table as input. 
in (11)
ndim (11)
aq2D (11)
xN (9)
yN (9)
xT (9)
yT (9)
xMODE (9)
yMODE (9)

sortTab  1  Sort the lines in an NMRPipeformat table.  
tkrm  1  Utility to list programs which are using X11 graphics as a means of interprocess communication, in the style of the TCL/TK send command; also used to remove obsolete entries in the list of such programs.  
var2pipe  63  Convert Varianformat timedomain data to NMRPipeformat data. 
xN (60)
xT (60)
xMODE (60)
xSW (60)
xOBS (60)
xCAR (60)
xLAB (60)
ndim (60)
in (59)

varAdjust  1  Strips internal parameter information between vectors in Varianformat timedomain data. OBSOLETE. See: varAdjust.tcl  
varian  63  Graphical interface for Varian spectrometer format conversion; actually a script which invokes conv.tcl to produce a var2pipe conversion script.  
waitFor  39  Synchronize NMRPipe parallel processing schemes. See Also: nmrShell and nmrCsh. 
par (39)
ext (39)
cpu (21)
init (18)
verb (6)

xNotify  6  Utility to display a message in a popup window.  
xyz2pipe  443  Read a 3D or 4D NMRPipeformat input, to create a stream for processing via the nmrPipe program. 
in (442)
verb (355)
z (188)
x (178)
par (38)
cpu (34)
y (26)
a (18)
ri2c (5)

zero2D  1  Set the all intensities of an NMRPipeformat file to zero; often used when creating simulated spectral data with simSpecND. 
Function  Instances  Description  Common Arguments (Instances) 
ADD  0  Add a Constant  
APOD  11  Apply the Selected Window (Apodization) 
inv (7)
hdr (7)
qName (4)
q1 (4)
q2 (4)
q3 (4)

BASE  9  Linear Baseline Corrections 
first (8)
last (8)
nw (8)
nl (6)

CBF  20  Subtract Constant Baseline  
COADD  31  Linear Combination of Data Vectors 
cList (30)
axis (27)
time (25)

CS  48  Circular Shift 
rs (37)
sw (37)
neg (27)
ls (10)
1ppm (5)
inv (1)

DX  0  Derivative  
EM  35  Exponential Multiply Window 
lb (34)
c (18)

EXT  487  Extract Region 
sw (455)
xn (317)
x1 (306)
left (157)
yn (7)
y1 (6)

FSH  2  Frequency Shift via Fourier Transform 
ls (1)
sw (1)

FT  1597  Complex Fourier Transform 
inv (178)
auto (111)
neg (53)
alt (25)
bruk (17)
real (11)

GM  54  LorentztoGauss Window 
g1 (53)
g2 (53)
c (53)
g3 (5)

GMB  0  Gaussian Window  
HA  0  Hadamard Transform  
HT  155  Reconstruct Imaginary Data Via Hilbert Transform 
auto (90)
ps90180 (4)

IMG  5  Image Processing Functions 
median (3)
dx (2)
dy (2)
kern (1)
min (1)
thresh (1)

INTEG  0  Integral  
JMOD  0  Damped JModultion  
LP  198  Linear Prediction 
ord (148)
fb (93)
pred (74)
xn (46)
ps00 (28)
ps90180 (18)

LS  0  Left Shift  
MAC  187  Mlanguage MACRO Processing 
macro (186)
all (67)
var (25)
str (14)
reg (9)
dif (6)

MC  29  Modulus (Magnitude) Calculation for Complex Data 
p0 (4)
p1 (4)

MED  2  Baseline Correction via Local Median 
nw (1)

MEM  50  ND Maximum Entropy Reconstruction 
sigma (49)
report (46)
ndim (42)
alpha (21)
zero (18)
xconv (17)

MIR  2  Form Mirror Image  
ML  22  Maximum Likelihood Frequency Map 
xfSize (12)
ndim (11)
yfSize (10)
xlw (8)
sign (7)
report (5)

MULT  92  Multiply by a Constant 
xn (69)
c (63)
hdr (24)
inv (6)
r (4)
i (2)

NULL  7  Null Function; Leave Data Unchanged  
POLY  169  Polynomial TimeDomain Solvent Subtraction 
time (169)

POLY  562  Polynomial FrequencyDomain Baseline Correction 
auto (390)
ord (134)
xn (20)
x1 (20)
window (3)
nw (3)

PS  1333  Phase Correction 
p0 (1176)
p1 (1167)
hdr (150)
inv (89)
ls (2)
rs (2)

QART  6  Scale Quad Artifacts 
a (5)
f (5)

QMIX  5  General Linear Combination of Data Vectors 
ic (5)
oc (5)
cList (5)
time (5)
0,1 (1)

REV  17  Reverse Data 
sw (2)

RFT  0  Real Fourier Transform  
RS  22  Right Shift 
rs (21)
sw (11)

SAVE  0  Save Current 1D Data Vector  
SET  43  Set Data to Constant 
r (25)
c (15)
x1 (9)
xn (8)

SHUF  15  Shuffle Data (Exchange Reals and Imaginaries, etc) 
exlr (7)
ri2c (2)
bswap (2)
swap (1)
c2ri (1)
r2i (1)

SIGN  11  Sign Manipulation (Negate, etc) 
alt (7)
i (3)

SMO  3  Smooth Data via Convolution Filter  
SOL  208  Solvent Filter 
head (16)
mir (16)
fl (2)

SP  1357  Adjustable Sine Bell Window 
off (1204)
end (1160)
pow (1148)
c (1143)
inv (117)
hdr (117)

TM  0  Trapezoid Window  
TP  892  2D Transpose XY>YX (YTP) 
hyper (47)
nohdr (7)
auto (2)

TRI  2  Triangle Window 
loc (1)

ZD  0  Zero Diagonal Region  
ZF  1580  Zero Fill 
auto (941)
size (284)
zf (169)
inv (122)
mid (11)
pad (3)

ZTP  35  3D Transpose XYZ>ZYX 
Name  Instances  Description  Common Arguments (Instances) 
addFC.tcl  0  Add or replace the FC forceconstant value for selected atoms in table.  
addPDBNoise.tcl  0  Add random values to coordinates in a PDB file; commonly used for validation and error estimation.  
addTabNoise.tcl  0  Add random noise to selected values in an NMRPipeformat table; commonly used for validation and error estimation.  
addTabVar.tcl  4  Add a variable (column) to an NMRPipeformat table. 
in (4)
var (4)
after (4)
fmt (4)
val (4)

adjShift.tcl  8  Add an offset adjustment to ppm values in a TALOSformat chemical shift table. 
in (8)
out (8)
atom (8)
adj (8)

angles.tcl  0  List the backbone angles in one or more PDB files. Replaced by dynAngles.tcl.  
apod.com  20  Create 1D apodization files used for 1D timedomain models. See also: autoFit.tcl  
apod.tcl  0  Demo script for interactive display of an NMRPipe apodization window.  
appendTab.tcl  0  Append two NMRPipeformat tables.  
autoFit.tcl  17  General purpose lineshape fitting of 1D, 2D, 3D and pseudo3D NMRPipeformat data. 
specName (17)
inTab (14)
series (8)
simName (5)
outTab (3)
thresh (2)
difName (2)
dX (2)
modX (1)

clustTab.tcl  0  Perform cluster analysis on an NMRPipeformat table.  
cmpFDATA.tcl  0  Compare the header values of two NMRPipeformat data files.  
cont.tcl  0  Utility to consolidate lines in PostScript contour plots produced with NMRPipe tools.  
conv.tcl  0  Graphical interface for Spectrometer data format conversion; invoked by commands varian, bruker, and delta.  
convEuler.tcl  0  Convert XYZformat Euler angles to a different format, such as ZYZ.  
cs2pk.tcl  0  Create a synthetic peak table from a chemical shift table for common triple resonance experiments such as CBCANH.  
dc2xplor.tcl  0  Convert a DYNAMO format dipolar coupling table to XPLOR format.  
dcConvert.tcl  7  Convert XPLOR format Dipolar Coupling Data to DYNAMO format. 
in (7)
pdb (7)
seg (7)

dcEnsemble.tcl  0  SVD Fit of Dipolar Couplings for an Ensemble of PDB Files.  
dcEval.tcl  0  Summarize agreement with dipolar couplings and backbone chemical shifts for each residue in a PDB file.  
dcNoise.tcl  0  Add random noise to values in an NMRPipeformat dipolar coupling table; used in validation and error estimation.  
deco.tcl  5  Decompose an NMRPipeformat 1D spectrum as a linear combination of others. 
in (4)
inList (4)

diffTab.tcl  0  List X/Y differences between two assigned tables; used to extract coupling data from two related peak tables for IP/AP (inphase/antiphase) spectra.  
dosyView.tcl  0  Crude utility to view 1D evolution curves from a 2D interferogram.  
draw1D.tcl  0  Demo script for 1D drawing.  
dyn2di.tcl  0  Create  
dynAngles.tcl  0  Print or display backbone and sidechain angles from a PDB.  
dynAvg.tcl  3  Compute an average molecular structure. 
align (3)
r1 (3)
rN (3)
in (3)
out (3)

dynBasicExt.tcl  0  General utility to perform a DYNAMO molecular structure annealing scheme; commonly used to generate extended structures as a starting point for other calculations.  
dynCenter.tcl  6  Adjust coordinates of a PDB structure to center it at the origin. 
in (6)
out (6)

dynEval.tcl  0  Evaluate a PDB file's agreement with the collection of DYNAMO molecular structure restraints.  
expDemo.tcl  0  Demo script for X/Y fitting of an exponential curve.  
findPDBSurf.tcl  0  Estimate the solventaccessible surface of a PDB structure.  
fitTab.tcl  0  An example of generalpurpose X/Y fitting of values from a table.  
fixCS.tcl  0  Apply offset correction to values in a TALOSformat chemical shift table.  
fixPDB.tcl  0  Adjust a PDB for use in TALOS/DYNAMO database applications, for example by adding hydrogen atoms if needed.  
fragSA.tcl  0  Utility to refine fragments found in an NMR homology search (MFR, Molecular Fragment Replacement)  
getTabCol.tcl  0  Extract a column from an NMRPipeformat table; used to access table data from within a Cshell script.  
getTabInfo.tcl  0  Extract table information, such as number of entries (rows) from an NMRPipeformat table; used to access table data from within a Cshell script.  
getTabRow.tcl  0  Extract a row from an NMRPipeformat table; used to access table data from within a Cshell script.  
gif2roi.tcl  0  Convert a GIF format grayscale image to an NMRPipe regionofinterest (ROI).  
gmcEdit.tcl  0  Graphical interface for specifying sequence data to create a DYNAMO structure calculation environment.  
imageView.tcl  0  Graphical interface for viewing and multivariate analysis of an image series such as a chemical shift image (3D spectral image).  
ipap.tcl  3  Graphical interface to assign peaks in an NMRPipeformat peak table based on existing amide assignments. 
assName (2)
single (2)
inName (2)
specName (2)
jx (2)
jy (2)
inName1 (1)
inName2 (1)
specName1 (1)

j2dyn.tcl  0  Convert a table of Jcoupling values into DYNAMOformat molecular calculation restraints.  
jConvert.tcl  4  Convert XPLOR format JCoupling Data to DYNAMO format. 
in (4)
pdb (4)
seg (3)

mapPDB.tcl  2  Map a parameter onto the temperature column of a PDB file, as a crude visualization tool. 
in (2)
tab (2)
out (2)
inVar (2)
noseg (2)
vMin (2)
vMax (2)
all (2)

mask.tcl  0  Create a binarized mask from NMRPipeformat data.  
mfr.tcl  77  Conduct an NMR Parameter Homology Search for structure analysis by Molecular Fragment Replacement (MFR). 
out (61)
ref (31)
daRef (28)
drRef (28)
rms (23)
ramaT (23)
csT (23)
rxRef (22)
ryRef (22)

mfr2dyn.tcl  2  Convert results of a Molecular Fragment Replacement (MFR) homology search into DYNAMO structural restraints. 
mfr (2)
pdb (2)
maxRank (2)
seg (2)
dHi (2)
ac (2)

mfr2euler.tcl  0  Estimate relative orientation between two dipolar coupling alignment tensors from NMR homology search results (MFR, Molecular Fragment Replacement)  
mfr2init.tcl  10  Create a protein structure based on average phi and psi backbone angles from a Molecular Fragment Replacement (MFR) homology search.  
mfr2surf.tcl  5  Create phi/psi distribution surfaces from Molecular Fragment Replacement (MFR) homology search results.  
mfr2torsion.tcl  0  Extract backbone torsion restraints from NMR homology search results.  
modelExp.tcl  9  Utility for fitting peak evolution curves to exponential functions. Replaced by fitXY.tcl  
mstat.tcl  0  Apply TCL script statistics functions to data from an NMRPipeformat table.  
name2torsion.tcl  0  Convert a text file of named torsions such as phi and psi into DYNAMOformat molecular calculation restraints.  
noeConvert.tcl  10  Convert XPLOR format NOE distance data to DYNAMO format. 
in (10)
pdb (10)
seg (9)
min (1)
max (1)

nusSort.tcl  5  Utility for expanding and reordering NonUniformly Sampled (NUS) NMRPipeformat data. 
in (5)
out (5)
prof (5)
sample (5)

orientDC.tcl  3  Find the optimal orientation between two domains in a PDB file using dipolar couplings. 
ref (3)
pdb (3)
exit (2)
dc (1)

ov.tcl  16  Compute the coordinate alignment and overlay between related PDB molecular structures. 
ref (16)
in (16)
r1 (7)
rN (7)
noverb (3)
norot (2)
hdr (2)

pcaLP.com  5  Utility for 2D Linear Prediction using Principal Component Analysis decomposition. 
inDir (5)
outDir (5)
ordX (5)
ordY (5)
nc (5)
thresh (5)
extra (5)
ps00 (2)
xLP (1)

pdb2ac.tcl  17  Extract DYNAMO atomic coordinate restraints from a PDB file. 
in (17)
seg (17)
fc (15)
dHi (8)
id (5)
center (4)
atom (3)
dx (3)
nohdr (3)

pdb2dyn.tcl  0  Extract DYNAMO residue creation data from a residue in a PDB; used to help add new residue types for DYNAMO structure calculation.  
pdb2gmc.tcl  15  Use sequence information in a PDB file to create a DYNAMO structure calculation environment. 
in (15)
seg (15)
gmc (15)
nohelix (12)
out (11)
rasmol (7)
noext (2)
cont (1)
append (1)

pdb2hms.tcl  0  Create data needed for DYNAMO ringcurrent chemical shift calculation.  
pdb2torsion.tcl  6  Extract DYNAMO torsion restraints from a PDB file. 
seg (6)
in (6)
ref (6)
dPhi (6)
pPsi (6)
nohdr (4)
id (4)
hdr (2)

pdbSelect.tcl  2  Select DYNAMO PDB files based on energy values recorded in their header data; used to select lowest energy structures, etc. 
n (2)
pdb (2)

pdbTrans.tcl  0  Apply a rotation or translation to a PDB molecular structure.  
peakHN.tcl  15  Utility for automated peak detection of a 2D amide HNN spectrum or projection; used a simple way to generate coordinates for a strip plot overview of 3D spectra. 
proj (15)
in (15)
out (15)
hi (15)

pipe2tiff.tcl  0  Convert NMRPipeformat data to  
pipe2txt.tcl  0  Convert NMRPipeformat data to ASCII text listing the intensity values at each point.  
pix.tcl  0  Demo script for spectral reading and drawing.  
pkFilter.tcl  0  Extract columns from an NMRPipeformat peak table; used to create a simplified table for direct manipulation and viewing.  
plot1D2D.tcl  0  Example script for 2D hardcopy PostScript plot generation with 1D projections.  
plot3d.tcl  0  Example script for PostScript plotting of 2D planes in an NMRPipeformat 3D spectrum.  
plotTab.tcl  2  Display simple XY plot of two columns from an NMRPipeformat table. 
in (2)
x (2)
y (2)
z (2)
select (2)
xMin (1)
xMax (1)
yMin (1)
yMax (1)

proj2D.tcl  0  Create 2D projections from NMRPipeformat 3Dspectra.  
proj3D.tcl  35  Form 2D projections from a 3D NMRPipeformat spectrum 
in (34)
abs (24)

rama.tcl  0  Graphical interface for TALOS.  
randDel.tcl  2  Randomly delete entries in a table; used in crossvalidation and error estimation. 
in (2)
out (2)
del (2)
iseed (2)
noverb (2)
keep (1)

renamePDB.tcl  0  Rename PDB atoms to conform with DYNAMO protocol, for example convert amide atom name H to HN.  
resProbCS.tcl  0  Compute residuetype probability based on chemical shift.  
resetLW.tcl  0  Adjust the linewidth values in an NMRPipeformat peak table, commonly to provide better starting values for lineshape fitting.  
resetPhiPsi.tcl  6  Reset the backbone angles in a protein PDB structure, commonly to make an extended structure or helix. 
in (6)
out (6)
pdb (3)
verb (3)
noall (3)

rotDC.tcl  9  Add tensor information to a PDB file; crude method to visualize results from Dipolar Coupling analysis. 
pdb (9)
in (9)
rx (8)
out (6)
ignore (5)
noaxis (5)
nohalo (5)
ry (4)
halo (4)

rotPCS.tcl  0  Add tensor information to a PDB file; crude method to visualize results from PseudoContact Shift analysis.  
scale.tcl  5  Find the factor which minimizes the difference in the residual between two NMRPipeformat data files. 
in1 (5)
in2 (5)
mask (5)
ndim (5)
window (5)
step (5)
out (5)
noverb (5)
def (5)

scaleDI.tcl  0  Set or scale values in a dipolar coupling table.  
scanCS.tcl  6  Create phi/psi surfaces showing regions most favored according to backbone chemical shifts.  
scroll.tcl  78  General purpose strip viewing tools for one or more related NMRPipeformat 3D spectra. 
in (78)
tab (78)
hi (76)
pair (68)
lab (13)
zw (9)
xVar (6)
yVar (6)
xName (4)

scrollRama.tcl  9  Graphical interface for viewing ramachandran trajectories for one or more PDB files, or for fragment results from a Molecular Fragment Replacement (MFR) homology search. 
pdb (9)
mfr (6)
pdbColor (6)
ref (6)
mfrColor (2)
r1 (1)
rN (1)

selectTab.tcl  0  Utility for extracting lines from a table according to a given condition.  
seq2gmc.tcl  13  Use sequence information from a table such as a TALOS chemical shift table to create a DYNAMO structure calculation environment. 
in (13)
seg (13)
gmc (13)
rasmol (9)
out (3)
helix (3)

seq2ss.tcl  0  Crude estimation of secondary structure from residue sequence.  
series.com  11  Reset the headers of a 2D NMRPipeformat spectral series to create a Pseudo3D result.  
shift2tab.tcl  0  Convert PIPPformat assignments to NMRPipetable format.  
showCS.tcl  3  Display observed versus calculated chemical shifts. 
in (3)
nograph (1)
noverb (1)

showDC.tcl  8  Display observed versus calculated dipolar couplings. 
in (8)
single (2)

showEvolve.tcl  0  Graphical interface for displaying evolution curves, such as results from analysis of 2D relaxation series.  
showSim1D.tcl  0  Graphical interface for displaying 1D lineshape fitting results.  
sim1D.tcl  0  Utility for creating 1D synthetic data from lineshape fitting results.  
simAB.tcl  0  Example of simultaneous fitting of two dipolar coupling tensors.  
simCS.tcl  0  Utility for calculating backbone chemical shifts for a protein PDB.  
simPCS.tcl  2  Utility for calculating backbone chemical shifts for a protein PDB. 
in (2)
out (2)
noverb (2)
pdb (1)

simple.tcl  0  Demo script illustrating spectral drawing.  
splitPDB.tcl  0  Create individual PDB files from a PDB with multiple MODEL structures.  
splitSeg.tcl  0  Create individual PDB files from a PDB with multiple SEGID structures.  
ss.tcl  5  Analyze a PDB structure for secondary structure classification and hydrogen bonds. 
dssp (5)
pdb (5)
verb (5)

star2cs.tcl  0  Convert STAR format data to TALOSformat chemical shift table.  
stripPlot.tcl  0  Create PostScript plots of strips from 3D NMRPipeformat spectra.  
svdPoly.tcl  0  Polynomial fitting of X/Y data.  
svdTab.tcl  0  Perform leastsquares decomposition on data in an NMRPipetable.  
talos.tcl  0  TALOS  prediction of phi and psi protein backbone angles using chemical shifts.  
talos2dyn.tcl  6  Convert TALOS protein backbone angle predictions to DYNAMO molecular structure calculation restraints. 
in (6)
pdb (6)
seg (6)
id (3)

talos2shift.tcl  0  Convert TALOS chemical shift table to format with multiple shifts per row.  
talos2xplor.tcl  0  Convert TALOS backbone angle predictions to XPLORformat restraints.  
torsionConvert.tcl  6  Convert XPLORformat torsions into DYNMAMO molecular structure calculation restraints. 
in (6)
pdb (6)
seg (6)
id (1)
fc (1)

txt2bin.tcl  0  Convert ASCII text values to binary data.  
txt2pipe.tcl  0  Convert ASCII text values to NMRPipeformat data.  
updateTab.tcl  0  Update the chemical shift positions in an NMRPipeformat peak table, based on the positions recorded in points.  
varAdjust.tcl  0  Utility to adjust Varianformat fid data, to reorder interleaved data or to separate multiple experiments.  
view2D.tcl  0  Graphical interface to view two or more 2D spectra in overlay mode.  
vina.tcl  0  TALOS  prediction of phi and psi protein backbone angles using chemical shifts. 
Name  Instances  Description  Common Arguments (Instances) 
buildHdr  15  Create and set an NMRPipeformat data file header; often used to create synthetic data. 
xN (15)
xT (15)
xMODE (15)
xSW (15)
xOBS (15)
xCAR (15)
xLAB (15)
ndim (15)
xFT (13)

decoNMR  3  Matrix decomposition of NMRPipeformat data by nonlinear leastsquares. 
rdata (2)
fdata (2)
noise (2)
thresh (2)
verb (2)
step (2)
tol (2)
nc (2)
help (1)

defineCell  219  Define a cell, which is a spectral drawing region on the screen or PostScript page. 
x (219)
cell (219)
y (218)
win (138)
verb (47)
roiRef (8)
cellRef (4)

drawBox  39  Draw a rectangular outline in the spectral graphics area of the screen or a PostScript page. 
x (39)
y (39)
fg (39)
cell (11)
roi (3)

drawLine  80  Draw a line in the spectral graphics area of the screen or a PostScript page. 
x (80)
fg (79)
y (71)
cell (62)
roi (26)
roiRef (18)
thick (9)

drawROI  285  Draw spectral data (a RegionofInterest, or ROI) in a graphics area of the screen or a PostScript page. 
roi (285)
cell (279)
bg (239)
hi (185)
color1 (108)
color2 (103)
fg (101)
axis (96)
plev (77)

drawRec  179  Draw a filled rectangle in the spectral graphics area of the screen or a PostScript page. 
x (179)
y (179)
fg (179)
cell (98)
noupdate (34)
roiRef (16)
roi (11)
win (6)
extendedColor (1)

drawSettings  21  Adjust the parameters for drawing in the spectral graphics area of the screen or PostScript page. 
reset (19)
extendedColor (2)

drawText  125  Draw text in the spectral graphics area of the screen or a PostScript page. 
x (125)
y (125)
text (125)
fg (106)
cell (102)
yOff (37)
bg (35)
center (24)
roiRef (21)

dynAlign  64  Find the translation and rotation that minimizes the difference in coordinates between two related molecular structures. 
aSrc (64)
refSrc (62)
r1 (59)
rN (59)
a1 (59)
atom (15)
apply (15)
verb (15)
max (4)

dynCopy  0  Copy a DYNAMO object. Currently, only copies a PDB object.  
dynCreate  0  Create a DYNAMO object.  
dynDestroy  0  Destroy (deallocate) DYNAMO object and the resources associated with it. Same as dynFree. Currently, only works for PDB, CS (Chemical Shift) and DC (Dipolar Coupling) objects.  
dynDynamics  3  Take a dynamics step in a simulated annealing molecular structure calculation. 
src (3)
timeStep (3)
tempControl (3)
temp (3)
init (1)

dynEnergy  4  Evaluate the energy at a given step of a simulated annealing molecular structure calculation. 
src (4)
bond (4)
dist (4)
angle (4)
improper (4)
torsion (4)
j (4)
dt (4)
ac (4)

dynEuler  20  Find possible XYZformat rotational angles associated with a given rotation matrix, or find the rotation angles that map one rotation onto another.  
dynEval  9  Evaluate the energy of a given structure. 
src (9)
dc (1)
j (1)
angle (1)
uangle (1)
improper (1)
torsion (1)
bond (1)
ac (1)

dynFree  121  Same as dynDestroy 
src (4)
cs (4)
pdb (1)
dc (1)

dynGet  0  Gets a DYNAMO parameter.  
dynGetAlpha  0  Get the alpha torsion angle CA(i1) CA(i) CA(i+1) CA(i+2).  
dynGetAngle  0  Gets the angle formed by the three specified atoms.  
dynGetAtomInfo  0  Get the parameters associated with an atom, such as atom name, residue name, and coordinates.  
dynGetChi  12  Get the Chi sidechain angle. 
src (12)
res (12)
all (11)
chi1 (1)

dynGetCoord  17  Get the coordinates of one or more atoms. 
src (17)
atomEntry (17)
verb (10)
dyn (1)

dynGetDist  19  Get the distance between two specified atoms. 
src (19)
atomI (13)
atomJ (13)
contact (6)
verb (6)
dist (6)

dynGetInfo  266  Get information associated with a DYNAMO object; commonly, used to extract the first and last residue ID in a molecular structure. 
src (264)
res (65)
resName (60)
all (10)
extent (6)
segName (3)
limits (3)
seg (2)
atomName (2)

dynGetKappa  0  Get the Kappa angle CA(i2) CA(i) CA(i+2).  
dynGetNAAngles  2  Get angles from a Nucleic Acid structure. 
src (2)
res (2)

dynGetOmega  12  Get the Omaga torsion angle CA(i1) C(i1) N(i) CA(i). 
src (12)
res (12)

dynGetPDBStr  25  Create a text entry describing an atom in the form of a PDB ATOM line. 
resID (21)
resName (21)
atomName (21)
chain (21)
x (21)
y (21)
z (21)
atomID (4)

dynGetPhi  5  Get the protein backbone torsion angle phi C(i1) N(i) CA(i) C(i). 
src (5)
res (5)

dynGetPhiPsi  111  Get the protein backbone torsion angle pair phi and psi. 
res (111)
src (111)
phi (1)
psi (1)

dynGetPsi  5  Get the protein backbone torsion angle psi N(i) CA(i) C(i) N(i+1). 
src (5)
res (5)

dynGetTorsion  3  Get the torsion associated with the four named atoms. 
src (3)
atomI (3)
atomJ (3)
atomK (3)
atomL (3)

dynHomology  8  Compute a simple residue type homology score for two amino acid sequences of the same length. 
refSrc (8)
aSrc (8)
r1 (8)
rN (8)
a1 (8)

dynInit  300  Initialize the DYNAMO structure manipulation environment. 
fast (106)
nowarn (43)
warn (6)

dynRama  6  Compute a ramachandran statistic for the backbone angles of a protein or fragment. 
refSrc (6)
aSrc (6)
a1 (6)
r1 (5)
rN (5)
s1 (1)
sN (1)

dynRead  593  Read a table or molecular structure for the DYNAMO structure manipulation environment. 
in (593)
pdb (372)
verb (191)
dc (110)
src (66)
r1 (65)
rN (65)
cs (58)
atomName (55)

dynRestore  32  Restore molecular coordinates which were first saved by dynStore 
src (2)

dynRotate  37  Apply a 3D rotation to the given molecular structure. 
rx (37)
ry (37)
rz (37)
src (34)
all (31)
verb (6)
center (3)
inv (2)

dynSearch  20  Perform NMR Homology Search (Molecular Fragment Replacement) 
search (16)
src (12)
pdbName (8)
r1 (6)
rN (6)
init (4)
cs (4)
homoW (4)
ramaW (4)

dynSelect  54  Select atoms according to the specified conditions, such as by residue name, etc. 
src (52)
res (21)
atom (19)
list (19)
atomName (16)
clear (12)
glob (7)
seg (6)
r1 (6)

dynSet  0  Set a DYNAMO parameter, such as the temperature in a simulated annealing schedule.  
dynSetAtomInfo  0  Set the information associated with an atom, such its coordinates.  
dynSetAtomName  0  Set the atom name for the selected atom.  
dynSetChain  26  Sets the PDB chain name associated with a molecular structure. 
src (26)
chain (22)
id (4)

dynSetChainMode  46  Allow PDB chain name to be ignored when selected and identifying atoms. 
ignore (46)

dynSetChi  0  Set the given protein sidechain angles.  
dynSetCoord  4  Set the coordinates of the given atom. dynSetInfo Set information associated with a DYNAMO object. 
src (4)
atomEntry (4)
x (2)
y (2)
z (2)
charge (1)
occ (1)

dynSetOmega  0  Set the omega angle CA(i1) C(i1) N(i) CA(i).  
dynSetPhiPsi  131  Set the protein backbone angles phi C(i1) N(i) CA(i) C(i) and psi N(i) CA(i) C(i) N(i+1). 
src (131)
res (131)
phi (131)
psi (131)
store (99)

dynSetResName  0  Set the residue name.  
dynSetSeg  10  Set the PDB Segment Name. 
src (10)
seg (6)

dynSetSegMode  47  Allow PDB segment name to be ignored when selected and identifying atoms. 
ignore (47)

dynSetTempFactor  0  Set the temperature factor for a DYNAMO annealing scheme.  
dynSetTemperature  0  Set the temperature for a stage in a DYNAMO annealing scheme.  
dynSetTensor  43  Set the parameters associated with an alignment tensor, as used in dipolar coupling and pseudocontact shift calculation. 
dc (42)
da (32)
dr (32)
dadr (27)
auto (22)
rxRef (16)
ryRef (16)
rzRef (16)
rotref (15)

dynSimulate  239  Calculate NMR parameters from structure, including backbone chemcial shifts, dipolar couplings, pseudocontact shifts, and Jcouplings. 
src (239)
a1 (160)
s1 (140)
sN (140)
dc (129)
verb (72)
cs (56)
svd (48)
r1 (42)

dynStore  0  Store a temporary copy of a PDB structure's coordinates.  
dynSurface  19  Compute the solventaccesible surface. 
refSrc (14)
aSrc (14)
r1 (14)
rN (14)
a1 (14)
src (5)
r (2)
tol (2)
verb (1)

dynTransform  7  Apply rotation and translation to a molecular structure. 
src (4)
all (4)
center (3)
reset (2)
verb (2)
m (1)
apply (1)

dynTranslate  15  Apply translation to a molecular structure. 
src (15)
all (12)
center (8)
tx (7)
ty (5)
tz (5)
verb (2)

dynWrite  274  Write the DYNAMO table or molecular structure. 
out (273)
src (167)
pdb (161)
verb (106)
rem (83)
dc (47)
cs (33)
renumber (10)
j (9)

fixHdr  0  Adjust an NMRPipeformat header to handle byteswapping.  
freeCell  0  Remove the definition of a spectral drawing area (cell) on the screen or PostScript page.  
freeROI  0  Delete the spectral data region (ROI, regionofinterest).  
gammaq  0  Calculate the Incomplete Gamma Function Value  
gdbAddNote  40  Add a text entry, such as a comment line, to a GDB Database table.  
gdbAppend  3  Append one GDB table after another; commonly, this will be done for two tables which have the same number of columns. See Also: gdbJoin 
src (3)
dest (3)

gdbCheck  2  Test the integrity of the GDB database. 
verb (2)

gdbCreate  279  Create a GDB database object; commonly used to add a variable (column) or entry (row) to a table. 
name (122)
parent (116)
varType (87)
varFmt (87)

gdbDelNote  2  Delete a given text entry in a GDB database table.  
gdbDestroy  94  Delete GDB database object; commonly used to delete the contents of a table when it is no longer needed. 
verb (1)

gdbFindByName  104  Find a GDB object by its name; commonly used to find a particular variable (column) in a given table.  
gdbFirst  176  Find the first entry (row) in a table.  
gdbFree  79  Same as gdbDestroy.  
gdbGet  2684  Extract the value associated with a database cell, which is a particular value in a table, specified by its entry (row) and variable (column).  
gdbGetInfo  543  Get information about an object in the GDB database; commonly used to get a list of entries (rows) in a table. 
parms (542)
params (1)

gdbInit  157  Initialize the GDB database engine; usually not needed, because this step is performed automatically the first time that a table is read by the gdbRead command.  
gdbJoin  0  Join two tables along the rows; commonly, this will be done for two tables which have the same number of rows.  
gdbLast  6  Find the last entry (row) in a GDB database table.  
gdbNext  237  Find the next entry in a GDB database.  
gdbPrev  9  Find the previous entry in a GDB database.  
gdbRead  643  Read a NMRPipeformat database table or PDB file into the GDB database engine. 
in (643)
name (129)
pdb (70)
verb (53)
 (3)
hetatm (3)

gdbReverse  0  Reverse the order of GDB objects, such as entries (rows) in a table.  
gdbSelect  322  Perform a database Query, i.e., select entries from a GDB table according to one or more conditions. 
from (322)
cond (322)
inPlace (67)
M (61)
new (23)
tcl (13)
mSQL (5)
vars (1)

gdbSet  408  Set the value associated with a database cell, which is a particular value in a table, specified by its entry (row) and variable (column).  
gdbSetInfo  0  Set the information associated with a GDB database object.  
gdbSetVal  8  Same as gdbSet  
gdbSort  7  Sort the data in a GDB database table according to a given column (variable). OBSOLETE: replaced by the more flexible function gdbSortTab.  
gdbSortTab  5  Sort the data in a GDB database table according to a given column (variable). 
down (1)
abs (1)

gdbSwap  0  Swap the order of two objects in a GDB database, such as two entries (rows) in a table.  
gdbTest  0  Test whether a GDB cell (value at a given row and column) has data or is empty.  
gdbWrite  116  Write the GDB database table. 
noverb (21)
pdb (16)
verb (1)

geco  0  Genetic Algorithm for Combinatorial Optimization.  
getBinary  0  Get the value at a pointer location in a binary array as a hex number.  
getCellInfo  37  Get the graphics coordinates and parameters associated with a cell, which is a spectral drawing region on the screen or a PostScript page. 
cell (35)
win (12)
x (5)
y (5)
roi (3)

getParm  217  Get the named numerical parameter, such as size or spectral width, from an NMRPipeformat data header in a binary array. See also: TCL script function rdFDATA, nmrWish commands buildHdr and sysMemory.  
getParmStr  90  Get the named text parameter, such as axis label, from an NMRPipeformat data header in a binary array. See also: nmrWish functions getParm and sysMemory.  
getPtrStr  4  Get the packed text at a pointer location in a binary array.  
getPtrVal  248  Get the numerical value at a pointer location in a binary array.  
getROIInfo  333  Get information associated with a an ROI (region of interest), specifically binary data pointers to the spectral data and header, and the sizes of each dimension of the ROI. See also: nmrWish functions readROI, getParm, getPtrVal, and the nmrWish binary vector functions . 
roi (333)

incrPtr  62  Return a new nmrWish binary data pointer after incrementing the location that it references.  
incrPtrVar  0  Adjust variable whose value is an nmrWish binary data pointer.  
modelXY  18  Nonlinear least squares fitting of X/Y data pairs with monte carlo error analysis, according to a fitting function specified in TCL. 
y (18)
p (18)
x (14)
macro (14)
gc (14)
noverb (11)
noise (10)
tol (8)
res (8)

newScreen  58  Clear the graphics screen. See also: drawROI. 
win (22)

nmrExec  0  Execute an NMRPipe processing function on nmrWish binary data. See also: nmrInit, nmrFree.  
nmrFree  0  Deallocate information for using an NMRPipe processing function within nmrWish. See also: nmrInit and nmrExec.  
nmrInit  0  Initialize information and resources so that NMRPipe vector processing functions can be applied to nmrWish binary data.  
pcaNMR  0  Principal Component Analysis matrix decomposition on spectral data in a region of interest (ROI). See also: readROI, reconNMR.  
pdbAngle  14  Get the angle formed by three atoms in a PDB file, using nmrWish GDB database entries.  
pdbCoords  0  Get the coordinates and other information of associated with an atom in a PDB file, using nmrWish GDB database entries.  
pdbDist  11  Get the distance between atoms in a PDB file, using nmrWish GDB database entries.  
pix2spec  74  Convert a pixel location in a spectral drawing area into spectral units such as PPM. See also: defineCell, readROI, drawROI 
cell (74)
units (74)
roi (72)
x (40)
y (36)
win (17)
roiRef (2)

pkFindROI  82  Perform peak detection on the given spectral region of interest (ROI). See also: readROI. NOTE: this command overwrites the given ROI spectral data. 
roi (81)
sigma (81)
pChi (81)
plus (81)
minus (81)
dx (81)
idx (81)
out (81)
tol (80)

pkLabelROI  0  Perform component labeling on the given spectral region of interest (ROI). See also: readROI, pkFindROI.  
plotClose  59  Close the current PostScript plot file. See also: plotOpen, defineCell, drawROI.  
plotOpen  40  Open a PostScript plot file for creating hardcopy spectral graphics. See also: defineCell, readROI, drawROI 
color (36)
landscape (34)
paper (17)
plotName (13)
tray (4)
portrait (3)
c1Width (2)
c1Height (2)
lwPlus (1)

plotSend  0  Send a finished PostScript plot file to the printer.  
plotSettings  2  Adjust the settings for PostScript plot generation. 
reset (2)

plotWrite  6  Write text into the current PostScript plot file.  
pnt2spec  96  Convert a point location to a location in spectral units such as PPM, given an NMRPipeformat header as nmrWish binary data.  
pnt2specW  4  Convert a width specified in points to a width specified in spectral units such as Hz, given an NMRPipeformat header as nmrWish binary data.  
rand  81  Return a uniformly distributed or gaussian random number. See also: srand. 
gauss (8)

readROI  676  Read a region of interest (ROI) from NMRPipeformat data. 
roi (675)
in (654)
ndim (525)
x (366)
y (290)
verb (103)
dy (90)
z (62)
dx (54)

reconNMR  4  Reconstruct NMRPipeformat data from decomposition results produced by pcaNMR. 
x (4)
y (4)
z (4)
c (2)

setBinary  0  Set the hex value at a pointer location in a binary array.  
setCellKey  0  Associate information with a spectral drawing area (cell).  
setParm  221  Set the named numerical parameter, such as size or spectral width, in an NMRPipeformat data header in a binary array. See also: TCL script function rdFDATA, nmrWish commands buildHdr and sysMemory.  
setParmStr  2  Set the named text parameter, such as size or spectral width, in an NMRPipeformat data header in a binary array.  
setPtrStr  0  Set the packed text value at a pointer location in a binary array.  
setPtrVal  134  Set the numerical value at a pointer location in a binary array.  
setROIKey  0  Associate data with a spectral region of interest (ROI). See also: readROI, drawROI.  
spec2pix  215  Convert a location in spectral units such as PPM to a pixel location in a spectral drawing area and a particular regionofinterest (ROI). See also: defineCell, readROI, drawROI. 
cell (215)
roi (123)
x (109)
y (106)
win (38)
nofold (7)
roiRef (4)

spec2pnt  17  Convert a location in spectral units such as PPM to a point location in a particular regionofinterest (ROI). See also: readROI.  
spec2pntW  18  Convert a width spectral units such as Hz to a width in points for a particular regionofinterest (ROI). See also: readROI.  
srand  108  Set the random number seed for the rand random number generation function.  
strcasecmp  1239  Compare two strings, caseinsensitive.  
strcmp  288  Compare two strings, casesensitive.  
svdLinSol  15  Use Singular Value Decomposition to solve a linear least squares matrix problem. 
x (15)
y (15)

swapHdr  0  Perform byteswap on the NMRPipeformat header in an nmrWish binary data array.  
sysByteSwap  0  Perform byteswap on data in an nmrWish binary data array.  
sysClose  28  Close a binary data file previously opened with sysOpen.  
sysFree  46  Deallocate a binary data array previously allocated by sysMalloc.  
sysMalloc  79  Allocate an nmrWish binary data array, return a pointer which references the array.  
sysOpen  37  Open a binary data file or pipeline command for reading or writing. See also: sysRead, sysWrite, sysClose.  
sysRead  19  Read binary data into an nmrWish binary data array, with automatic byteswapping. Nonblocking form (returns immediately if no data is available). See also: sysOpen, sysReadB.  
sysReadB  0  Read data into an nmrWish binary data array, with automatic byte swapping. Blocking version (stops until data is available, used for reading pipelines rather then files). See also: sysOpen, sysReadB.  
sysReadBNS  0  Same as sysReadB, but without automatic byte swapping.  
sysReadNS  0  Same as sysRead, but without automatic byte swapping.  
sysSeek  0  Move to a particular location in a binary data for reading or writing. See also: sysOpen, sysRead, sysWrite.  
sysTime  29  Return the current time in seconds and milliseconds.  
sysWrite  37  Write binary data from an nmrWish binary data array, with automatic byteswapping. Nonblocking form (returns immediately if no data is available). See also: sysOpen, sysWriteB.  
sysWriteB  0  Write binary data from an nmrWish binary data array, with automatic byteswapping. Blocking form (stops until data can be written, used for writing to pipelines rather then files). See also: sysOpen, sysWriteB.  
system  10  Execute a UNIX command.  
testHdr  0  Test the NMRPipeformat file header data in an nmrWish binary array, to determine if the data needs to be byteswapped. See also: rdFDATA, fixHdr, sysOpen, sysRead.  
updateHdr  5  Update the PPM calibration information for the NMRPipeformat header an nmrWish binary array. See also: rdFDATA, setParm.  
vACos  0  Apply function to nmrWish floatingpoint binary data: arc cosine.  
vASin  0  Apply function to nmrWish floatingpoint binary data: arc sine.  
vAbs  9  Apply function to nmrWish floatingpoint binary data: absolute value.  
vAbsCor  0  Perform an optical absorbance correction to floatingpoint binary data.  
vAvg  0  Compute the average of values in floatingpoint binary data.  
vBinarize  2  Binarize (set to 1 or 0) values in floatingpoint binary data according to their range.  
vByteSwap  2  Apply byteswap to nmrWish binary data.  
vCos  0  Apply function to nmrWish floatingpoint binary data: cosine.  
vEstNoise  29  Estimate the noise level of spectral data in an in an nmrWish floatingpoint binary data array. See also: sysRead, readROI.  
vExp  0  Apply function to nmrWish floatingpoint binary data: exponential.  
vInterp  0  Perform linear interpolation on floatingpoint binary data.  
vLinSol  5  Perform linear least squares computation on floatingpoint binary data. 
xPtr (5)
yPtr (5)
aPtr (5)
ePtr (5)
eCount (5)
vCount (5)
cCount (5)
eJump (5)
vJump (5)

vLog  0  Apply function to nmrWish floatingpoint binary data: logarithm.  
vMax  60  Find the maximum value in an nmrWish floatingpoint binary data array.  
vMaxAbs  0  Find the maximum absolute value in an nmrWish floatingpoint binary data array.  
vMaxLoc  2  Find the point location of the maximum value in an nmrWish floatingpoint binary data array.  
vMedian  0  Find the median value in an nmrWish floatingpoint binary data array.  
vMin  44  Find the minimum value in an nmrWish floatingpoint binary data array.  
vMinAbs  0  Find the minimum absolute value in an nmrWish floatingpoint binary data array.  
vMinLoc  0  Find the point location of the minimum value in an nmrWish floatingpoint binary data array.  
vNeg  0  Apply function to nmrWish floatingpoint binary data: negate.  
vPDF  0  Utility for Probability Surface generation.  
vPDFCoords  2  Utility for Probability Surface generation.  
vRMS  13  Find the root mean square (RMS) of values in an nmrWish floatingpoint binary data array.  
vResize  2  Resize a 1D, 2D or 3D data matrix in an nmrWish floating point data array using Fourier interpolation. 
src (2)
ndim (2)
xSize (2)
ySize (2)
xZF (2)
yZF (2)

vRev  0  Reverse the order of points in an nmrWish floatingpoint binary data array.  
vSin  0  Apply function to nmrWish floatingpoint binary data: sine.  
vSort  3  Sort the values in an nmrWish floatingpoint binary data array.  
vStdDev  3  Find the standard deviation of values in an nmrWish floatingpoint binary data array.  
vSum  27  Find the average of values in an nmrWish floatingpoint binary data array.  
vSurface  72  Add a term to a ramachandran distribution; used to general phi/psi surfaces for chemical shifts, etc. 
sPtr (72)
val (72)
xSize (72)
ySize (72)
xfw (72)
yfw (72)
x0 (72)
y0 (72)
dPtr (27)

vsAdd  0  Scalar operation on nmrWish floatingpoint binary data: add a constant.  
vsDiv  7  Scalar operation on nmrWish floatingpoint binary data: divide by a constant.  
vsFix  2  Scalar operation on nmrWish floatingpoint binary data: set data to zero if its absolute value is less then or equal to a constant.  
vsIntegLoc  5  Find the location of the point where the integral (simple sum) of an nmrWish floatingpoint binary data array becomes larger then a given constant.  
vsMult  15  Scalar operation on nmrWish floatingpoint binary data: multiple by a constant.  
vsPower  0  Scalar operation on nmrWish floatingpoint binary data: raise to a power.  
vsSet  21  Scalar operation on nmrWish floatingpoint binary data: set values to a constant.  
vsSub  0  Scalar operation on nmrWish floatingpoint binary data: subtract a constant.  
vvAdd  3  VectorVector operation on floatingpoint nmrWish binary data: addition.  
vvCast  2  VectorVector operation on floatingpoint nmrWish binary data: type conversion (such as integer to float).  
vvDiv  2  VectorVector operation on floatingpoint nmrWish binary data: divide.  
vvDot  14  VectorVector operation on floatingpoint nmrWish binary data: dot product.  
vvMove  18  VectorVector operation on floatingpoint nmrWish binary data: copy.  
vvMove2  4  Multiple vector copying for floatingpoint nmrWish binary data.  
vvMult  32  VectorVector operation on floatingpoint nmrWish binary data: multiply.  
vvSub  5  VectorVector operation on floatingpoint nmrWish binary data: subtract.  
vvSwap  0  VectorVector operation on floatingpoint nmrWish binary data: exchange contents of two vectors.  
writeImage  22  Create and save an image in TIFF format using three nmrWish spectral data arrays for the red, green, and blue channels. See also: readROI, Standalone program pcaNMR, nmrWish function pcaNMR. 
out (22)
x (13)
y (13)
gif (11)
roiR (9)
roiG (9)
roiB (9)
tiff (4)
iRMax (3)

writeROI  169  Write a spectral data regionofinterest (ROI) as NMRPipeformat data. 
roi (168)
out (168)
ov (158)
verb (14)
help (1)

Name  Instances  Description  Common Arguments (Instances) 
arg2array  0  Store a list of arguments on the command line in a TCL array.  
dynEvalTensor  0  Compute Dipolar Coupling or PseudoContact Shift tensor parameters for a timestep in a DYNAMO molecular structure calculation.  
dynExit  36  Exit from a DYNAMO molecular structure calculation.  
dynGetPDBDisuList  2  Identify atom pairs likely to be involved in SS bonds from a PDB file read as a DYNAMO object.  
dynGetPDBSeqStr  7  Create DATA SEQUENCE lines from the residue sequence in a PDB file read as a DYNAMO object.  
dynNAAngles  0  Extract angles associated with Nucleic Acid PDB file read as a DYNAMO object.  
dynReadGMC  61  Read a DYNAMO molecular structure calculation GMC environment (GMC, Generic Molecular Coordinates). 
gmc (61)
pdb (61)
r1 (28)
rN (28)
torsion (27)
ac (9)
uangle (1)
noe (1)

dynSimulateAnnealing  60  Perform a DYNAMO Simulated Annealing Calculation with Initialization, HighTemperature, and Cooling Stages. 
graph (59)
print (59)
sa (59)
fc (56)
rasmol (47)
nocenter (19)
notensorProc (16)
tensorProc (12)
norasmol (8)

estSpecNoise  12  Estimate the standard deviation of the baseline noise in the named NMRPipeformat data.  
expand  0  Expand a string into a list of its individual characters.  
extractArray  0  TCL Array Manipulation  
extractSaupe  8  Dipolar Coupling Analysis Utility  
findClusters  5  List Manipulation Cluster Analysis on Objects in a List  
flagLoc  1298  Find the location of a flag in the command line.  
get15NDim  11  Return the axis name of the 15N dimension in an NMRPipeformat header.  
get15NTabVar  21  Get the name of the variable (column) in an NMRPipeformat peak table associated with amidenitrogen (15N) chemical shift in PPM.  
getAbsMax  6  Return Find the value with the greatest absolute value in a list.  
getAbsMin  0  Return Find the value with the smallest absolute value in a list.  
getArgD  2525  Extract the named argument's value from the command line if it can be found.  
getArgDN  32  Set a TCL array variables from an argument's value in the command line if it can be found.  
getArrayList  2  Extract array contents as a list.  
getAtomEntry  4  Find an atom's entry (row number) in a PDB file.  
getAvg  72  Return Find the average of values in a list.  
getAvgAngle  31  Returns the average of a list of angles in degrees.  
getChi2  0  Computes the chisquare statistic on the difference between two lists, given the corresponding uncertainties.  
getChiAngle  2  Extract chi sidechain angles for a given residue in a PDB file.  
getDefinedAngles  3  Returns a list of angles in degrees with "undefined" values (> 999) removed.  
getDim  0  Return the dimension location (1, 2, etc) associated with the axis name in an NMRPipeformat header.  
getDimKeyword  18  Return the keyword (CUR_XDIM, CUR_YDIM, etc) associated with the axis name in an NMRPipeformat header.  
getDirectDim  11  Return the axis name of the directlyacquired dimension in an NMRPipeformat header.  
getEListAvg  13  Get the average of values for a GDB database table variable (column) from a list of entries (rows).  
getEListMax  0  Get the maximum value of a GDB database table variable (column) from a list of entries (rows).  
getEListMin  0  Get the minimum value of a GDB database table variable (column) from a list of entries (rows).  
getEListStat  11  Apply a given TCL function to compute a statistic using a list of entries (rows) from a GDB database table.  
getEListStdDev  0  Get the standard deviation for a GDB database table variable (column) from a list of entries (rows).  
getEListSum  0  Get the sum of values for a GDB database table variable (column) from a list of entries (rows).  
getEListVals  0  Extract all values associated with a GDB database table variable (column) from a list of entries (rows).  
getFileBytes  6  Returns the size of a file in bytes, with options for compressed data. 
estimate (3)
exact (1)

getFirstLevel  6  Spectral Data Manipulation  
getFormat  0  Reformat values in list, for example to give a uniform number of decimal places.  
getHNTabVar  21  Get the name of the variable (column) in an NMRPipeformat peak table associated with amideproton (HN) chemical shift in PPM.  
getHist  4  Build histogram values for lists of X/Y pairs.  
getIndirectDim  8  Return the "third dimension" axis name in an NMRPipeformat header for amidedetected 3D data.  
getIndirectTabVar  14  Get the name of the variable (column) in an NMRPipeformat peak table associated with the "third" dimension chemical shift of an amidedetected 3D data.  
getIota  0  Return a numeric list with equal spacing between values.  
getKeyData  26  Get the DATA information associated with a given keyword.  
getListArgD  307  Extract the named argument's list of values from the command line if it can be found.  
getMax  97  Return Find the maximum value in a list.  
getMaxRes  15  Extract the largest residue number from a PDB file read as a GDB database table.  
getMedian  27  Find the median of values in a list, return value is an average of two values for lists with even numbers of points.  
getMin  79  Return Find the minimum value in a list.  
getMinRes  14  Extract the smallest residue number from a PDB file read as a GDB database table.  
getNAAngles  2  Extract angles associated with Nucleic Acid PDB file read as a GDB database table.  
getNAResName3  0  Return the 3character residue name associated with the given nucleaic residue name.  
getNthResName  29  Get the name of the given residue in a PDB file.  
getNthTensor  79  Extract tensor parameters from a Dipolar Coupling result.  
getOmegaAngle  9  Extract omega backbone angles for a given residue in a PDB file.  
getPChi  2  Return the Chisquare probability given a list of residuals, their associated uncertainties, and the number of degrees of freedom.  
getPDBDisuList  2  Identify atom pairs likely to be involved in SS bonds from a PDB file read as a GDB database table.  
getPDBSeqList  3  Extract sequence information from a PDB file read as a GDB database table.  
getPDBSeqStr  0  Create DATA SEQUENCE lines from the residue sequence in a PDB file read as a GDB database table.  
getPDF  5  Create a 1D probability density distribution from lists of X/Y pairs.  
getPDFCoords  4  Get coordinates for the Xaxis of a 1D probability density function.  
getParmI  93  Extract an integer parameter from an NNRPipeformat header.  
getPearsonR  12  Return the Pearson's R correlation coefficient.  
getPhiPsiAngles  18  Extract phi/psi backbone angles for a given residue in a PDB file.  
getQuadSize  4  Return 1 if the given dimension is realonly, 2 if complex.  
getRMS  48  Return the RMS (Root Mean Square) of values in a list.  
getROIStat  14  Perform a computation on intensities from a given spectral regionofinterest (ROI.  
getRange  0  Return the range (maximum  minimum) of values in a list.  
getRepeat  0  Create a list by repeating a value.  
getResName1  36  Return the 1character residue name associated with the given amino acid residue name.  
getResName3  19  Return the 3character residue name associated with the given amino acid residue name.  
getReverse  2  Returns a list with the order of its items reversed.  
getSaupeAngle  17  Compute the angle between two Dipolar Coupling alignment tensors.  
getScale  0  Return the value that minimizes the residual between values in two lists.  
getSeqList  62  Extract residue sequence information from DATA statements in a table into a TCL array.  
getSeqListSeqStr  2  Create DATA SEQUENCE lines from the residue sequence list.  
getSequence  0  Extract the protein residue sequence from a PDB file read as a GDB database table.  
getSimpleMedian  0  Find the median of values in a list; return value is always an element from the list.  
getSpecRange  0  Spectral Data Manipulation Find the ranges of intensities in an NMRPipeformat data file.  
getStdDev  56  Return the standard deviation of values in a list.  
getStdDevAngle  36  Returns the standard deviation of a list of angles in degrees.  
getSum  18  Return the sum of values in a list.  
getSumSq  8  Return Find the sum of squares of values in a list.  
getTabAvg  3  Get the average of values of a variable (row) in a GDB database table.  
getTabKeyItem  0  Get the value associated with a given DATA keyword in a table.  
getTabKeyLength  3  Get a number of items associated with a DATA keyword in a table.  
getTabKeyList  0  Get a list of DATA keywords in a table.  
getTabMax  32  Get the maximum value of a variable (row) in a GDB database table.  
getTabMin  26  Get the minimum value of a variable (row) in a GDB database table.  
getTabStat  0  Apply a given TCL function to compute a statistic using all values extracted from a GDB database table variable (column).  
getTabStatU  2  Apply a given TCL function to compute a statistic using all values extracted from a GDB database table variable (column), with undefined values skipped.  
getTabStdDev  0  Get the standard deviation of values of a variable (row) in a GDB database table.  
getTabSum  0  Get the sum of values of a variable (row) in a GDB database table.  
getTabTextCount  0  Get the number of text items in a table.  
getTabTextInfo  0  Extract table text items into a TCL array.  
getTabVals  7  Extract all values associated with a GDB database table variable (column).  
getTau  2  Extract the Tau value from the given NMRPipeformat data file.  
getVsStat  12  Computes a statistic on the difference of two numerical lists of the same length.  
getWAvg  24  Return Find the weighted average of values in a list.  
getWRMS  6  Return Find the weighted RMS (Root Mean Square) of values in a list.  
initMiniPlot  11  Initialize settings for multiple "postage stamp" PostScript plots. 
landscape (1)
pxn (1)
bwx (1)
bwy (1)
bdx (1)
bdy (1)
bg (1)

initResNames  48  Initialize the list of canonical residue names for common amino acids.  
isAscending  0  Return 1 if the given numerical list is ascending.  
isDescending  0  Return 1 if the given numerical list is descending.  
isFlag  5  Return 1 if argument is a valid flag.  
isInt  4  Test if argument contains only one or more digits 09.  
isMonotonic  0  Return 1 if the given numerical list is monotonic.  
linterp  0  Interpolate XY pairs in numerical lists.  
listDisjoint  4  Returns the unique elements in one list but not in the other.  
listIntersect  6  Returns the unique elements common to two lists.  
listUnion  6  Returns the unique elements in the combined contents of two lists.  
listUniq  6  Returns the unique members in a list.  
loadArray  3  TCL Array Manipulation  
loadArrayDB  0  TCL Array Manipulation Read the contents of a TCL array from a file.  
lselect  22  Select items in one list according to 1 and 0 values in a corresponding list.  
metro  0  Combinatorial optimization by metropolis method.  
name2fmt  0  NMRPipe Data Format Manipulation Convert a file name to an NMRPipe format template (i.e. test001.dat to test%03d.dat).  
nextFlag  9  Find the location of the next flag in the command line.  
nextMiniPlot  11  Prepare to draw the next "postage stamp" plot.  
nextPower2  3  Return the smallest power of two equal to or greater than the given argument.  
okExit  8  Display a Dialog Box asking permission to exit an application.  
okWrite  7  Display a Dialog Box asking permission to overwrite a file.  
pdbNAAngles  0  Extract angles associated with Nucleic Acid structures.  
permList  8  Form all permutations of the elements in the given list taken N at a time.  
polySolve  0  Return the solution coefficients to a polynomial least squares problem.  
probePDBSrc  0  Identify PDB file contents as protein or nucleic acid.  
rClip  17  Clip a variable's value.  
rOrder  3  Numerical Utility  
rSwap  0  Utility Swap the contents of two TCL variables.  
rdFDATA  65  Read the NMRPipeformat header from the named file.  
rdFDATAU  6  Read the NMRPipeformat header from a data file opened for reading.  
removeElement  0  Remove an element from a list by its location.  
removeNullElements  2  Remove null items from a list.  
sameList  2  Test whether two lists have the same unique members.  
setArgD  30  Change the value of an argument in the command line if it can be found. 
xLAB (6)
yT (6)
yMODE (6)
yLAB (6)
aq2D (6)

setColors  3  Set some typical colors used for graphical interface items such as buttons. OBSOLETE.  
setFlag  0  Change a flag in the command line.  
setFlagD  0  Change a flag in the command line if it can be found.  
setFonts  41  Set some typical font names for use in an NMRWish graphical application.  
setListArgD  6  Change an argument's list of values in the command line if it can be found. 
comment (6)

setOSType  38  Set some operatingsystem dependant variables. OBSOLETE.  
showError  79  Display a Dialog Box indicating an error.  
simplePermutation  4  Form all permutations of the elements in the given list.  
simplePermutationN  0  Form all permutations of the elements in the given list taken N at a time.  
storeArray  4  TCL Array Manipulation  
storeArrayDB  0  TCL Array Manipulation Save the contents of a TCL array as a file.  
wrFDATA  3  Write the NMRPipeformat header to the named file. 
NMRPipe Processing Functions
ADD: Add a Constant to Data.

ADD adds a constant to the real or imaginary part of each vector in the data stream, or to a range of points within each vector. It is possible to specify separate constants to add to the real and imaginary parts of the data, however the imaginary constant will only be used if the current dimension of the input data has an imaginary part.
OPTIONS
c cC
Specifies the same constant to add to both the real part of the data,
and also to the imaginary part if it exists.
r cR
Specifies the constant to add to the real part of the data.
i cI
Specifies the constant to add to the imaginary part of the data.
This has no effect if the input data has no imaginary part.
ri
If this flag is used, the imaginary part of the data will be
added to the real part, and flags r realC
i imagC
and c riC
will be ignored. The ri
flag
is ignored if the input data has no imaginary part.
x1 pnt1
Specifies the location of the first point in range of points to adjust,
with default units in points. The default value is 1, the first point
in the data vector. The valid unit labels are: Pts Hz ppm %.
When specifying a location with a unit label, there should be no spaces
between the numerical value and the label.
xn pntN
Specifies the location of the last point in range of points to adjust,
with default units in points. The default value is the last point
in the data vector. The valid unit labels are: Pts Hz ppm %.
When specifying a location with a unit label, there should be no spaces
between the numerical value and the label.
EXAMPLES
The following example adds the constant 1.0 to all points:
nmrPipe fn ADD c 1.0
The following example adds the constant 1.0 to all real points, and 1.0 to all imaginary points, if any:
nmrPipe fn ADD r 1.0 i 1.0
The following example adds the constant "100.0" to the range of points from 5.5ppm to 4.5ppm:
nmrPipe fn ADD c 100.0 x1 5.5ppm xn 4.5ppm
The following Cshell script uses the program scale2D to extract the minimum and maximum values in a given spectrum. A processing scheme with the ADD function is used to add a suitable constant to the spectrum so that there will be no negative values in the result. The script uses the commands MATH and IMATH to evaluate floatingpoint arithmetic.
#!/bin/csh set sInfo = (`scale2D test.ft2`) set minVal = $sInfo[3] echo Minimum is $minVal if (`IMATH "$minVal < 0.0"`) then set c = (`MATH "1.0 + 1.0*$minVal"`) echo Minimum is less than zero, adding $c nmrPipe in test.ft2 fn ADD c $c out test.ft2 inPlace endif
SEE ALSO
The ADD function has corresponding functions
SET and MULT.
NMRPipe Processing Functions
APOD: Generic Apodization Window.

APOD applies one of the nmrPipe apodize windows, as specified by commandline arguments or header values. It can be used to apply a window function which was specified during format conversion or during previous processing.
In addition to functionspecific options, each of the nmrPipe window functions provides the following features in common:
APOD OPTIONS
qName apodName
Specifies the name of the window function to apply:
EM
GM
GMB
JMOD
SP
TM
TRI. See the section on a given window function for more information.
q1 apodQ1
Specifies the first parameter (Q1) of the selected window
function.
See the section on a given window function for information
on which window parameter corresponds with Q1.
q2 apodQ2
Specifies the second parameter (Q2) of the selected
window function.
See the section on a given window function for information
on which window parameter corresponds with Q2.
q3 apodQ3
Specifies the third parameter (Q3) of the selected window function.
See the section on a given window function for information
on which window parameter corresponds with Q3.
GENERIC WINDOW OPTIONS
size aSize
Specifies the number of points in the window function.
The default value is the valid timedomain size
recorded in the data header.
start aStart
Specifies the starting point of the window function.
The default value is 1, which means the window function
starts at the first point of the FID. This option is
intended for creation of composite windows by application
of different functions to different regions of the
FID.
c fScale
Specifies the scaling applied to the first point of the
FID, which influences the zeroorder offset in the
corresponding spectrum. The default value is 1.0,
which means no first point adjustment is applied. A
value of 0.5 is usually appropriate in cases where no
substantial firstorder phase correction will be
applied.
one
This flag influences the values used "outside" the window
function, in cases where the window size is smaller
than the actual number of data points. By default,
data values outside the window region are multiplied by
zero when the window is applied. However if the one
flag is used, data values outside the window region
will be multiplied by 1.0 when the window is applied.
This flag is intended to assist creation of composite
windows by application of different functions to different
regions of the FID.
hdr
When this flag is used, default window parameters
(Q1,Q2, and Q3) will be extracted from the data header,
along with the first point scaling. This requires that
all of these parameters have already been recorded, for
instance during previous processing or format conversion
(see EXAMPLES below). Additional commandline can
be used to override values restored from the header.
The window parameters stored in the data header can be
viewed using the showhdr program, for example:
showhdr verb test.ft2
inv
When this flag is used, the inverse (1/window) of the
selected window and first point scale will be applied.
This option is intended for removing a
previouslyapplied window in inverse processing
schemes. This option should generally only be used on
window functions which have no values close or equal to
zero. In cases where the window does have a zero
value, the inverse window is also given as zero.
EXAMPLES
The following scheme shows window parameters (APOD, Q1, Q2, and Q3), first point scale (C1), and phasing (P0, P1) specified during conversion. The values are then extracted and used during processing by including the hdr option with processing functions APOD and PS:
#!/bin/csh bruk2pipe in hsqcn.ser \ xN 2048 yN 256 \ xT 1024 yT 128 \ xMODE Complex yMODE Complex \ xSW 9090.91 ySW 2500.00 \ xOBS 600.138 yOBS 60.8108 \ xCAR 4.73 yCAR 118.0 \ xLAB HN yLAB N \ xAPOD SP yAPOD SP \ xQ1 0.50 yQ1 0.50 \ xQ2 0.98 yQ2 0.95 \ xQ3 2.0 yQ3 1.0 \ xC1 0.5 yC1 1.0 \ xP0 0.0 yP0 90.0 \ xP1 0.0 yP1 180.0 \ ndim 2 aq2D States \ out hsqcn.fid verb ov nmrPipe in hsqcn.fid \  nmrPipe fn SOL \  nmrPipe fn APOD hdr \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS p0 22 p1 0.0 di \  nmrPipe fn EXT left sw verb \  nmrPipe fn TP \  nmrPipe fn APOD hdr \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS hdr di \ verb ov out test.ft2
In this inverse processing scheme, a spectrum is inverse
transformed, and the window applied in a previous scheme
is removed (APOD inv hdr
) in order to apply Linear Prediction
(LP). After LP, the window is reapplied (APOD hdr
).
The inverse window will only work well if the orginal window did not have
any values equal or close to zero.
xyz2pipe in lp/test%03d.ft3 z verb \  nmrPipe fn HT auto \  nmrPipe fn PS inv hdr \  nmrPipe fn FT inv \  nmrPipe fn ZF inv \  nmrPipe fn APOD inv hdr \  nmrPipe fn LP fb \  nmrPipe fn APOD hdr \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS hdr di \  pipe2xyz out lp/test%03d.ft3 z inPlace
HEADER VALUES
The nmrPipe window functions use the recorded timedomain size (NDAPOD) to establish their default length.
When the hdr
flag is used, default window parameters are
extracted from header values NDAPODCODE, NDAPODQ1, NDAPODQ2,
NDAPODQ3, and NDC1.
The header values NDAPODCODE, NDAPODQ1, NDAPODQ2, NDAPODQ3,
and NDC1 are updated according to the values applied during
processing.
NMRPipe Processing Functions
BASE: Linear Baseline Corrections.

NMRPipe Processing Functions
CBF: Constant Baseline Correction Using SignalFree Regions.
1. Sequential Data is adjusted automatically. 2. Digital Oversampled Data (Bruker DMX and JEOL Delta) is adjusted automatically. 
CBF is intended to remove constant offsets in data, particularly in the time domain, since an offset in timedomain data will lead to a spike at zero frequency in the corresponding spectrum.
CBF calculates and subtracts a constant from each 1D vector in the data. The constant is calculated from the average of a range of points in the vector. The range of points is specified as a percentage of points to use from the tail (last points) of each vector. CBF includes special handling for depending on the vector data type:
noseq
flag.
bruk2pipe AMX
instead of DMX
), no constant will be subtracted from the
initial ~70 oversampled points. The number of oversampled points
is calculated automatically according to the conversion parameters.
OPTIONS
last percent
This option specifies the number of points to use for calculating
a correction, as a percentage of the vector size. By default, this
value is 10, which means that the last 10% of points in each vector
will be averaged to find a constant for subtraction.
reg reg1StartPtsX reg1EndPtsX ...
This option can be used to restrict the correction to a particular
range of points within each vector, with the starting and ending points
specified as points, or with labels Hz ppm %. By default, the calculated
constant is subtracted from the entire vector.
slice reg1StartPtsY reg1EndPtsY ...
This option can be used to restrict the correction to one or
more particular ranges of vectors within each plane,
with the starting and ending locations specified as points,
or with labels Hz ppm %. By default, all vectors are corrected.
noseq
Suppress special handling of sequential mode timedomain data.
nodmx
Suppress special handling of uncorrected oversampled timedomain data.
EXAMPLES
CBF is commonly used as the first processing function in a transform scheme, as shown here, where it is used to remove a DCoffset in a 2D magnitudemode FID.
nmrPipe in test.fid \  nmrPipe fn CBF \  nmrPipe fn SP off 0.0 end 0.95 \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn TP \  nmrPipe fn SP off 0.0 end 0.95 \  nmrPipe fn ZF auto \  nmrPipe fn FT neg \  nmrPipe fn MC \  nmrPipe fn POLY auto ord 0 \ out test.ft2 ov
NMRPipe Processing Functions
COADD: CoAddition of Data.

The COADD function is commonly applied to interleaved data such as InPhase/AntiPhase (IPAP) experiements, where it is used to either combine interleaved data by addition or subtraction, or simply to extract a given component of the interleaved data. Data seperated in this way can later be recombined by the program addNMR which can form sums and differences of NMRPipeformat data files.
COADD works by reducing a spectrum or FID by summing
groups of two or more points within each 1D vector (axis X
)
or by summing two or more adjacent 1D vectors (axis Y
).
Before summation, the data is multiplied by the coefficients given by "cList" before summation. So for example:
 nmrPipe fn COADD axis Y cList 1 1 time \
will form a spectrum from the difference of each pair of adjacent 1D slices. The "time" argument is used to reduce the recorded number of valid timedomain points according to the reduction in the output data size.
PROCESSING INTERLEAVED DATA WITH FUNCTION COADD
In the input data used for this example, there are 255 complex t1 increments interleaved with a second set of 255 complex increments. The goal is to make processing using either the sum or difference of these two sets, or using just one or the other of these two sets.
In the input, there are a total of 255*2 + 255*2 = 1020 real+imag data points in t1. But, when we process the data in the t1 dimension, we will have only 255 complex points, because we will first take the sum or difference of the two interleaved sets. So, for this example yN (total points real+imag in file) is 1020, while yT (length of the corresponding window function) should be 255, rather than the default value of 510.
There are two ways to accommodate
this factoroftwo difference in the final result.
One way is simply to manually change the conversion parameters
so that "yT 255" is given. The more common way however
is to use the COADD time
option, which will
reduce timedomain size parameter automatically according to
the number of values given for cList
coefficient
list.
bruk2pipe in ser \ xN 1024 yN 1020 \ xT 512 yT 510 \ xMODE Complex yMODE Complex \ xSW 7246.00 ySW 5000.0 \ xOBS 600.13 yOBS 150.91 \ xCAR 4.65 yCAR 43.0 \ xLAB H yLAB C \ ndim 2 aq2D States \ bad 0.0 \ out test.fid verb ovThe next step is to process the data; as the first step of processing, the COADD function will be used to add points from the t1 (Y) axis. The pairs of points will be multiplied by the coefficients given in "cList" before adding:
nmrPipe in test.fid \  nmrPipe fn COADD axis Y cList 1 1 time \  nmrPipe fn SP off 0.5 end 0.98 pow 2 c 0.5 \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn EXT x1 4.3ppm xn 1.0ppm sw \  nmrPipe fn PS p0 9.5 p1 14.8 di verb \  nmrPipe fn TP \  nmrPipe fn SP off 0.3 end 0.98 pow 1 c 0.5 \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS p0 5.4 p1 0 di verb \  nmrPipe fn TP \  nmrPipe fn POLY auto \ verb ov out sum.ft2Alternatively, we can change the coefficients, so that we form the difference between adjacent t1 points instead of the sum; the rest of the processing stays the same:
nmrPipe in test.fid \  nmrPipe fn COADD axis Y cList 1 1 time \ . . .  nmrPipe fn POLY auto \ verb ov out dif.ft2Again, we can change the coefficients this time to process only the odd t1 points:
nmrPipe in test.fid \  nmrPipe fn COADD axis Y cList 1 0 time \ . . . verb ov out odd.ft2Or the even ones:
nmrPipe in test.fid \  nmrPipe fn COADD axis Y cList 0 1 \ . . . verb ov out even.ft2
We can also recombine the two seperate results using the addNMR program. In this example, we create a new result which consists of odd + 1.2*even:
addNMR in1 odd.ft2 in2 even.ft1 c1 1.0 c2 1.2 add out wsum.ft2
In addition, the COADD function can also be used directly during conversion, for instance in this case to generate a converted FID which selects only the oddnumbered interleaved channels:
bruk2pipe in ser \ xN 1024 yN 1020 \ xT 512 yT 255 \ xMODE Complex yMODE Complex \ xSW 7246.00 ySW 5000.0 \ xOBS 600.13 yOBS 150.91 \ xCAR 4.65 yCAR 43.0 \ xLAB H yLAB C \ ndim 2 aq2D States \ bad 0.0 \  nmrPipe fn COADD axis Y cList 1 0 \ out odd.fid verb ovINTERLEAVED DATA WITH GRADIENT ENHANCEMENT In NMRPipe, gradient enhanced timedomain data is converted to a conventional complex format by use of a shuffling macro. The shuffling macro can be inserted into a converion or processing script, for example, this command will adjust gradient data in the YAxis of Bruker data:
 nmrPipe fn MAC macro $NMRTXT/bruk_ranceY.M noRd noWr \There are corresponding shuffling macros for Varian data, for example:
 nmrPipe fn MAC macro $NMRTXT/var_ranceY.M noRd noWr \These shuffling macros will be applied automatically if the given dimension is converted with either the "EchoAntiEcho" or "RanceKay" keyword (the two keywords perform the same action). For example, the following two conversion commands are equivalent:
bruk2pipe in ser bad 0.0 noaswap DMX decim 16 dspfvs 12 \ xN 2048 yN 512 \ xT 1024 yT 256 \ xMODE DQD yMODE Complex \ xSW 10000.000 ySW 1724.138 \ xOBS 600.141 yOBS 60.819 \ xCAR 4.773 yCAR 118.367 \ xLAB HN yLAB N \ ndim 2 aq2D States \  nmrPipe fn MAC macro $NMRTXT/bruk_ranceY.M noRd noWr \ out test.fid verb ov bruk2pipe in ser bad 0.0 noaswap DMX decim 16 dspfvs 12 \ xN 2048 yN 512 \ xT 1024 yT 256 \ xMODE DQD yMODE RanceKay \ xSW 10000.000 ySW 1724.138 \ xOBS 600.141 yOBS 60.819 \ xCAR 4.773 yCAR 118.367 \ xLAB HN yLAB N \ ndim 2 aq2D States \ out test.fid verb ov
The gradient shuffling macros assume that adjacent groups of data should be combined to form real and imaginary parts of the result. For example, for YAxis gradient data, the shuffling macro assumes that pairs of adjacent 1D complex vectors should be combined to form one complex vector which is a YAxis real point, and a second complex vector is the the corresponding YAxis imaginary point.
However, if the data are both gradient enhanced and interleaved, depending on the acquisition scheme, the interleaved data must be accommodated before gradient shuffling can be performed. This will be the case for acquisition schemes where the loop which performs interleaving is "inside" the loop which performs gradient enhanced detection. For such cases, we first use COADD to extract one channel of the interleaved data, and send the result through a gradient shuffling macro. Here is such a case for 3 interleaved 3D experiments with gradient enhanced detection in the YAxis.
#!/bin/csh set tauList = (0.00193 0.00373 0.00722) zcat ser.Z  bruk2pipe tau $tauList[1] \ bad 0.0 noswap DMX decim 24 dspfvs 12 \ xN 1024 yN 270 zN 122 \ xT 512 yT 135 zT 61 \ xMODE DQD yMODE Complex zMODE Complex \ xSW 8012.821 ySW 1666.667 zSW 9090.909 \ xOBS 600.141 yOBS 60.819 zOBS 150.911 \ xCAR 4.840 yCAR 117.640 zCAR 46.159 \ xLAB 1H yLAB 15N zLAB 13C \ ndim 3 aq2D States \  nmrPipe fn COADD cList 1 0 0 axis Y time \  nmrPipe fn MAC macro $NMRTXT/bruk_ranceY.M noRd noWr \  pipe2xyz x out ./fidA/test%03d.fid verb ov zcat ser.Z  bruk2pipe tau $tauList[2] \ bad 0.0 noswap DMX decim 24 dspfvs 12 \ xN 1024 yN 270 zN 122 \ xT 512 yT 135 zT 61 \ xMODE DQD yMODE Complex zMODE Complex \ xSW 8012.821 ySW 1666.667 zSW 9090.909 \ xOBS 600.141 yOBS 60.819 zOBS 150.911 \ xCAR 4.840 yCAR 117.640 zCAR 46.159 \ xLAB 1H yLAB 15N zLAB 13C \ ndim 3 aq2D States \  nmrPipe fn COADD cList 0 1 0 axis Y time \  nmrPipe fn MAC macro $NMRTXT/bruk_ranceY.M noRd noWr zcat ser.Z  bruk2pipe tau $tauList[3] \ bad 0.0 noswap DMX decim 24 dspfvs 12 \ xN 1024 yN 270 zN 122 \ xT 512 yT 135 zT 61 \ xMODE DQD yMODE Complex zMODE Complex \ xSW 8012.821 ySW 1666.667 zSW 9090.909 \ xOBS 600.141 yOBS 60.819 zOBS 150.911 \ xCAR 4.840 yCAR 117.640 zCAR 46.159 \ xLAB 1H yLAB 15N zLAB 13C \ ndim 3 aq2D States \  nmrPipe fn COADD cList 0 0 1 axis Y time \  nmrPipe fn MAC macro $NMRTXT/bruk_ranceY.M noRd noWr \  pipe2xyz x out ./fidC/test%03d.fid verb ovDATA WITH MANY INTERLEAVED VALUES In this example, there are 16 interleaved 2D planes in the given gradientenhanced data, with tau values which in this case can be calculated from the contents of the spectrometer file "vclist". In this scheme, the COADD
cList
argument is built "automatically" as 1.0 in one position and zero
everywhere else, and the position of the nonzero value is changed
over the course of a loop.
bruk2pipe in $d/ser bad 0.0 noaswap DMX decim 24 dspfvs 12 \ xN 1024 yN 4000 \ xT 512 yT 125 \ xMODE DQD yMODE EchoAntiEcho \ xSW 8012.821 ySW 5000.000 \ xOBS 600.141 yOBS 150.917 \ xCAR 4.754 yCAR 00.00 \ xLAB 1H yLAB 13C \ ndim 2 aq2D States \ verb ov out ./test.fid #!/bin/csh if (!(d ft)) then mkdir ft endif set tauList = "" set cList = "" foreach vc (`cat vclist`) set tauList = ($tauList `MATH 20\*$vc`) set cList = ($cList 0) end nmrPipe in test.fid \  nmrPipe fn SP off 0.5 pow 2 end 0.99 c 0.5 \  nmrPipe fn ZF size 2048 \  nmrPipe fn FT auto \  nmrPipe fn PS p0 89 p1 28.4 di \  nmrPipe fn POLY auto ord 2 \  nmrPipe fn EXT x1 3.5ppm xn 6.5ppm sw verb \  nmrPipe fn TP \ out test.ft1 ov set i = 1 foreach tau ($tauList) set cList[$i] = 1 set outName = `printf ft/relax%03d.ft2 $i` echo $outName $tau nmrPipe in test.ft1 \  nmrPipe fn COADD axis X cList $cList \  nmrPipe fn SP off 0.5 pow 2 end 0.99 c 0.5 \  nmrPipe fn ZF size 2048 \  nmrPipe fn FT neg \  nmrPipe fn PS p0 14.6 p1 26.2 di \  nmrPipe fn POLY auto ord 2 \  nmrPipe fn EXT x1 8ppm xn 8ppm sw verb \ ov out $outName sethdr $outName tau $tau set cList[$i] = 0 @ i++ endHEADER VALUES
Since it reduces the size of the data, the COADD function
will adjust NDSIZE accordingly. The the time
flag is given,
it will also update the timedomain size values NDAPOD and NDTDSIZE.
NMRPipe Processing Functions
CS: Circular Shift.
Flag inv is equivalent to neg 
CS applies a circularshift to the points in each vector from the current dimension of the data. The shifted points at one end of the vector are moved to the other end of the vector. In this regard, CS mimics the frequencydomain shift which results from applying a firstorder phase correction in the timedomain. A circular shift can be applied in either direction, right or left. For example, if an 8point data vector consists of the following values:
1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0then after a 2point right circular shift (
CS rs 2
) the result
will be:
7.0 8.0 1.0 2.0 3.0 4.0 5.0 6.0whereas, if a 2point left circular shift (
CS ls 2
) were applied
to the original data vector, the result would be:
3.0 4.0 5.0 6.0 7.0 8.0 1.0 2.0
The CS function will only shift by an integer number of points; for shifting data by a fractional number of points, use the FSH function.
OPTIONS
rs rsVal
Specifies the number of points for the shift. If the number is
positive, the data will be shifted to the right. If it is negative,
the data will be shifted to the left.
This value can also be specified with spectral units (% Hz ppm).
In these cases, the amount of shift requested will be rounded
to the nearest integer.
ls lsVal
Specifies the number of points for the shift. If the number is
positive, the data will be shifted to the left. If it is negative,
the data will be shifted to the right.
This value can also be specified with spectral units (% Hz ppm).
In these cases, the amount of shift requested will be rounded
to the nearest integer.
sw
If this flag is used with
frequencydomain data, the chemical shift calibration
information is updated (NDORIG and NDCENTER).
neg
If this flag is used, the points shifted from one side of the
vector will be negated; this corresponds to sign inversion
which occurs to aliased (folded) points in the frequency
domain from timedomain data with a halfpoint delay (time
domain data which require firstorder phase P1 = 180).
For example, if an 8point data vector has the values:
1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0then after a 2point signnegated right circular shift (
CS rs 2 neg
) the result will be:
7.0 8.0 1.0 2.0 3.0 4.0 5.0 6.0
EXAMPLES
CS is commonly used as a convenience to move spectral signals to a more convenient position. For example, in the indirect 1H dimension of an 15N 3D NOE experiment, a sufficiently large but arbitrary circular shift can be applied to move the diagonal so that it is not folded over the edges of the spectrum. Note that when CS is applied, the requested shift is always rounded to an integer number of points; for shifting data by a fractional number of points, use the FSH function.
xyz2pipe in fid/test%03d.fid x verb \  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 167 p1 0.0 di \  nmrPipe fn EXT x1 10.5ppm xn 6ppm sw \  nmrPipe fn TP \  nmrPipe fn SP off 0.5 end 0.98 pow 1 c 1.0 \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS p0 135 p1 360 di \  nmrPipe fn POLY auto ord 0 \  nmrPipe fn CS rs 1ppm sw \  nmrPipe fn TP \  nmrPipe fn POLY auto \  pipe2xyz out ft/test%03d.ft3 y
NMRPipe Processing Functions
DX: Derivitive by Central Difference.
DX performs a numerical derivative calculation on each vector. If the current dimension is complex, the real and imaginary parts are treated separately. For an Npoint data vector y[0] ... y[N1] the derivative dy[i] is calculated as:
dy[0] = y[1]  y[0]for the first point.
dy[i] = y[i+1]  y[i1]for the interior points, and
dy[N] = y[N]  y[N1]for the last point.
The nmrPipe function INTEG performs
the numerical integral function, the complementary function to
DX.
NMRPipe Processing Functions
EM: Exponential Multiply Window.

EM applies an exponential window. The exponential is
specified in terms of a Lorentzian line broadening (lb) in Hz.
In the following formula, tSize
is the number of
timedomain points, which defines the length of the window
function; EM[i] is the EM window function from i = 0
(first point) to i = tSize  1
(last point);
sw
is the sweep width in Hz.
EM[i] = exp( PI*i*lb/sw )
In addition to functionspecific options, the EM window function provides the following features common to all NMRPipe window functions:
EM OPTIONS
lb lbHz
(Q1) Specifies the exponential decay of the window in
terms of a line broadening in Hz. Negative values will
generate an increasing exponential window, which
corresponds to a line sharpening. The linebroadening
parameter is often selected to match the natural
linewidth.
GENERIC WINDOW OPTIONS
size aSize
Specifies the number of points in the window function.
The default value is the valid timedomain size
recorded in the data header.
start aStart
Specifies the starting point of the window function.
The default value is 1, which means the window function
starts at the first point of the FID. This option is
intended for creation of composite windows by application
of different functions to different regions of the
FID.
c fScale
Specifies the scaling applied to the first point of the
FID, which influences the zeroorder offset in the
corresponding spectrum. The default value is 1.0,
which means no first point adjustment is applied. A
value of 0.5 is usually appropriate in cases where no
substantial firstorder phase correction will be
applied.
one
This flag influences the values used "outside" the window
function, in cases where the window size is smaller
than the actual number of data points. By default,
data values outside the window region are multiplied by
zero when the window is applied. However if the one
flag is used, data values outside the window region
will be multiplied by 1.0 when the window is applied.
This flag is intended to assist creation of composite
windows by application of different functions to different
regions of the FID.
hdr
When this flag is used, default window parameters
(here, Q1) will be extracted from the data header,
along with the first point scaling (C1). This requires that
all of these parameters have already been recorded, for
instance during previous processing or format conversion
(see EXAMPLES below). Additional commandline can
be used to override values restored from the header.
The window parameters stored in the data header can be
viewed using the showhdr program, for example:
showhdr verb test.ft2
inv
When this flag is used, the inverse (1/window) of the
selected window and first point scale will be applied.
This option is intended for removing a
previouslyapplied window in inverse processing
schemes. This option should generally only be used on
window functions which have no values close or equal to
zero. In cases where the window does have a zero
value, the inverse window is also given as zero.
HEADER VALUES
EM and the other nmrPipe window functions use the recorded timedomain size (NDAPOD) to establish their default length.
When the hdr
flag is used, default window parameters are
extracted from header values NDAPODCODE, NDAPODQ1, NDAPODQ2,
NDAPODQ3, and NDC1.
The header values NDAPODCODE, NDAPODQ1, NDAPODQ2, NDAPODQ3,
and NDC1 are updated according to the values applied during
processing.
NMRPipe Processing Functions
EXT: Extract Region.
Use negative integers for coords in order to specify limit relative to last point. 
NMRPipe Processing Functions
FSH: Frequency Shift via Inverse Fourier Transform.

FSH applies a circularshift to the points in each vector from the current dimension of the data. The shift is performed by inversetransforming a data vector, applying a firstorder phase correction, and transforming the data back to its original domain. This method can be used to shift data by a fractional number of points.
OPTIONS
rs rsVal
Specifies the number of points for the shift. If the number is
positive, the data will be shifted to the right. If it is negative,
the data will be shifted to the left.
This value can also be specified with spectral units (% Hz ppm).
ls lsVal
Specifies the number of points for the shift. If the number is
positive, the data will be shifted to the left. If it is negative,
the data will be shifted to the right.
This value can also be specified with spectral units (% Hz ppm).
sw
If this flag is used with
frequencydomain data, the chemical shift calibration
information is updated (NDORIG and NDCENTER).
NMRPipe Processing Functions
FT: Complex Fourier Transform.

FT applies a complex Fourier transform (FT) to produce a complex result. There is no requirement for a poweroftwo data size, but processing times will likely be slower for nonpoweroftwo cases. FT options include selection of forward or inverse transform, negation of imaginaries before transformation, and signalternation (negation of alternating points) of the data before transformation. An option to apply a complex FT to a real data sequence is also provided for TPPImode data. FT options can also be selected automatically from the header, provided that the acquisition mode information was recorded appropriately during conversion.
According to the usual convention, the forward FT arranges a frequencydomain result such that zero frequency is in the center of the spectrum, specifically, at point 1 + N/2 of 1 to N (e.g. point 513 of 1 to 1024). The forward/inverse Fourier transform pair are scaled in such a way that a forward FT followed by an inverse FT will recover the original intensities.
If a given dimension of a spectrum is reversed, then that dimension
should be processed using FT neg
... note that simply
reversing the order of data points via nmrPipe fn REV
alone
is not correct.
If a given dimension of a spectrum has its first and second halves
rotated, then that dimension should be processed using FT alt
.
In some cases, both neg
and alt
might
both be needed for a given dimension.
The automode option auto
is intended primarily for use in
specialpurpose applications which automate an entire conversion
and processing scheme, or for use in pulsesequence specific
examples. Its use for routine processing is not recommended.
COMMON OPTIONS
real
This flag selects a complex Fourier transform for a
realonly sequence. It is commonly used for data
recorded in the TPPI mode. This option will reduce the
data size by a factor of two.
alt
This flag causes sign alternation to be applied to the
data before the FT. In the case of complex data, sign
alternation has the effect of exchanging the left and
right halves of the corresponding spectrum:
 nmrPipe fn FT alt \is equivalent to:
 nmrPipe fn FT \  nmrPipe fn SHUF exlr \
neg
This flag causes the imaginary part of the data to be
negated before the FT. It is equivalent to reversal of
the corresponding spectrum followed by a onepoint
right circular shift:
 nmrPipe fn FT neg \is equivalent to:
 nmrPipe fn FT \  nmrPipe fn REV sw \  nmrPipe fn CS rs 1 sw \
bruk
This flag applies a signalternated real FT suitable
for Bruker Sequential Mode (QSEQ) data. This option
will reduce the data size by a factor of two. It is
equivalent to:
nmrPipe fn FT real alt
auto
This flag enables automatic selection of the FT modes.
Inverse mode will be selected if the data are in the
frequencydomain. Real transform mode will be selected
if the acquisition mode is recorded as Real, TPPI, or
Sequential (Bruker). Negation of imaginaries will be
selected if the acquisition mode is recorded as
ComplexN StatesN, or StatesTPPIN. Signalternation
will be selected if the acquisition mode is recorded as
StatesTPPI, StatesTPPIN, or Sequential (Bruker).
The general use of this flag is not recommended.
inv
This flag selects an inverse Fourier transform.
EXAMPLES
The following is a basic 2D Fourier transform scheme for States or StatesTPPI data. The same schemes are used for GradiantEnhanced phasesensitive data, once such data have been appropriately shuffled.
nmrPipe in test.fid \  nmrPipe fn SP off 0.5 end 0.95 pow 1 c 0.5 \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS p0 0.0 p1 0.0 di verb \  nmrPipe fn TP \  nmrPipe fn SP off 0.5 end 0.95 pow 1 c 0.5 \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS p0 0.0 p1 0.0 di verb \ ov out test.ft2
The basic 2D Fourier transform scheme above needs only a
slight modification for TPPI data, which requires
the FT real
option for the indirect dimension:
nmrPipe in test.fid \  nmrPipe fn SP off 0.5 end 0.95 pow 1 c 0.5 \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS p0 0.0 p1 0.0 di verb \  nmrPipe fn TP \  nmrPipe fn SP off 0.5 end 0.95 pow 1 c 0.5 \  nmrPipe fn ZF auto \  nmrPipe fn FT real \  nmrPipe fn PS p0 0.0 p1 0.0 di verb \ ov out test.ft2The following is a basic magnitudemode (also called absolute value mode) 2D processing scheme; note that in this case, the imaginaries are not deleted after the first Fourier transform, and the magnitude calculation function MC is used after the second transform. Note also that the second FT is a complex one, which can be specified as
FT neg
if the YAxis of the result needs to
be reversed:
nmrPipe in test.fid \  nmrPipe fn SP verb \  nmrPipe fn ZF auto \  nmrPipe fn FT auto \  nmrPipe fn TP \  nmrPipe fn SP verb \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn MC \ out test.ft2 verb ov
The following is a general inverse Fourier transform
scheme, which will regenerate a 2D hypercomplex FID from a
realonly untransposed 2D spectrum. Note use of the generic nmrPipe
option ad
to make room for hypercomplex data,
and the use of the hypercomplex transpose option TP hyper
.
In this case, the generic window function APOD is used
in order to divide the data by whatever window was applied during processing.
This use of an inverse window requires that the original data was
processed using a window function with no values at or close to zero.
nmrPipe in test.ft2 \  nmrPipe fn TP \  nmrPipe fn HT auto verb \  nmrPipe fn PS inv hdr \  nmrPipe fn FT inv \  nmrPipe fn ZF inv \  nmrPipe fn APOD inv hdr ad \  nmrPipe fn TP hyper \  nmrPipe fn HT auto verb \  nmrPipe fn PS inv hdr \  nmrPipe fn FT inv \  nmrPipe fn ZF inv \  nmrPipe fn APOD inv hdr \ out test.fid ov
HEADER VALUES
The FT function toggles the NDFTFLAG to 0 or 1, depending on whether the result is timedomain or frequency domain, respectively.
The NDQUADFLAG of the result is set to 0, to indicate complex data.
In the case of a real
transform, NDSIZE, NDAPOD, and
NDTDSIZE are reduced by a factor of two.
NMRPipe Processing Functions
GM: LorentztoGauss Window.

GM applies a LorentztoGauss window, which is a combination of an inverse exponential and a Gaussian. The purpose of the window is to replace the exponential decay of the original data with a Gaussian decay, so that the corresponding spectral lineshape will be more like a Gaussian rather than a Lorentzian. The exponential term is specified as a Lorentzian line sharpening in Hz. The Gaussian term is specified as a Gaussian line broadening in Hz, and a center position (location of the Gaussian maximum). The Gaussian center position is specified as a value ranging from 0.0 (Gaussian maximum at the first point of the FID) to 1.0 (Gaussian maximum at the last point of the FID). In a usual application, the Lorentzian line sharpening is chosen to match the intrinsic decay of the timedomain data, and the Gaussian broadening is chosen to provide a suitable degree of decay. In most cases, this means that the Gaussian broadening will be substantially larger than the Lorentzian sharpening.
In the following formula for GM, tSize
is th number of
timedomain points, which defines the length of the window
function; GM[i] is the window function from i = 0
(first
point) to i = tSize  1
(last point); and sw
is the sweep width in Hz.
GM[i] = exp( e  g*g )where
e = PI*i*g1/sw g = 0.6*PI*g2*(g3*(tSize1)  i)/sw
In addition to functionspecific options, the GM window function provides the following features common to all NMRPipe window functions:
GM OPTIONS
g1 invExpHz
(Q1) Specifies the inverse exponential to apply in
terms of a line sharpening in Hz. It is usually
adjusted to match the natural linewidth. The default
value is 0.0, which means no exponential term will be
applied, and the window will be a pure Gaussian function.
g2 gaussHz
(Q2) Specifies the Gaussian to apply in terms of a line
broadening in Hz. It is usually adjusted to be
larger (x 1.25  4.0) than the line sharpening
specified by the g1
option.
g3 gCenter
(Q3) Specifies the position of the Gaussian function's
maximum on the FID. It is specified as a value ranging
from 0.0 (Gaussian maximum at the first point of the
FID) to 1.0 (Gaussian maximum at the last point of the
FID). It most applications, the default value of 0.0
is used.
GENERIC WINDOW OPTIONS
size aSize
Specifies the number of points in the window function.
The default value is the valid timedomain size
recorded in the data header.
start aStart
Specifies the starting point of the window function.
The default value is 1, which means the window function
starts at the first point of the FID. This option is
intended for creation of composite windows by application
of different functions to different regions of the
FID.
c fScale
Specifies the scaling applied to the first point of the
FID, which influences the zeroorder offset in the
corresponding spectrum. The default value is 1.0,
which means no first point adjustment is applied. A
value of 0.5 is usually appropriate in cases where no
substantial firstorder phase correction will be
applied.
one
This flag influences the values used "outside" the window
function, in cases where the window size is smaller
than the actual number of data points. By default,
data values outside the window region are multiplied by
zero when the window is applied. However if the one
flag is used, data values outside the window region
will be multiplied by 1.0 when the window is applied.
This flag is intended to assist creation of composite
windows by application of different functions to different
regions of the FID.
hdr
When this flag is used, default window parameters
(Q1,Q2, and Q3) will be extracted from the data header,
along with the first point scaling. This requires that
all of these parameters have already been recorded, for
instance during previous processing or format conversion
(see EXAMPLES below). Additional commandline can
be used to override values restored from the header.
The window parameters stored in the data header can be
viewed using the showhdr program, for example:
showhdr verb test.ft2
inv
When this flag is used, the inverse (1/window) of the
selected window and first point scale will be applied.
This option is intended for removing a
previouslyapplied window in inverse processing
schemes. This option should generally only be used on
window functions which have no values close or equal to
zero. In cases where the window does have a zero
value, the inverse window is also given as zero.
EXAMPLES
A typical usage of a LorentztoGauss window:
nmrPipe fn GM g1 20 g2 35
The following scheme shows window parameters (APOD, Q1, Q2, and Q3), first point scale (C1), and phasing (P0, P1) specified during conversion. The values are then extracted and used during processing by including the hdr option with processing functions APOD and PS:
#!/bin/csh bruk2pipe in hsqcn.ser \ xN 2048 yN 256 \ xT 1024 yT 128 \ xMODE Complex yMODE Complex \ xSW 9090.91 ySW 2500.00 \ xOBS 600.138 yOBS 60.8108 \ xCAR 4.73 yCAR 118.0 \ xLAB HN yLAB N \ xAPOD GM yAPOD GM \ xQ1 20 yQ1 10 \ xQ2 35 yQ2 15 \ xQ3 0.0 yQ3 0.0 \ xC1 0.5 yC1 1.0 \ xP0 0.0 yP0 90.0 \ xP1 0.0 yP1 180.0 \ ndim 2 aq2D States \ out hsqcn.fid verb ov nmrPipe in hsqcn.fid \  nmrPipe fn SOL \  nmrPipe fn APOD hdr \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS p0 22 p1 0.0 di \  nmrPipe fn EXT left sw verb \  nmrPipe fn TP \  nmrPipe fn APOD hdr \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS hdr di \ verb ov out test.ft2
HEADER VALUES
GM and the other nmrPipe window functions use the recorded timedomain size (NDAPOD) to establish their default length.
When the hdr
flag is used, default window parameters are
extracted from header values NDAPODCODE, NDAPODQ1, NDAPODQ2,
NDAPODQ3, and NDC1.
The header values NDAPODCODE, NDAPODQ1, NDAPODQ2, NDAPODQ3,
and NDC1 are updated according to the values applied during
processing.
NMRPipe Processing Functions
GMB: Another Version of the Gauss Window.

GMB applies a Gausslike window, inspired by a similar window function found on Bruker spectrometers. It is somewhat similar to the GM function, and like this function, it also applies a combination of an exponential and a Gaussian.
In the following formula for GMB, tSize
is th number of
timedomain points, which defines the length of the window
function; GMB[i] is the window function from i = 0
(first
point) to i = tSize  1
(last point); and sw
is the sweep width in Hz.
Given the GMB adjustable parameters lb
and gb
:
GMB[i] = exp( a*t  b*t*t )where
t = i/sw aq = tSize/sw a = PI*lb b = a/(2.0*gb*aq)In addition to functionspecific options, the GMB window function provides the following features common to all NMRPipe window functions:
GMB OPTIONS
lb lbVal
(Q1) Specifies an exponential factor lb
,
as used in the
formula given above. This value is usually specified
as a negative number which is about the same size as
the natural linewidth in Hz. The default value is 0.0,
which means no exponential term will be applied.
gb gbVal
(Q2) Specifies a Gaussian factor gb
,
as used in the formula
given above. It is usually specified as a positive
number which is a fraction of 1.0. The default
value is 0.0, which leads to an undefined window function
according to the formula; for this reason, the
Gaussian term is omitted from the calculation
when gb 0.0
is given.
GENERIC WINDOW OPTIONS
size aSize
Specifies the number of points in the window function.
The default value is the valid timedomain size
recorded in the data header.
start aStart
Specifies the starting point of the window function.
The default value is 1, which means the window function
starts at the first point of the FID. This option is
intended for creation of composite windows by application
of different functions to different regions of the
FID.
c fScale
Specifies the scaling applied to the first point of the
FID, which influences the zeroorder offset in the
corresponding spectrum. The default value is 1.0,
which means no first point adjustment is applied. A
value of 0.5 is usually appropriate in cases where no
substantial firstorder phase correction will be
applied.
one
This flag influences the values used "outside" the window
function, in cases where the window size is smaller
than the actual number of data points. By default,
data values outside the window region are multiplied by
zero when the window is applied. However if the one
flag is used, data values outside the window region
will be multiplied by 1.0 when the window is applied.
This flag is intended to assist creation of composite
windows by application of different functions to different
regions of the FID.
hdr
When this flag is used, default window parameters
(Q1 and Q2) will be extracted from the data header,
along with the first point scaling (C1). This requires that
all of these parameters have already been recorded, for
instance during previous processing or format conversion
(see EXAMPLES below). Additional commandline can
be used to override values restored from the header.
The window parameters stored in the data header can be
viewed using the showhdr program, for example:
showhdr verb test.ft2
inv
When this flag is used, the inverse (1/window) of the
selected window and first point scale will be applied.
This option is intended for removing a
previouslyapplied window in inverse processing
schemes. This option should generally only be used on
window functions which have no values close or equal to
zero. In cases where the window does have a zero
value, the inverse window is also given as zero.
EXAMPLES
A typical usage of a GM and GMB window:
nmrPipe fn GM g1 20 g2 35 nmrPipe fn GMB lb 20 gb 0.25
HEADER VALUES
GMB and the other nmrPipe window functions use the recorded timedomain size (NDAPOD) to establish their default length.
When the hdr
flag is used, default window parameters are
extracted from header values NDAPODCODE, NDAPODQ1, NDAPODQ2,
and NDC1.
The header values NDAPODCODE, NDAPODQ1, NDAPODQ2,
and NDC1 are updated according to the values applied during
processing.
NMRPipe Processing Functions
HA: Sequential Hadamard Transform.
Input is zerofilled to a required power of two. 
HA applies a Hadamard transform to the vectors in the data. This transform is a relative of the Fourier transform, and is sometimes used as an alternative to a Fourier transform for signal processing and enhancement methods. For a data vector with 2^m points, the Hadamard transform is defined in terms of a scale factor and a transform matrix H, which is a matrix of (2^m) x (2^m) values, which are all either 1 or 1. So, If input data is complex, the real and imaginary parts are treated separately, since the Hadamard transform matrix is allreal. Since the Hadamard transform matrix is defined in terms of powers of two, it requires that the input data is an exact power of two in size. Therefore, if needed, input data is automatically zerofilled to the nearest power of two before the transform is applied.
OPTIONS
inv
This flag scales the result by 1/N, where N is the number of points in
the transformed vector.
HEADER VALUES
The HA function toggles the NDFTFLAG to 1 or 0, depending
on whether the input is timedomain or frequency domain, respectively.
NMRPipe Processing Functions
HT: Hilbert Transform

NMRPipe Processing Functions
IMG: Image Processing Utilities.

NMRPipe Processing Functions
INTEG: Integral by Simple Sum.
INTEG performs a numerical integral by simple sum on each vector. If the current dimension is complex, the real and imaginary parts are treated separately.
The nmrPipe function DX performs
the numerical derivative function, the complementary function to
INTEG.
NMRPipe Processing Functions
JMOD: Exponentially Damped JModulation Profile.

JMOD is a window function which applies an exponentially damped sinusoid modulation to the given data. The purpose of the JMOD window is to approximate or reproduce a couplinginduced splitting. One use of this is to specify a deconvolution to be applied by a function such as MEM. The JMOD exponential term is specified as a Lorentzian line broadening in Hz (parameter lb). Likewise, the modulation frequency is expressed as a splitting in Hz (parameter jHz). There is an adjustable phase offset for the modulation (parameter off), making it possible to choose between cosine forms (inphase modulation) and sine forms (antiphase modulation).
In the following formula for JMOD, tSize
is the number of
timedomain points, which defines the length of the window
function; JMOD[i] is the window function from i = 0
(first
point) to i = tSize  1
(last point); and sw
is the sweep width in Hz.
JMOD[i] = exp( e )*sin( PI*off + PI*(end  off)*i/(tSize1) )where
e = PI*i*lb/sw end = off + jHz*(tSize  1)/sw
In addition to functionspecific options, the JMOD window function provides the following features common to all NMRPipe window functions:
JMOD OPTIONS
off offset
(Q1) Specifies the offset of the sinusoid modulation in
units of pi radians. Usual
values are 0.0 (for a sine modulation) and 0.5 (for a
cosine modulation.
jHz jHz
(Q2) Specifies the modulation frequency to apply in terms
of a corresponding line splitting in Hz.
lb lbHz
(Q3) Specifies the exponential to apply in
terms of a line width in Hz. The default
value is 0.0, which means no exponential term will be
applied, and the window will be an undamped sinusoid.
cos
Sets Q1 to 0.5, to provide cosine modulation.
sin
Sets Q1 to 0.0, to provide sine modulation, which is the default.
GENERIC WINDOW OPTIONS
size aSize
Specifies the number of points in the window function.
The default value is the valid timedomain size
recorded in the data header.
start aStart
Specifies the starting point of the window function.
The default value is 1, which means the window function
starts at the first point of the FID. This option is
intended for creation of composite windows by application
of different functions to different regions of the
FID.
c fScale
Specifies the scaling applied to the first point of the
FID, which influences the zeroorder offset in the
corresponding spectrum. The default value is 1.0,
which means no first point adjustment is applied. A
value of 0.5 is usually appropriate in cases where no
substantial firstorder phase correction will be
applied.
one
This flag influences the values used "outside" the window
function, in cases where the window size is smaller
than the actual number of data points. By default,
data values outside the window region are multiplied by
zero when the window is applied. However if the one
flag is used, data values outside the window region
will be multiplied by 1.0 when the window is applied.
This flag is intended to assist creation of composite
windows by application of different functions to different
regions of the FID.
hdr
When this flag is used, default window parameters
(Q1, Q2, and Q3) will be extracted from the data header,
along with the first point scaling. This requires that
all of these parameters have already been recorded, for
instance during previous processing or format conversion
(see EXAMPLES below). Additional commandline can
be used to override values restored from the header.
The window parameters stored in the data header can be
viewed using the showhdr program, for example:
showhdr verb test.ft2
inv
When this flag is used, the inverse (1/window) of the
selected window and first point scale will be applied.
This option is intended for removing a
previouslyapplied window in inverse processing
schemes. This option should generally only be used on
window functions which have no values close or equal to
zero. In cases where the window does have a zero
value, the inverse window is also given as zero.
EXAMPLES
The following script introduces a 90Hz splitting to the 15N dimension of a 2D HN/N spectrum:
nmrPipe in test.fid \  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 194 p1 0.0 di \  nmrPipe fn EXT x1 10.5ppm xn 6.5ppm sw verb \  nmrPipe fn TP \  nmrPipe fn JMOD j 90 cos \  nmrPipe fn SP off 0.5 end 0.95 pow 1 c 0.5 \  nmrPipe fn ZF auto \  nmrPipe fn PS p0 0 p1 0 di \  nmrPipe fn TP \  nmrPipe fn POLY auto \ verb ov out test.ft2
The following example includes Maximum Entropy Method (MEM) used to remove the simulated 90 Hz splitting which is applied in the first processing pipeline.
nmrPipe in test.fid \  nmrPipe fn SOL \  nmrPipe fn ZF zf 2 auto \  nmrPipe fn FT \  nmrPipe fn PS p0 194 p1 0.0 di \  nmrPipe fn EXT x1 10.5ppm xn 6.5ppm sw verb \  nmrPipe fn TP \  nmrPipe fn JMOD j 90 cos \ out jmod.ft1 verb ov nmrPipe in jmod.ft1 \  nmrPipe fn ZF zf 2 \  nmrPipe fn FT di \  nmrPipe fn TP \  nmrPipe fn MEM ndim 2 x0 0.0 tScale 0.0 sigma 60 report 2 \ xconv EM xcQ1 10.0 \ yconv JMOD ycQ1 0.5 ycQ2 90 ycQ3 11.0 \ out mem.ft2 ov
HEADER VALUES
JMOD and the other nmrPipe window functions use the recorded timedomain size (NDAPOD) to establish their default length.
When the hdr
flag is used, default window parameters are
extracted from header values NDAPODCODE, NDAPODQ1, NDAPODQ2,
NDAPODQ3, and NDC1.
The header values NDAPODCODE, NDAPODQ1, NDAPODQ2, NDAPODQ3,
and NDC1 are updated according to the values applied during
processing.
NMRPipe Processing Functions
LP: Linear Prediction.
1. Default value for pred is SIZE for LP after .2. Default value for pred is 1 for LP before .3. Default value for x1 is PRED+1 for LP before .4. Default value for x1 is 1 for LP after .5. Use ord 0 for max order SIZE/2.6. Root Fixing Mode Values for fixMode : 1 Fix roots to suppress decreasing signals (Default for before ). 0 No root fixing. 1 Fix roots to suppress increasing Signals (Default for after ). 
LP is an implementation of Linear Prediction for complex data which has been designed for high stability. As a result, it may be slower than other implementations of Linear Prediction, but perhaps more robust. LP is used primarily to extend timedomain data. By extending the data, Fourier truncation artifacts become less severe, and line broadening due to use of window functions on short data vectors will be less pronounced. LP can also be used to replace missing or distorted points at the start or interior of timedomain data. LP is usually most effective when used on timedomain data vectors which are not decayed substantially, relatively short (~8256 complex points) and with a small number of signals (~08 peaks per vector). It will also be more effective with higher signaltonoise and limited dynamic range. However, LP can still be useful in cases with a larger number of signals, or with high dynamicrange cases, since it can often reduce the truncation artifacts of the largest peaks which might otherwise obscure smaller peaks.
Linear Prediction makes a model of a given complex data region; this model can then be used to predict points immediately after the modeled data region (points in the future) or to predict points immediately before the data region (points in the past). In the model, a set of coefficients is found such that linear combination of a group of points predicts the next point in the series. A single set of coefficients is determined by considering each successive overlapping group of points in the data region. The number of coefficients extracted is called the linear prediction order, which determines how many NMR signals (damped sinusoids) can be predicted by the model.
There are three ways of organizing the model to establish the LP coefficients. In one method, the points immediately after each group are predicted; this is called forward linear prediction. In the second method, the points immediately before each group are predicted; this is called backward linear prediction. In the third method, called forwardbackward linear prediction, the results from separate forward and backwardlinear prediction calculations are combined. Forwardbackward linear prediction is more timeconsuming because it requires two LP calculations, but it often gives better results. But, regardless of which modeling method is used, the coefficients can still be used (either directly or in modified form) to predict past or future points.
Once the LP model is created, it can be applied to predict a new synthetic point by using a group of existing points from the original data. The new point can then be used along with a group from the original data to predict yet another new point. This process can be continued indefinitely, but in practice it becomes more unstable as additional points are predicted from previous synthetic ones. Therefore, LP is usually limited to extending data to about twice its original size.
Most LP applications will involve setting the following parameters, or using their default values:
ord lpOrder
)
Default: order 8.
f b
or fb
)
Default: forward.
x1 firstPoint
and xn lastPoint
)
Default: all points 1 to SIZE.
pred predPointCount
)
Default: size of original data.
before
or after
)
Default: future.
In addition, some data may allow use of Mirror Image LP; in this case, there are two possible modes, described in more detail later:
ps00
)
LP ORDER
The linear prediction order defines the number of points in each successive group used to build the LP model. Since several successive groups must be analyzed to build a reliable model, the LP order is usually much smaller than the size of the modeled region, and no larger than half the modeled region. But, the number of signals which can be extracted by LP is limited by the LP order itself. So, there is a tradeoff; the LP order must be as large as the number of signals to extract, but smaller than half the original data size. Therefore, cases of very small data size cause a problem, but in some situations this can be solved by Mirror Image LP (see below).
PARAMETERS FOR PREDICTION AFTER
By default, LP is set up to work like zero filling; this means that it will double the size of the data by predicting future points using all of the original data in the model. For example, starting with data of 64 complex points, LP with no arguments:
nmrPipe fn LP
is equivalent to:
nmrPipe fn LP x1 1 xn 64 ord 8 f pred 64 after
which means "use data region of points 1 to 64 and an order=8 forward linear prediction to predict 64 more points immediately after the data region". Another way would be to use forwardbackward LP instead:
nmrPipe fn LP fb
which is the same as:
nmrPipe fn LP x1 1 xn 64 ord 8 fb pred 64 after
PARAMETERS FOR PREDICTION BEFORE
When LP is used with the "before" argument, it will work by replacing points before the selected data region, but it will not increase the size of the data (Note: this may change in later implementations). Therefore, in order to extend the data vectors by adding points at the beginning, the data size must first be adjusted "manually" by zero filling and rightshifting. For example, if we start with 100 data points, and want to create 6 additional points before them:
 nmrPipe fn ZF pad 6 \  nmrPipe fn RS rs 6 sw \  nmrPipe fn LP before x1 7 xn 106 pred 6 \
When the before option is used, the default value for the x1 parameter is set to 1 plus the pred value. So, the following LP scheme is equivalent to the one above:
 nmrPipe fn ZF pad 6 \  nmrPipe fn RS rs 6 sw \  nmrPipe fn LP before pred 6 \
which means "make room for 6 new points, move the original data over by 6 points, predict 6 new points before the original data which is now at points 7 to 106".
MIRROR IMAGE LP
In order for LP to analyze NMR data correctly, the data must have uniform sampling, i.e. the time increment must be the same between all points. Furthermore, the signals are assumed to be exponentially damped or undamped sinusoids, with uniform noise.
In the case of constanttime data, the signals have no exponential dampening. So, we can sometimes artificially extend this data temporarily by adding the data's mirror image complex conjugate (imaginary is negated) before LP, then discarding the mirror image after LP. By extending the data this way, we can use larger than usual LP order parameters, and thus have an opportunity to reconstruct more signals. Furthermore, since the original data points are used in both forward and reverse order, mirror image LP provides the stability advantage of forwardbackward LP.
Note that mirrorimage LP will usually only be an advantage when there are a small number of original data points; in cases with larger number of data points (> 32 to 64), forwardbackward LP may be just as good, and it has the added advantage of no special restrictions on delaytime or decay. So, before using mirrorimage LP, be sure that the circumstances are appropriate, as described below.
When we create a mirror image for LP use, we have to be sure that the extended data still has a uniform time increment between each point. In the case of data with no delay, the original points are (t=0 t=1 t=2 ... t=n), and they are the same as hypothetical points at "negative time" (t=0 t=1 t=2 ... t=n) since cos(t) = cos(t).
We can append the mirror image as:
mirror image plane  t=n . . t=2 t=1 t=0 t=1 t=2 . . t=n 
and we still have uniform increments between all points; the new data has N1 reflected points, followed by N original points.
If the data have a halfpoint delay, we can still make a mirror image, but we have to do it a little differently. We start with the original data, which are (t=0.5 t=1.5 t=2.5 ... t=n+0.5). They are the same as the negative time data (t=0.5 t=1.5 t=2.5 ...) so the mirror image is:
mirror image plane  t=(n+0.5) ... t=1.5 t=0.5  t=0.5 t=1.5 ... t=(n+0.5) 
and again, there are uniform time increments between all points; this time, the new data has N reflected points followed by N original points.
These two cases can be selected by using the options ps00 or ps90180. This will automatically build the mirror image, do the LP, and discard the mirror image automatically. By default, both cases will double the number of original data points, as with ordinary LP. For example:
nmrPipe fn LP ps00 ord 12
means "build the mirror image suitable for data with no acquisition delay, extend it LP using a 12point order, then discard the mirror image part".
However, if the data have more than one point delay, then appending the mirror image will result in data that have a "gap"  that is the two points on either side of the mirror image plane will not be separated by one time increment. For instance, if there is a twopoint delay, there will be a threepoint gap:
mirror image plane  t=n . . t=2 gap t=2 . . t=n 
Therefore, data with a 1 or more than 1point acquisition delay can not be used directly for mirror image LP. Instead, the missing first points must be replaced before using mirror image LP. It may be possible in these cases to use LP with the before option to replace the missing points, then later use LP with the ps00 option to do mirror image as usual.
For example, if there are 30 original points with a three point delay:
 nmrPipe fn ZF pad 3 \  nmrPipe fn RS rs 3 sw \  nmrPipe fn LP before pred 3 \  nmrPipe fn LP ps00 \
means "make room for the three missing points, shift the data by three points, create the three missing points by LP, use mirrorimage LP to create 33 additional points by extending the data.
DATA WITH 1DWELL DELAY
Data acquired with a 1point delay can be thought if as zerodelay data which have been leftshifted by one point. We compensate for this timedomain shift by phase correction in the frequency domain; each onepoint shift in the timedomain adds a 360 degree first order correction (P1=360) to the corresponding spectrum.
However, a P1=360 in the frequencydomain does not correspond to exactly to a simple onepoint shift in the timedomain; rather, it is equivalent to a circular shift in the timedomain. So, it is as if the missing first point of the FID is replaced by the last original point of the FID (or by zero if the data has been zero filled).
Fourier theory tells us that the amplitude of the first point in the FID is the integral of all points in the frequencydomain; therefore, if the value of the first timedomain point is incorrect, there will be an offset error (constant baseline distortion) in the corresponding spectrum. As a result, data processed with P1=360 will have a baseline offset.
If we want to avoid baseline problems in this case, we must find a way to replace the missing first point accurately. LP can be used for this task, but it is time consuming and sometimes unstable.
A faster and more stable approach takes advantage of the fact that adjustment of the first timedomain point corresponds to adding a constant in the frequencydomain, as mentioned above. So, we can do the equivalent of replacing the first timedomain point by performing a zeroorder baseline correction in the frequency domain. In cases with 64 or more data points and spectra which are not too crowded, automated zeroorder baseline correction can be faster and more stable than LP. Therefore, the baseline correction approach is often a better one than LP for this purpose.
STRATEGIES FOR USE OF LP
LP will work best when the timedomain vectors to extend have the fewest possible signals. In order to achieve this, all of the other dimensions of the spectrum should be Fourier Transformed first; this will localize the spectral signals in the transformed dimensions and simplify the remaining timedomain dimension. This means that inverse processing schemes will be required for cases where LP will be used in two of the spectral dimensions. Inverse processing will usually involve the following steps to retore a spectrum to its original timedomain form:
When creating inverse processing schemes, the following should be considered:
mirror
image
HT can be used for data with
a halfdwell delay (P1=180). In all other cases, the HT
may introduce distortions at the edges of the data,
but these may only be serious in cases where the data
size is small or where signals of interest lie at the
edges of the spectrum.
For this reason, if LP results seem poor when inverse processing schemes are used, examine the intermediate reconstructed timedomain data. In some cases, the distortion in the last points will be obvious, and can be repaired by either changing the original processing scheme, of simply discarding the last timedomain point before applying LP.
OPTIONS
The LP commandline options are detailed below; use the command nmrPipe fn LP help to generate a complete list of options and their default values.
pred predPts
Specifies the number of complex points to predict. In
the after mode (default), the predicted points will be
placed after the selected data region, replacing any
existing points, and extending the size of the data
automatically if needed. When the after mode is used,
the default number of points to predict is set to the
original size of the data, so that the data size will
be doubled by prediction. If the before mode is used,
the given number of predicted points will be placed
before the selected data region, however the size of
the data will not be adjusted. When the before mode is
selected, the default number of predicted points is 1,
so that the first point of the FID will be replaced.
x1 dataStart
Specifies the first complex point in the range of
points from the original data which will be used to
generate the LP model. In the after mode (default),
the default value is 1, which means the region of data
to model will start at the first point of the FID. In
the before mode, the default value is set to 1 plus
the number of points to predict (pred predPts
), which
means the first points of the FID will be replaced by
LP.
xn dataEnd
Specifies the last complex point in the range of points
from the original data which will be used to generate
the LP model. The default value is set to the original
size, which means that the region to model will extend
to the last point of the original data.
ord order
Specifies the LP order, the number of complex coefficients
which will be extracted by the LP model. The LP
order can be no larger than half the number of points
in the data region to model. The LP order also determines
the maximum number of NMR signals (damped
sinusoids) which can be represented by the model.
f
When this flag is used, LP coefficients will be
extracted using forwardmode equations (default).
b
When this flag is used, LP coefficients will be
extracted using backwardmode equations.
fb
When this flag is used, LP coefficients will be
extracted using both forward and backwardmode equations,
and the two sets of coefficients are then averaged
for enhanced stability.
before
When this flag is used, the LP predicted points will be
placed before the modeled data region.
after
When this flag is used, the LP predicted points will be
placed after the modeled data region (default).
nofix
This flag turns off the LP root reflection procedure.
This procedure adjusts the LP coefficients to suppress
creation of signals which do not have the desired
exponential envelope.
fix
This flag enables the LP root reflection procedure.
This procedure adjusts the LP coefficients to suppress
creation of signals which do not have the desired
exponential envelope.
fixMode fm
Specifies the type of root reflection to use. The
options are:
1 Suppress Decreasing Exponentials (default for
before)
0 No Adjustment
1 Suppress Increasing Exponentials (default for
after)
ps90180
This flag performs mirrorimage LP for data with a
halfdwell delay (i.e., data that require P0=90,P1=180
phasing). It is intended for use with data having little
or no dampening.
ps00
This flag performs mirrorimage LP for data with no
acquisition delay (i.e., data that require P0=0,P1=0
phasing). It is intended for use with data having little
or no dampening.
EXPERIMENTAL OPTIONS
The following are experimental options, and thus should not be relied on; the descriptions are included for development purposes.
pca
Sets the LP order to the YAxis size; this assumes that
the data set is actually a matrix decomposition result
created by the Principal Component Analysis (PCA) program
pcaNMR.
extra xOrd
The LP order established by PCA will be increased by
the value given here. This is used to insure a minimum
reasonable LP order.
sig sigCount
Specifies the number of signals to reconstruct, in case
this should be less than the LP order.
auto
This flag enables automatic signal count estimation,
which will adjust the LP order on a vectorbyvector
basis.
min nmin
The minimum allowable number of signals for automatic
signal count estimation.
max nmax
The minimum allowable number of signals for automatic
signal count estimation.
nw nw
Specifies the cell size in points for noise determination.
dw dw
Specifies the +/ width in points for signal detection.
nf nf
Specifies the noise threshold factor for signal detection.
sf sf
Specifies the signal count factor.
fr hf
Specifies the minimum fraction of data considered to
belong to baseline.
EXAMPLES
The following example shows LP used to extend the 15N dimension of a 2D HN/N correlated spectrum. nmrPipe in test.fid \  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 194 p1 0.0 di \  nmrPipe fn EXT x1 10.5ppm xn 6.5ppm sw verb \  nmrPipe fn TP \  nmrPipe fn LP fb \  nmrPipe fn SP off 0.5 end 0.95 pow 1 c 0.5 \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS p0 0 p1 0 di \  nmrPipe fn TP \  nmrPipe fn POLY auto \ verb ov out lp.ft2
The following example shows conventional processing of a data plane with a 1dwell delay in the indirect dimension. This requires a phase correction of P0=180,P1=360 which leads to baseline distortions. So, the result from this scheme will have a baseline distortion. Compare this scheme to the following two alternative schemes, which attempt to compensate for the distortion.
#!/bin/csh nmrPipe in fid/test001.fid \  nmrPipe fn SOL \  nmrPipe fn SP off 0.35 end 0.99 pow 2 c 0.5 \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS p0 0.0 p1 0.0 di \  nmrPipe fn EXT x1 10.5ppm xn 5.5ppm sw verb \  nmrPipe fn TP \  nmrPipe fn SP off 0.5 end 0.95 pow 1 c 1.0 \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS p0 180 p1 360 di \ out test.ps.ft2 ov verb
In the following scheme, the data above are processed with a onepoint shift followed by Linear Prediction to replace the missing first point caused by the 1dwell delay. The rightshift also removes the need for a phasecorrection, so that after the first point is replace by LP, the data can be treated as if P1=0.
#!/bin/csh nmrPipe in fid/test001.fid \  nmrPipe fn SOL \  nmrPipe fn SP off 0.35 end 0.99 pow 2 c 0.5 \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS p0 0.0 p1 0.0 di \  nmrPipe fn EXT x1 10.5ppm xn 5.5ppm sw verb \  nmrPipe fn TP \  nmrPipe fn ZF pad 1 \  nmrPipe fn RS rs 1 sw \  nmrPipe fn LP before pred 1 \  nmrPipe fn SP off 0.5 end 0.95 pow 1 c 0.5 \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS p0 0.0 p1 0.0 di \ out test.lp.ft2 ov verb
In the following scheme, the data above are processed with a an automated zeroorder baseline correction. This has the same effect as replacing the missing first point caused by the 1dwell delay. As noted previously, this method is often faster and more reliable than the LP method given above.
#!/bin/csh nmrPipe in fid/test001.fid \  nmrPipe fn SOL \  nmrPipe fn SP off 0.35 end 0.99 pow 2 c 0.5 \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS p0 0.0 p1 0.0 di \  nmrPipe fn EXT x1 10.5ppm xn 5.5ppm sw verb \  nmrPipe fn TP \  nmrPipe fn SP off 0.5 end 0.95 pow 1 c 1.0 \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS p0 180 p1 360 di \  nmrPipe fn POLY auto ord 0 \ out test.poly.ft2 ov verb
The following script demonstrates an LP scheme which was
used to repair bad 1D vectors in a 2D StatesMode FID. The
defects occurred in 1D vectors 912 in the raw data, which
contained 128 total 1D vectors (64 complex points in the YAxis).
The defects were found by graphical inspection of
the FID using the nmrDraw program. Since the 1D vectors in
the FID represent interleaved real and imaginary points, the
bad vectors correspond to complex points 5 and 6 in the YAxis.
Since the bad points lie near the beginning of the
FID, LP is used in the before mode, to predict the two bad
points before
the good points 764. Note: to find the
complex point corresponding to interleaved point N, use the
formula int[(N1)/2] + 1.
#!/bin/csh nmrPipe in hcabgco2d.fid \  nmrPipe fn GM g1 10 g2 30 c 0.5 \  nmrPipe fn ZF size 1024 \  nmrPipe fn FT \  nmrPipe fn PS p0 206.4 p1 0.0 \  nmrPipe fn EXT x1 1.0ppm xn 6.0ppm sw verb \  nmrPipe fn PS p0 0 p1 0 di \  nmrPipe fn TP \  nmrPipe fn LP before x1 7 pred 2 ord 16 \  nmrPipe fn GM g1 10 g2 30 \  nmrPipe fn ZF size 512 \  nmrPipe fn FT \  nmrPipe fn PS p0 217 p1 159 di \  nmrPipe fn TP \  nmrPipe fn POLY auto \ out hcabgco2d.ft2 verb ov
In some cases, bad data points might be close to the center of an interferogram, so that it is reasonable to consider using either the points before the bad ones for repair, or the points after the bad ones. It is also possible to repair the bad points using both methods, and then to add the resulting repaired interferograms together to give a result which might be better. This procedure can be applied to 1D or 2D data, or even to replace an invididual plane from 3D data. For example, to replace points 30 and 31 in a 2D:
#!/bin/csh nmrPipe in hcabgco2d.fid \  nmrPipe fn GM g1 10 g2 30 c 0.5 \  nmrPipe fn ZF size 1024 \  nmrPipe fn FT \  nmrPipe fn PS p0 206.4 p1 0.0 \  nmrPipe fn EXT x1 1.0ppm xn 6.0ppm sw verb \  nmrPipe fn PS p0 0 p1 0 di \  nmrPipe fn TP \ out test.ft1 ov nmrPipe in test.ft1 \  nmrPipe fn LP before x1 32 pred 2 \ out before.ft1 ov nmrPipe in test.ft1 \  nmrPipe fn LP after xn 29 pred 2 \ out after.ft1 ov addNMR in1 before.ft1 in2 after.ft2 c1 0.5 c2 0.5 \ out avg.ft1 nmrPipe in avg.ft1 \  nmrPipe fn GM g1 10 g2 30 \  nmrPipe fn ZF size 512 \  nmrPipe fn FT \  nmrPipe fn PS p0 217 p1 159 di \  nmrPipe fn TP \  nmrPipe fn POLY auto \ out hcabgco2d.ft2 verb ov
The following scheme demonstrates LP used to repair bad data
planes within a 3D spectrum. In this example, planes 58 and
59 in the original FID were corrupted during acquisition.
The complete FID consisted of 64 planes. Since the FID
planes represent alternating real and imaginary points in
the ZAxis, plane 58 corresponds to the imaginary part of
complex point 29, and plane 59 corresponds to the real part
of complex point 30. Therefore, points 29 and 30 must be
replaced in the ZAxis. In this case, since the bad data is
towards the end of the FID, LP is used in the after mode
(default), to replace the two bad points after
points 128.
Note that the LP is not applied until after the other dimensions
have been transformed.
#!/bin/csh xyz2pipe in fid/test%03d.fid x verb \  nmrPipe fn SP off .35 end .95 pow 2 c 0.5 \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS p0 112.0 p1 0.0 di \  nmrPipe fn TP \  nmrPipe fn SP off .35 end 1.0 pow 1 c 1.0 \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS p0 90.0 p1 180.0 di \  nmrPipe fn TP \  nmrPipe fn POLY auto \  pipe2xyz out ft/test%03d.ft2 x ov xyz2pipe in ft/test%03d.ft2 z verb \  nmrPipe fn LP xn 28 pred 2 ord 12 \  nmrPipe fn SP off .35 end 1.0 pow 1 c 1.0 \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS p0 90.0 p1 180.0 di \  pipe2xyz out ft/test%03d.ft3 z ov
The following scheme illustrates LP used in the two indirect dimensions of a constanttime 3D CBCANH experiment. The scheme is arranged so that the 1D timedomain vectors to be extended by LP are as simple as possible (i.e. have the fewest possible signals). To achieve this, LP is only used on a given dimension when all the remaining dimensions have been processed. This localizes the spectral signals as much as possible, since in the timedomain, a given signal can extend significantly across the spectrum, but in the frequencydomain the signal will be "concentrated" into a peak.
In this example, the HN and N dimensions are transformed, then the CACB dimension is Linear Predicted and then transformed. Finally, the N dimension is inverse transformed, Linear Predicted, then retransformed. Note the use of "inv" to undo the effects of not only the Fourier Transform, but also the phasing (if any), the zero filling, and the window function. Note also that the forwardbackward LP option fb could be used as an alternative to the mirrorimage options ps00 and ps90180:
#!/bin/csh xyz2pipe in fid/test%03d.fid x verb \  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 43 p1 0.0 di \  nmrPipe fn EXT left sw \  pipe2xyz out lp/test%03d.ft3 x xyz2pipe in lp/test%03d.ft3 z verb \  nmrPipe fn SP off 0.5 end 0.95 pow 1 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.ft3 z inPlace xyz2pipe in lp/test%03d.ft3 y verb \  nmrPipe fn LP ps90180 ord 10 \  nmrPipe fn SP off 0.5 end 0.98 pow 1 c 1.0 \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS p0 90 p1 180 di \  pipe2xyz out lp/test%03d.ft3 y inPlace xyz2pipe in lp/test%03d.ft3 z verb \  nmrPipe fn HT auto \  nmrPipe fn PS inv hdr \  nmrPipe fn FT inv \  nmrPipe fn ZF inv \  nmrPipe fn SP inv hdr \  nmrPipe fn LP ps00 \  nmrPipe fn SP hdr \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS hdr di \  pipe2xyz out lp/test%03d.ft3 z inPlace
HEADER VALUES
LP updates the recorded timedomain sizes (NDAPOD and NDTDSIZE), so that window functions applied after data extension via LP will automatically extend to the correct number of points to cover both the original data and the predicted points.
LP also updates some chemical shift calibration information (NDCENTER and NDORIG) to accommodate the new position of the zerofrequency point which is anticipated for the corresponding spectrum.
LIMITATIONS
LP used in the before mode will not increase the data size automatically.
Using LP to backpredicting missing or distorted points at the start of an FID is often unreliable.
LP is often not effective on data with many signals, data
with high dynamic range, data with low signaltonoise
ratios, or heavily damped data.
NMRPipe Processing Functions
LS: Left Shift and Zero Pad.

LS applies a leftshift to the points in each vector from the current dimension of the data. The shifted points at the start of the data vector are replaced with zeros. For example, if an 8point data vector consists of the following values:
1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0then after a 2point leftshift (
LS ls 2
) the result
will be:
3.0 4.0 5.0 6.0 7.0 8.0 0.0 0.0
The LS function will only shift by an integer number of points; for shifting data by a fractional number of points, use the FSH function.
OPTIONS
rs rsVal
Specifies the number of points for the shift. If the number is
positive, the data will be shifted to the right. If it is negative,
the data will be shifted to the left.
This value can also be specified with spectral units (% Hz ppm).
In these cases, the amount of shift requested will be rounded
to the nearest integer.
sw
If this flag is used with timedomain data, the recorded
timedomain sizes NDAPOD and NDTDSIZE are adjusted by
the number of points shifted. If this flag is used with
frequencydomain data, the chemical shift calibration
information is updated (NDORIG and NDCENTER).
EXAMPLES
The following, when applied in the timedomain, is equivalent to applying a first order phase of P1=360 in the frequency domain; applying the zerofill before the LS avoids losing one point:
 nmrPipe fn ZF auto \  nmrPipe fn LS rs 1 \
SEE ALSO
Shifting functions
RS (rightshift, integer number of points)
CS (circularshift, integer number of points)
FSH (circularshift, fractional nuumber of points)
and phasecorrection function
PS which can be used to apply the equivalent
of a circular shift in one domain by applying a first order phase
correction in the other domain.
NMRPipe Processing Functions
MACRO: SliceProcessing Macro.

NMRPipe Processing Functions
MC: Modulus/Magnitude Calculation.

NMRPipe Processing Functions
MED: Median Baseline Correction.

NMRPipe Processing Functions
MEMND: ND Maximum Entropy Calculation.
1. Important options are ndim sigma and alpha. 2. Underestimate time noise value for sigma to avoid missing peaks. 3. Use a minimum of 2 zero fills (size*4). 4. Use report 2 for statistics of each iterate. 5. Reduce alpha value if results diverge. 6. Chi/N statistic should decrease to 1.0 in a good reconstruction. 7. MEM Z statistic should increase to 1.0 in a good reconstruction, but values as small as 0.1 are not unusual. 
MEM performs Maximum entropy reconstructions of 1D, 2D, and 3D spectra and spectral subsets (such as 2D planes of a 3D spectrum). The MEM reconstruction can be thought of as an attempt to create a spectrum of optimal quality or sharpness which is nevertheless consistent with the original timedomain data. The MEM function in nmrPipe is a twochannel implementation of Gull and Daniell's algorithm, with modifications introduced by Wu. The method and its basis is described in the following references:
Sibisi, S. (1983) Nature, 301, 134136.
Gull, S.F. and Daniell, G.J. (1978) Nature, 272, 686690.
Wu, N.L. (1984) Astron. Astrophys., 139, 555557.
Laue, E.D., Skilling, J., Staunton, J., Sibisi, S. and
Brereton, R. (1985) J. Magn Reson., 62,
437452.
Hoch, J.C., Stern, A.S., Donoho, D.L. and Johnstone, I.M
(1990) J. Magn. Reson., 86, 236246.
Stephenson, M. (1988) Prog. NMR.
Spectrosc., 20, 515626.
USING MEM A typical MEM application might involve using 2D MEM on the planes from the indirect dimensions of a 3D spectrum. In this case, steps like the following will be performed:
THE MEM ALGORITHM
The MEM algorithm implemented in nmrPipe is iterative. It starts with a trial MEM spectrum, which is initially uniform. At each iteration, the trial MEM spectrum is inverse Fouriertransformed and then subtracted from the original timedomain data to form a timedomain residual. The timedomain residual is then forward Fouriertransformed, and used to update the MEM spectrum. In the case of MEM deconvolution, the same procedure is used, except that the MEM data is broadened by a window function at each iteration, in order to generate a sharp reconstruction which when broadened is consistent with the original timedomain data.
A rough summary of the Gull and Daniell algorithm (without accommodations for combinations of positive and negative signals) follows.
D: is the original timedomain data.
n: is the total number of points in D.
sigma: is the standard deviation of the noise in D.
F: is the current MEM spectrum at a given iteration.
R: is the inverse Fourier transform of MEM spectrum F.
C: is the timedomain residual between the original data and the MEM data:
C = (D  R)/(sigma^2)U: is the forward Fourier transform of C. Therefore U can be thought of as the frequencydomain residual between the original data and the MEM data.
s: is the entropy value of MEM spectrum F, given by:
s = Sum( F ln(F/g) )where g is a suitable scaling factor; s can be thought of as a measure of spectral quality in the sense of sharpness or simplicity.
chi2: is the chisquare value of the residual between the original data D and MEM data R:
chi2 = Sum( (D  R)^2 / (sigma^2) )
The chi2 value should approach n when the MEM data is consistent with the original spectrum to within the noise level.
The MEM procedure attempts to find a spectrum F which will maximize the expression:
q = s  lambda*chi2
where lambda is a La Grange multiplier which is chosen so that chi2 approaches n at the solution, or in other words so that the maximum entropy spectrum F is consistent with the original timedomain data D to within the noise. This leads to a solution spectrum B with scaling factor a where:
B = a*exp( 1 + 2*lambda*U )
which corresponds to an exponential amplification of the frequencydomain residual U. In practice, this exponential form is unstable, so the solution spectrum B is found iteratively:
F[new] = (1  alpha)*F + alpha*B
RECONSTRUCTION STRATEGY
In the nmrPipe implementation, the dimensions to be reconstructed by MEM must all be in the same Fourier domain, either as hypercomplex timedomain data, or realonly frequencydomain data. As with linear prediction (LP), the remaining dimensions should usually be in the frequencydomain. Furthermore, phasecorrection and baseline adjustment of the spectrum as a whole should be performed prior to using MEM; for this reason, it is usually most convenient to apply MEM to frequencydomain data, rather than timedomain data. So, one useful strategy is to process data completely with the usual methods, inspect the result, and then employ a MEM scheme which will inverseprocess and reprocess the spectrum in a form most suitable for MEM. A given dimension of an ordinary spectrum might be prepared for MEM with the following steps:
 nmrPipe fn HT auto \  nmrPipe fn PS inv hdr \  nmrPipe fn FT inv \  nmrPipe fn ZF inv \  nmrPipe fn APOD inv hdr \  nmrPipe fn MULT hdr xn 1 \  nmrPipe fn ZF zf 2 auto \  nmrPipe fn FT \  nmrPipe fn PS hdr di \
Since MEM and MEM schemes involve Hilbert transform and inverse processing, the the following guidelines should be observed:
Zero Filling: in order to reconstruct imaginary data correctly using the Hilbert Transform (HT) during MEM, the original data must have been zerofilled to at least twice its original size. However, additional zerofilling, commonly to four times the original data size, is needed to achieve an increase in resolution by MEM. Furthermore, the transform steps will work much more quickly if the size after zerofill is a power of two. Note that these zerofilling guidelines will often lead to exceptionally large data sizes.
Acquisition Delay: the Hilbert Transform will only produce ideal reconstruction of imaginary data in two cases: an ordinary HT can be used for data with no acquisition delay (P1=0); a mirrorimage HT can be used for data with a halfdwell delay (P1=180). In all other cases, the HT may introduce distortions at the edges of the spectrum, but these may only be serious in cases where the data size is small or where signals of interest lie at the edges of the spectrum.
Window Function: inverse processing will require dividing the data by the original window function. This means that the original window function should be chosen so that none of the window values are close to or equal to zero.
Extracted Regions: the Hilbert Transform, as well as other Fourier manipulations, may not be ideal when applied to extracted regions of a given dimension. This is most likely to be a problem in cases where the data size is small, where signals of interest lie at the edges of the extracted region, or where substantial truncation artifacts extend to the edges of the extracted region.
EXTRACTING AN INDIRECT 2D PLANE
The nmrDraw graphical interface includes commands to interactively select and save 2D planes from the X/Z and Y/Z dimensions of a 3D or 4D spectrum. In typical processing schemes, the directlyacquired dimension will usually be saved as the XAxis or YAxis of the result. In both of these cases, a 2D plane from the indirect dimensions corresponds to an orthogonal plane from nmrDraw's vertical axis, which can be extracted by the following command:
1D Menu/Extract 2D V This nmrDraw command extracts the orthogonal 2D plane which corresponds to the vertical 1D slice currently selected. The 2D plane will be extracted as a file called "ext.dat", which can be treated as a 2D spectrum. The nmrDraw command Previous Data in the File Menu can be used to return to the original 3D data. The Extract 2D command is currently implemented only for allreal data.
Once an appropriate plane is extracted, it can be used to establish and test a MEM scheme and its parameters.
ESTIMATING THE TIMEDOMAIN NOISE LEVEL
Use of MEM requires an estimate of the standard deviation of the noise in the timedomain. Since this may not be easy to measure directly, we can instead use the noise level in the corresponding spectrum to infer the level of noise in the timedomain. The spectral noise level can be estimated interactively with nmrDraw:
Note that the spectral noise level should be estimated from the data dimensions where MEM will be applied. For example, if 2D MEM will be applied to the CACB/N indirect dimensions of a CBCANH experiment, the noise level in a CACB/N plane should be used, rather than the noise level from an HN/N or HN/CACB plane.
Once the spectral noise level has been estimated, the program showApod can be used to calculate the corresponding timedomain noise level. This program takes into account the details of the window functions and zero filling which were originally used to process the data. For example, if the 2D spectral plane "ext.dat" has a frequencydomain noise level of 9100, the following command could be used:
showApod in ext.dat sigma 9100to generate a report like the following, which in this case lists the corresponding timedomain noise as roughly 400:
REMARK Effect of Processing on Noise for ext.dat REMARK Usersupplied Noise in Processed Data: 9100 REMARK Noise Before Processing N and CACB: 407.003 VARS AXIS LABEL LW_ADJ SIGMA_FACTOR FORMAT %8s %8s %+9.5f %8.5f XAxis N 0.57981 0.25223 YAxis CACB 0.56989 0.17732
INTERPRETING THE MEM REPORTS
Setting the report level as report 2 will produce a summary like the following one, which gives an initial summary of parameters such as memory used, the MEM statistics at each iteration, and a final summary. If the report level is set as report 1, only the final summary will be listed.
2D MEM, TwoChannel Mode, 2.65 MBytes XAxis: 1stPoint=Not Adjusted P0=+000.00 P1=+000.00 YAxis: 1stPoint=Not Adjusted P0=090.00 P1=+180.00  1. Chi/N: 8.75 S: 3.831e+08 La: 0.000 Z: 0.056   2. Chi/N: 8.62 S: 3.838e+08 La: 0.151 Z: 0.054   3. Chi/N: 7.17 S: 3.953e+08 La: 0.301 Z: 0.059   4. Chi/N: 3.16 S: 4.478e+08 La: 0.462 Z: 0.103   5. Chi/N: 1.77 S: 4.831e+08 La: 0.704 Z: 0.149   6. Chi/N: 1.32 S: 5.029e+08 La: 1.024 Z: 0.181   7. Chi/N: 1.13 S: 5.170e+08 La: 1.389 Z: 0.201   8. Chi/N: 1.02 S: 5.279e+08 La: 1.779 Z: 0.217   9. Chi/N: 0.96 S: 5.362e+08 La: 2.183 Z: 0.227  1. It: 9 C/N: 0.96 S: 5.36e+08 RMS: 4.6e+02 Z: 0.227 CHI2
The meanings of the parameters reported at each iteration are as follows:
Chi/N: Reports the chi2/n value at the current iteration. This should decrease to 1.0 or smaller for a good reconstruction. If this value shows a tendency to increase, try reducing the alpha parameter or increasing the eScale parameter by an order of magnitude. If applicable, try using milder deconvolution windows.
If chi2/n converges to a value higher than 1.0, check the accuracy of the noise estimate. If chi2/n value tends to improve too slowly, try increasing the alpha parameter or decreasing the eScale parameter.
S: Reports the entropy s at the current iteration. In a good reconstruction. this will be a negative number which increases in magnitude.
A: Reports the value of a, the scaling factor used to create the amplified residual B, which is used in turn to update the current MEM spectrum.
La: Reports the value of lambda at the current iteration. In a good reconstruction, this will be an increasingly large positive number.
Z: Reports another MEM convergence statistic (the cosine of the angle between the entropy gradient and the chisquare gradient), which should ideally increase to 1.0 during the reconstruction. In many practical cases however, this statistic may be much less than 1.0, indicating that the final reconstruction does not have maximal entropy. In these cases, it may be useful to try the scaling mode option ts 2, which may improve the Z statistics.
PRIMARY OPTIONS
The options listed here, along with the DECONVOLUTION OPTIONS below, are those most likely to be used or adjusted in a typical MEM scheme.
ndim dimCount [1]
Number of dimensions in each reconstruction; this must
be less than or equal to the total number of dimensions
in the input data. For example, using a setting of
ndim 2 for a 3D data set means that each 2D XY plane
from the 3D data set will be reconstructed separately.
Note that memory and computational requirements
increase rapidly with increasing dimension count.
sigma noise [1.0]
This important parameter specifies the estimated standard
deviation of the noise in the timedomain. If
this value is not set well, a poor reconstruction will
probably result. The timedomain noise level is usually
not measured directly, but rather it is estimated
on the basis of the noise level measured in the
frequencydomain. See the section on Noise Estimation
above for more. If a sigma value of zero is given, an
automated estimate will be used, but this is not recommended.
In most cases, it seems better to underestimate the noise level,
in order to prevent MEM iterations from terminating before
the smallest signals have
been reconstructed. If the MEM result seems to be
missing signals that are observed in the original data,
try reducing the value of the sigma parameter.
alpha alpha [1e3]
In each iteration of the MEM algorithm, an "ideal"
correction is calculated for updating the current MEM
spectrum. In practice however, only a fraction of this
correction is added to insure stable convergence. This
option specifies the parameter alpha, the fraction of
the ideal correction to add to the current MEM spectrum.
Values for alpha commonly range from 1e1 to
1e4, with larger values leading to faster but potentially
unstable reconstructions. Many divergence problems can be
fixed by reducing the alpha parameter.
x0 thresh [5.0]
In the MEM algorithm, the scaled frequencydomain residual
(2*lambda*U) at a given iteration is amplified
exponentially to generate the correction to add to the
current MEM spectrum. To avoid excessive amplification,
scaled signals above the threshold given by x0
will be amplified linearly rather than exponentially.
Increasing this parameter may improve resolution or
convergence speed, at the expense of stability.
eScale g [1.0]
Specifies the scale factor g used for computing the
entropy s from MEM spectrum F, s = Sum( F ln(F/g) ).
Smaller values will lead to faster but potentially
unstable reconstructions.
ts tsMode [0]
This option specifies when to perform additional
scaling of the current MEM spectrum in an attempt to
more effectively minimize the timedomain residual.
The possible modes are:
0
No scaling is used (Default).
1
Data is rescaled on divergence.
2
Data is rescaled at every iteration.
Option 2 can often improve the convergence of the Z statistic, possibly at the expense of increased iteration count.
report rLevel [0]
Specifies the report level for statistics displayed
during the calculation:
0
No report (Default).
1
Report summary after each final iteration.
2
Report statistics after each iteration
3
Save current data F and U at each iteration.
Option 3 is intended primarily for testing and development purposes.
DECONVOLUTION OPTIONS
These options specify the name and parameters of the window functions used on the dimensions of the MEM timedomain data (R in the description above) before it is compared with the original timedomain data. These windows will usually be line broadening functions whose broadening widths are less than the intrinsic linewidths in the original data. The purpose of these windows is to adjust the (sharp) MEM spectrum so that it matches the original data when broadened. In other words, resolution enhancement is achieved via a convolution of the MEM data (which is a stable procedure), rather than by direct deconvolution of the original data (which is unstable).
A given window is specified as a function name option, plus one, two, or three generic window parameters, called Q1, Q2, and Q3. The dimension that the window and parameters apply to is specified by including a prefix "x", "y", "z", or "a" in the option name, such as xconv, yconv, etc. If the prefix is omitted, such as in conv, the option applies to the XAxis of the data.
The specified function name can be any nmrPipe window function, including SP, EM, or GM. Depending on which window function is selected, the corresponding options cQ1, cQ2, etc. specify its Q parameters; the meaning of the parameters depends on the choice of window function. The specific interpretation of the Q1/Q2/Q3 parameters is given in the manual page about a given window function, and also in the nmrPipe online help text, for example by using:
nmrPipe help fn SPThe complete list of deconvolution options follows:
conv cFn
(for XAxis Only)
xconv xcFn
(for XAxis)
yconv ycFn
(for YAxis)
zconv zcFn
(for ZAxis)
Specifies the window function name for the given axis
of the MEM timedomain data; if no option is specified,
no window will be applied.
cQ1 cQ1
cQ2 cQ2
cQ3 cQ3
xcQ1 xcQ1
xcQ2 xcQ2
xcQ3 xcQ3
Specifies the window parameters Q1, Q2, and Q3 for the
window applied to the XAxis of the MEM timedomain
data. These options are only used if options conv or
xconv have been used as well.
ycQ1 ycQ1
ycQ2 ycQ2
ycQ3 ycQ3
Specifies the window parameters Q1, Q2, and Q3 for the
window applied to the YAxis of the MEM timedomain
data. These options are only used if option yconv has
been used as well.
zcQ1 zcQ1
zcQ2 zcQ2
zcQ3 zcQ3
Specifies the window parameters Q1, Q2, and Q3 for the
window applied to the ZAxis of the MEM timedomain
data. These options are only used if option zconv has
been used as well.
CONVERGENCE TEST OPTIONS
cLim chiLimit [1.0]
Probably the most important convergence criterion for
MEM is that the residual between the original
timedomain data and the MEM reconstruction is small
enough to be accounted for by the known noise level.
This is judged by the chisquare value of the
timedomain residual. Ideally, for n total points in
the data (chisquare)/n should be one or smaller. The
option cLim specifies the value which (chisquare)/n
should fall below in a properly converged result.
Iterations will terminate automatically if this criterion
is reached.
zLim zLimit [1.0]
One convergence criterion for MEM is the balance
between corrections which maximize the entropy of the
current MEM spectrum compared to corrections which
minimize the chisquare value of the residual. This is
measured by the MEM Z value, which gives the cosine of
the angle between the entropy gradient and the
chisquare gradient. Iterations will terminate
automatically if the Z value is greater than the given
zLimit parameter. Note that the Z value should
increase to 1.0 in an ideal reconstruction, but values
as small as 0.1 often seem to give acceptable results.
itmax maxIter [50]
Specifies the maximum iteration count allowed for any
given reconstruction. Values in the range of 10 to 100
are usual.
itmin minIter [3]
Specifies the minimum iteration count allowed for any
given reconstruction, even if convergence tests have
already been satisfied.
div maxDiverge [3]
Specifies the maximum number of successive iterations
where the chisquare value is permitted to get worse
(larger) before iterations terminate automatically.
Note that divergence is often due to an alpha parameter
which is too large, a bad noise estimate for
sigma, or a problem in the preprocessing scheme.
RECONSTRUCTION MODE OPTIONS
neg
This flag enables reconstruction of combinations of
both positive and negative signals (Two Channel MEM) It
is the default mode.
pos
This flag limits MEM to reconstruction of only positive
signals. If the data contains substantial negative
signals, this mode may cause a poor result and bad convergence
statistics.
zero
The MEM algorithm used here tends to introduce a
zeroorder offset into the reconstruction. This option
will cause the final result to be corrected by
zeroorder baseline estimation. (Default).
nozero
This flag will suppress the zeroorder offset
correction which is applied to the final result.
freq
This flag will produce the final MEM result as
frequencydomain data. (Default).
time
This flag will produce the final MEM result as
timedomain data.
zf zfCount [2]
(Also xzf yzf etc).
Specifies the zero fill count for a given dimension.
The zero fill count defines the number of times to double
the data size by padding with zeros. Because the
MEM algorithm used here includes a Hilbert transform
step, each dimension in the reconstruction should be
zerofilled at least once for MEM to work correctly,
and optimally twice (i.e. zfCount of 2, to increase
size by a factor of 4) to make resolution improvement
possible. Note however that it is recommended that
zerofilling is performed as a preprocessing step
prior to use of MEM. See the section on Reconstruction
Schemes above for more.
OTHER MEM PARAMETER OPTIONS
clip cMode [0]
The option activates clipping of the original spectrum,
to reduce the most extreme intensities to a given
level. It can be used to stabilize reconstruction of
data with very large peaks which are not of direct
interest (e.g. solvent signal). The possible modes
are:
0
No clipping (Default).
1
Clip positive signals only.
2
Clip negative signals only.
3
Clip both positive and negative signals.
min cMin [1e17]
Specifies the minimum value for negative signal clipping;
this only applies for clip modes 2 and 3 above.
max cMax [+1e17]
Specifies the minimum value for negative signal clipping;
this only applies for clip modes 1 and 3 above.
cScale x [1e2]
Specifies a scaling parameter x; the original
timedomain data will be multiplied by x/sigma at the
start of the MEM calculation, and the final MEM result
will be multiplied by sigma/x to remove the effect of
the initial scaling. The intention of this scaling is
to keep spectral intensities within a reasonable range
during the reconstruction.
lamb lambda [1e5]
Specifies the initial value for the La Grange multiplier
lambda; this value is also used as the minimum
allowable value for lambda at any given iteration.
step beta [0.02]
At each iteration, an ideal value of the the La Grange
multiplier lambda is computed. However this "ideal"
calculation can lead to lambda values which change too
quickly from one iteration to the next, leading to instability
and divergence. The beta parameter specified
here is used to limit the change in the lambda value
according to:
lambda[next] = (1  beta)*lambda[prev] + beta*lambda[ideal]Larger values of beta will lead to faster but potentially unstable reconstructions.
tScale w [0.5]
Specifies a scale factor w for enabling exponential
amplification, as a value in the range of 0 to 1. If
this value is nonzero, only data points larger than
w*Max( U ) will be amplified, where U is the
frequencydomain residual between the current MEM spectrum
and the original data. The intent of this parameter
is to avoid amplification of truncation artifacts.
Note however that this improvement may be at the
expense of lineshape distortion.
tLimit tLimit [1.5]
Specifies a chi2 limit for use of the amplification
threshold specified by tScale w. When the chi2 value
goes below this limit, the tScale option will no
longer suppress amplification.
EXAMPLES
1D MEM applied to a 2D Spectrum: MEM may sometimes be useful in reducing truncation artifacts or improving resolution in 2D spectra when applied separately to each 1D t1 vector. Note however that differences in convergence between adjacent 1D vectors may distort the overall 2D peak shapes. The following scheme was applied to a 2D protoncarbon HSQC spectrum:
#!/bin/csh nmrPipe in test.fid \  nmrPipe fn SP off 0.5 end 0.95 pow 1 c 0.5 \  nmrPipe fn ZF auto \  nmrPipe fn FT auto \  nmrPipe fn PS p0 11 p1 22 di \  nmrPipe fn EXT x1 6ppm xn 2ppm sw \  nmrPipe fn TP \  nmrPipe fn MULT c 0.5 xn 1 \  nmrPipe fn ZF zf 2 auto \  nmrPipe fn FT auto \  nmrPipe fn PS p0 0.0 p1 0.0 di \  nmrPipe fn MEM sigma 3000 report 2 \  nmrPipe fn TP \ ov out mem1d.ft2
2D MEM applied to an Extracted 2D Plane: the following macro gives a scheme for reprocessing a 2D plane extracted from a 3D spectrum. The scheme expects that the dimensions of the 2D plane where originally processed in such a way as to permit inverse processing.
#!/bin/csh nmrPipe in ext.dat \  nmrPipe fn HT auto \  nmrPipe fn PS inv hdr \  nmrPipe fn FT inv \  nmrPipe fn ZF inv \  nmrPipe fn SP inv hdr \  nmrPipe fn MULT hdr xn 1 \  nmrPipe fn ZF zf 2 auto \  nmrPipe fn FT \  nmrPipe fn PS hdr di \  nmrPipe fn TP \  nmrPipe fn HT auto \  nmrPipe fn PS inv hdr \  nmrPipe fn FT inv \  nmrPipe fn ZF inv \  nmrPipe fn SP inv hdr \  nmrPipe fn MULT hdr xn 1 \  nmrPipe fn ZF zf 2 auto \  nmrPipe fn FT \  nmrPipe fn PS hdr di \  nmrPipe fn TP \  nmrPipe fn MEM ndim 2 sigma 460 report 2 \ out ext.mem.ft2 ov
2D MEM applied to a 3D Spectrum: the following macro gives a scheme for reprocessing a 3D spectrum with 2D MEM in both indirect dimensions. This macro expects that the original spectrum is stored in transposed order, with the directlydetected dimension in the YAxis. It also expects that the indirect dimensions where originally processed in such a way as to permit inverse processing.
The scheme has been built to present the data to MEM in a specific axis order. For instance, if we assume the input spectrum has a data order X=H Y=HN Z=N, then this scheme temporarily rearranges the data for MEM such that X=N Y=H Z=HN.
In the macro, the indirect planes are reprocessed so that they are presented for MEM without window functions, but with firstpoint scaling in the timedomain, phasing, and extensive zero fill. MEM deconvolution is used to apply exponential line sharpening (EM) by 10hz in the XAxis, and 15hz in the YAxis:
#!/bin/csh xyz2pipe in ft/test%03d.ft3 z \  nmrPipe fn HT auto \  nmrPipe fn PS inv hdr \  nmrPipe fn FT inv \  nmrPipe fn ZF inv \  nmrPipe fn SP inv hdr \  nmrPipe fn MULT c 0.5 xn 1 \  nmrPipe fn ZF zf 2 auto \  nmrPipe fn FT \  nmrPipe fn PS hdr di \  nmrPipe fn TP \  nmrPipe fn HT auto \  nmrPipe fn PS inv hdr \  nmrPipe fn FT inv \  nmrPipe fn ZF inv \  nmrPipe fn SP inv hdr \  nmrPipe fn MULT c 0.5 xn 1 \  nmrPipe fn ZF zf 2 auto \  nmrPipe fn FT \  nmrPipe fn PS hdr di \  nmrPipe fn TP \  nmrPipe fn MEM ndim 2 report 2 \ sigma 1520 alpha 0.0001 eScale 0.1 \ xconv EM xcQ1 10 yconv EM ycQ1 15 \  pipe2xyz out ft/mem%03d.ft3 zDeconvolution of a fixed coupling: in this example, a J = 88Hz coupling is deconvolved from the indirect dimension of 2D timedomain data. The coupling profile is specified via parameters for the JMOD window function. In the NMRPipe implementation of MEM, this kind of deconvolution will only work effectively on data with limited dynamic range. The calculation is stabilized by using a higher than normal threshold for computing an iterate (
tScale 0.8
). Furthermore, in this case, the iterations
are stopped at an earlier than usual stage (cLim 3.0
)
to avoid artifacts from the deconvolution, which take the form of
satelite peaks at positions +/ J from the deconvolved peaks.
In this example, the data are temporarily transformed in the direct dimension in order to extract a PPM range of interest.
nmrPipe in test.fid \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn EXT x1 12ppm xn 6ppm sw \  nmrPipe fn PS p0 256 p1 0 \  nmrPipe fn FT inv \  nmrPipe fn ZF inv \  nmrPipe fn MEM sigma 750 report 2 ndim 2 cLim 3 tScale 0.8 tLimit 0.0 \ xconv EM xcQ1 10.0 \ yconv JMOD ycQ1 0.5 ycQ2 88.0 ycQ3 5.0 yzf 3 \ out deco.ft2 ovHEADER VALUES
MEM uses NDFTFLAG to determine the transform state of the current data. It also uses NDP1 and NDX1/NDXN to decide whether an oridinary Hilbert Transform should be used to reconstruct imaginary data, or a special version for data with halfpoint delay (NDP1 = 180, no subregion extracted).
MEM updates the data sizes NDSIZE, NDAPOD, and NDTDSIZE.
The result from MEM is realonly frequency domain data, so that MEM
also updates NDFTFLAG, NDQUADFLAG, and FDQUADFLAG, as well as the
parameters for PPM calibration (NDORIG, NDCENTER).
NMRPipe Processing Functions
MIR: Append Mirror Image.
Options for Left or Right Mode:

NMRPipe Processing Functions
Maximum Likelihood Frequency Map
ML Size, Linewidth, Conv Window: (also: x y z):

NMRPipe Processing Functions
MULT: Multiply Data by a Constant.

MULT multiplies the real or imaginary part of each vector in the data stream by a given constant. The function can operate on all points, or on a range of points within each vector. It is possible to specify separate constants for multiplying the real and imaginary parts of the data, however the imaginary constant will only be used if the current dimension of the input data has an imaginary part.
OPTIONS
c cC
Specifies the same constant for multiplying both the real part of the data,
and also to the imaginary part if it exists.
r cR
Specifies the constant to multiply the real part of the data.
i cI
Specifies the constant to multiply the imaginary part of the data.
This has no effect if the input data has no imaginary part.
inv
If this flag is used, the inverse of the constants will be used
for multiplication.
x1 pnt1
Specifies the location of the first point in range of points to adjust,
with default units in points. The default value is 1, the first point
in the data vector. The valid unit labels are: Pts Hz ppm %.
When specifying a location with a unit label, there should be no spaces
between the numerical value and the label.
xn pntN
Specifies the location of the last point in range of points to adjust,
with default units in points. The default value is the last point
in the data vector. The valid unit labels are: Pts Hz ppm %.
When specifying a location with a unit label, there should be no spaces
between the numerical value and the label.
EXAMPLES
The following example multiplies all data by 100.0:
nmrPipe fn MULT c 100.0
The following example multiplies the first real point, and the first imaginary point if any, by 0.5:
nmrPipe fn MULT c 0.5 xn 1
The following example adds the constant "100.0" to the range of points from 5.5ppm to 4.5ppm:
nmrPipe fn ADD c 100.0 x1 5.5ppm xn 4.5ppm
The following Cshell script uses the program scale2D to extract the minimum and maximum values in a given spectrum. A processing scheme with the MULT function is used to multiply the data by a suitable constant so that the maximum value in the result will be 100.0. The script uses the command MATH floatingpoint arithmetic.
#!/bin/csh set sInfo = (`scale2D all test.ft2`) set maxVal = $sInfo[5] echo Maximum is $maxVal set c = (`MATH "100.0/$maxVal"`) nmrPipe in test.ft2 fn MULT c $c out test.ft2 inPlace
SEE ALSO
The MULT function has corresponding functions
ADD and SET.
NMRPipe Processing Functions
NULL: No Change to Data.
The NULL function leaves the data unchanged. It is
the default function of nmrPipe,
applied when no other function is specified explicitly via the
nmrPipe fn ...
argument. This is most commonly
done at the head of a processing pipeline, where an input file
is specified, but no explicit processing function is given, for
example, as in the first line of this processing scheme:
nmrPipe in test.fid \  nmrPipe fn EM lb 2.0 c 0.5 \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS p0 45 p1 0 di \ out test.ft1 ov
NMRPipe Processing Functions
POLY: Polynomial Subtract for TimeDomain Solvent Correction and FrequencyDomain Baseline Correction.
Baseline Region Coordinates (Valid Units: Pts Hz ppm %):
Sequential Data Is Adjusted Automatically. Digital Oversampled Data (Bruker DMX and JEOL Delta) Is Adjusted Automatically. 
NMRPipe Processing Functions
PS: Phase Correction.
1. Linear correction: p0 + p1*f 2. Exponential correction: p0*exp( tc*f ) 
NMRPipe Processing Functions
QART: Scaling for Quad Artifacts.
R' = R I' = (1+a)*I + f*R 
NMRPipe Processing Functions
QMIX: Complex mixing of N inputs to M outputs.

NMRPipe Processing Functions
REV: reverse spectrum.

The REV function reverses the order of points
in each vector. Note that this is rarely the correct function
to apply to a "reversed" spectrum. This is because the zerofrequency
point of a spectrum is at point N/2 + 1 of 1 to N points.
This point should stay in the same position when the order of
frequencies is reversed. But, if the order of points is simply
reversed, the point that was previously at point N/2 + 1
will then be at point N/2. For this reason, a spectral dimension
which is reversed should instead be processed with FT neg
as shown below.
OPTIONS
sw
If this flag is used on frequencydomain data, the chemical
shift calibration information will be adjusted by the equivalent
of one point.
EXAMPLES
Negating imaginary data before Fourier transform is equivalent to applying the REV function followed by a onepoint circular shift:
 nmrPipe fn FT neg \is equivalent to:
 nmrPipe fn FT \  nmrPipe fn REV sw \  nmrPipe fn CS rs 1 sw \
NMRPipe Processing Functions
RFT: Real Fourier Transform.
This is not the same as Complex Fourier Transform of realonly data; most cases require use of FT real, not RFT. 
RFT applies a real Fourier transform (cosine transform) to the current data vectors. Note that this is not the same as applying a complex Fourier transform to realonly data, and so RFT is seldom used. Instead, realonly data is usualy transformed via the FT real nmrPipe processing function. There is no requirement for a poweroftwo data size, but processing times will likely be slower for nonpoweroftwo cases. FT options include selection of forward or inverse transform.
OPTIONS
inv
This flag selects an inverse Cosine transform.
HEADER VALUES
The RFT function toggles the NDFTFLAG to 0 or 1, depending
on whether the result is timedomain or frequency domain, respectively.
NMRPipe Processing Functions
RS: Right Shift and Zero Pad.

RS applies a rightshift to the points in each vector from the current dimension of the data. The shifted points at the start of the data vector are replaced with zeros. For example, if an 8point data vector consists of the following values:
1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0then after a 2point rightshift (
RS rs 2
) the result
will be:
0.0 0.0 1.0 2.0 3.0 4.0 5.0 6.0
The RS function will only shift by an integer number of points; for shifting data by a fractional number of points, use the FSH function.
OPTIONS
rs rsVal
Specifies the number of points for the shift. If the number is
positive, the data will be shifted to the right. If it is negative,
the data will be shifted to the left.
This value can also be specified with spectral units (% Hz ppm).
In these cases, the amount of shift requested will be rounded
to the nearest integer.
sw
If this flag is used with timedomain data, the recorded
timedomain sizes NDAPOD and NDTDSIZE are adjusted by
the number of points shifted. If this flag is used with
frequencydomain data, the chemical shift calibration
information is updated (NDORIG and NDCENTER).
EXAMPLES
The following, when applied in the timedomain, is equivalent to applying a first order phase of P1=360 in the frequency domain; applying the zerofill before the RS avoids losing one point:
 nmrPipe fn ZF auto \  nmrPipe fn RS rs 1 \
NMRPipe Processing Functions
SAVE: Save Current Data Vector.

NMRPipe Processing Functions
SET: Set Data to a Constant.

SET sets the value of the real or imaginary part of each vector in the data stream to a given constant. It can operate on all points, or on a range of points within each vector. It is possible to specify separate constants for the real and imaginary parts of the data, however the imaginary constant will only be used if the current dimension of the input data has an imaginary part.
OPTIONS
c cC
Specifies the same constant for setting both the real part of the data,
and also to the imaginary part if it exists.
r cR
Specifies the constant for setting the real part of the data.
i cI
Specifies the constant for setting the imaginary part of the data.
This has no effect if the input data has no imaginary part.
x1 pnt1
Specifies the location of the first point in range of points to adjust,
with default units in points. The default value is 1, the first point
in the data vector. The valid unit labels are: Pts Hz ppm %.
When specifying a location with a unit label, there should be no spaces
between the numerical value and the label.
xn pntN
Specifies the location of the last point in range of points to adjust,
with default units in points. The default value is the last point
in the data vector. The valid unit labels are: Pts Hz ppm %.
When specifying a location with a unit label, there should be no spaces
between the numerical value and the label.
EXAMPLES
The following example sets all points in the data to 1.0:
nmrPipe fn SET c 1.0
The following example sets all real points to 1.0, and all imaginary points to 1.0, if any:
nmrPipe fn SET r 1.0 i 1.0
The following example sets the range of points from 5.5ppm to 4.5ppm to zero:
nmrPipe fn SET c 100.0 x1 5.5ppm xn 4.5ppm
SEE ALSO
The SET function has corresponding functions
ADD and MULT.
NMRPipe Processing Functions
SHUF: Shuffle Utilities.

NMRPipe Processing Functions
SIGN: Sign Manipulation Utilities.

NMRPipe Processing Functions
SMO: NPoint Smoothing.

The SMO function performs smoothing or centering on data vectors. If the current dimension is complex, the real and imaginary parts of each vector are treated separately. In smoothing, a given point in the data vector is replaced by the local average of all points in the range +/ N points away. This means that a given local region in the interior of the vector will consist of 2*N + 1 points, but fewer points at the head and tail of the vector.
OPTIONS
n N
This option specifies N, the +/ size of the local region used
for the calculation. The value can be specified with units of
Pts Hz ppm %, but will be rounded to an integer number of points.
center
If this flag is used, centering will be performed instead of
smoothing. In centering, the local average is subtracted
from each point.
NMRPipe Processing Functions
SOL: Solvent Filter.
Sequential Data Adjusted Automatically. Digital Oversampled Data (Bruker DMX, JEOL Delta) Adjusted Automatically. 
NMRPipe Processing Functions
SP: Adjustable Sine Window.

SP applies a sinebell window with an adjustable
offset, endpoint, and exponent. The offset and endpoint are
specified in units of pi radians.
In the following formula tSize
is the number of
timedomain points, which defines the length of the window
function; SP[i] is the SP window function from i = 0
(first
point) to i = tSize  1
(last point); sw
is the sweep width
in Hz.
SP[i] = sin( (PI*off + PI*(endoff)*i/(tSize1) )^pow
In addition to functionspecific options, the SP window provides the following features common to all nmrPipe window functions:
SP OPTIONS
off offset
(Q1) Specifies the starting point of the sinebell in
units of pi radians. Common
values are 0.0 (for a sine
window which starts height at 0.0) and 0.5 (for a
cosine window, which starts at height 1.0). The
default value is 0.0.
end end
(Q2) Specifies the ending point of the sinebell in
units of pi radians. Common values are
1.0 (for a window which goes to 0.0 height at the last
point) and
0.95 (for a window which doesn't go all the way to
0.0). The default value is 1.0.
pow pow
(Q3) Specifies the exponent of the sinebell;
Noninteger values are allowed. Common values are 1.0
(for ordinary sinebell) and 2.0 (for squaredbell
functions). The default value is 1.0.
GENERIC OPTIONS
size aSize
Specifies the number of points in the window function.
The default value is the valid timedomain size
recorded in the data header.
start aStart
Specifies the starting point of the window function.
The default value is 1, which means the window function
starts at the first point of the FID. This option is
intended for creation of composite windows by application
of different functions to different regions of the
FID.
c fScale
Specifies the scaling applied to the first point of the
FID, which influences the zeroorder offset in the
corresponding spectrum. The default value is 1.0,
which means no first point adjustment is applied. A
value of 0.5 is usually appropriate in cases where no
substantial firstorder phase correction will be
applied.
one
This flag influences the values used "outside" the window
function, in cases where the window size is smaller
than the actual number of data points. By default,
data values outside the window region are multiplied by
zero when the window is applied. However if the one
flag is used, data values outside the window region
will be multiplied by 1.0 when the window is applied.
This flag is intended to assist creation of composite
windows by application of different functions to different
regions of the FID.
hdr
When this flag is used, default window parameters
(Q1, Q2, Q3) will be extracted from the data header,
along with the first point scaling. This requires that
all of these parameters have already been recorded, for
instance during previous processing or format conversion
(see EXAMPLES below). Additional commandline can
be used to override values restored from the header.
The window parameters stored in the data header can be
viewed using the showhdr program, for example:
showhdr verb test.ft2
inv
When this flag is used, the inverse (1/window) of the
selected window and first point scale will be applied.
This option is intended for removing a
previouslyapplied window in inverse processing
schemes. This option should generally only be used on
window functions which have no values close or equal to
zero. In cases where the window does have a zero
value, the inverse window is also given as zero.
EXAMPLES
Two ways of specifying an ordinary cosine bell:
nmrPipe fn SP off 0.5 nmrPipe fn SP off 0.5 end 1.0
Three ways of specifying an ordinary sine bell; note that this is the default function for SP:
nmrPipe fn SP nmrPipe fn SP off 0.0 nmrPipe fn SP off 0.0 end 1.0
A cosinesquared bell:
nmrPipe fn SP off 0.5 end 1.0 pow 2
A 60degree shifted sine bell with scaling of the first point by 0.5; offset = 60/180, roughly 0.33:
nmrPipe fn SP off 0.33 end 1.0
A cosine bell which does not decrease all the way to zero; this window function can usually be inverted safely for inverse processing schemes, because its smallest height is about 0.16:
nmrPipe fn SP off 0.5 end 0.95
A cosinesquared rolloff function; the cosine function is
set to span 100 points starting from point 257 in the data,
so that the window region extends from point 257 to point
356. Since the one
flag is included, the data will be multiplied
by 1.0 outside of this region. Therefore, the
result is a window which is uniformly 1.0 over points 1 to
256, and decays to 0.0 as a cosinesquare over points 257 to
356:
nmrPipe fn SP off 0.5 pow 2 start 257 size 100 one
The following scheme shows window parameters (APOD, Q1, Q2, and Q3), first point scale (C1), and phasing (P0, P1) specified during conversion. The values are then extracted and used during processing by including the hdr option with processing functions APOD and PS:
#!/bin/csh bruk2pipe in hsqcn.ser \ xN 2048 yN 256 \ xT 1024 yT 128 \ xMODE Complex yMODE Complex \ xSW 9090.91 ySW 2500.00 \ xOBS 600.138 yOBS 60.8108 \ xCAR 4.73 yCAR 118.0 \ xLAB HN yLAB N \ xAPOD SP yAPOD SP \ xQ1 0.50 yQ1 0.50 \ xQ2 0.98 yQ2 0.95 \ xQ3 2.0 yQ3 1.0 \ xC1 0.5 yC1 1.0 \ xP0 0.0 yP0 90.0 \ xP1 0.0 yP1 180.0 \ ndim 2 aq2D States \ out hsqcn.fid verb ov nmrPipe in hsqcn.fid \  nmrPipe fn SOL \  nmrPipe fn APOD hdr \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS p0 22 p1 0.0 di \  nmrPipe fn EXT left sw verb \  nmrPipe fn TP \  nmrPipe fn APOD hdr \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS hdr di \ verb ov out test.ft2
In this inverse processing scheme, a spectrum is inverse
transformed, and the SP window applied in a previous scheme
is removed (SP inv hdr
) in order to apply Linear Prediction
(LP). After LP, the window is reapplied (SP hdr
):
xyz2pipe in lp/test%03d.ft3 z verb \  nmrPipe fn HT auto \  nmrPipe fn PS inv hdr \  nmrPipe fn FT inv \  nmrPipe fn ZF inv \  nmrPipe fn SP inv hdr \  nmrPipe fn LP fb \  nmrPipe fn SP hdr \  nmrPipe fn ZF auto \  nmrPipe fn FT \  nmrPipe fn PS hdr di \  pipe2xyz out lp/test%03d.ft3 z inPlace
HEADER VALUES
The nmrPipe window functions use the recorded timedomain size (NDAPOD) to establish their default length.
When the hdr
flag is used, default window parameters are
extracted from header values NDAPODCODE, NDAPODQ1, NDAPODQ2,
NDAPODQ3, and NDC1.
The header values NDAPODCODE, NDAPODQ1, NDAPODQ2, NDAPODQ3,
and NDC1 are updated according to the values applied during
processing.
NMRPipe Processing Functions
TM: Trapezoid Multiply Window.

TM applies a trapezoid window. The window is specified in terms of the lengths of the left and right edges of the trapezoid. The lengths are specified in points. The window is seldom if ever used with biomolecular NMR spectra, but might be of use for timedomain data which has its largest amplitudes near the center, as is commonly found in timedomain image data.
In addition to functionspecific options, each of the nmrPipe window functions provides the following features:
TM OPTIONS
t1 leftPts
(Q1) Specifies the number of points in the left edge of
the trapezoid window. The window function will
increase from 0.0 to 1.0 over this point range.
t2 rightPts
(Q2) Specifies the number of points in the right edge
of the trapezoid window. The window function will
decrease from 1.0 to 0.0 over this point range.
GENERIC OPTIONS
size aSize
Specifies the number of points in the window function.
The default value is the valid timedomain size
recorded in the data header.
start aStart
Specifies the starting point of the window function.
The default value is 1, which means the window function
starts at the first point of the FID. This option is
intended for creation of composite windows by application
of different functions to different regions of the
FID.
c fScale
Specifies the scaling applied to the first point of the
FID, which influences the zeroorder offset in the
corresponding spectrum. The default value is 1.0,
which means no first point adjustment is applied. A
value of 0.5 is usually appropriate in cases where no
substantial firstorder phase correction will be
applied.
one
This flag influences the values used "outside" the window
function, in cases where the window size is smaller
than the actual number of data points. By default,
data values outside the window region are multiplied by
zero when the window is applied. However if the one
flag is used, data values outside the window region
will be multiplied by 1.0 when the window is applied.
This flag is intended to assist creation of composite
windows by application of different functions to different
regions of the FID.
hdr
When this flag is used, default window parameters
(Q1,Q2, and Q3) will be extracted from the data header,
along with the first point scaling. This requires that
all of these parameters have already been recorded, for
instance during previous processing or format conversion
(see EXAMPLES below). Additional commandline can
be used to override values restored from the header.
The window parameters stored in the data header can be
viewed using the showhdr program, for example:
showhdr verb test.ft2
inv
When this flag is used, the inverse (1/window) of the
selected window and first point scale will be applied.
This option is intended for removing a
previouslyapplied window in inverse processing
schemes. This option should generally only be used on
window functions which have no values close or equal to
zero. In cases where the window does have a zero
value, the inverse window is also given as zero.
EXAMPLES
TM is commonly applied with equal lengths for the legs of the trapezoid:
 nmrPipe fn TM t1 32 t2 32 \
HEADER VALUES
The nmrPipe window functions use the recorded timedomain size (NDAPOD) to establish their default length.
When the hdr
flag is used, default window parameters are
extracted from header values NDAPODCODE, NDAPODQ1, NDAPODQ2,
and NDC1.
The header values NDAPODCODE, NDAPODQ1, NDAPODQ2,
and NDC1 are updated according to the values applied during
processing.
NMRPipe Processing Functions
TP: 2D Plane Transpose (Also: YTP)

NMRPipe Processing Functions
TRI: Triangle Window.

TRI applies a triangle window. The window is specified in terms of the location of the triangle apex, and the heights of the window at the first and last points of the FID. The window is seldom if ever used with biomolecular NMR spectra, but might be of use for timedomain data which has its largest amplitudes near the center, as is commonly found in timedomain image data.
In addition to functionspecific options, each of the nmrPipe window functions provides the following features:
TRI OPTIONS
loc apexLoc
(Q1) Specifies the point location of the triangle
function's apex on the FID. The triangle function will
have a height of 1.0 at this location.
lHi lHi
(Q2) Specifies the height of the triangle function at
the first point of the window. The window will vary
linearly from this height to 1.0 between the first
point and the apex of the window.
rHi rHi
(Q3) Specifies the height of the triangle function at
the last point of the window. The window will vary
linearly from 1.0 to this height between the apex of
the window and the last point.
GENERIC OPTIONS
size aSize
Specifies the number of points in the window function.
The default value is the valid timedomain size
recorded in the data header.
start aStart
Specifies the starting point of the window function.
The default value is 1, which means the window function
starts at the first point of the FID. This option is
intended for creation of composite windows by application
of different functions to different regions of the
FID.
c fScale
Specifies the scaling applied to the first point of the
FID, which influences the zeroorder offset in the
corresponding spectrum. The default value is 1.0,
which means no first point adjustment is applied. A
value of 0.5 is usually appropriate in cases where no
substantial firstorder phase correction will be
applied.
one
This flag influences the values used "outside" the window
function, in cases where the window size is smaller
than the actual number of data points. By default,
data values outside the window region are multiplied by
zero when the window is applied. However if the one
flag is used, data values outside the window region
will be multiplied by 1.0 when the window is applied.
This flag is intended to assist creation of composite
windows by application of different functions to different
regions of the FID.
hdr
When this flag is used, default window parameters
(Q1,Q2, and Q3) will be extracted from the data header,
along with the first point scaling. This requires that
all of these parameters have already been recorded, for
instance during previous processing or format conversion
(see EXAMPLES below). Additional commandline can
be used to override values restored from the header.
The window parameters stored in the data header can be
viewed using the showhdr program, for example:
showhdr verb test.ft2
inv
When this flag is used, the inverse (1/window) of the
selected window and first point scale will be applied.
This option is intended for removing a
previouslyapplied window in inverse processing
schemes. This option should generally only be used on
window functions which have no values close or equal to
zero. In cases where the window does have a zero
value, the inverse window is also given as zero.
EXAMPLES
A triangle window which goes from 0.05 to 1.0 and back to 0.05, so that it contains no zero values:
 nmrPipe fn TRI lHi 0.05 rHi 0.05 \
HEADER VALUES
The nmrPipe window functions use the recorded timedomain size (NDAPOD) to establish their default length.
When the hdr
flag is used, default window parameters are
extracted from header values NDAPODCODE, NDAPODQ1, NDAPODQ2,
and NDC1.
The header values NDAPODCODE, NDAPODQ1, NDAPODQ2,
and NDC1 are updated according to the values applied during
processing.
NMRPipe Processing Functions
ZD: Set Diagonal Band to Zero.
For Auto Mode, slope M is set to (XSIZE*XSW)/(YSIZE*YSW) 
NMRPipe Processing Functions
ZF: Extend By Zero Filling.
Zero Fill Amount. Use only one of the following:

NMRPipe Processing Functions
ZTP: 3D Matrix Transpose.
ZTP exchanges the current XAxis of the data stream with the current ZAxis, so that vectors from the ZAxis of 3D and 4D data can be processed. In most cases, it is not neccessary to use the ZTP function, because ZAxis vectors can be accessed directly via xyz2pipe z ... But, ZTP can be used to build processing schemes which process three dimensions in a single pass, as shown below.
Each instance of the ZTP function requires enough memory to fit an entire 3D matrix from the current data; this might not be possible for every case depending on data size and system resources. And, even when possible, it might not be efficient.
EXAMPLES
This is a variation on the typical 3D HNdetected processing scheme, but in this case using ZTP to processes the 3D data without the need to save an intermediate result. In this scheme, the order of the dimensions is unchanged.
xyz2pipe in fid/test%03d.fid x verb \  nmrPipe fn SOL \  nmrPipe fn SP off 0.5 end 0.98 pow 2 c 0.5 \  nmrPipe fn ZF \  nmrPipe fn FT \  nmrPipe fn PS p0 43 p1 0.0 di \  nmrPipe fn EXT left sw \  nmrPipe fn TP \  nmrPipe fn SP off 0.5 end 0.98 pow 1 c 1.0 \  nmrPipe fn ZF \  nmrPipe fn FT \  nmrPipe fn PS p0 135 p1 180 di \  nmrPipe fn TP \  nmrPipe fn POLY auto \  nmrPipe fn TP \  nmrPipe fn ZTP \  nmrPipe fn SP off 0.5 end 0.98 pow 1 c 0.5 \  nmrPipe fn ZF \  nmrPipe fn FT \  nmrPipe fn PS p0 0.0 p1 0.0 di \  pipe2xyz out ft/test%03d.ft3 z