%CLD%Module CMPR_SUBCOMMANDS
%CLD%
\Program CMPR
%CLD% Define verb HELP
%CLD% 	parameter P1, value (type = $rest_of_line)
%CLD%
%HLP%1 HELP
%HLP%                Information on commands within CMPR

 Program CMPR is used to perform operations that compare
 diffractograms: operations such as plotting, addition/subtraction and
 simulation of patterns from ICDD-JCPDS data.

%HLP% The list of available commands is given below. For additional
%HLP% information about any of these commands, enter the name at
%HLP% the Topic? prompt. It is also possible to use the HELP command
%HLP% for help on a specific command from within CMPR. Type
%HLP%        HELP command_name
%HLP% at the CMPR> prompt (For example: CMPR> help exit).
%CLD%
%CLD% Define verb ADD
%CLD% 	parameter P1, label=file_1, value (type = $number, list)
%CLD% 	parameter P2, label=file_2, value (type = $number)
%CLD% 	Qualifier SCALE, value(required), nonnegatable
%CLD% 	Qualifier OFFSET, value(required), nonnegatable
%CLD% 	Qualifier MINIMUM, nonnegatable
%CLD% 	Qualifier TITLE value(required), nonnegatable
\Command ADD\par
  Used to add two files. The file numbers can be entered on
  the command line or can prompted. File numbers may be separated by
  either spaces or commas (or both).\par
  |   ADD 2 4   | is equivalent to
  |   ADD 2,4|\par
\Qualifiers
\qual
/TITLE="file_title"\par
  This option is used to specify a title line for the new file
\qual
/SCALE=scale_factor\par
  The intensities in second file will be multiplied by |scale_factor|.
  The |scale_factor| need not be an integer, but should be greater than
  zero.
\qual
/OFFSET=offset_val\par
  A fixed offset can be added (|offset_val| greater than zero) or
  subtracted (|offset_val| less than zero) to the resultant
  diffractogram after the two files are added. |offset_val| will
  be added to each point; |offset_val| may be a floating point number.

  If |/MINIMUM| is used with |/OFFSET|, the offset, |offset_val|,
  is added after subtracting the minimum intensity from all points,
  thus if the command |SUB/MIN/OFF=100 | is used, the lowest
  intensity point in the pattern will have an intensity of 100.
\qual
/MINIMUM\par
  Subtracts the intensity of the least intense point from all points
  in the diffractogram.
%CLD%
%CLD% Define verb ATTRIBUTES
%CLD% 	Qualifier COLOR, value(type=$number)
%CLD% 	Qualifier WIDTH, value(type=$number)
%CLD% 	Qualifier LINE, value(type=$number)
%CLD% 	Qualifier PEAK,	value(type=$number)
%CLD% 	Qualifier OFFSET
%CLD% 	Qualifier MAGNIFICATION
%CLD% 	Qualifier ALL,  syntax=no_parms
%CLD% 	parameter P1, label=file_1, value (type = $number,list)
%CLD% 	parameter P2, label=file_2, value (type = $number,list)
%CLD% 	parameter P3, label=file_3, value (type = $number,list)
%CLD% 	parameter P4, label=file_4, value (type = $number,list)
%CLD% 	parameter P5, label=file_5, value (type = $number,list)
%CLD% 	parameter P6, label=file_6, value (type = $number,list)
%CLD% 	parameter P7, label=file_7, value (type = $number,list)
%CLD% 	parameter P8, label=file_8, value (type = $number)
%CLD% 	define syntax no_parms, noparameters
\Command ATTRIBUTES\par
  This command is used to set the attributes which define how a
  diffractogram is plotted. The files to be affected may be included on
  the command line or may be input with a prompt. If more than one file
  is specified, the attributes for all specified files will be set to
  the same values.
\Qualifiers
\qual
/COLOR=color\par
 Sets the color for plotting the diffractogram. The color index must 
 be a number between 0 and 255, where color 0 corresponds to the background 
 color (producing an invisible plot). The actual number of colors available 
 isdetermined by the graphics device (see the PGPLOT documentation) with
 most devices supporting less than 256.
\qual
/WIDTH=width\par
 The line width to be used for plotting the diffractogram and/or the peak
 positions. A width of 1 is the usual default, but thicker lines may be
 specified by using larger numbers. Numbers less than 1 should not be used.
\qual
/LINE=line_type\par
 Determines the type of line used for plotting the diffractogram intensity
 versus angle data. |line_type| of 1 produces a single connecting line.
 |/LINE=2| through |/LINE=5| produce dashed, dot-dashed, dotted and
 dot-dot-dashed lines, respectively. |/LINE=6| puts dots at each
 data point (this is not exactly the same as a dotted line.) A line type
 of 0 indicates that the diffractogram data is not to be plotted.
 Numbers less than 0 or greater than 6 should not be used.
\qual
/PEAK=peak_type\par
 Determines the type of line used for plotting the peak position data.
 Ignored for files that do not have peaks. A |peak_type| of 1 produces a
 single straight line for each peak.  Types of 2 through 5 produce
 dashed, dot-dashed, dotted and dot-dot-dashed lines, respectively.
 A peak type of 0 indicates that the peaks are not to be plotted.
 If 8 is added to the peak type, the intensity is considered arbitrary
 and will be plotted full scale.
 Numbers less than 0 or greater than 14 should not be used.
\qual
/OFFSET=off_value\par
Specifies an offset to be added to the data when the data is plotted.
The value is a floating point number which may be positive or negative.
\qual
/MAGNIFICATION=mag_value\par
\!\null\par
Specifies a magnification factor for the data for plotting.
The value is a floating point number which may be greater than or less than
one.
\qual
/ALL\par
 Sets the specified attributes for all files.
