SPLOT is an acronym for spectrum plotter. It's function is to create output 
files which can be sent later sent to a laser printer to create a plot of
the requested spectra. The current version at NBITAL creates a post script file
which can be then sent to the printer que SYS$LASER. This program is a modified
version of SPLOT which was developed at the University of Tennessee by Mike
Carpenter and Shaun Gleason.

The program currently resides on DUA1:[MC.CODES.SPLOT]. To run the program, type
at your terminal @$1$DUA1:[MC.CODES.SPLOT]SPLOT. This runs a command file which
makes some necessary file assignments. To plot an output file created by SPLOT,
you must tell the laser printer that the file is written in post script
language. To do this, que the file to the printer with the command
PRINT/QUE=SYS$LASER/PARAMETERS=(data_type=postscript). If you plan to use the
program alot, it may be benifical to make some symbol definitions in your login
command file in order to make things easier for you. Suggested symbols are SPLOT
and LASPS. 

Once you are in the program, you will notice the SPLOT prompt, SPLOT>. Help is
available and can be excessed by typing HELP when in the program. To get help on
certain categories of commands type 

SPLOT> HELP ASN    ! Will write the following to the screen
CMD  FILE          - Define the command file
FTYP FILE-TYPE     - Define the type of spectrum file to be read
IN   FILE          - Define the SAP file
OU   FILE          - Define the BASE name for the output files
PK   FILE          - Define the file which contains peaks to be labeled on plot
TOGI (REW)         - Toggle from command to screen mode and visa-versa
END                - End and close all files

SPLOT> HELP TEXT   ! Will write the following to the screen
GATE CH1,CH2,ENER  - Define low and high channels of gate and gate energy
MVLG XLEG,YLEG     - Position of lower left hand cornor of legend
PLEG PNUM,LABEL    - Define personal legend for the PNUMth plot on page
SIZE TI,AX,LG,PK   - Define sizes of title, axis, legend, and peak mark texts
TITL LABEL         - Define title of graph
XAX  LABEL         - Define x-axis label
YAX  LABEL         - Define y-axis label
WRLG 7*Y/N         - Define which legend line are to be written
                     (1) Name of spectrum
                     (2) PLOT ID e.g. ``ID = 1''
                     (3) First 30 characters from SAP title
                     (4) First 30 characters from SAP subtitle
                     (5) User inputted string
                     (6) Gate channels
                     (7) Energy of gate

SPLOT> HELP SPEC   ! Will write the following to the screen
AUTO Y/N           - Determines if spectra are Auto scaled in overlay mode
CAL  A,B,C         - Define the energy coefficients
DX XLO,XHI         - Set the display limits on the x-axis
DY YLO,YHI         - Set the display limits on the y-axis
IC CHAN            - Set channel at which parameter set 2 is used for peak find
INAC Y/N           - Determine whether peak find is intearactive or not
PAR1 FW,SIGMA,AP   - Set the peak find parameters for searching section 1
PAR2 FW,SIGMA,AP   - Set the peak find parameters for searching section 2
PS ON/OFF          - Turn peak search on/off
XSCA CHA/CAL       - Defines whether X-axis is in channel or calibrated units
YSCA LIN/LOG       - DefineS whether Y-axis is LIN or LOG scale

SPLOT> HELP PLOT   ! Will write the following to the screen
BO XLEN,YLEN       - Set the X and Y lengths of the plot in mm.
OR LA/PO           - Specify oreintation of plot 
OV Y/N             - Define whether files should be stacked or overlayed
PLOT ID1,...ID8    - Do a plot of ID1 upto ID8 using current parameters
PTYP HIS/NHIS      - Define if plot should be histrogram or point mode       
XTIC XSTEP         - Define step for x-tic marks (Not currently available)
YTIC YSTEP         - Define step for y-tic marks (Not currently available)

The philosophy behind issuing commands is as follows. Each command can
be up to 4 characters long. The commands may be issued in upper or lower case.
In most cases, the commands must be issued exactly as required e.g. the PLOT
command will not function if you only type PLO. Each command may have one or
more parameters associated with it. Each parameter must be seperated by a comma.
This is the only delimiter SPLOT understands at the moment. It is not necessary
to include all parameters in the command. For example, the WRLG command has
7 parameters associated with. If you wish to set only the 4th parameter, you
could issue the commmand, WRLG ,,,Y. Only the fourth parameter is set and
all others would retain there current setting.

