NMRPipe Processing Functions
MULT: Multiply Data by a Constant.
MULT multiplies the real or imaginary part of each vector in the data stream by a given constant. The function can operate on all points, or on a range of points within each vector. It is possible to specify separate constants for multiplying the real and imaginary parts of the data, however the imaginary constant will only be used if the current dimension of the input data has an imaginary part.
Specifies the same constant for multiplying both the real part of the data, and also to the imaginary part if it exists.
Specifies the constant to multiply the real part of the data.
Specifies the constant to multiply the imaginary part of the data. This has no effect if the input data has no imaginary part.
If this flag is used, the inverse of the constants will be used for multiplication.
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.
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.
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 echo Maximum is $maxVal set c = (`MATH "100.0/$maxVal"`) nmrPipe -in test.ft2 -fn MULT -c $c -out test.ft2 -inPlace
The MULT function has corresponding functions ADD and SET.