Frank Delaglio, Ph.D.

19804 Maycrest Way
Germantown MD 20876 USA

301 806-0867
delaglio@nmrscience.com



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.

TP exchanges the current X-Axis of the data stream with the current Y-Axis, so that vectors from the Y-Axis of 2D plane can be processed. It is a key function for processing 2D data, and also commonly used for 3D and 4D schemes.

The details of how the transpose is performed depend on the real and imaginary parts of the two dimensions. In most cases, these details are handled automatically, so that in most schemes, the TP function is used without arguments, as in these basic outlines of common 2D processing schemes:

  • Hypercomplex, States, States-TPPI, Gradient-Enhanced, Rance-Kay, Echo-AntiEcho:
       FT | PS -di | TP | FT | PS -di
    
  • TPPI (converted with -yMODE Real -aq2D TPPI):
       FT | PS -di | TP | FT -real | PS -di
    
  • Magnitude Mode (converted with -yMODE Real -aq2D Magnitude). In a magnitude (absolute value) mode scheme, the imaginary data from the directly-detected dimension is re-used for transforming the indirect dimension:
       FT | TP | FT | MC
    

OPTIONS

-hyper
Use this flag for applying 2D transpose to hypercomplex planes (i.e. planes where both dimensions have their own real and imaginary data).

-nohdr
By default, TP will toggle the header value FDTRANSPOSED between 0 and 1 each time it is applied. This value is sometimes used by graphical applications like nmrDraw to decide whether the X-Axis should be drawn as the horizontal dimension of a 2D plot, or the vertical dimension; in the NMRPipe convention, the directly-detected dimension is usually drawn as the horizontal axis, regardless of whether a data plane is transposed. If the -nohdr flag is used, the FDTRANSPOSED header value will not be updated. This flag is not often used, but can find use in schemes which create 2D planes where both dimensions are indirect dimensions, so that there is no pre-defined convention about which dimension should be the horizontal dimension of a plot.

-auto
This flag will automatically select a hypercomplex TP if the data type is hypercomplex. It is not often used.

EXAMPLES

In a typical 2D hypercomplex processing scheme, TP is used is to exchange the X-Axis (the directly-detected dimension) and the Y-Axis (the indirect dimension). The TP is applied after the direct dimension has been transformed and phase-corrected, and the imaginary part has been deleted. The transpose will commonly be used a second time after the indirect dimension is processed, so that automated baseline correction can be applied effectively to the directly-detected dimension.

   nmrPipe -in fid/test001.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 43  -p1 0.0 -di               \
   | nmrPipe  -fn EXT -x1 11.5ppm -xn 5.5ppm -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 180 -di              \
   | nmrPipe  -fn TP                                   \
   | nmrPipe  -fn POLY -auto                           \
      -out test.ft2 -verb -ov

If desired, the indirect dimension of a 2D-hypercomplex FID can be processed first, as in this scheme. Here, TP -hyper is first used to transpose the 2D FID:

   nmrPipe -in fid/test001.fid \
   | nmrPipe  -fn TP -hyper                            \
   | 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 180 -di              \
   | nmrPipe  -fn TP                                   \
   | 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 -x1 11.5ppm -xn 5.5ppm -sw       \
   | nmrPipe  -fn POLY -auto                           \
      -out test.ft2 -verb -ov

A 2D real-only spectrum like the ones produced in the two examples above can be inverse-processed to create a 2D hypercomplex FID. In this inverse scheme, the data is first transposed in order to process the indirect dimension first. Then, the first HT function adds imaginary data to the indirect dimension. The generic nmrPipe flag "-ad" then makes room for additional imaginary data associated with the direct dimension. At this point, the data is hypercomplex (i.e. it has real and imaginary parts for both dimensions) but only the indirect dimension has valid imaginary data, while the direct dimension has zeros in its imaginary part. It is not until the second HT that the direct dimension has valid imaginary data:

   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
This typical 2D Magnitude-mode (absolute value) scheme uses no phase correction, but instead used MC (magnitude calculation) as a final step:
   nmrPipe -in test.fid \
   | nmrPipe -fn SP -off 0.05 -end 0.95 \
   | nmrPipe -fn ZF -auto               \
   | nmrPipe -fn FT                     \
   | nmrPipe -fn TP                     \
   | nmrPipe -fn SP -off 0.05 -end 0.95 \
   | nmrPipe -fn ZF -auto               \
   | nmrPipe -fn FT -neg                \
   | nmrPipe -fn MC                     \
      -out test.ft2 -ov

This is a variation on the typical 3D HN-detected processing scheme, in this case using both TP and 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

HEADER VALUES

TP will exchange the dimension code values in FDDIMORDER1 and FDDIMORDER2 to indicate the change in which dimensions are stored in the result. TP will also toggle the value for FDTRANSPOSED, unless the -nohdr argument is given. It will also exchange the NDSIZE values for the X-Axis and Y-Axis. In the special case of a hypercomplex transform, the new NDSIZE value for the X-Axis will be 1/2 of the old Y-Axis value, and the new Y-Axis value will be 2 times the old X-Axis value; this factor-of-two adjustment accounts for the fact that NMRPipe format data has separated real and imaginary data in the X-Axis, but interleaved real and imaginary data in the remaining dimensions.