\Examples
\exam
  |ATT 1 2 3|\par
			Sets the attributes for files 1, 2 and 3. The
			values for the attributes will be requested
			using prompted input.
\exam
  |ATT|\par
 			As before except the file numbers will also be
			prompted for.
\exam
  |ATTR/COLOR=2  4,3|\par
			Resets the color for files 3 and 4 to color
			type \#2 (actual color is device dependant,
			usually red).
\exam
  |ATTR/ALL/C=1|\par
			Resets the color for all files the default color.
%CLD%
%CLD% Define verb COMBINE
%CLD% 	parameter P1, label=file_1, value (type = $number,list)
%CLD% 	parameter P2, label=file_2, value (type = $number,list)
%CLD% 	parameter P3, label=file_3, value (type = $number,list)
%CLD% 	parameter P4, label=file_4, value (type = $number,list)
%CLD% 	parameter P5, label=file_5, value (type = $number,list)
%CLD% 	parameter P6, label=file_6, value (type = $number,list)
%CLD% 	parameter P7, label=file_7, value (type = $number,list)
%CLD% 	parameter P8, label=file_8, value (type = $number)
\Command COMBINE\par
  Used to combine two or more files into one file.  The file numbers can
  be entered on the command line or can be prompted.  File numbers may be
  separated by spaces or commas or both.\par

  Command format: |COMBINE [file_list]|
\Parameter
\parm
file_list\par
 File numbers may be specified on the command line separated by
 commas or spaces.\par

 If no files are placed on the command line, a prompt will be
 generated for file numbers.
%CLD%
%CLD% Define verb DCL
\Command DCL\par
 Spawns a subprocess to execute DCL commands, type LOGOUT to
 return back to CMPR without affecting the current list of files.
 This command is useful for quick DCL ``errands'' such as answering
 a mail message without exiting the program.
%CLD%
%CLD% Define verb DEFAULT
%CLD% 	Qualifier AUTO
%CLD% 	Qualifier MANUAL
%CLD% 	    Disallow ANY2(AUTO,MANUAL)
\Command DEFAULT\par
  This program can operate in two modes, AUTO mode and MANUAL mode. In
  AUTO mode, default values are used where possible to cut down on the
  amount of questions the need to answered. In MANUAL mode, if a
  parameter is not specified on the command line, a prompt will be
  generated for an option or value. The current mode is listed on the
  top of the screen.

  Command qualifiers always override default options. For example,
  in AUTO mode command |WRITE/NBS| produces a file in NBS format,
  while |WRITE| defaults to |/BINARY|. In MANUAL mode, the latter
  command would generate a prompt requesting a choice for file format.

  The mode can be toggled by entering the DEFAULT command without any
  qualifiers. Alternately, a qualifier may be used:
\TAB {} |DEF/MAN  |	(sets the mode to MANUAL)
\TAB {} |DEFAULT/A|	(sets the mode to AUTO)
\TAB {} |DEF      |	(sets the mode to the opposite of the current mode)
\Qualifiers
\qual
/AUTO\<
/NOMANUAL\par
		If either of these qualifiers are used, the mode is set
		to AUTO. Thus, default values will be used for options
		(where possible) to reduce the number of prompts.
		(|/NOMANUAL| is equivalent to |/AUTO|)
\qual
/MANUAL\<
/NOAUTO\par
		If either of these qualifiers are used, the mode is set
		to MANUAL. Thus, the program will prompt rather than
		using default option(s).
		(|/MANUAL| is equivalent to |/NOAUTO|)
%CLD%
%CLD% Define verb DELETE
%CLD% 	parameter P1, label=file_1, value (type = $number)
%CLD% 	Qualifier ALL, syntax=DELETE_ALL
%CLD% 	define syntax DELETE_ALL, noparameters
\Command DELETE\par
  Used to remove a ``file'' from the list of available files. This will not
  delete the file from disk storage (unless it was created in CMPR and
  never actually written on disk). Only one file can be removed at a
  time and file number 1 can only be removed with the |DELETE/ALL| 
  command -- which removes all files (equivalent to starting a new CMPR
  run).

  usage:
\TAB  {}      |DELETE [file_number]   | or
\TAB  {}      |DEL/ALL|
\Parameter
\parm
file_number\par
 The number of a single file to be removed may be specified on the
 command line. If the file number is not specified a prompt will be
 given requesting a file number. The file number must be in the range of
 2 to 10. No file number may be specified if |/ALL| is used.
\Qualifier
\qual
/ALL\par
  Removes all files (equivalent to starting a new session). When
  running interactively, a prompt will be generated for new file names
  to read. No file numbers can be specified if |/ALL| is specified.
%CLD%
%CLD% Define verb DGEN
%CLD% 	Qualifier A, value(required), nonnegatable
%CLD% 	Qualifier B, value(required), nonnegatable
%CLD% 	Qualifier C, value(required), nonnegatable
%CLD% 	Qualifier ALPHA, value(required), nonnegatable
%CLD% 	Qualifier BETA, value(required), nonnegatable
%CLD% 	Qualifier GAMMA, value(required), nonnegatable
\Command DGEN\par
  Computes the allowed d-spaces for a given unit cell optionally omitting 
  reflections extinct by translation symmetry. Must be run interactively.
