NMRPipe Big Reference Page

Under Construction ... Last Updated Jul 7, 2008

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 C-Shell interpreter, while others are written in the TCL scripting language. In particular, spectral processing is performed via C-shell 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 built-in 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 under-estimate the importance of interactive commands like "nmrDraw", which are used often, but seldom included in another script.

Programs of NMRPipe

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 Stand-alone 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 C-shell scripts. Actually a script which invokes the M macro interpreter.
M 8 Stand-alone 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 C-shell scripts. Actually a script which invokes the M macro interpreter.
addNMR 50 Combine NMRPipe-format 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 Gaussian-random noise to NMRPipe-format data.
addTabVar 76 Add a variable (new column) to an NMRPipe-format table. -in (76) -var (76) -start (76)
-col (4)
bin2pipe 41 Generic utility to convert binary data to NMRPipe-format data. -xN (39) -xT (39) -xMODE (39)
-xSW (39) -xOBS (39) -xLAB (39)
-xCAR (37) -ndim (37) -in (35)
bruk2pipe 212 Convert Bruker time-domain data to NMRPipe-format 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 integer-to-float conversion. -in (9) -iws (5) -ows (5)
-out (5) -is (4) -bo (4)
-last (3) -s2f (2) -d2f (2)
byteSwap 1 Byte-swap binary data for format conversion.
clustTab 10 Identify clusters (overlapping groups) of objects based on their coordinates in an NMRPipe-format 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 time-domain data to NMRPipe-format data; see also the delta command for creating format conversion scripts. -in (2) -out (2)
extract2D 1 Extract a smaller 2D region from an NMRPipe-format 2D plane. OBSOLETE: replaced by stand-alone command readROI.
flagLoc 1 Utility for extracting command-line arguments from a C-shell script; returns the location of a flag on the command line.
getArgD 3 Utility for extracting command-line arguments from a C-shell 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 command-line arguments from a C-shell script; extracts a list of values associated with a flag on the command line.
getParm 1 Stand-alone program to extract parameters such as size and spectral width from NMRPipe-format data, commonly used to make spectral parameters available to C-shell 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 NMRPipe-format all-real 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 Stand-alone 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 NMRPipe-format 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 threshold-based binary mask from an NMRPipe-format all-real spectrum, with optional labeling of contiguous regions in the result.
nmrCsh 1 Utility used to launch NMRPipe parallel processing scripts on a single multi-CPU computer. See also: nmrShell, waitFor.
nmrDraw 334 Interactive interface for displaying NMRPipe-format spectral data, with facilites for processing, phasing, and peak detection. NOTE: nmrDraw (with upper-case 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 NMRPipe-format spectral data stream. Generally NOT invoked directly, but instead used in a UNIX pipeline via a C-shell script. -fn (9201) -di (1329) -verb (993)
-out (691) -in (639) -ov (631)
-noWr (86) -noRd (77) -inPlace (62)
nmrRecon 11 Reconstruct NMRPipe-format data from vector decomposition results, for example from program pcaNMR. -score (11) -load (11) -out (11)
-ndim (7)
nmrShell 1 Utility for network-based parallel processing with NMRPipe. NOTE: use simpler script nmrCsh For processing on a multi-CPU 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 carriage-return characters so that Windows-format text files can be used with UNIX commands and NMRPipe.
pcaNMR 17 Principal Component Analysis for vector decomposition of NMRPipe-format 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 NMRPipe-format table.
pipe2ft 1 Convert NMRPipe-format data to the FTNMR format.
pipe2spiff 3 Convert NMRPipe-format 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 NMRPipe-format stream as an NMRPipe-format file series. Also used to write NMRPipe-format 1D-4D data stream as an NMRView-format 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 Command-line utility for formatted printing in the style of the C-programming language, often used in C-shell scripts to generate NMRPipe-style data file names. -stdout (12) -stderr (12)
readROI 16 Utility for extracting and saving a region-of-interest (ROI) from NMRPipe format spectral data. Actually a TCL script which invokes the NMRWish Built-In 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 NMRPipe-format data file.
seriesTab 17 Extract maximum intensities or summations for peak regions in an NMRPipe-format 2D spectral series, using an NMRPipe-format 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 NMRPipe-format data file. See Also: sethdr.
sethdr 35 Set the value of a named parameter in the header of an NMRPipe-format 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 NMRPipe-format spectrum, and back-calculate the time-domain 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 NMRPipe-format data file. See Also: NMRPipe programs getParm, setfdata, and showhdr.
showhdr 7 Summarize the parameters in the header of an NMRPipe-format data file. -verb (4)
simSpecND 30 Add simulated multidimensional signals to an existing NMRPipe-format all-real spectrum, given an NMRPipe-format peak table as input. -in (30) -mod (30) -w (30)
-data (22) -apod (19) -list (8)
simTD 31 Create simulated NMRPipe-format 2D time-domain 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 NMRPipe-format multidimensional time-domain data, given an NMRPipe-format 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 NMRPipe-format table.
tkrm 1 Utility to list programs which are using X11 graphics as a means of inter-process 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 Varian-format time-domain data to NMRPipe-format 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 Varian-format time-domain 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 pop-up window.
xyz2pipe 443 Read a 3D or 4D NMRPipe-format 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 NMRPipe-format file to zero; often used when creating simulated spectral data with simSpecND.

NMRPipe Processing Functions

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 Lorentz-to-Gauss 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) -ps90-180 (4)
IMG 5 Image Processing Functions -median (3) -dx (2) -dy (2)
-kern (1) -min (1) -thresh (1)
INTEG 0 Integral
JMOD 0 Damped J-Modultion
LP 198 Linear Prediction -ord (148) -fb (93) -pred (74)
-xn (46) -ps0-0 (28) -ps90-180 (18)
LS 0 Left Shift
MAC 187 M-language 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 Time-Domain Solvent Subtraction -time (169)
POLY 562 Polynomial Frequency-Domain 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

NMRPipe Scripts

