Frank Delaglio, Ph.D.

19804 Maycrest Way
Germantown MD 20876 USA

301 806-0867
delaglio@nmrscience.com



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.