\Qualifier
\qual
/A=a_length\<
/B=b_length\<
/C=c_length\<
/ALPHA=bc_angle\<
/BETA=ac_angle\<
/GAMMA=ab_angle\par
Defines the unit cell lengths in Angstroms and the angles in degrees
for the d-space generation. 
If |a_length| is not specified, values for the cell Laue symmetry and
then all appropriate unit cell parameters will be requested.
If |b_length| and/or |c_length| are not specified, they default to 
|a_length|. Any angles that are not specified default to 90 degrees.
%CLD%
%CLD% Define verb DUMP
%CLD% 	parameter P1, label=file_1, value (type = $number,list)
\! % Dump is not documented -- for debugging only
%CLD%
%CLD% Define verb EXIT
%CLD% 	parameter P1,value (type = $REST_OF_LINE)
\Command EXIT\par
 Type EXIT (which can be abbreviated to E) to exit; alternately
 press Control Z (|^Z|) to exit the program. After exiting, you will 
 be prompted to write any files that have been modified or created
 within the program.
%CLD%
%CLD%Define verb FILE
%CLD%	Parameter P1, label file_name, value(type=$file)
%CLD%
\Command FILE\par
 Allows a series of commands to be input to the program from an external
 file. The file should be prepared before starting the program, or using
 the DCL command to invoke an editor. 
\Parameter
\parm
file_name\par
 A single file may be specified on the command line containing the name
 of the file with commands. If the file is not specified, a prompt will be
 given to request a file name. 

 If no file extension is supplied, the default extension is |.CMD|
%CLD% Define verb HKLPLOT
%CLD% 	parameter P1, label=file_1, value (type = $number, list)
%CLD% 	parameter P2, label=file_2, value (type = $number)
%CLD% 	Qualifier WIDTH, value(required), nonnegatable
%CLD% 	Qualifier XLOW,	nonnegatable,value(required)
%CLD% 	Qualifier XHIGH, nonnegatable,value(required)
%CLD% 	Qualifier DATASCALE, nonnegatable,value(required)
%CLD% 	Qualifier PEAKSCALE, nonnegatable,value(required)
%CLD%
\Command HKLPLOT\par
  Used to label hkl values and show which peaks would be expected to 
become extinct for a given set of symmetry elements.

  A symmetry operation is supplied to the program and reflections
from the file are displayed in one of three colors (or line styles
if the graphics device is incapable of displaying color graphics). 
The basic color is used for peaks that are extinct by the specified
Bravais lattice and translational symmetry elements. The second
color is used for peaks that are not extinct. A third color is used 
for where extinct and non-extinct peaks overlap.

  If raw data is in the diffractogram file, that data is also displayed.
If two file numbers are given, the data from the second file is displayed.

  If the interactive graphics device has a graphics cursor, the cursor can
be used to selectively label the indices of selected reflections.
\Qualifier
\qual
/WIDTH=P_width\par
  The value of |P_width| dictates the width where it is expected to 
be impossible to discern two overlapped reflections. This should normally 
be in the range of one and a half to one quarter of the expected peak FWHM.
\qual
/XLOW=low_limit\<
/XHIGH=high_limit\par
  Defines the limits for plotting the x-axis. If either is specified,
  the values for limits will not be prompted. Values may be
  integers or floating point numbers, but must be included if the
  qualifier is specified. The units are degrees \twotheta.
\qual
/DATASCALE=data_scale\<
/PEAKSCALE=peak_scale\par
  Defines the limits for plotting the y-axis. A value of |1.0| means 
  data/peaksare plotted so that the maximum value is full scale, |2.0| 
  means a magnification factor of x2. 

  A value of |0.0| for |peak_scale| means that all peaks will be plotted
  to full scale.
%CLD%
%CLD% Define verb LOGIC
\Command LOGIC\par
 Use this command to invoke the LOGIC program to search the ICDD-JCPDS database
 (without exiting CMPR.)  After exiting from LOGIC, CMPR will be resumed
 with all current files still loaded and all current parameters unchanged.
%CLD%
%CLD% Define verb MANIP
%CLD% 	parameter P1, label=file_1, value (type = $number)
\Command MANIP\par
 Use this command to invoke the MANIP program without exiting CMPR.
 When exiting from MANIP, the computer will return to CMPR with all
 CMPR files still loaded in memory. It is possible to pass a file
 from CMPR's list of current files to MANIP and/or pass one or more
 files from MANIP back to CMPR.
\Parameter
\parm
file_number\par
 The number of a single file may be specified on the command line
 referencing the number of the file to be passed to MANIP. If the file
 number is not specified a prompt will be given requesting a file number.
 Files must be written on disk in order to be passed. If the file has
 been modified and does not exist in the current form on disk,
 confirmation will be requested before the file is written.
%CLD%
%CLD% Define verb PLOT
%CLD% 	Qualifier XSTACK, value(type=$number, required)
%CLD% 	Qualifier YSTACK, value(type=$number, required)
%CLD% 	Qualifier STACK
%CLD% 	Disallow (neg STACK) and (XSTACK or YSTACK)
%CLD% 	Qualifier XLOW,	nonnegatable,value(required)
%CLD% 	Qualifier XHIGH, nonnegatable,value(required)
%CLD% 	Qualifier SIZE,
%CLD% 		nonnegatable,value(list)
%CLD% 	Qualifier Q
%CLD% 	Qualifier DSPACE
%CLD% 	Qualifier WAVELENGTH, nonnegatable, value(required)
%CLD% 	Disallow ANY2(Q,DSPACE,WAVELENGTH)
%CLD% 	Qualifier YLOW, nonnegatable, value(required)
%CLD% 	Qualifier YHIGH, nonnegatable, value(required)
%CLD% 	Qualifier FIRST, nonnegatable
%CLD% 	Qualifier RELATIVE, nonnegatable
%CLD% 	Qualifier EXTREME, nonnegatable
%CLD% 	Disallow ANY2(FIRST,RELATIVE,EXTREME,YHIGH)
%CLD% 	Qualifier LOG,	nonnegatable
%CLD% 	Qualifier SQRT,	nonnegatable
%CLD% 	Qualifier LINEAR, nonnegatable
%CLD% 	Disallow ANY2(SQRT,LOG,LINEAR)
%CLD% 	Qualifier TITLE
%CLD%	Qualifier FILE
%CLD% 	Qualifier GRID
%CLD% 	Qualifier CLIP
%CLD% 	Qualifier HARD
%CLD% 	parameter P1, label=file_1, value (type = $number,list)
%CLD% 	parameter P2, label=file_2, value (type = $number,list)
%CLD% 	parameter P3, label=file_3, value (type = $number,list)
%CLD% 	parameter P4, label=file_4, value (type = $number,list)
%CLD% 	parameter P5, label=file_5, value (type = $number,list)
%CLD% 	parameter P6, label=file_6, value (type = $number,list)
%CLD% 	parameter P7, label=file_7, value (type = $number,list)
%CLD% 	parameter P8, label=file_8, value (type = $number)
\Command PLOT\par
Used to produce a plot on either a terminal or on a hard copy device.
Several options are available to determine the format of the plot. 