Name Instances Description Common Arguments (Instances)
addFC.tcl 0 Add or replace the FC force-constant 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 NMRPipe-format table; commonly used for validation and error estimation.
addTabVar.tcl 4 Add a variable (column) to an NMRPipe-format table. -in (4) -var (4) -after (4)
-fmt (4) -val (4)
adjShift.tcl 8 Add an offset adjustment to ppm values in a TALOS-format 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 time-domain models. See also: autoFit.tcl
apod.tcl 0 Demo script for interactive display of an NMRPipe apodization window.
appendTab.tcl 0 Append two NMRPipe-format tables.
autoFit.tcl 17 General purpose lineshape fitting of 1D, 2D, 3D and pseudo-3D NMRPipe-format 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 NMRPipe-format table.
cmpFDATA.tcl 0 Compare the header values of two NMRPipe-format 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 XYZ-format 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 NMRPipe-format dipolar coupling table; used in validation and error estimation.
deco.tcl 5 Decompose an NMRPipe-format 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 (in-phase/anti-phase) 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 solvent-accessible surface of a PDB structure.
fitTab.tcl 0 An example of general-purpose X/Y fitting of values from a table.
fixCS.tcl 0 Apply offset correction to values in a TALOS-format 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 NMRPipe-format table; used to access table data from within a C-shell script.
getTabInfo.tcl 0 Extract table information, such as number of entries (rows) from an NMRPipe-format table; used to access table data from within a C-shell script.
getTabRow.tcl 0 Extract a row from an NMRPipe-format table; used to access table data from within a C-shell script.
gif2roi.tcl 0 Convert a GIF format grayscale image to an NMRPipe region-of-interest (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 NMRPipe-format 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 J-coupling values into DYNAMO-format molecular calculation restraints.
jConvert.tcl 4 Convert XPLOR format J-Coupling 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 NMRPipe-format 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 NMRPipe-format table.
name2torsion.tcl 0 Convert a text file of named torsions such as phi and psi into DYNAMO-format 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 re-ordering Non-Uniformly Sampled (NUS) NMRPipe-format 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) -ps0-0 (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 ring-current 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 HN-N 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 NMRPipe-format data to
pipe2txt.tcl 0 Convert NMRPipe-format 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 NMRPipe-format peak table; used to create a simplified table for direct manipulation and viewing.
plot1D2D.tcl 0 Example script for 2D hard-copy PostScript plot generation with 1D projections.
plot3d.tcl 0 Example script for PostScript plotting of 2D planes in an NMRPipe-format 3D spectrum.
plotTab.tcl 2 Display simple XY plot of two columns from an NMRPipe-format 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 NMRPipe-format 3D-spectra.
proj3D.tcl 35 Form 2D projections from a 3D NMRPipe-format spectrum -in (34) -abs (24)
rama.tcl 0 Graphical interface for TALOS.
randDel.tcl 2 Randomly delete entries in a table; used in cross-validation 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 residue-type probability based on chemical shift.
resetLW.tcl 0 Adjust the linewidth values in an NMRPipe-format 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 Pseudo-Contact Shift analysis.
scale.tcl 5 Find the factor which minimizes the difference in the residual between two NMRPipe-format 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 NMRPipe-format 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 NMRPipe-format spectral series to create a Pseudo-3D result.
shift2tab.tcl 0 Convert PIPP-format assignments to NMRPipe-table 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 TALOS-format chemical shift table.
stripPlot.tcl 0 Create PostScript plots of strips from 3D NMRPipe-format spectra.
svdPoly.tcl 0 Polynomial fitting of X/Y data.
svdTab.tcl 0 Perform least-squares decomposition on data in an NMRPipe-table.
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 XPLOR-format restraints.
torsionConvert.tcl 6 Convert XPLOR-format 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 NMRPipe-format data.
updateTab.tcl 0 Update the chemical shift positions in an NMRPipe-format peak table, based on the positions recorded in points.
varAdjust.tcl 0 Utility to adjust Varian-format fid data, to re-order 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.

NMRWish Built-In TCL

Name Instances Description Common Arguments (Instances)
buildHdr 15 Create and set an NMRPipe-format 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 NMRPipe-format data by nonlinear least-squares. -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 Region-of-Interest, 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 (de-allocate) 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 XYZ-format 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(i-1) 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(i-2) 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(i-1) C(i-1) 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(i-1) 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(i-1) C(i-1) N(i) CA(i).
dynSetPhiPsi 131 Set the protein backbone angles phi C(i-1) 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 pseudo-contact 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, pseudo-contact shifts, and J-couplings. -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 solvent-accesible 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 NMRPipe-format header to handle byte-swapping.
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, region-of-interest).
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 NMRPipe-format 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 NMRPipe-format 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 NMRPipe-format 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 Non-linear 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 De-allocate 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 over-writes 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 hard-copy 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 NMRPipe-format 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 NMRPipe-format 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 NMRPipe-format data. -roi (675) -in (654) -ndim (525)
-x (366) -y (290) -verb (103)
-dy (90) -z (62) -dx (54)
reconNMR 4 Reconstruct NMRPipe-format 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 NMRPipe-format 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 NMRPipe-format 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 region-of-interest (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 region-of-interest (ROI). See also: readROI.
spec2pntW 18 Convert a width spectral units such as Hz to a width in points for a particular region-of-interest (ROI). See also: readROI.
srand 108 Set the random number seed for the rand random number generation function.
strcasecmp 1239 Compare two strings, case-insensitive.
strcmp 288 Compare two strings, case-sensitive.
svdLinSol 15 Use Singular Value Decomposition to solve a linear least squares matrix problem. -x (15) -y (15)
swapHdr 0 Perform byte-swap on the NMRPipe-format header in an nmrWish binary data array.
sysByteSwap 0 Perform byte-swap on data in an nmrWish binary data array.
sysClose 28 Close a binary data file previously opened with sysOpen.
sysFree 46 De-allocate 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 byte-swapping. Non-blocking 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 byte-swapping. Non-blocking 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 byte-swapping. 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 NMRPipe-format file header data in an nmrWish binary array, to determine if the data needs to be byte-swapped. See also: rdFDATA, fixHdr, sysOpen, sysRead.
updateHdr 5 Update the PPM calibration information for the NMRPipe-format header an nmrWish binary array. See also: rdFDATA, setParm.
vACos 0 Apply function to nmrWish floating-point binary data: arc cosine.
vASin 0 Apply function to nmrWish floating-point binary data: arc sine.
vAbs 9 Apply function to nmrWish floating-point binary data: absolute value.
vAbsCor 0 Perform an optical absorbance correction to floating-point binary data.
vAvg 0 Compute the average of values in floating-point binary data.
vBinarize 2 Binarize (set to 1 or 0) values in floating-point binary data according to their range.
vByteSwap 2 Apply byte-swap to nmrWish binary data.
vCos 0 Apply function to nmrWish floating-point binary data: cosine.
vEstNoise 29 Estimate the noise level of spectral data in an in an nmrWish floating-point binary data array. See also: sysRead, readROI.
vExp 0 Apply function to nmrWish floating-point binary data: exponential.
vInterp 0 Perform linear interpolation on floating-point binary data.
vLinSol 5 Perform linear least squares computation on floating-point 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 floating-point binary data: logarithm.
vMax 60 Find the maximum value in an nmrWish floating-point binary data array.
vMaxAbs 0 Find the maximum absolute value in an nmrWish floating-point binary data array.
vMaxLoc 2 Find the point location of the maximum value in an nmrWish floating-point binary data array.
vMedian 0 Find the median value in an nmrWish floating-point binary data array.
vMin 44 Find the minimum value in an nmrWish floating-point binary data array.
vMinAbs 0 Find the minimum absolute value in an nmrWish floating-point binary data array.
vMinLoc 0 Find the point location of the minimum value in an nmrWish floating-point binary data array.
vNeg 0 Apply function to nmrWish floating-point 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 floating-point 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 floating-point binary data array.
vSin 0 Apply function to nmrWish floating-point binary data: sine.
vSort 3 Sort the values in an nmrWish floating-point binary data array.
vStdDev 3 Find the standard deviation of values in an nmrWish floating-point binary data array.
vSum 27 Find the average of values in an nmrWish floating-point 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 floating-point binary data: add a constant.
vsDiv 7 Scalar operation on nmrWish floating-point binary data: divide by a constant.
vsFix 2 Scalar operation on nmrWish floating-point 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 floating-point binary data array becomes larger then a given constant.
vsMult 15 Scalar operation on nmrWish floating-point binary data: multiple by a constant.
vsPower 0 Scalar operation on nmrWish floating-point binary data: raise to a power.
vsSet 21 Scalar operation on nmrWish floating-point binary data: set values to a constant.
vsSub 0 Scalar operation on nmrWish floating-point binary data: subtract a constant.
vvAdd 3 Vector-Vector operation on floating-point nmrWish binary data: addition.
vvCast 2 Vector-Vector operation on floating-point nmrWish binary data: type conversion (such as integer to float).
vvDiv 2 Vector-Vector operation on floating-point nmrWish binary data: divide.
vvDot 14 Vector-Vector operation on floating-point nmrWish binary data: dot product.
vvMove 18 Vector-Vector operation on floating-point nmrWish binary data: copy.
vvMove2 4 Multiple vector copying for floating-point nmrWish binary data.
vvMult 32 Vector-Vector operation on floating-point nmrWish binary data: multiply.
vvSub 5 Vector-Vector operation on floating-point nmrWish binary data: subtract.
vvSwap 0 Vector-Vector operation on floating-point 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, Stand-alone 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 region-of-interest (ROI) as NMRPipe-format data. -roi (168) -out (168) -ov (158)
-verb (14) -help (1)

NMRWish Built-In TCL

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 Pseudo-Contact 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 S-S 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, High-Temperature, 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 NMRPipe-format 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 NMRPipe-format header.
get15NTabVar 21 Get the name of the variable (column) in an NMRPipe-format peak table associated with amide-nitrogen (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 chi-square 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 NMRPipe-format header.
getDimKeyword 18 Return the keyword (CUR_XDIM, CUR_YDIM, etc) associated with the axis name in an NMRPipe-format header.
getDirectDim 11 Return the axis name of the directly-acquired dimension in an NMRPipe-format 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 NMRPipe-format peak table associated with amide-proton (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 NMRPipe-format header for amide-detected 3D data.
getIndirectTabVar 14 Get the name of the variable (column) in an NMRPipe-format peak table associated with the "third" dimension chemical shift of an amide-detected 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 3-character 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 Chi-square 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 S-S 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 X-axis of a 1D probability density function.
getParmI 93 Extract an integer parameter from an NNRPipe-format 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 real-only, 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 region-of-interest (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 1-character residue name associated with the given amino acid residue name.
getResName3 19 Return the 3-character 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 NMRPipe-format 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 NMRPipe-format 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 0-9.
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 NMRPipe-format header from the named file.
rdFDATAU 6 Read the NMRPipe-format 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 operating-system 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 NMRPipe-format header to the named file.









NMRPipe Processing Functions
ADD: Add a Constant to Data.

Flag Argument Default Description
 -r cR 0.0 Constant for Real Data.
 -i cI 0.0 Constant for Imaginary Data.
 -c cC 0.0 Constant for Real and Imaginary Data.
Special Options:
 -ri Add Imaginary Data to Real Data.
Processing Region (Valid Units: Pts Hz ppm %):
 -x1 pnt1 1 First Point.
 -xn pntN SIZE Last Point.

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 C-shell 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 floating-point 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.

Flag Argument Default Description
 -qName apName None Apodize Function Name: SP EM GM GMB TM TRI JMOD.
 -q1 parm1 0.0 Apodize Parameter 1 (APOD Parameter Q1).
 -q2 parm2 0.0 Apodize Parameter 2 (APOD Parameter Q2).
 -q3 parm3 0.0 Apodize Parameter 3 (APOD Parameter Q3).
 -size aSize TSIZE Number of Points in Apodize Window.
 -start aStart 1 Start Location for Applying Apodize Window.
 -c fScale 1 Scale Factor for First Point (C1 Parameter).
 -one Set window points outside apodize region to 1.
 -hdr Use Q1,Q2,Q3,C1 Values from Header as Defaults.
 -inv Invert Window.

APOD applies one of the nmrPipe apodize windows, as specified by command-line 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 function-specific 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 time-domain 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 zero-order 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 first-order 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 command-line 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 previously-applied 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 re-applied (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 time-domain 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.

Flag Argument Default Description
 -nl xList None Baseline Node List (Valid Units: Pts Hz ppm %).
 -nw nw 0 Node Width +/- Pts.
 -first Include First Point of Data in Node List.
 -last Include Last Point of Data in Node List.


NMRPipe Processing Functions
CBF: Constant Baseline Correction Using Signal-Free Regions.

Flag Argument Default Description
 -last percent 10 BC Correct FID.
Explicit Correction Regions (Valid Units: Pts Hz ppm %).
 -reg ix1 X-Axis Region Start and End List.
 -slice iy1 Y-Axis Region Start and End List.
Adjustments:
 -noseq No Adjustment for Sequential Data.
 -nodmx No Adjustment for Digital Oversampled Data.
Notes:
  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 time-domain 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:

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 time-domain data.

-nodmx
Suppress special handling of uncorrected oversampled time-domain 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 DC-offset in a 2D magnitude-mode 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: Co-Addition of Data.

Flag Argument Default Description
 -cList clist 1 1 Coefficient List.
 -axis aName X X: Co-Add Points. Y: Co-Add Slices.
Header Adjustment:
 -time Adjust valid time-domain size in header to account for reduction in data size.

The COADD function is commonly applied to interleaved data such as In-Phase/Anti-Phase (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 re-combined by the program addNMR which can form sums and differences of NMRPipe-format 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 time-domain 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 factor-of-two 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 time-domain 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 -ov
The 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.ft2
Alternatively, 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.ft2
Again, 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.ft2
Or 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 odd-numbered 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 -ov
INTERLEAVED DATA WITH GRADIENT ENHANCEMENT In NMRPipe, gradient enhanced time-domain 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 Y-Axis 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 "Echo-AntiEcho" or "Rance-Kay" 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      Rance-Kay  \
  -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 Y-Axis gradient data, the shuffling macro assumes that pairs of adjacent 1D complex vectors should be combined to form one complex vector which is a Y-Axis real point, and a second complex vector is the the corresponding Y-Axis 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 Y-Axis.

   #!/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 -ov
DATA WITH MANY INTERLEAVED VALUES In this example, there are 16 interleaved 2D planes in the given gradient-enhanced 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 non-zero 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  Echo-AntiEcho  \
     -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++
   end
HEADER 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 time-domain size values NDAPOD and NDTDSIZE.

NMRPipe Processing Functions
CS: Circular Shift.

Flag Argument Default Description
 -rs rsPts 0 Right Shift Count (Valid Units: Pts Hz ppm %).
 -ls lsPts 0 Left Shift Count (Valid Units: Pts Hz ppm %).
 -neg Negate Shifted Points.
 -sw Adjust Sweep Width and ppm calibration.
Back-Compatibility Note:
  Flag -inv is equivalent to -neg

CS applies a circular-shift 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 frequency-domain shift which results from applying a first-order phase correction in the time-domain. A circular shift can be applied in either direction, right or left. For example, if an 8-point data vector consists of the following values:

   1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0
then after a 2-point 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.0 
whereas, if a 2-point 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 frequency-domain 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 time-domain data with a half-point delay (time domain data which require first-order phase P1 = 180). For example, if an 8-point data vector has the values:

   1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0
then after a 2-point sign-negated 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 N-point data vector y[0] ... y[N-1] the derivative dy[i] is calculated as:

 dy[0] = y[1] - y[0]      
for the first point.
 dy[i] = y[i+1] - y[i-1]  
for the interior points, and
 dy[N] = y[N] - y[N-1]    
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.

Flag Argument Default Description
 -lb expHz 0.0 Exponential Line Broadening, Hz (APOD Parameter Q1).
 -size aSize TSIZE Number of Points in Apodize Window.
 -start aStart 1 Start Location for Applying Apodize Window.
 -c fScale 1 Scale Factor for First Point (C1 Parameter).
 -one Set window points outside apodize region to 1.
 -hdr Use Q1,C1 Values from Header as Defaults.
 -inv Invert 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 time-domain 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 function-specific 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 line-broadening 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 time-domain 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 zero-order 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 first-order 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 command-line 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 previously-applied 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 time-domain 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.

Flag Argument Default Description
 -time Extract Time Domain.
 -left Extract Left Half.
 -right Extract Right Half.
 -mid Extract Center Half.
 -pow2 Round size to nearest power of 2.
 -sw Adjust Sweep Width and ppm calibration.
 -round n 1 Round size to nearest N.
Extract Region Coordinates (Valid Units: Pts Hz ppm %):
 -x1 xFirst 1 X Extract Range Start.
 -xn xLast XSIZE X Extract Range End.
 -y1 yFirst 1 Y Extract Range Start.
 -yn yLast YSIZE Y Extract Range End.
Notes:
  Use negative integers for coords in order to specify limit relative to last point.


NMRPipe Processing Functions
FSH: Frequency Shift via Inverse Fourier Transform.

Flag Argument Default Description
 -ls lsPts 0.0 Left Shift Points.
 -rs lsPts 0.0 Right Shift Points.
 -sw Adjust Sweep Width and ppm calibration.

FSH applies a circular-shift to the points in each vector from the current dimension of the data. The shift is performed by inverse-transforming a data vector, applying a first-order 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 frequency-domain data, the chemical shift calibration information is updated (NDORIG and NDCENTER).

NMRPipe Processing Functions
FT: Complex Fourier Transform.

Flag Argument Default Description
 -auto Choose Mode Automatically.
 -real Transform of Real-Only Data.
 -inv Perform Inverse Transform.
 -alt Use Sign Alternation.
 -neg Negate Imaginaries.
 -null No FT Processing, Adjust Header Only.
 -bruk Redfield Sequential Data (Same as: FT -alt -real).
 -dmx Force Digital Oversample Adjustment ON (Bruker DMX, JEOL Delta).
 -nodmx Force Digital Oversample Adjustment OFF.

FT applies a complex Fourier transform (FT) to produce a complex result. There is no requirement for a power-of-two data size, but processing times will likely be slower for non-power-of-two cases. FT options include selection of forward or inverse transform, negation of imaginaries before transformation, and sign-alternation (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 TPPI-mode 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 frequency-domain 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 auto-mode option -auto is intended primarily for use in special-purpose applications which automate an entire conversion and processing scheme, or for use in pulse-sequence specific examples. Its use for routine processing is not recommended.

COMMON OPTIONS

-real
This flag selects a complex Fourier transform for a real-only 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 one-point 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 sign-alternated 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 frequency-domain. 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 Complex-N States-N, or States-TPPI-N. Sign-alternation will be selected if the acquisition mode is recorded as States-TPPI, States-TPPI-N, 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 States-TPPI data. The same schemes are used for Gradiant-Enhanced phase-sensitive 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.ft2
The following is a basic magnitude-mode (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 Y-Axis 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 real-only 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 time-domain 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: Lorentz-to-Gauss Window.

Flag Argument Default Description
 -g1 expHz 0.0 Inverse Exponential Width, Hz (APOD Parameter Q1).
 -g2 gaussHz 0.0 Gaussian Broaden Width, Hz (APOD Parameter Q2).
 -g3 center 0.0 Location of Gauss Maximum, 0.0 to 1.0 (APOD Parameter Q3).
 -size aSize TSIZE Number of Points in Apodize Window.
 -start aStart 1 Start Location for Applying Apodize Window.
 -c fScale 1 Scale Factor for First Point (C1 Parameter).
 -one Set window points outside apodize region to 1.
 -hdr Use Q1,Q2,Q3,C1 Values from Header as Defaults.
 -inv Invert Window.

GM applies a Lorentz-to-Gauss 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 time-domain 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 time-domain 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*(tSize-1) - i)/sw

In addition to function-specific 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 time-domain 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 zero-order 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 first-order 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 command-line 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 previously-applied 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 Lorentz-to-Gauss 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 time-domain 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.

Flag Argument Default Description
 -lb lb 0.0 Exponential Term (APOD Parameter Q1)
 -gb gb 0.0 Gaussian Term. (APOD Parameter Q2)
 -size aSize TSIZE Number of Points in Apodize Window.
 -start aStart 1 Start Location for Applying Apodize Window.
 -c fScale 1 Scale Factor for First Point (C1 Parameter).
 -one Set window points outside apodize region to 1.
 -hdr Use Q1,Q2,C1 Values from Header as Defaults.
 -inv Invert Window.

GMB applies a Gauss-like 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 time-domain 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 function-specific 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 time-domain 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 zero-order 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 first-order 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 command-line 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 previously-applied 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 time-domain 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.

Flag Argument Default Description
 -inv Perform 1/N Scaling.
Notes:
  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 all-real. 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 time-domain or frequency domain, respectively.

NMRPipe Processing Functions
HT: Hilbert Transform

Flag Argument Default Description
 -ps90-180 Mirror Image Mode (For Data with Half-Point Delay, First Order Phase=180).
 -zf Temporary Zero Fill for Speed.
 -td Set Time-Domain Size to SIZE/2.
 -auto Auto Mode (Selects HT and ZF mode).
Controls for Auto Mode:
 -ps0-0 Force Ordinary Hilbert Transform.
 -nozf No Temporary Zero Fill.


NMRPipe Processing Functions
IMG: Image Processing Utilities.

Flag Argument Default Description
 -conv Apply Convolution Filter (Default). Requires -kern ...
Statistical Filters and Options:
 -median Median.
 -min Minimum (Erosion).
 -max Maximum (Dilation).
 -amin Minimum Absolute Value.
 -amax Maximum Absolute Value.
 -range Range.
 -avg Average.
 -dev Standard Deviation.
 -thresh t 0.0 Use Threshold t for Selection.
General Filter Parameters:
 -dx dx 1 +/- Filter Width, Points.
 -dy dy 1 +/- Filter Height, Points.
Convolution Filter Parameters:
 -kern kList List of Kernel Values.


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 J-Modulation Profile.

Flag Argument Default Description
 -off off 0.0 Modulation Start*PI. (APOD Parameter Q1)
 -j jHz 0.0 J-Modulation, Hz. (APOD Parameter Q2)
 -lb lbHz 0.0 Line Broadening, Hz. (APOD Parameter Q3)
 -sin Sine Modulation. (Equivalent to -off 0.0)
 -cos Cosine Modulation. (Equivalent to -off 0.5)
 -size aSize TSIZE Number of Points in Apodize Window.
 -start aStart 1 Start Location for Applying Apodize Window.
 -c fScale 1 Scale Factor for First Point (C1 Parameter).
 -one Set window points outside apodize region to 1.
 -hdr Use Q1,Q2,Q3,C1 Values from Header as Defaults.
 -inv Invert Window.

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 coupling-induced 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 (in-phase modulation) and sine forms (anti-phase modulation).

In the following formula for JMOD, tSize is the number of time-domain 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/(tSize-1) ) 
where
          e   = PI*i*lb/sw
          end = off + jHz*(tSize - 1)/sw

In addition to function-specific 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 time-domain 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 zero-order 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 first-order 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 command-line 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 previously-applied 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 time-domain 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.

Flag Argument Default Description
 -pred predPts 1 or SIZE Number of Points to Predict (PRED). See Notes Below.
 -x1 dataStart PRED+1 or 1 First Point of Input Data for Extracting LP Coefficients. See Notes Below.
 -xn dataEnd SIZE Last Point of Input Data for Extracting LP Coefficients.
 -ord order 8 Prediction Order (Number of LP Coefficients).
Prediction Direction:
 -f Forward LP (Default)
 -b Backward LP
 -fb Forward-Backward LP
 -before Prediction region is before data region.
 -after Prediction region is after data region.
Root Fixing:
 -nofix No Root Fixing (Default for -before).
 -fix Use Root Fixing (Default for -after).
 -fixMode fm 1 Root Fixing Mode.
LP Using Mirror Image:
 -ps90-180 Exact Image.
 -ps0-0 One-Point Shifted Image.
LP Using PCA Vectors:
 -pca Set LP Order to YSIZE.
 -extra xOrd 0 Increase LP Order by the Given Amount.
Auto Signal Count Estimation (Not Implemented):
 -auto Use Automated Order.
 -sig sigCount Signal Count.
 -min nMin 4 Min Nonzero Count.
 -max nMax ORDER Max Nonzero Count.
 -nw ww 8 Noise Cell Width, Pts.
 -dw dw 2 Detect Width +/- Pts.
 -nf nf 3.00 Noise Threshold Factor.
 -sf sf 2.00 Signal Count Factor.
 -fr fr 0.33 Histogram Fraction.
Notes:
  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 time-domain 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 time-domain data. LP is usually most effective when used on time-domain data vectors which are not decayed substantially, relatively short (~8-256 complex points) and with a small number of signals (~0-8 peaks per vector). It will also be more effective with higher signal-to-noise and limited dynamic range. However, LP can still be useful in cases with a larger number of signals, or with high dynamic-range 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 forward-backward linear prediction, the results from separate forward- and backward-linear prediction calculations are combined. Forward-backward linear prediction is more time-consuming 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:

In addition, some data may allow use of Mirror Image LP; in this case, there are two possible modes, described in more detail later:

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 trade-off; 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 forward-backward 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 right-shifting. 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 constant-time 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 forward-backward LP.

Note that mirror-image 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), forward-backward LP may be just as good, and it has the added advantage of no special restrictions on delay-time or decay. So, before using mirror-image 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 N-1 reflected points, followed by N original points.

If the data have a half-point 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 -ps0-0 or -ps90-180. 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 -ps0-0 -ord 12

means "build the mirror image suitable for data with no acquisition delay, extend it LP using a 12-point 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 two-point delay, there will be a three-point gap:

                          mirror
                          image
                          plane
                            |
         t=-n . . t=-2 ----gap---- t=2 . . t=n
                            |

Therefore, data with a 1 or more than 1-point 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 -ps0-0 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  -ps0-0               \

means "make room for the three missing points, shift the data by three points, create the three missing points by LP, use mirror-image LP to create 33 additional points by extending the data.

DATA WITH 1-DWELL DELAY

Data acquired with a 1-point delay can be thought if as zero-delay data which have been left-shifted by one point. We compensate for this time-domain shift by phase correction in the frequency domain; each one-point shift in the time-domain adds a 360 degree first order correction (P1=360) to the corresponding spectrum.

However, a P1=360 in the frequency-domain does not correspond to exactly to a simple one-point shift in the time-domain; rather, it is equivalent to a circular shift in the time-domain. 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 frequency-domain; therefore, if the value of the first time-domain 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 time-domain point corresponds to adding a constant in the frequency-domain, as mentioned above. So, we can do the equivalent of replacing the first time-domain point by performing a zero-order baseline correction in the frequency domain. In cases with 64 or more data points and spectra which are not too crowded, automated zero-order 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 time-domain 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 time-domain 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 time-domain form:

  1. If the imaginary data was deleted previously, reconstruct it using the Hilbert Transform (HT).
  2. Remove the phase correction which was applied previously, using the negative of the original phase values P0 and P1.
  3. Apply an inverse Fourier Transform to restore the data to the time domain.
  4. Remove the zeros which were appended by previous zero filling.
  5. Divide the data by the window and first point scale used previously during forward processing.

When creating inverse processing schemes, the following should be considered:

As noted, the results of an inverse processing scheme will be affected by details such as reconstruction of imaginary data, the inverse window function, and prior use of baseline correction. In some cases, the results of an inverse processing scheme might distort the first or last point of the reconstructed time-domain data. In particular, a distortion in the last point will be especially bad for LP, since this last point will be used directly to append the first synthetic point, and any error will tend to be propagated and amplified as additional synthetic LP points are added.

For this reason, if LP results seem poor when inverse processing schemes are used, examine the intermediate reconstructed time-domain 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 time-domain point before applying LP.

OPTIONS

The LP command-line 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 forward-mode equations (default).

-b
When this flag is used, LP coefficients will be extracted using backward-mode equations.

-fb
When this flag is used, LP coefficients will be extracted using both forward- and backward-mode 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)

-ps90-180
This flag performs mirror-image LP for data with a half-dwell delay (i.e., data that require P0=-90,P1=180 phasing). It is intended for use with data having little or no dampening.

-ps0-0
This flag performs mirror-image 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 Y-Axis 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 vector-by-vector 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 1-dwell 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 one-point shift followed by Linear Prediction to replace the missing first point caused by the 1-dwell delay. The right-shift also removes the need for a phase-correction, 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 zero-order baseline correction. This has the same effect as replacing the missing first point caused by the 1-dwell 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 States-Mode FID. The defects occurred in 1D vectors 9-12 in the raw data, which contained 128 total 1D vectors (64 complex points in the Y-Axis). 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 Y-Axis. 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 7-64. Note: to find the complex point corresponding to interleaved point N, use the formula int[(N-1)/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 Z-Axis, 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 Z-Axis. 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 1-28. 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 constant-time 3D CBCANH experiment. The scheme is arranged so that the 1D time-domain 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 time-domain, a given signal can extend significantly across the spectrum, but in the frequency-domain 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 re-transformed. 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 forward-backward LP option -fb could be used as an alternative to the mirror-image options -ps0-0 and -ps90-180:

      #!/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 -ps90-180 -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  -ps0-0                           \
      | 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 time-domain 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 zero-frequency 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 back-predicting 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 signal-to-noise ratios, or heavily damped data.

NMRPipe Processing Functions
LS: Left Shift and Zero Pad.

Flag Argument Default Description
 -ls lsPts 0 Left Shift Pnt Count (Valid Units: Pts Hz ppm %).
 -sw Adjust Sweep Width and ppm calibration.

LS applies a left-shift 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 8-point data vector consists of the following values:

   1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0
then after a 2-point left-shift (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 time-domain data, the recorded time-domain sizes NDAPOD and NDTDSIZE are adjusted by the number of points shifted. If this flag is used with frequency-domain data, the chemical shift calibration information is updated (NDORIG and NDCENTER).

EXAMPLES

The following, when applied in the time-domain, is equivalent to applying a first order phase of P1=360 in the frequency domain; applying the zero-fill before the LS avoids losing one point:

 | nmrPipe -fn ZF -auto \
 | nmrPipe -fn LS -rs 1 \

SEE ALSO

Shifting functions RS (right-shift, integer number of points) CS (circular-shift, integer number of points) FSH (circular-shift, fractional nuumber of points) and phase-correction 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: Slice-Processing Macro.

Flag Argument Default Description
 -macro mFile M-Language MACRO File.
 -var vList Variable Name/Value Pairs.
 -str sList String Name/Text Pairs.
 -all Use all slice codes.


NMRPipe Processing Functions
MC: Modulus/Magnitude Calculation.

Flag Argument Default Description
 -mod Result = Sqrt( real^2 + imaginary^2 ) (Default).
 -pow Result = real^2 + imaginary^2.


NMRPipe Processing Functions
MED: Median Baseline Correction.

Flag Argument Default Description
 -nw medWidth 24 Median Window +/- Pts.
 -sf sfWidth 16 Smoothing Filter +/- Pts.
 -avg No Subtract Window Averages.


NMRPipe Processing Functions
MEMND: ND Maximum Entropy Calculation.

Flag Argument Default Description
 -ndim nDim 1 Number of Dimensions.
 -sigma sigma 1.0 Std Dev of Time-Domain Noise. Use Zero for Auto Estimates.
 -zf zfCount 2 Zero Fill Count. Time-Domain Input Only. (also use -xzf -yzf etc).
Reconstruction Mode Flags:
 -neg Use Two Channel (+/-) MEM (Default).
 -pos Use Positive-Only MEM.
 -zero Correct Zero Order Offset (Default).
 -nozero Suppress Offset Correction.
 -freq Output Freq-Domain Result (Default).
 -time Output Time-Domain Result.
Convolution Parameters (also use -x.. -y.. etc). Defines window used on MEM data:
 -conv FILE fName Keyword FILE followed by Convolution Function File Name.
 -conv cFn Convolution Window Function: SP EM GM GMB TM TRI JMOD.

 -cQ1 cQ1 Convolution APOD Function Parameter Q1.
 -cQ2 cQ2 Convolution APOD Function Parameter Q2.
 -cQ3 cQ3 Convolution APOD Function Parameter Q3.
 -csin Sets Q1 to 0.0 for Sine JMOD.
 -ccos Sets Q1 to 0.5 for Cosine JMOD.
Deconvolution Parameters (also use -x.. -y.. etc). Defines inverse window used on original data:
 -deco FILE fName Keyword FILE followed by Deonvolution Function File Name.
 -deco dFn Deconvolution Window Function: SP EM GM GMB TM TRI JMOD.
 -deco dFn None Deconvolution Window Function:
 -dQ1 dQ1 Deconvolution APOD Function Parameter Q1.
 -dQ2 dQ2 Deconvolution APOD Function Parameter Q2.
 -dQ3 dQ3 Deconvolution APOD Function Parameter Q3.
 -dsin Sets Q1 to 0.0 for Sine JMOD.
 -dcos Sets Q1 to 0.5 for Cosine JMOD.
Data Clipping and Scaling:
 -ts tsMode 0 Time-Domain Scaling Mode: 0=None 1=Divergence 2=Always.
 -clip cMode 0 Freq-Domain Clipping Mode: 0=None 1=Pos 2=Neg 3=Both.
 -min cMin -1e17 Minimum for Clipping.
 -max cMax +1e17 Maximum for Clipping.
MEM Parameters:
 -alpha alpha 1e-4 Scale for MEM Update.
 -tScale tScale 0.5 Scale for Amplification Threshold.
 -tLimit tLimit 1.5 Chi Limit for Use of Threshold.
 -cScale cScale 1e2 Desired Sigma After Scaling.
 -eScale eScale 1.0 Scale (A) for Entropy Calc.
 -lamb lamda 1e-5 Initial/Minimum Lambda Value.
 -step step 0.02 Scale for Lamda Update.
 -x0 x0 5.0 Second-Order MEM Threshold.
Convergence Tests:
 -cLim cLimit 1.0 Chi-Square/N Limit for Convergence. (same as old option -zFact)
 -zLim zLimit 1.0 Z-Statistic Limit For Convergence.
 -itmax itMax 50 Maximum Iteration Count.
 -itmin itMin 3 Minimum Iteration Count.
 -div divCount 3 Maximum Divergence Count.
 -report reportLev 0 Report Level: 0=No Report. 1=Final Iteration. 2=Each Iteration. 3=Save F and dC.
Notes:
  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 time-domain data. The MEM function in nmrPipe is a two-channel 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, 134-136.
Gull, S.F. and Daniell, G.J. (1978) Nature, 272, 686-690.
Wu, N.L. (1984) Astron. Astrophys., 139, 555-557.
Laue, E.D., Skilling, J., Staunton, J., Sibisi, S. and Brereton, R. (1985) J. Magn Reson., 62, 437-452.
Hoch, J.C., Stern, A.S., Donoho, D.L. and Johnstone, I.M (1990) J. Magn. Reson., 86, 236-246.
Stephenson, M. (1988) Prog. NMR. Spectrosc., 20, 515-626.

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:

  1. Decide if MEM is suitable for the application. It may be useful for improving resolution or reducing truncation artifacts; this particular implementation may not be suitable for data where precise quantification of peak heights or lineshapes is required, or in cases of high dynamic range. MEM may also be unstable when used on large data arrays, or simply impractical due to memory and computational requirements.
  2. Process the data completely with an ordinary Fourier transform scheme first, to determine details of phase correction, baseline adjustment, etc. Construct the scheme so that the dimensions of the result can be inverse-processed, and so that the axis-order of the result allows access to the data planes where MEM will be applied.
  3. Use nmrDraw to extract a plane from the indirect dimensions, and to estimate the noise level of this plane in the frequency-domain. If deconvolution will be used, estimate the intrinsic linewidths (linewidths of the data without window functions) as well.
  4. Use the program showApod to find the time-domain noise level based on the value of the frequency-domain noise level.
  5. Create and test a trial MEM processing scheme for the extracted 2D plane. Try executing the scheme without the MEM function first, to make sure that the details of inverse processing and reprocessing are correct.
  6. Execute and test the trial MEM scheme, adjusting MEM parameters as needed so that convergence is achieved in a reasonable number of iterations, and the MEM result seems to include all of the signals observed in the original data.
  7. Create and execute a similar MEM processing scheme for all the indirect dimension 2D planes in the 3D data, using the steps and parameters from the trial 2D scheme.

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 Fourier-transformed and then subtracted from the original time-domain data to form a time-domain residual. The time-domain residual is then forward Fourier-transformed, 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 time-domain data.

A rough summary of the Gull and Daniell algorithm (without accommodations for combinations of positive and negative signals) follows.

D: is the original time-domain 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 time-domain 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 frequency-domain 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 chi-square 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 time-domain 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 frequency-domain residual U. In practice, this exponential form is unstable, so the solution spectrum B is found iteratively:

  1. Start with D (the original time-domain data with noise sigma), and F (the current MEM spectrum), which is initially uniform.
  2. Find R, the inverse Fourier transform of F, after using a Hilbert transform to reconstruct the imaginary part of F. If desired, apply a line broadening or other window to R in order to mimic the signal envelope in the original time-domain data D.
  3. Find the time-domain residual C, (D - R)/(sigma^2), as well as the chi-square value of the residual, chi2.
  4. Find U, the frequency-domain residual, by forward Fourier-transform of residual C.
  5. Find a suitable lambda value for the current iterate.
  6. Find B by exponentially amplifying U as above, which has the effect of sharpening the signals in U.
  7. Update the current MEM spectrum F by a forming a weighted average between it and the amplified residual B:
               F[new] = (1 - alpha)*F + alpha*B
    
  8. Repeat steps 1-7 until the chi-square value of the time-domain residual is small enough to be accounted for by the known noise level.

RECONSTRUCTION STRATEGY

In the nmrPipe implementation, the dimensions to be reconstructed by MEM must all be in the same Fourier domain, either as hypercomplex time-domain data, or real-only frequency-domain data. As with linear prediction (LP), the remaining dimensions should usually be in the frequency-domain. Furthermore, phase-correction 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 frequency-domain data, rather than time-domain 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 inverse-process and re-process 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:

  1. Reconstruct the spectrum's imaginary data.
  2. Undo any phasing previously applied.
  3. Inverse-transform the data into the time-domain.
  4. Undo the zero-filling previously applied.
  5. Remove the window function. (nmrPipe also removes first-point scaling)
  6. Re-apply the first-point scaling.
  7. Zero fill to four times the original size.
  8. Retransform the data into the frequency-domain.
  9. Re-apply the previous phasing.
These steps are illustrated in the following script fragment:
        | 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 zero-filled to at least twice its original size. However, additional zero-filling, 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 zero-fill is a power of two. Note that these zero-filling 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 mirror-image HT can be used for data with a half-dwell 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 directly-acquired dimension will usually be saved as the X-Axis or Y-Axis 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 all-real data.

Once an appropriate plane is extracted, it can be used to establish and test a MEM scheme and its parameters.

ESTIMATING THE TIME-DOMAIN NOISE LEVEL

Use of MEM requires an estimate of the standard deviation of the noise in the time-domain. 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 time-domain. The spectral noise level can be estimated interactively with nmrDraw:

  1. Use the "Mouse/2D Zoom" command in nmrDraw to activate the 2D zoom box.
  2. Use the mouse to adjust the size and position of the zoom box to select a small empty region.
  3. Move the mouse pointer outside the graphics area, and click the middle mouse button for "Statistics". A pop-up window will appear, with a histogram of the intensities in the selected region, and a statistical summary. The standard deviation is labeled as "SDev:".

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 time-domain 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 frequency-domain noise level of 9100, the following command could be used:

       showApod -in ext.dat -sigma 9100
to generate a report like the following, which in this case lists the corresponding time-domain noise as roughly 400:
        REMARK Effect of Processing on Noise for ext.dat
        REMARK User-supplied 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

         X-Axis     N          0.57981       0.25223
         Y-Axis     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, Two-Channel Mode, 2.65 MBytes
       X-Axis:  1st-Point=Not Adjusted P0=+000.00 P1=+000.00
       Y-Axis:  1st-Point=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 chi-square 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 time-domain. If this value is not set well, a poor reconstruction will probably result. The time-domain noise level is usually not measured directly, but rather it is estimated on the basis of the noise level measured in the frequency-domain. 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 [1e-3]
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 1e-1 to 1e-4, 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 frequency-domain 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 time-domain 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 time-domain data (R in the description above) before it is compared with the original time-domain 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 X-Axis 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 on-line help text, for example by using:

        nmrPipe -help -fn SP
The complete list of deconvolution options follows:

-conv  cFn  (for X-Axis Only)
-xconv xcFn (for X-Axis) -yconv ycFn (for Y-Axis) -zconv zcFn (for Z-Axis)
Specifies the window function name for the given axis of the MEM time-domain 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 X-Axis of the MEM time-domain 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 Y-Axis of the MEM time-domain 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 Z-Axis of the MEM time-domain 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 time-domain data and the MEM reconstruction is small enough to be accounted for by the known noise level. This is judged by the chi-square value of the time-domain residual. Ideally, for n total points in the data (chi-square)/n should be one or smaller. The option -cLim specifies the value which (chi-square)/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 chi-square 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 chi-square 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 chi-square 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 pre-processing 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 zero-order offset into the reconstruction. This option will cause the final result to be corrected by zero-order baseline estimation. (Default).

-nozero This flag will suppress the zero-order offset correction which is applied to the final result.

-freq This flag will produce the final MEM result as frequency-domain data. (Default).

-time This flag will produce the final MEM result as time-domain 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 zero-filled 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 zero-filling is performed as a pre-processing 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 time-domain 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 [1e-5]
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 non-zero, only data points larger than w*Max( U ) will be amplified, where U is the frequency-domain 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 proton-carbon 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 re-processing 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 re-processing a 3D spectrum with 2D MEM in both indirect dimensions. This macro expects that the original spectrum is stored in transposed order, with the directly-detected dimension in the Y-Axis. 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 re-arranges 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 first-point scaling in the time-domain, phasing, and extensive zero fill. MEM deconvolution is used to apply exponential line sharpening (EM) by 10hz in the X-Axis, and 15hz in the Y-Axis:

       #!/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 -z

Deconvolution of a fixed coupling: in this example, a J = 88Hz coupling is deconvolved from the indirect dimension of 2D time-domain 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 -ov 
HEADER 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 half-point delay (NDP1 = 180, no sub-region extracted).

MEM updates the data sizes NDSIZE, NDAPOD, and NDTDSIZE. The result from MEM is real-only 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:
Flag Argument Default Description
 -left Original on Left (Default).
 -right Original on Right.
 -invl Negate Left Half.
 -invr Negate Right Half.
Options for Center Modes:
 -center Original in Center.
 -ps90-180 Original In Center, Signs Negated.
 -ps0-0 Original In Center, One-Point Shift.
General:
 -sw Adjust Sweep Width and ppm calibration.


NMRPipe Processing Functions
Maximum Likelihood Frequency Map

ML Size, Linewidth, Conv Window: (also: -x -y -z):
Flag Argument Default Description
 -fSize rN 2*SIZE Frequency Domain Size for Output.
 -p0 p0 0.0 Zero-Order Phase or List.
 -p1 p1 0.0 First-Order Phase.
 -lw lw 0.0 Linewidth, Hz.
 -wName wName None Window Function File.
Input Region Limits (also -ty1 -tyn -tz1 -tzn):
 -tx1 itx1 1 First Point of Region.
 -txn itxn TSIZE Last Point of Region.
Output Region Limits (also -fy1 -fyn -fz1 -fzn):
 -fx1 ifx1 1 First Point of Region.
 -fxn ifxn FSIZE Last Point of Region.
Other Parameters:
 -sign Created a Signed Frequency Map.
 -iseed iseed 543217 Random Number Seed.
 -trials nc 1 Random Trials Per Freq.
 -sigma s 1.0 Noise Estimate.
 -bf f 0.333 Baseline Fraction.
 -ndim n 1 Dimension Count (1-3).
 -report lev 0 Report Verbose Level.
 -sw Adjust Sweep Width and ppm calibration.


NMRPipe Processing Functions
MULT: Multiply Data by a Constant.

Flag Argument Default Description
 -r cR 1.0 Constant for Real Data.
 -i cI 1.0 Constant for Imaginary Data.
 -c cC 1.0 Constant for Real and Imaginary.
 -inv No Multiply by Inverse of Constant.
 -hdr No Use Constant Value C from Header (As set by Window Functions APOD -c etc).
Processing Region (Valid Units: Pts Hz ppm %):
 -x1 pnt1 1 First Point.
 -xn pntN SIZE Last Point.

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 C-shell 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 floating-point 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 Time-Domain Solvent Correction and Frequency-Domain Baseline Correction.

Baseline Region Coordinates (Valid Units: Pts Hz ppm %):
Flag Argument Default Description
 -sx1 x1 1 Polynomial Subtraction Region Start.
 -sxn xn SIZE Polynomial Subtraction Region End.
 -fx1 y1 1 Initial Fit Region Start.
 -fxn yn SIZE Initial Fit Region End.
 -x1 y1 1 Sets -sx1 and -fx1.
 -xn yn SIZE Sets -sxn and -fxn.
 -nl list No Node List, Pts.
 -nw wide 1 Node Width +/- Pts.
Other Parameters:
 -ord pOrd 4 Polynomial Order.
 -nc cnt 0 Initial Fit Nodes.
 -first No Use First Points.
 -last No Use Last Points.
 -avg No Use Node Averages.
 -filt No Use Sine Filter. Requires -avg flag.
Time-Domain Correction for Solvent Subtraction:
 -time Uses these Defaults: -avg -nw 16 -fx1 NW+4 -nc SIZE/(2*NW+1)
Frequency-Domain Automated Baseline Correction:
 -auto No Auto Baseline.
 -window 8 Noise Analysis Window Length, Pts.
 -frac 0.33 Minimum Fraction of Data which is Baseline.
 -nf 1.5 Noise Adjustment Factor.
 -noise 0.0 RMS Noise Value. Default is Auto.
Fourier Series Correction (Not Implemented):
 -sine No Use Fourier Series.
 -p0 0.0 Zero Order Phase.
 -p1 0.0 First Order Phase.
Time Domain Adjustments:
 -noseq No Adjustment for Sequential Data.
 -nodmx No Adjustment for Digital Oversampled Data Data.
Time Domain Correction Notes:
  Sequential Data Is Adjusted Automatically.
  Digital Oversampled Data (Bruker DMX and JEOL Delta) Is Adjusted Automatically.


NMRPipe Processing Functions
PS: Phase Correction.

Flag Argument Default Description
 -p0 p0Deg 0.0 Zero Order Phase, Degrees
 -p1 p1Deg 0.0 First Order Phase, Degrees.
 -inv Inverse Phase Correction
 -hdr Use Phase Values in Header.
 -noup Don't Update Values Header.
Reconstructing Imaginaries:
 -ht Use Hilbert Transform to reconstruct imaginaries.
 -zf Use Temporary Zero Fill with the Hilbert Transform.
Non-Linear (Exponential) Phase Correction:
 -exp Use Exponential Correction.
 -tc tc 0.0 Exponential Decay Constant.
Time-Domain Phase Correction for Freq Shift (Valid Units: Pts Hz ppm %):
 -rs rPts 0.0 Right Shift Point Count.
 -ls lPts 0.0 Left Shift Point Count.
 -sw Adjust Sweep Width and ppm calibration.
Notes:
  1. Linear correction: p0 + p1*f
  2. Exponential correction: p0*exp( -tc*f )


NMRPipe Processing Functions
QART: Scaling for Quad Artifacts.

Flag Argument Default Description
 -a aVal 0.0 Amplitude Adjustment.
 -f fVal 0.0 Phase Adjustment.
Automatic Value Determination:
 -auto Find a and f Values Automatically Via Grid Search.
Freq-Domain Region for Auto Mode:
 -x1 xLoc1 1 First Point to Use.
 -xn xLocN SIZE Last Point to Use.
 -y1 xLoc1 1 First Slice to Use.
 -yn yLocN Y1 Last Slice to Use.
Time-Domain Region for Auto Mode:
 -head skipPts 0 Points to Skip.
 -size tSize SIZE Points to Use.
Grid Search Parameter Limits for Auto Mode:
 -aMin -0.01 Minimum A Value.
 -aMax +0.01 Maximum A Value.
 -aCnt 16 A Increment Count.
 -fMin -0.01 Minimum F Value.
 -fMax +0.01 Maximum F Value.
 -fCnt 16 F Increment Count.
Formula:
  R' = R
  I' = (1+a)*I + f*R


NMRPipe Processing Functions
QMIX: Complex mixing of N inputs to M outputs.

Flag Argument Default Description
 -ic n 1 Input Channel Count.
 -oc m 1 Output Channel Count.
 -cList cList 0.0 ... N by M Coefficient Matrix.
 -time Adjust valid time-domain size recorded in header to account for reduction in data points.


NMRPipe Processing Functions
REV: reverse spectrum.

Flag Argument Default Description
 -sw Adjust Sweep Width and ppm calibration.

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 zero-frequency 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 frequency-domain 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 one-point 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.

Flag Argument Default Description
 -inv Perform Inverse Transform.
Notes:
  This is not the same as Complex Fourier Transform of real-only 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 real-only data, and so RFT is seldom used. Instead, real-only data is usualy transformed via the FT -real nmrPipe processing function. There is no requirement for a power-of-two data size, but processing times will likely be slower for non-power-of-two 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 time-domain or frequency domain, respectively.

NMRPipe Processing Functions
RS: Right Shift and Zero Pad.

Flag Argument Default Description
 -rs rsPts 0 Right Shift Pnt Count (Valid Units: Pts Hz ppm %).
 -sw Adjust Sweep Width and ppm calibration.

RS applies a right-shift 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 8-point data vector consists of the following values:

   1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0
then after a 2-point right-shift (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 time-domain data, the recorded time-domain sizes NDAPOD and NDTDSIZE are adjusted by the number of points shifted. If this flag is used with frequency-domain data, the chemical shift calibration information is updated (NDORIG and NDCENTER).

EXAMPLES

The following, when applied in the time-domain, is equivalent to applying a first order phase of P1=360 in the frequency domain; applying the zero-fill before the RS avoids losing one point:

 | nmrPipe -fn ZF -auto \
 | nmrPipe -fn RS -rs 1 \


NMRPipe Processing Functions
SAVE: Save Current Data Vector.

Flag Argument Default Description
 -name saveName Name of the 1D output file. (Required)


NMRPipe Processing Functions
SET: Set Data to a Constant.

Flag Argument Default Description
 -r cR 0.0 Constant for Real Data.
 -i cI 0.0 Constant for Imaginary Data.
 -c cC 0.0 Constant for Real and Imaginary Data.
Processing Region (Valid Units: Pts Hz ppm %).
 -x1 pnt1 1 First Point to set.
 -xn pntN SIZE Last Point to set.

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.

Flag Argument Default Description
 -ri2c Interleave Real/Imag.
 -c2ri Separate Real/Imag.
 -ri2rr Append Real/Imag.
 -rr2ri Unapppend Real/Imag.
 -exlr Exchange Left/Right Halves.
 -rolr Rotate Left/Right Halves.
 -swap Swap Real/Imag.
 -bswap Four-Byte Swap.
 -r2i Real to Integer Format.
 -i2r Integer to Real Format.
 -inv Inverse for -exlr of odd point count.


NMRPipe Processing Functions
SIGN: Sign Manipulation Utilities.

Flag Argument Default Description
 -ri Negate All Data.
 -r Negate Real Data.
 -i Negate Imaginary Data.
 -left Negate Left Half.
 -right Negate Right Half.
 -alt Negate Alternate Points.
 -abs Make Data Positive.
 -sign Replace data with its SIGNUM.


NMRPipe Processing Functions
SMO: N-Point Smoothing.

Flag Argument Default Description
 -n wWidth 1 Window Size +/- Pts (Valid Units: Pts Hz ppm %).
 -center Perform centering instead.

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.

Flag Argument Default Description
 -mode fMode 1 Filter Mode: 1=Low Pass. 2=Spline. 3=Polynomial.
For Lowpass Filtering:
 -fl fLenPts 16 Filter Length, +/- Points.
 -fs fShape 1 Lowpass Shape: 1=Boxcar. 2=Sine. 3=Sine^2.
Other Parameters:
 -po order 2 Extrapolation Polynomial Order.
 -sn noise 1.0 Spline Noise.
 -sf sFactor 1.1 Smooth Factor.
Head/Tail Extrapolation:
 -head skipPts 0 Number of Points to Skip.
 -poly Use Polynomial Extrapolation. (Default)
 -mir Use Mirror Image Extrapolation.
Adjustments:
 -noseq No Adjustment for Sequential Data.
 -nodmx No Adjustment for Digital Oversampled Data.
Notes:
  Sequential Data Adjusted Automatically.
  Digital Oversampled Data (Bruker DMX, JEOL Delta) Adjusted Automatically.


NMRPipe Processing Functions
SP: Adjustable Sine Window.

Flag Argument Default Description
 -off offset 0.0 Sine Start*PI (APOD Paramater Q1).
 -end end 1.0 Sine End*PI (APOD Paramater Q2).
 -pow exp 1.0 Sine Exponent (APOD Paramater Q3).
 -size aSize TSIZE Number of Points in Apodize Window.
 -start aStart 1 Start Location for Applying Apodize Window.
 -c fScale 1 Scale Factor for First Point (C1 Parameter).
 -one Set window points outside apodize region to 1.
 -hdr Use Q1,Q2,Q3,C1 Values from Header as Defaults.
 -inv Invert Window.

SP applies a sine-bell 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 time-domain 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*(end-off)*i/(tSize-1) )^pow

In addition to function-specific 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 sine-bell 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 sine-bell 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 sine-bell; Non-integer values are allowed. Common values are 1.0 (for ordinary sine-bell) and 2.0 (for squared-bell 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 time-domain 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 zero-order 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 first-order 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 command-line 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 previously-applied 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 cosine-squared bell:

        nmrPipe -fn SP -off 0.5 -end 1.0 -pow 2

A 60-degree 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 cosine-squared roll-off 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 cosine-square 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 re-applied (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 time-domain 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.

Flag Argument Default Description
 -t1 leftPts 0 Left Ramp Length (APOD Parameter Q1).
 -t2 rightPts 0 Right Ramp Length (APOD Parameter Q2).
 -size aSize TSIZE Number of Points in Apodize Window.
 -start aStart 1 Start Location for Applying Apodize Window.
 -c fScale 1 Scale Factor for First Point (C1 Parameter).
 -one Set window points outside apodize region to 1.
 -hdr Use Q1,Q2,C1 Values from Header as Defaults.
 -inv Invert 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 time-domain data which has its largest amplitudes near the center, as is commonly found in time-domain image data.

In addition to function-specific 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 time-domain 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 zero-order 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 first-order 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 command-line 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 previously-applied 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 time-domain 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)

Flag Argument Default Description
 -hyper Hypercomplex Transpose.
 -nohyper Suppress Hypercomplex Mode.
 -auto Choose Mode Automatically.
 -nohdr No Change to TRANSPOSE value recorded in header.


NMRPipe Processing Functions
TRI: Triangle Window.

Flag Argument Default Description
 -loc aLoc TSIZE/2 Point Loc of Apex (APOD Parameter Q1).
 -lHi lHi 0.0 Left Edge Starting Height (APOD Parameter Q2).
 -rHi rHi 0.0 Right Edge Starting Height (APOD Parameter Q3).
 -size aSize TSIZE Number of Points in Apodize Window.
 -start aStart 1 Start Location for Applying Apodize Window.
 -c fScale 1 Scale Factor for First Point (C1 Parameter).
 -one Set window points outside apodize region to 1.
 -hdr Use Q1,Q2,Q3,C1 Values from Header as Defaults.
 -inv Invert 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 time-domain data which has its largest amplitudes near the center, as is commonly found in time-domain image data.

In addition to function-specific 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 time-domain 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 zero-order 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 first-order 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 command-line 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 previously-applied 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 time-domain 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.

Flag Argument Default Description
 -wide w 1 Diagonal Band Width, +/- Pts (Valid Units: Pts Hz ppm %).
 -x0 b 1 Diagonal Start Location (X-Intercept of Diagonal), Pts (Valid Units: Pts Hz ppm %).
 -slope m 0 Diagonal Aspect Ratio X/Y. (Inverse Slope of Diagonal, 0 for Auto Mode).
 -func fc 0 Function Code: 0 = Boxcar. 1 = Triangle. 2 = Sine Bell. 3 = Gaussian.
 -g gw 1 Gauss Width, Pts. For -func 3. Valid Units Pts Hz ppm %.
Notes:
  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:
Flag Argument Default Description
 -zf zfCnt 1 Number of Times to Double the Size by Zero Filling.
 -pad padCnt Number Zeros to Add.
 -size finSize Desired Final Size.
Other Flags:
 -mid Zero Fill in Middle.
 -inter Zero Fill by zfCnt Between Points.
 -auto Round Final Size to Power of 2.
Removing Previous Zero Filling (Inverse Zero Fill):
 -inv Extract Original Time Domain Data Points.


NMRPipe Processing Functions
ZTP: 3D Matrix Transpose.

ZTP exchanges the current X-Axis of the data stream with the current Z-Axis, so that vectors from the Z-Axis of 3D and 4D data can be processed. In most cases, it is not neccessary to use the ZTP function, because Z-Axis 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 HN-detected 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




[ Home ] [ NIH ] [ NIDDK ] [ Disclaimer ] [ Copyright ]
last updated: Jul 7, 2008 / Webmaster