Command files can be used and are recommended. Two such command files exist on 
DUA1:[JN.ACQ]. They are : BAF_MUL.CMD  and HO157_GATES.CMD. Output plot for 
these two command procedures are included along with a short description how 
they work.

To run the example BAF_MUL.CMD do the following:
$SPLOT	                ! Enters spectrum plotting program
SPLOT> CMD BAF_MUL.CMD  ! OPENS COMMAND FILE BAF_MUL.CMD 
SPLOT> TOGI             ! Executes following commands in command file.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
IN ALL_BAFT       ! Define sap file
OU SPLOT.PS       ! Open an output file
DX 400,3200       ! Define channels to be plotted
PAR1 6,4,.03      ! Peak search commands for region 1
PAR2 8,3,.01      ! Peak search commands for region 2
IC 2600           ! Channel at which PAR2 commands are begun to be used
BO 250,150        ! Dimensions of entire box surrounding plots (in mm)
TITLE BaF\_2\ Multiplicity Gates ! Title of plot
XAX ENERGY (keV)  ! Label for x-axis
YAX COUNTS        ! Label for y-axis
CAL 0,.25         ! Energy calibration E = 0.0 + .25*channel
PS ON             ! Use peak search and mark peaks on plot
PTYP HIS          ! Plot will be in historgram mode
INAC = N          ! No chance to manipulate PAR1 or PAR2 before outputting plot.
WRLG N,Y,N,N,Y    ! Which legend lines to right 
PLEG 1,BaF\_2\ = 1    ! Personal Legend for 1st stacked spectrum
PLEG 2,BaF\_2\ = 3    ! Personal legend for 2nd stacked spectrum
PLEG 3,BaF\_2\ 5 or > ! Personal legend for 3rd stacked spectrum
PLOT 61,63,65      ! Plot Id's 61, 63, and 65 in stack mode
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
SPLOT> END                 ! ENDS PROGRAM

This command file has created a Post Script file, SPLOT.PS, with one plot in it.
To plot this file on the laser printer. Type at the terminal:
$LASPS SPLOT.PS


To run the example BAF_MUL.CMD do the following:
$SPLOT	                ! Enters spectrum plotting program
SPLOT> CMD BAF_MUL.CMD  ! OPENS COMMAND FILE BAF_MUL.CMD 
SPLOT> TOGI             ! Executes following commands in command file.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
IN ALL_BAFT       ! Define sap file
OU SPLOT.PS       ! Open an output file
DX 300,3200       ! Define channels to be plotted
PAR1 6,4,.03      ! Peak search commands for region 1
PAR2 8,3,.01      ! Peak search commands for region 2
IC 2600           ! Channel at which PAR2 commands are begun to be used
BO 250,150        ! Dimensions of entire box surrounding plots (in mm)
XAX ENERGY (keV)  ! Label for x-axis
YAX COUNTS        ! Label for y-axis
CAL 0,.25         ! Energy calibration E = 0.0 + .25*channel
PS ON             ! Use peak search and mark peaks on plot
PTYP HIS          ! Plot will be in historgram mode
INAC = N          ! No chance to manipulate PAR1 or PAR2 before outputting plot.
WRLG N,Y,N,N,N,Y,Y   ! Define legend lines to write
TITLE \^156\Ho       ! Define title of plot
GATE 1903,1912,476.8 ! Define gate info for legend
PLOT 74              ! PLOT ID 74
TITLE \^157\Ho       ! redefine Title
GATE 2144,2153,537.3
PLOT 75              ! PLOT 75 etc., etc.
GATE 2548,2556,637.8
PLOT 76
GATE 2781,2790,697.5
PLOT 77
GATE 2047,2056,513
PLOT 78
GATE 2241,2249,561
PLOT 79
GATE 2327,2337,583
PLOT 80
GATE 2517,2528,630
PLOT 81
END                 ! END THE PROGRAM
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

This command file has created a Post Script file, SPLOT.PS, with 8 plots in it.
To plot this file on the laser printer. Type at the terminal:
$LASPS SPLOT.PS

While the commands used in the following examples work well enough to produce
an output, nothing at the moment is guarrenteed to work. If something doesn't
do what you thought would or if the Program bombs while in use. Please tell
me so I can try to correct it.

                                                M. P. Carpenter
