The MCNT Program.

The MCNT program is the contouring program in the MNMR package. It reads a file containing setup commands and produces one or more pages with contours, either on a pen plotter, laser printer, or on a graphics screen.

Calling the MCNT Program.

The MCNT program is called as follows:

<Machine ID>mcnt <inputfile

All commands to MCNT are read from standard input, and in the case above, this has been redirected to the file: inputfile.

Commands to the MCNT Program.

The following is a list of all commands accepted by the MCNT program. All commands are given in upper-case, and no abbreviations are allowed.

Comments can be specified, starting with a hash sign #.

Colors

Colors in MCNT commands are specified as follows:

<color> <thick> <density>

Color can be one of the following: WHITE, BLACK (same as WHITE), RED, GREEN, BLUE, CYAN, MAGENTA, YELLOW, BBLACK (really black). Specify any other word (NONE, NO, etc.) to disable the command, e.g. BORDER NONE disables drawing of the border. Thick is the thickness of the lines. Density is a number in the interval 0 to 10. 0 selects an invisible line, 10 a solid line.

DATAFILE

Format:

DATAFILE <name> <expno> <procno> <disk> <user>

Description:

Selects the processed datafile to be used for the subsequent plottings. The program can read several formats:

MNMR format:The data file must have the name:

/disk/nmr/user/data/name

UXNMR format:The 2D data file must have the name:

/disk/data/user/nmr/name/expno/pdata/procno/2rr

Note: The files containing the acquisition and processing parameters must be available.

FELIX format:The 2D data file must have the name:

/disk/felix/user/data/name

BORDER

Format:

BORDER <color> <thick> <density>

Description:

Draw a border around the plot, in the selected color.

GRID

Format:

GRID <color> <thick> <density>

Description:

Draw grid lines from the tick marks. If this is not specified, short tick marks are drawn instead.

LEGEND

Format:

LEGEND <color> <thick> <density>

Description:

The axes will be labelled with the text: w<number>, where number is calculated as: number of dimensions minus the dimension of the axis to label. If the data set has more than two dimensions, a line with the proper ppm value will be drawn above the contour diagram for each dimension not used as an axis dimension.

LABELS

Format:

LABELS <color> <thick> <density>

Description:

Label the axes in the specified color. If LABELS NONE is specified, no labels will be drawn at the tick marks.

TITLE

Format:

TITLE <color> <thick> <density>
<text>

Description:

Draw the text line on the following line as a title text above the border of the contour diagram.

HEADTEXT

Format:

HEADTEXT <color> <thick> <density>
<text 1>
<text 2> etc.
.END

Description:

The texts will be plotted to the right of the border of the contour plot. Lines will be plotted one by one, starting from the top of the paper. In order for this to work, the width of the contour plot itself should be less than the width of the paper, as the contour plot width is not reduced to make room for the text.

IMAG

Format:

IMAG

Description:

Use the imaginary part of each point for contouring.

REAL

Format:

REAL

Description:

Use the real part of the complex points for contouring (the default).

LEVELS

Format:

LEVELS <number>

Description:

Select number levels for the positive contours.

NLEVELS

Format:

NLEVELS <number>

Description:

Select number levels for the negative contours.

HIGH

Format:

HIGH <high>

Description:

Selects the value of the highest positive contours to high.

LOW

Format:

LOW <low>

Description:

Sets the values of the lowest positive contours to low.

NHIGH

Format:

NHIGH <high>

Description:

Selects the value of the highest negative contours to high. The number specified should be a negative number.

NLOW

Format:

NLOW <low>

Description:

Sets the values of the lowest negative contours to low. Should be specified as a negative number.

NTICKX

Format:

NTICKX <ntick>

Description:

Sets the desired number of tick marks on the x axis to ntick. The actual number of tick marks drawn may be a bit less than ntick.

NTICKY

Format:

NTICKY <ntick>

Description:

Sets the desired number of tick marks on the y axis to ntick. The actual number of tick marks drawn may be a bit less than ntick.

NTICK

Format:

NTICK <ntick>

Description:

Sets the desired number of tick marks on both axes to ntick. The actual number of tick marks drawn may be a bit less than ntick. This works as if both NTICKX and NTICKY are set to the same value.

ASPECT

Format:

ASPECT <aspect>

Description:

If aspect is set to YES (the default), one ppm will correspond to the same length, in centimeters, in both dimensions. Use ASPECT NO if the two dimensions contain ppm axes for different nuclei.