The default options for plotting are determined by the DEFAULT command.
However, use of a PLOT qualifier on the command line will override the
default option.

Note that the x-axes for all files to be plotted should be of the
same x-axis type (have the same units) except if |/Q|, |/WAVELENGTH| 
or |/DSPACE| is specified. In that case files will be converted (if 
possible) to the appropriate units before plotting.

Command format: |PLOT [/qualifiers] [file_list]|
\Parameter
\parm
file_list\par
 File numbers may be specified on the command line separated by
 commas or spaces:\par
|        PLOT 1,2,3|\par
|        PLOT 1 2 3|\par
|        PLOT 1 2,3|\par
 all of the above are equivalent and valid.

 If no files are placed on the command line, a prompt will be
 generated for file numbers.
\Qualifiers
\qual
/XLOW=low_limit\<
/XHIGH=high_limit\par
  Defines the plot limits for the x-axis. If either is specified,
  the values for plotting limits will not be prompted. Values may be
  integers or floating point numbers, but must be included if the
  qualifier is specified. The units are those of the files to be plotted
  unless the the |/Q|, |/WAVELENGTH| or |/DSPACE| option is used.
\qual
/Q\<
/DSPACE\<
/WAVELENGTH=wavel\par
 Files are plotted with their x-axis units unchanged unless |/Q|, 
 |/DSPACE|, or |/WAVELENGTH| is placed on the command line or the 
 default plotting option is changed to one of these options.
 The program will then attempt to convert all files to the requested 
 units (not all conversions are possible.)

|/Q| \TAB {}
	The graph will be plotted in Q units (in reciprocal \AA).
\!Q is defined as 
\!$$Q = {4 \pi\over\lambda} \sin\theta = {2\pi\over d}. $$

|/DSPACE| \TAB {}
 	The graph will be plotted in D-space units (in \AA).
\!the d-space is defined as $$d = {\sin\theta\over 2\lambda}.$$

|/WAVELENGTH| \TAB {}
 	The graph will be plotted in \twotheta\ units at 
	wavelength |wavel|\AA.
\qual
/STACK\<
/NOSTACK\par
  There are two options that govern how more than one diffractogram 
  is plotted. They may be superimposed on a single set of axes, with 
  optional offsets between plots (see |/XSTACK| and |/YSTACK|) or 
  plotted with each diffractogram having a separate set of axes.
  These options are only applicable if more than one file will be plotted.

 |/STACK| \TAB {}
	Causes each diffractogram to be plotted with single set of axes.
	These plots are also called single-box plots in the documentation.

 |/NOSTACK| \TAB {}
	Causes each diffractogram to be plotted with a separate set of axes.
	These plots are also called multiple box plots in the documentation.
\qual
/XSTACK=X_spacing\<
/YSTACK=Y_spacing\par
 Causes plots to be ``stacked'' -- drawn on a single set of axes (see
 |/STACK|). |X_spacing| is the horizontal distance in percent of the 
 full scale and |Y_spacing| is the vertical distance in percent of full 
 scale between the zero values in successive plots. |/XSTACK| and/or 
 |/YSTACK| cannot be used with the |/NOSTACK| qualifier.
\qual
/RELATIVE\<
/EXTREME\<
/FIRST\par
  There are four scaling options to determine the maximum value for 
  the y-axis. The first three are applicable only if more than one file 
  will be plotted.

 |/FIRST| \TAB {}
    The maximum intensity for the vertical axis is set from the first 
    file to be plotted.

 |/EXTREME| \TAB {}
    The maximum intensity for the vertical axis is set from the maximum
    of all files to be plotted. All files will be plotted on the same
    scale.

 |/RELATIVE| \TAB {}
    The vertical axis is set to the maximum point in each diffractogram. 
    If the plot is ``stacked'' (see |/XSTACK| or |/YSTACK|) the full
    scale will be increased, if needed to include all files.

  The fourth option is to specify the maximum [and optionally minimum] 
  y-axis values using |/YHIGH| [and |/YLOW|.]

  Only one of |/YHIGH|, |/EXTREME|, |/FIRST| and |/RELATIVE| can be used.
\qual
/YLOW=low_limit\<
/YHIGH=high_limit\par
  Defines plot limits for the y-axis. |low_limit| and |high_limit| are
  the minimum and maximum number of counts that can fit on the plot
  axes. (These numbers need not be integers and are not prompted.)
  If |/YLOW| is not specified, |low_limit| will be 0.
  If |/YHIGH| is not specified, |high_limit| will depend on options
  for |/XSTACK| or |/YSTACK|. 

  Cannot be used with |/EXTREME|, |/FIRST| or |/RELATIVE|.
\qual
/SIZE=(X_len,Y_len,X_mar,Y_mar)\<
/SIZE=(X_len,Y_len)\<
/SIZE\par
\!\line{\hss}
  Used to specify the size of the plot in inches. |X_len| and |Y_len|
  are the lengths of the x- and y-axes, respectively.
  |Y_mar| and |X_mar| are the margins below and to the left of the
  axes. (The default margins are 1 inch.) These numbers may be
  floating point numbers.

 The command can be used two ways, if |/SIZE| is used without any
 values, CMPR will prompt for values. If values are specified
 on the command line, both |X_len| and |Y_len| must be specified.
 |X_mar| and |Y_mar| are optional, but |X_mar| must be specified
 before |Y_mar|.

 It is the user's responsibility to insure that the requested size
 is compatible with the graphics device. 
\qual
/TITLE\<
/NOTITLE\par
  If |/TITLE| is specified, plot(s) will be labeled with the title 
  from each file. If |/NOTITLE| is specified, plot(s) will not be labeled
  with the title.

 (Command |TITLE| may be used to change the file title).
\qual
/FILE\<
/NOFILE\par
  If |/FILE| is specified, plot(s) will be labeled with the name
  of the data file. IF |/NOFILE| is specified, plots will not be labeled 
  with the filename.
\qual
/CLIP\par
  Segments of the plot that lie outside the plot axes may ``squared off''
  (clipped) at the axis limit (|/CLIP|) or may be simply omitted (|/NOCLIP|).
\qual
/LINEAR\<
/LOG\<
/SQRT\par
  The intensity scale can plotted proportional to the number of
  counts (|/LINEAR|), logarithmic units (|/LOG|) or proportional to 
  the square-root of the number of counts (|/SQRT|). 
  Plots will be made in |/LINEAR| mode, unless |/LOG| or |/SQRT| is
  specified or the default is changed.
\qual
/GRID\par
  If |/GRID| is specified, the graph will be plotted with a grid 
  extending from each tick mark on the x- and y-axes.
\qual
/HARD\par
 If |/HARD| is specified, graphics will be sent
 to the default hardcopy device, rather than displayed the terminal.
%CLD%
%CLD% Define verb QUIT
\Command QUIT\par
 Type QUIT (which can be abbreviated to Q) to quit the program. Unlike
 the exit command, you will not be prompted to write any files that have 
 been modified or created within the program.
%CLD%
%CLD% Define verb READ
%CLD% 	parameter P1, label=filename, value (type = $file,list)
\Command READ\par
  Used to read one or more new files into the list of available file
  names. (Assuming there is still space in the list for additional files.
  If not, first use the DELETE command to make room.)

  usage:
|        READ [filename1] [,filename2] [,filename3],...|

%HLP% Information on peak and data files can be found in the 
%HLP% File_formats help entry.
\! See the section on File Formats in the first chapter for 
\! information on formats for peak and data files.
\Parameter
\parm
file_name\par
\parm
file_name_1, file_name_2,... file_name_8\par
 Files may be specified on the command line. If no files are specified,
 a prompt will be given requesting a file name to read.

 |file_name| may be VMS filename or logical name or a JCPDS-ICDD entry 
 number. For interactive input, a question mark (|?|)may be used to see 
 help information and if a wildcard is used (|*| or |%|), a directory
 listing is shown.
 
 If |file_name| is a VMS filename it can be of form |FILE.EXT| or 
 |DEV:[DIR]FILE.EXTENSION;2| -- subject to a limitation that the 
 file name must not exceed 80 characters.

 It is usually preferable to supply the file name without a file 
 extension, as the default extension will then depend on the file
 format. This improves the speed that the program has available 
 when searching for the file.
%HLP% See the help entry on File_formats for more information.
 The subroutines which read data and peak files, (subroutines 
 |READDATA| and |READPEAK| respectively), will attempt to determine 
 the format of the file from the file contents and the extension.

 More than one file name can be specified on the command line, but 
 names must be separated by commas. If more file names are specified
 than may be read, the extra names will be ignored.

 Filenames may not be specified if the |/JCPDS| qualifier is used.
\Qualifier
\qual 
%CLD%	Qualifier FORMAT, value(required), nonnegatable	
/FORMAT=fileform\par
 This optional qualifier may be used to specify the file format that will
 be used for reading the file(s). If more than one file is given and 
 |/FORMAT| is used, all files must all be in the specified format.
\! (See the information on File Formats for the |fileform| codes).
%HLP% (See the help entry on File_formats for the |fileform| codes).

 In most cases it is not necessary to specify the file format, as the 
 program will discern the file format from the file. However, in certain
 cases where problems are encountered, it may be necessary to use the 
 format option.

 File formats may not be specified if the |/JCPDS| qualifier is used.
\qual 
%CLD%	Qualifier JCPDS, value(list, type=$number), syntax=READJCPDS
%CLD%Define syntax READJCPDS, noparameters
%CLD%	Disallow <read>FORMAT
/JCPDS=card_list\<
/JCPDS\par
 Use this qualifier to select entries using their ICDD-JCPDS entry number.
 The entry number is always a five or six digit number consisting
 of the ``old'' entry number plus 10,000 times the set number. For
 example, entry 413 in set 7 would be coded as:\par
\Examples
\exam
 |READ group.mother/FORMAT=DUPONT|\par
\exam
 |READ|\par
\exam
 |READ/JCPDS=(271402,400001)|\par
\exam
 |READ group.mom,[.test]exper.fil,somewhere:overthe.rainbow;1|\par
%CLD%
%CLD% Define verb SCALE
%CLD% 	parameter P1, label=file_1, value (type = $number)
%CLD% 	Qualifier XOFFSET, nonnegatable, value(required)
%CLD% 	Qualifier XMULT, nonnegatable, value(required)
%CLD% 	Qualifier YOFFSET, nonnegatable, value(required)
%CLD% 	Qualifier YMULT, nonnegatable, value(required)
\Command SCALE\par
 Rescales the x and/or y values for a data file.