CHARSIZE

Format:

CHARSIZE <height>

Description:

The height parameter defines the height, in cm., of the text drawn on the contour plot. This parameter is used for labelling the axes and for drawing headlines, etc.

CONTOURS

Format:

CHARSIZE <type>

where type is either LIN, LOG, or EXP.

Description:

The type parameter defines the spacing of the contour levels between the LOW and HIGH levels. If type is LIN, the spacing will be equidistant, i.e. linear. If LOG is selected, the logarithm is taken of the low and high values, and the contour levels are drawn at the exponential function evaluated to equidistant values between the two logarithms. For exponential contours, the exponential function is evaluated on the low and high values, and the contour levels are drawn at the logarithms to equidistant values between the two exponents.

PEN

Format:

PEN <type>

Description:

Specify type as YES if output is directed to a pen plotter. This will make the contouring algorithm finish plotting of one whole contour line before continuing with the next. Specify NO for all other devices (laser printers or screens), as this will speed up the contouring process. If output is produced in HPGL, you can specify NO if the output is directed to a laser printer emulating HPGL. The default is NO.

PEAKFILE

Format:

PEAKFILE <name> <length> <type> <clip> <color> <thick> <density>

Description:

Plot markers at peak locations as located by the MPEAK program. The name parameter must be the name of a peak file generated by the MPEAK program. Length is the length, in cm., of crosses to be drawn. The MPEAK program uses two methods for determining the exact peak position between the grid points in the spectrum: If type is 0, the value determined by simple interpolation will be used, if type is 1, values determined by fitting a second-degree polynomium (experimental feature, don't use it) in three variables will be used. If clip is non-zero, the crosses will be clipped at the border of the contour plot. The color, thick, and density parameters define the color of the crosses to be drawn.

The cross will be drawn for a plane, if it's ppm value in the plane dimension is within one-half of the differences of the ppm values between two planes.

BASELINE

Format:

BASELINE <type>

Description:

Selects the baseline correction algorithm. Currently only LEGENDRE is supported.

BASEORDER

Format:

BASEORDER <order>

Description:

Selects the order of the polynomia used for the baseline correction. The BASELINE command must be specified as well.

XDIM

Format:

XDIM <dimension>

Description:

Selects the dimension to be plotted along the x-axis. Dimension is a number from 0 to the number of dimensions minus one.

YDIM

Format:

YDIM <dimension>

Description:

Selects the dimension to be plotted along the y-axis. Dimension is a number from 0 to the number of dimensions minus one.

XRANGE

Format:

XRANGE <low> <high>

Description:

Specify the range to plot on the x-axis. The values are specified in ppm. Note, the value of low must be less than the value of high.

YRANGE

Format:

YRANGE <low> <high>

Description:

Specify the range to plot on the y-axis. The values are specified in ppm. Note, the value of low must be less than the value of high.

EXTRAFRAME

Format:

EXTRAFRAME <value>

Description:

The value of value will be subtracted from the values of xlow and ylow, and added to the values of xhigh and yhigh (from the XRANGE and YRANGE statements).

PLANE

Format:

PLANE <dimension> <index>

Description:

Selects the indices for the dimensions not specified in XDIM and YDIM. For a 2D spectrum, this statement is not necessary. One PLANE statement should appear in the input for plotting of a 3D spectrum, two statements for a 4D spectrum, etc. The value of dimension should be from zero to the number of dimensions minus one. A value used for XDIM or YDIM should not appear as dimension in a PLANE statement. The index value selects the index in that dimension.

The statements:

XDIM 1
YDIM 2
PLANE 0 310

will plot dimension number 1 (t2) along the x-axis, dimension number 2 (t1) along the y-axis, and select plane number 310 (numbered from zero) in dimension number 0 (t3).

COLOR

Format:

COLOR <color> <thick> <density>

Description:

Selects the color to use for the positive contour lines.

NCOLOR

Format:

NCOLOR <color> <thick> <density>

Description:

Selects the color to use for the negative contour lines.

STYLE

Format:

STYLE <style>

Description:

Selects the line type for the positive contours. Style can be one of the following: SOLID, DOTTED, DASHED, or DOTDASH.

NSTYLE

Format:

NSTYLE <style>

Description:

Selects the line type for the negative contours. Style can be one of the following: SOLID, DOTTED, DASHED, or DOTDASH.

MARK

Format:

MARK <filename>

or:

MARK <markers> END

Description:

Read markers from a file (first format) or from standard input, until the END statement is met. The markers have the following format:

<x-value> <y-value> <height> <x-separation> <y-separation>

Crosses are written on the contours at the coordinates: (x-value, y-value). The coordinates are specified in ppm. If non-zero values are specified (in Hz) for x-separation and y-separation, a box will be drawn instead of a cross. The separation values define the width and height of the box.

MCOLOR

Format:

MCOLOR <color> <thick> <density>

Description:

Selects the color of the crosses or boxes drawn with the MARK command.

LINE

Format:

LINE <filename>

or:

LINE
<line commands>
END

Description:

Read line coordinates from a file (first format) or from standard input, until the END statement is met. The line coordinates have the following format:

<x1-value> <y1-value> <x2-value> <y2-value>

Draw a line from the coordinate (x1-value, y1-value) to (x2-value, y2-value). The coordinates are specified in ppm.

LCOLOR

Format:

LCOLOR <color> <thick> <density>

Description:

Selects the color of the lines drawn with the LINE command.

ANNOTATE

Format:

ANNOTATE <filename>

or:

ANNOTATE
<annotate commands>
END

Description:

Read annotate information from a file (first format) or from standard input, until the END statement is met. The annotate information has the following format:

<x-value> <y-value> <size> <color> <position> <clip> <text>

Draw the text text at coordinates (x-value, y-value). The coordinates are specified in ppm. size is the height, in cm, of the letters. Color is a number, selecting the color of the text: 1: WHITE/BLACK (white on screen, black on paper), 2: RED, 3: GREEN, 4: BLUE, 5: CYAN, 6: MAGENTA, 7: YELLOW, 8: BBLACK (black on screen). The position value defines the position of the text relative to the coordinates specified:

position = sum of values to the left and at the top

1

4

7

0

Bottom left

Bottom center

Bottom right

1

Middle left

Middle center

Middle right

2

Top left

Top center

Top right

ACOLOR

Format:

ACOLOR <color> <thick> <density>

Description:

Selects the color of the text drawn with ANNOTATE. The value of color is ignored, as it is specified in the annotate statements, only thick and density is used.

MULTIBUFFER

Format:

MULTIBUFFER <flag>

Description:

If flag is YES, enough buffers to hold a whole plane in a 3D spectrum will be used. This is only useful if you have a lot of memory and plan to plot out all planes of a 3D spectrum in a single call to MCNT.

TRANSPOSE

Format:

TRANSPOSE <transpose>

Description:

This command is not used anymore. To exchange the x- and y-axes, simply exchange the values specified for the XDIM and YDIM commands.

GO

Format:

GO

Description:

Do a plot with the selected parameters. Do not advance to the next page unless the PAGE command is given.

Format:

NOPAGE

Description:

Do not erase the page after the last GO command. This is used for graphics displays.

QUIT

Format:

QUIT

Description:

Terminates the MCNT program.

DEVICE

Format:

DEVICE <name> <destination>

Description:

Selects the output device for the MCNT program. The following is a list of the currently supported devices in the cplot package:

X11

Output is written into an X11 window. The window is created on the server specified with the environment string: DISPLAY. The window size is 1024 x 1024. The window cannot be resized or redrawn. The destination parameter is ignored. The density parameters to the COLOR statements are ignored. Specify a line thickness of zero to get the fastest display. Higher line thicknesses can be used, but this is slower. The program will wait for a click with the left mouse button in the graphics window before terminating. By default, the font with a size matching the CHARSIZE parameter best, and matching the pattern: -adobe-helvetica-medium-r-normal-* will be used. The font pattern can be changed by setting the CPLOT_FONT environment variable:

setenv CPLOT_FONT <something>

Use the xlsfonts command to get a list of available fonts on your X11 server.

HP7550

Output is written as HPGL commands. If destination is specified, this is taken as the output file name, else output is written to standard output. Output from MCNT can then be piped directly into a UNIX lp command. The paper size is assumed to be A3 (38 cm wide, 25 cm high), but the output can also be directed to a printer containing A4 paper, but this can lead to a small change in the aspect ratio. The thick and density parameters to the COLOR statements are ignored. The carrousel is assumed to contain the following pen colors: 1: BLACK, 2: RED, 3: GREEN, 4: BLUE, 5: CYAN, 6: MAGENTA, 7: YELLOW.

VT240

Output is in DEC's REGIS format. This driver is not complete (text is not positioned correctly). If destination is specified, this is taken as the output file name, else output is written to standard output. Three colors are supported: WHITE, RED, GREEN, giving different intensities on a black&white VT240 display.

GL

This driver only works on the Silicon Graphics machines. Output is produced in a GL window. The program must execute on the machine with the screen. Pen densities are not supported. Text is displayed in a proper scaled Helvetica font. Click the left mouse button in the window to terminate the program when all graphics output has been displayed.

DORE

This driver only works on the Stardent 1500 machine. A window 1024 x 1024 is created on the screen. The window can be resized, and will be redrawn, if a window on top of it is removed. The graphics in the window can be scaled and shifted using the dialbox. The dials work as follows:

 

Shift Y

 

Zoom

 

 

 

 

HPLJSII

Output is made in 300 dpi bitmap format, to be printed on a HP LaserJet series II (or compatible). The printer must be equipped with a memory expansion (a total amount of memory of 1.5 Mb is necessary). The maximum size of the plot will be 3232 dots in the x direction, and 2304 dots in the y direction. Colors are not supported; use line thickness and density instead. If destination is specified, this is taken as the output file name, else output is written to standard output. Output from MCNT can then be piped directly into a UNIX lp command, or the MCNT can be built into the interface code for the printer as a filter. In that case, you simply submit the MCNT input file to the printer, and contouring is done when the printer is ready. The size of the output file is 0.5 - 1.0 Mb, so connect the laserprinter by a parallel interface, if possible.

HPLJIII

This works exactly like the HPLJSII interface. The only difference is, that the bitmap output is compressed using the techniques supported only by the HP LaserJet series III printers. This reduces the amount of data sent to the printer.

HPLJSIV

This works like the HPLJIII driver, except that the resolution is 600 dpi.

WPG

Produces a graph in WordPerfect Graphics (.wpg) format.

PS

PostScript device. If destination is specified, this is taken as the output file name, else output is written to standard output. Output is produced to a paper size of 21 cm height and 29.7 cm width (A4). A margin of 0.63 is put on the top and right side, and a margin of 0.5 is put on the bottom and left side. The line thickness specified in the COLOR statements is assumed to be in units of 300'th of an inch. Characters are written using a scaled Helvetica font. In order to use special effects (e.g. special fonts), edit the PostScript output file with a standard editor, and change the PostScript commands before submitting the file to the printer. Note, even though a PostScript file is smaller than the corresponding file produced by the HPLJSII or HPLJIII drivers, it still may take longer to print, as some PostScript printers can take a LONG time to process the commands producing a page of graphics output. Unbalanced parenthesis or special characters in titles and headlines must be preceded with a backslash (\).

EPS

Encapsulated PostScript driver. Works like the PS driver, except that a bounding box line is added in the beginning of the file.

This driver also supports the following environment variables:
NameDescription
CPLOT_EPS_WIDTHThe width of the graph, in centimeters. Default is 30.
CPLOT_EPS_HEIGHTThe height of the graph, in centimeters. Default is 30.
CPLOT_EPS_BLACKCOLORThe actual color used for the color BLACK and WHITE. This is specified as a text string of three values, each value being a number from zero to one. Each value gives the intensity of red, green, and blue: "0 0 0" is black, and "1 1 1" is white.
CPLOT_EPS_BACKGROUNDA rectangle is drawn in this color behind the plot. The color is specified like CPLOT_EPS_BLACKCOLOR.

You can use the epstool program to add a preview to the generated EPS file.

VIEWPORT

Format:

VIEWPORT <xmin> <xmax> <ymin> <ymax>

Description:

Select the region of the paper to contain the plot. The parameters are specified in percentage of the drawing area available. It is thus possible to produce several plots on the same piece of paper. Note, the labeling of the y-axis will only take place for plots having xmin set to zero, and the labeling of the x-axis will only take place for plots having ymin set to zero. The title will be drawn for the plot having xmax and ymax set to 100.

PAGE

Format:

PAGE

Description:

Advance to the next piece of paper, or erase the screen. This is useful if the input file contains commands for several plots. Separate the commands for each page with a PAGE command.



Last updated: 18-Mar-1998
Questions/comments: mk@crc.dk