\Parameter
\parm
file_number\par
 The number of a single file to be rescaled may be specified on the
 command line. If the file number is not specified a prompt will be
 given requesting a file number.
\Qualifiers
\qual
/YMULT=Y_Factor\<
/YOFFSET=Y_Offset\par
  Rescales the y-values in the file from by first adding the offset
  (|Y_Offset|) and then by multiplying the y-values by the multiplier
  (|Y_Factor|).

  If not specified, |Y_Offset| defaults to 0.0 and |Y_Factor| defaults 
  to 1.0. If neither value is specified, a prompts will be generated 
  for values.
/XMULT=X_Factor\<
/XOFFSET=X_Offset\par
  Rescales the x-values in the file from by first adding the offset
  (|X_Offset|) and then by multiplying the x-values by the multiplier
  (|X_Factor|).

  If not specified, |X_Offset| defaults to 0.0 and |X_Factor| defaults 
  to 1.0. If neither value is specified, a prompts will be generated 
  for values.
%CLD%
%CLD% Define verb SIMULATE
%CLD% 	Qualifier WEIGHT, nonnegatable,value(list)
%CLD% 	Qualifier RANGE, nonnegatable,value(list)
%CLD% 	Qualifier STEP,	nonnegatable,value(required)
%CLD% 	Qualifier CAUCHY, nonnegatable,value(list)
%CLD% 	Qualifier GAUSSIAN, nonnegatable,value(list)
%CLD% 	    Disallow ANY2(CAUCHY,GAUSSIAN)
%CLD% 	Qualifier OFFSET, nonnegatable,value(type=$number,required)
%CLD% 	Qualifier AMORPHOUS, nonnegatable,value(list)
%CLD% 	    Disallow ANY2(OFFSET,AMORPHOUS)
%CLD% 	Qualifier WAVELENGTH, nonnegatable, value(required)
%CLD% 	Qualifier TARGET, nonnegatable,value(type=TARGET_TYPE)
%CLD% 	    Disallow ANY2(WAVELENGTH,TARGET)
%CLD% 	    Disallow ANY2(WAVELENGTH,WTYPE)
%CLD% 	Qualifier WTYPE, nonnegatable,value(type=$number)
%CLD% 	Qualifier NOISE, nonnegatable
%CLD% 	Qualifier MAXIMUM, nonnegatable,value(type=$number)
%CLD% 	parameter P1, label=file_1, value (type = $number,list)
%CLD% 	parameter P2, label=file_2, value (type = $number,list)
%CLD% 	parameter P3, label=file_3, value (type = $number,list)
%CLD% 	parameter P4, label=file_4, value (type = $number,list)
%CLD% 	parameter P5, label=file_5, value (type = $number,list)
%CLD% 	parameter P6, label=file_6, value (type = $number,list)
%CLD% 	parameter P7, label=file_7, value (type = $number,list)
%CLD% 	parameter P8, label=file_8, value (type = $number)
%CLD% 	Define type TARGET_TYPE
%CLD%		keyword CU, keyword MO, keyword NI, keyword CO
%CLD%		keyword FE, keyword CR, keyword AG, keyword SY, keyword NU
\Command SIMULATE\par
 This option is used to construct a simulated diffraction pattern from
 a set of peak positions and intensities. The peak positions may be
 generated by an external program, such as Lazy/Pulverix, read from the 
 JCPDS-ICDD data base, or obtained from an experimental source.

 The peak positions must be loaded into one or more files using the |READ|
 command. This command may then be used to construct a simulated pattern 
 by convoluting that data. More than one set of peaks may be combined to
 simulate a mixture, in which case weights for each file may be specified.

 If one or more files will be combined, or the file to be convoluted already
 has a corresponding diffraction pattern, a new file will be created. If
 only one file is used and no diffractogram is present for that file, 
 the diffractogram will be added to the same file as the peaks

 The command format is:\par
|     SIM [file_1] [file_2]... [file_8] [/qualifiers]|
\Parameter
\parm
file_list\par
 File numbers may be specified on the command line separated by
 commas or spaces.\par

 If no files are placed on the command line, a prompt will be
 generated for file numbers.
\Qualifiers
\qual
/RANGE=(x_min,x_max)\<
/RANGE\par
  Specifies the \twotheta\ range of the simulated pattern. If only |x_min|
  is specified, |x_max| defaults to the largest x value in file \#1.
  If both numbers are omitted, both default to the same as file \#1. The
  numbers may be specified as floating point.
\qual
/WEIGHT=(Wt_2,Wt_1,...Wt_n)\par
\!\null\par
 Specifies the weights for the |n| files to be convoluted. The default value
 is 100.
\qual
/STEP=step_size\<
/STEP\par
  Specifies the \twotheta\ step size for the simulated pattern in units of
  degrees. If the value is omitted, the default is the same as the
  step size in file number \#1. |step_size| should always be less than
  1.0 but greater than 0.
\qual
/CAUCHY=(p_wid,p_ang)\<
/CAUCHY\<
/GAUSSIAN=(p_wid,p_ang)\<
/GAUSSIAN\par
 Selects the peak profile as either Lorentzian (Cauchy) or Gaussian
 (not both). If both |p_wid| and |p_ang| and are specified, peaks at
 angle |p_ang| will have a WIDTH of |p_wid| degrees. If both numbers
 are not specified, the NBS width table will be used. Either number
 may be floating point.
\qual
/OFFSET=offset_val\par
  A fixed integer offset of |offset_val| counts can be added to the
  simulated pattern. Cannot be used with |/AMORPHOUS|.
\qual
/AMORPHOUS=(a_wid,a_ang,a_int)\par
\!\null\par
   Specifies that a broad peak simulating amorphous scattering
   be added to the simulated pattern. A peak will be placed at
   angle |a_ang|, with width |a_wid| and intensity |a_int|. The default
   values for |a_ang|, and |a_wid| are 25 and 30 degrees \twotheta
   respectively, for |a_int| it is 2 percent of full scale. Any of these
   numbers may be floating point values.

  Cannot be used with |/OFFSET|.
\qual
/WAVELENGTH=wave_length\par
  A single wavelength may be specified, where |wave_length| is the
  x-ray or neutron wavelength in \AA. If |wave_length| is used,
  |/TARGET| and |/WTYPE| should not. (The |target_type| will be assumed
  to be |SY| for synchrotron radiation).
\qual
/TARGET=target_type\<
/TARGET\par
 Specifies an x-ray target for conventional x-ray sources.
 The choices for targets are:
 |Cu|, |Mo|, |Ni|, |Co|, |Fe|, |Cr|, |Ag|, |NU|, or |SY|.
 Specifying |/TARGET| without a |target_type| is equivalent to
 |/TARGET=CU|. (Capitalization of the target type is ignored.)\par
 If |NU| or |SY| (for neutron or synchrotron radiation) is used,
 the program prompts for a wavelength. This option cannot be used if
 a |wave_length| value is specified using |/WAVELENGTH|.\par
\qual
/WTYPE=wave_type\par
   |wave_type| may be either 1, 2, 3 or 4 which determines
   the exact value used for the wavelength specified with |/TARGET|.
   The choices are:
\TAB	1 to use \Kalpha1\ radiation
\TAB	2 to use \Kalpha2\ radiation
\TAB	3 to use the intensity weighted average of \Kalpha1\ and \Kalpha2\
	  radiation.\par
\TAB	4 to use both \Kalpha1\ and \Kalpha2\ radiation.\par
   Specifying |/WTYPE| without a value is equivalent to |/WTYPE=4|.\par
   This qualifier is ignored if the radiation source has a single
   wavelength, (e.g. |/TARGET=NU| or |/TARGET=SY|) and cannot be used
   if |/WAVELENGTH| is specified.
\qual
/NOISE=sig_level\<
/NOISE\par
  Used to add random noise to the simulated diffractogram.
  Noise will be added at a level of |sig_level| standard deviations.
  |sig_level| may be floating point and defaults to 2.0
\qual
/MAXIMUM=max_count\<
/MAXIMUM\par
  This qualifier is used to set the maximum intensity in the pattern
  after scaling to |max_count|. The value for |max_count| must be an
  integer, if not specified it defaults to 5000 counts.
\Examples
\exam
 |SIMUL|\par
\exam
 |SIM 7,413|\par
\exam
 |SIM 7,413,50 7,414,50/CAUCHY/TARGET=MO|\par
%CLD%
%CLD% Define verb SUBTRACT
%CLD% 	parameter P1, label=file_1, value (type = $number, list)
%CLD% 	parameter P2, label=file_2, value (type = $number)
%CLD% 	Qualifier SCALE, value(required), nonnegatable
%CLD% 	Qualifier OFFSET, value(required), nonnegatable
%CLD% 	Qualifier TITLE, value (required), nonnegatable
%CLD% 	Qualifier MINIMUM, nonnegatable
%CLD% 	Qualifier IGNORE, nonnegatable
%CLD% 	Qualifier CLIP, nonnegatable
%CLD% 	    Disallow ANY2(MINIMUM,IGNORE,CLIP)
\Command SUBTRACT\par
  Used to subtract two files. The file numbers can be entered on
  the command line or can prompted. File numbers may be separated by
  either spaces or commas (or both).\par
  |   SUB 2 4   | is equivalent to
  |   SUB 2,4|\par
  (file \#4 will be subtracted from file \#2)
\Qualifiers
\qual
/TITLE="file_title"\par
  This option is used to specify a title line for the new file
\qual
/SCALE=scale_factor\par
  The intensities in second file will be multiplied by |scale_factor|.
  The |scale_factor| need not be an integer, but should be greater than
  zero.
\qual
/OFFSET=offset_val\par
  A fixed offset can be added (|offset_val| greater than zero) or
  subtracted (|offset_val| less than zero) to the resultant
  diffractogram after the two files are subtracted. |offset_val| will
  be added to each point; |offset_val| may be a floating point number.

  If |/MINIMUM| is used with |/OFFSET|, the offset, |offset_val|,
  is added after subtracting the minimum intensity from all points,
  thus if the command |SUB/MIN/OFF=100 | is used, the lowest
  intensity point in the pattern will have an intensity of 100.
\qual
/MINIMUM\par
  Subtracts the intensity of the least intense point from all points
  in the diffractogram.
\qual
/IGNORE\<
/CLIP\par
  Action to be taken if negative intensities are present. If |/CLIP|
  is used, negative intensities are set to zero, if |/IGNORE| is used,
  they are left unchanged. These options cannot be used if |/MINIMUM|
  is used (which will prevent negative intensities by shifting the
  pattern up). If |/OFFSET| and |/CLIP| are both used, |offset_val|
  will be added after negative points are clipped to zero.
%CLD%
%CLD% Define verb TITLE
%CLD% 	parameter P1, label=file_1, value (type = $number)
%CLD% 	parameter P2, label=new_title, value (type = $REST_OF_LINE)
\Command TITLE\par
 Used to change the title of a file. The format of this command is:\par
|      TITLE [file_number] title|\par
 The title can be specified on the command line only if preceeded by a
 file number, but neither must be specified. At this time, any lower case
 letters used in the title will be converted to uppercase.
\Examples
\exam
|TITLE 1 This is the new title for file number 1|\par
			Note that the title will be converted to all
			capital letters.
\exam
|TITLE 1|\par
			using this version, the title will be prompted.
\exam
|TITLE|\par
			Prompts will be generated for the file number
			and the title.
%CLD%Define verb WAVELENGTH
%CLD% 	parameter P1, label=wave_length
%CLD%	Qualifier TARGET, value(type=TARGET_TYPE), syntax=NO_PARAMS
%CLD%	Qualifier WTYPE, nonnegatable,value(type=$number)
%CLD% 	Define syntax NO_PARAMS, noparameters
%CLD%
\Command WAVELENGTH\par
 Used to enter a default wavelength for the READ and SIMULATE command.  
\Parameter
\parm
wave_length\par
  A single wavelength value may be specified directly, where |wave_length| 
  is the x-ray or neutron wavelength in \AA. (The |target_type| will be 
  assumed to be |SY| for synchrotron radiation).

  If |0.0| is used for the |wave_length|, the program will enter d-space 
  mode (same as specifying |WAVELENGTH/NOTARGET|).

  If |wave_length| is used, |/TARGET| and |/WTYPE| should not. 
\Qualifiers
\qual 
/TARGET=target_type\<
/TARGET\<
/NOTARGET\par
 Specifies an x-ray target for conventional x-ray sources. 
 The choices for targets are:
 |Cu|, |Mo|, |Ni|, |Co|, |Fe|, |Cr|, |Ag|, |NU|, or |SY|. 
 Specifying |/TARGET| without a |target_type| is equivalent to 
 |/TARGET=CU|. (Capitalization of the target type is ignored.)\par
 If |NU| or |SY| (for neutron or synchrotron radiation) is used, 
 the program prompts for a wavelength. 

 For input/output using d-spacings specify |/NOTARGET|\par

 The |/TARGET| option cannot be specified with a |wave_length| value.\par
\qual 
/WTYPE=wave_type\par
   |wave_type| may be either 1, 2 or 3 which determines 
   the exact value used for the wavelength specified with |/TARGET|.
   The choices are:
\TAB	1 to use \Kalpha1\ radiation 
\TAB	2 to use \Kalpha2\ radiation 
\TAB	3 to use the intensity weighted average of \Kalpha1\ and \Kalpha2\ 
	  radiation.\par
   Specifying |/WTYPE| without a value for |wave_type| is equivalent 
   to specifying |/WTYPE=1|.\par
   This qualifier is ignored if the radiation source has a single 
   wavelength, (e.g. |/TARGET=NU| or |/TARGET=SY|) or a 
   |wave_length| value is specified.
\Examples
\exam
|WAVELENGTH/TARGET=CU/WTYPE=3|\par
	The wavelength will be set to the average of Cu \Kalpha1\ and 
	\Kalpha2.
\exam
|WAVELENGTH/TARGET|\par
	The wavelength will be set to Cu \Kalpha1\ 
\exam
|WAVE/NOTAR|\par
	Peaks positions, etc. will be displayed as d-spaces.
\exam
|WAVE 0.0|\par
	Peaks positions, etc. will be displayed as d-spaces.
\exam
|WAVE 2.5401|\par
	The wavelength will be set to 2.5401\AA.
\exam
|WAVE|\par
	The user will be prompted to choose a wavelength or two use
	d-spacings. 
\exam
|WAVELENGTH/TARGET=NU/WTYPE=3|\par
	The user will be prompted to enter a wavelength; the |/WTYPE=3|
	qualifier will be ignored.\par
%CLD%
%CLD% Define verb WRITE
%CLD% 	parameter P1, label=file_1, value (type = $number)
%CLD% 	Qualifier FILENAME, value(required, type=$file)
%CLD% 	Qualifier NBS, nonnegatable
%CLD% 	Qualifier JONES, nonnegatable
%CLD% 	Qualifier BINARY, nonnegatable
%CLD% 	Qualifier PEAKS, nonnegatable
%CLD% 	Qualifier GSAS, nonnegatable
%CLD% 	Qualifier PROFPV, nonnegatable
%CLD% 	Disallow any2(NBS,JONES,BINARY,PEAKS,GSAS,PROFPV)
\Command WRITE\par
  Write one of the ``files'' in memory (from the table of available
  files) onto disk.
\Parameter
\parm
file_number\par
 The number of a single file may be specified on the command line
 referencing the number of the file to be written. If the file number
 is not specified a prompt will be given requesting a file number.
\Qualifiers
\qual
/FILENAME=file_name\par
 The name to be used for the file. This overrides the name already
 associated with the file and will replace that name. If /FILENAME is
 not specified and CMPR is run interactively, a prompt will be
 generated for the name of the file.
\qual
/BINARY\<
/NBS\<
/PROFPV\<
/GSAS\<
/JONES\<
/PEAKS\par
 Determines the format of the file to be written. If CMPR is run
 in MANUAL mode (see command DEFAULT) and none of these options is
 specified, a prompt will be generated. (In AUTO mode the default is
 |/BINARY|)
\TAB {}   |/BINARY| writes a file in du Pont format
\TAB {}   |/PEAKS|  Writes an ASCII file with just the peak information.
\Examples
\exam
 |WRITE 1|\par
			This command causes file \#1 to be written. The
			file name and format will be prompted for (in
			MANUAL mode).
\exam
 |write 7/BIN/FILE=tmp:copy.bin|\par
			This command causes file \#7 to be written
			as |TMP:COPY.BIN| in binary format.
\exam
 |WR/NB|\par
			This command causes file \#1 to be written in
			``NBS'' format. The file number will be prompted
			for and in MANUAL mode, so will the file name.\par

