Document number : EDOC115 Title : Some NSF system functions Received : 22 Jan 1991 Format : text Comments : D Brightly here are descriptions of some of the basic functions in the current system at the NSF that I promised to send. most of them are functions 'built-in' to our command language interpreter or are 'transient programs'. I have put a star against those that are built-in. the last file but two is an example of the use of the command language to combine programs like LAYOUT and RELKIN to provide an interactive application. the final file but one is the declarations of the formats of the 'frame database' records. the last one is just a summary of all the programs and builtins in the system. --------------------------------------------------------SYS.HELPCAT2.BACKPEAK BACKPEAK Format BACKPEAK SPECTRUM string * OPT string * LIMIT string * GUESS string * DISPLAY string * OUT stream LIST stream GRAPH stream Purpose To perform peak area and centroid extraction with background subtraction. The program has options for selecting backgrounds of various types, and for displaying the computed background against the current displayed spectrum. Detailed numerical results from the calculation are reported on the LIST stream and on the OUT stream. Arguments SPECTRUM Argtype: string Default: none The identifiers of the object spectrum OPT Argtype: string * Default: none Eight options are required, these are background type, weighting, polynomial order, peakfitting, number of peaks, centroid guess, shapeparameters and paramater print. BACKGROUND TYPE may be NONE, FLATLINE, SLOPELINE, FLATSMOOTH, SLOPESMOOTH, POLYNOMIAL or EXPONENTIAL. WEIGHTING may be NONE, COUNT, EQUAL or EQUALCOUNT. POLYNOMIAL ORDER is only valid for fits of type POLYNOMIAL and may have values 0,1,2 or 3. PEAKFITTING can have values NONE, GAUSS or SKEWGAUSS. The NUMBER OF PEAKS which may be fitted is between 1 and 4. The CENTROID GUESS may be COMPUTE in which case the program will compute initial guess(es) or LIGHTPEN in which case the user must supply initial quesses via the GUESS argument. The SHAPE PARAMETERS may be DIFFERENT, SAME, KEEP or TYPE. The PARAMETER PRINT option is only used in debugging the program, it takes values NONE, YES, FULL or TROUBLE. LIMIT Argtype: string * Default: none The channel numbers demarcating the peak and background regions. The first number supplied must be the total number of limits (normally=6). GUESS Argtype: string Default: none Four Centroid quesses, See above. DISPLAY Argtype: string Default: YES specifies (YES/NO) whether the computed background is to be drawn on the currently displayed spectrum. OUT Argtype: stream Default: * The terminal output stream. A summary of the calculation is output on this stream. LIST Argtype: stream Default: SINK/NEW The bulk listing stream. A summary of the calculation is output on this stream. GRAPH Argtype: stream Default: * The graphics output stream Examples BACKPEAK SPECTRUM H2S1 OPT EXPONENTIAL COUNT 1 NONE 1 LIGHTPEN SAME NONE GUESS 0 0 0 0 LIMIT 6 1894 1921 1842 1883 1935 1964 DISPLAY YES --------------------------------------------------------SYS.HELPCAT2.BUTTON BUTTON* Format 1 BUTTON key commandstring [labelstring] 2 BUTTON key 3 BUTTON Purpose To associate a command or command and argument combination with a function keyboard button (GRAF mode sessions only). Description All the function keys have default significance to the graphics terminal driver as described elsewhere. In NORMAL mode the command program ignores the function keys. In GRAF mode sessions the system macros assign various SHIFT and SCALE commands to keys 9 to 16 for looking at spectra (you override these if you must), and only the first four of the default meanings are enabled, namely 1 simulate keyboard escape character (repaint GRAFTERM window on workstation) 2 toggle graphics on/off (sreendump GRAFTERM window on workstation) 3 toggle text on/off 4 toggle between 5 and 40 lines of text You can assign any commands you wish to keys 17 to 32. In addition, if you are using GRAFTERM on a workstation you can attach a label to a key in the iconic function keyboard. Any label argument is ignored if you are using an S1112 terminal. Labels may be upto 8 characters wide. Examples BUTTON 17 'SPECTRUM NEW' 'NEW' assigns the command-and-argument combination 'SPECTRUM NEW' with function key 17 and labels the key 'NEW' BUTTON 17 dissociates function key 17 with any command and allows it to revert to its default function (if any) last changed: FRI 24 NOV 1989 by DB --------------------------------------------------------SYS.HELPCAT2.DATABASE DATABASE* Format DATABASE CREATE recordtype length DATABASE DELETE DATABASE LOCATE recordid DATABASE READ type offset [length] variablename DATABASE WRITE type offset [length] value DATABASE KEY type offset [length] value DATABASE SEARCH mode recordtype DATABASE NEXT Purpose To access the frame database corresponding to the current graphics frame and in particular to locate records and to transfer data values to and from fields within them. The DATABASE command works with the concept of a 'curent record' and has options for moving from one record to another. DATABASE CREATE recordtype length create new database record of the given record type and length and make it the current record. DATABASE DELETE delete current database record (which thus becomes undefined). DATABASE LOCATE recordid locate a database record given its record identifier and make it the current record. DATABASE READ type offset [length] variablename read the field of the given type at the given offset (and length if a character field) in the current database record and store its value in the given JCL variable. DATABASE WRITE type offset [length] value write the given value of the given type (and length if a character string) at the given offset of the current database record. DATABASE KEY type offset [length] value establish a key of the given type, value, and offset (and length if a character string) for a subsequent mode=3 search of the database. DATABASE SEARCH mode [recordtype] start a database search in one of three modes, returning the first record (ie, making it the current record) that matches. if mode=1 all database records are found; if mode=2 all database records of the given type are found; if mode=3 all database of the given type which match the previously established key are found. DATABASE NEXT locate the next record that matches in a database search. The field types supported are VALUE (16 bit integer, 2 bytes), FULL (32 bit integer, 4 bytes), REAL (32 bit floating point, 4 bytes), and STRING (variable length character data) The DATABASE commands can fail with ERRTYPE=33 and ERRVAL as follows: 1 record not found 2 database full 3 all records in use 4 invalid field length/offset (eg, outside record) 5 invalid parameter (eg, character data when integer expected) 6 database inconsistent ERRVAL=1 is returned, for example, when DATABASE NEXT finds no further record matching the search criterion. Examples DATABASE KEY VALUE 12 256 set a 2 byte integer search key of value 256 at byte offset 12. DATABASE SEARCH 3 13 start a keyed search of the database looking at records of type 13, locating the first such record matching the specified key. DATABASE READ STRING 14 8 XYZ extract an 8 byte character string starting at offset 14 of the current record and store it in JCL variable XYZ. DATABASE WRITE VALUE 12 257 write the 2 byte integer value 257 at offset 12 of the current record. DATABASE NEXT locate the next database record satisfying the search criterion. --------------------------------------------------------SYS.HELPCAT2.DBDUMP DBDUMP Format DBDUMP LIST stream OPT string Purpose Produces a formatted dump of the current graphics frame database to the LIST stream. Uses the default proforma. Arguments LIST Argtype: stream 6 Default: LP/NEW Stream on which the dump is output. OPT Argtype: string Default: null If a small positive integer denoting a database record type code then only records of this type are dumped, otherwise all records are dumped. Examples DBDUMP LP lists the frame database on the line printer. DBDUMP LIST * OPT 1 lists database records of type 1 on the terminal. Last changed: TUE 02 MAY 1989 20:31:53 --------------------------------------------------------SYS.HELPCAT2.DCPCALL DCPCALL Format DCPCALL (PROFORMA=proforma) ARGUMENTLIST Purpose The program implements several data collection commands Arguments PROFORMA Argtype: proforma Default: none selects the proforma by which the arguments are analysed and and the action to be performed. ARGUMENTLIST Default: none the arguments for the particular subcommand required Notes The program implements a number of data collection commands viz: BACKSPACE BIPARAM BIWINDOW CLEAR CLEARSTATISTICS DEMOUNT EBYEFROM EBYETO GATING GO HALT INQUIRETAPES ONLINETITLE POSITION PREMOUNT PRESET REWIND SCALERS SHOWSTATISTICS SINGLES TRIGGER XCOMMENT Each of these has its own proforma and these are described elsewhere in the document. The program discovers which command to execute by inspecting the PROFORMA argument. The code appropriate to that command is then invoked. --------------------------------------------------------SYS.HELPCAT2.EMINFO EMINFO Format EMINFO OPT string GRAPH stream PAGE value CORNER value * OUT stream Purpose to report on the current trigger and ADC channel setup programmed into the Event Manager Arguments OPT Argtype: string Default: ALL selects section of report for display - may be TRIGGERS or CHANNELS or ALL to get both sections GRAPH Argtype: stream default:*/LSB/NEW graphics output stream PAGE Argtype: value Default: 1 which page of a multipage report to be shown CORNER Argtype: value * Default: 0 XY coords of bottom left hand corner and top right corner of rectangular area on screen in which the page of the report is shown OUT Argtype: stream Default: */NEW message stream Examples EMINFO CORNER 100 550 3300 4000 PAGE 2 presents the second page of the current EM setup report in a large box in the centre of the screen Notes The program draws in graphics text paragraph 64 in the current graphics frame. If paragraph 64 already exists it is emptied and reused otherwise 2000 bytes of display file are allocated. Graphics output is constrained to occupy the rectangular box specified by the CORNER arguments. A character size is chosen so that a minimal number of lines of report are visible in the box. The report is then logically formatted as a number of pages with each page filling the box exactly. Only the requested page is actually drawn. The pages of a multipage report can be inspected by invoking the program repetitively with the PAGE argument incrementing by one and all other arguments fixed. The information presented consists of: i) TRIGGERS - for each trigger in use the program presents the list of associated ADC channels and the list of other triggers vetoed by this trigger. ii) CHANNELS - for each ADC channel in use (ie included in a multiparameter trigger or selected for SINGLES histogramming) the program presents the settings of the ADC data mask, auxilliary data mask, and program data registers, and indicates with a flag character whether the channel appears in a multiparameter trigger (M), is being singles histogrammed (S) and whether the singles hiogramming (if selected) is to be 'gated' by multiparameter events (G). The program works by interrogating the EbyE controller process MPP in the attached data collection module. Strictly speaking the information reported on does not represent the CURRENT register settings in the EM (ie these registers are not actually read), but rather what MPP's model of the EM indicates. This model reflects the true situation provided no setup modifications have been requested since the last GO command was issued. --------------------------------------------------------SYS.HELPCAT2.ENTER ENTER* Format ENTER [[mode] name]^ Purpose To enable a JCL macro to obtain parameters entered by keyboard or by light pen and to assign them to JCL variables. Description Each ENTER command reads one line of keyboard input, one light pen pick, or one function key interrupt. Several parameters may be obtained in each case and these are assigned in sequence to the JCL variables specified by the 'name' arguments. 'mode' is an optional keyword which specifies how the data read is to be analysed. 'mode' may be one of the following: FILE, STRING, VALUE, NONE, FULL, REAL, SPECIDHI, SPECIDLO, CHANNEL STRING is the default and extracts a string valued argument as defined by OS4000 JCL ie a sequence of alphanumeric characters delimited by a blank or end-of-line or an arbitrary sequence of characters enclosed in matching quotes. VALUE extracts a 16 bit precision integer NONE takes the remainder of the input line and assigns it to a string JCL variable FULL and REAL extract 32 bit integers and single precision real numbers respectively. Since the command program does not support 32 bit integer or real JCL variables the values extracted are stored as string JCL variables in decimal notation. SPECIDHI, SPECIDLO and CHANNEL extract the spectrum header number, generation number and channel respectively from the data returned by a light pen pick on a displayed spectrum. These modes are also satisfied by 16 bit integer fields entered via the keyboard. Examples SAY enter an integer value ENTER VALUE FRED SAY value entered is [FRED] This fragment prompts and reads an integer parameter and subsequently displays the entered value. ENTER NONE REST The users response is assigned, with leading blanks removed, to the string variable REST. SAY pick a channel ENTER CHANNEL CHAN SAY channel picked was [CHAN] This fragment prompts, reads and displays a channel number. The user may supply the channel by picking a displayed spectrum or by typing an integer value. --------------------------------------------------------SYS.HELPCAT2.FRAME FRAME* Format 1) FRAME NEW keys elements databasesize records 2) FRAME framenumber 3) FRAME DELETE framenumber Purpose Allows the creation, selection and deletion of graphics frames from JCL macros. The command program must be in graphics mode. The JCL value variables FRAME and FRAMESEG which contain the current frame number and the identifier of its database segment are updated. Examples FRAME 3 makes graphics frame number 3 the currently displayed frame FRAME DELETE 2 destroys graphics frame number 2, which must not be the currently displayed frame. FRAME NEW 10 20 1000 40 creates and makes current a new graphics frame containing at most 10 graphics keys and 20 graphics elements, and allocates a frame database segment of 1000 bytes containing at most 40 database records. --------------------------------------------------------SYS.HELPCAT2.INT INT Format INT SPECTRUM string LIMIT string * OUT stream Purpose A simple-minded peak analysis program to integrate a peak area and compute its centroid and width above a background linearly interpolated between two limits. This program supercedes the original INT which dates back to 1980. The older version is called INT80. Arguments SPECTRUM Argtype: string Default: none Spectrum to be analysed. LIMIT Argtype: string * Default: none Two integration limits given as channel numbers. OUT Argtype: stream 2 Default: * The terminal output stream. Examples INT SPECTRUM .RUN6.AD3 LIMIT 100 111 Format for results Output typically consists of four lines looking like this: Integration of .FXSPEC title AD3 Limits = 1287 and 1297, Total Area = 44612.00, Background Area = 583.00 Centroid = 1292.10+/-0.0069, Energy = 663.05+/-0.0035 KEV Peak Width = 3.17+/-0.0135, Peak Area = 44029.00+/- 212.59 Notes The program computes its results using formulae taken from Bock, volume 3, Table 1.10, page 208. ___i=N peak area I = \ (Si-Bi) /__i=M ___i=N peak area error dI = sqrt \ (Si+Bi) /__i=M ___i=N centroid channel C = 1/I * \ (Si-Bi) * i /__i=M ___i=N centroid channel error dC = 1/I * sqrt \ (Si+Bi) * (i-C)**2 /__i=M $ ___i=N  peak width W = 2.35 * sqrt $ 1/I * \ (Si-Bi) * (i-C)**2  $ /__i=M  peak width error $ ___i=N  dW = 1/(2*W*I) * sqrt$ \ [(i-C)**2 *2.35**2-W**2]**2 *[Si+Bi]  $ /__i=M  where Si = count in channel i Bi = background in channel i M = lower limit of peak N = upper limit of peak N*(i-M) + M*(N-i) and the background is Bi = ----------------- N-M Reference Bock, R (ed), "Heavy Ion Collisions", North Holland, 1982, ISBN 0-444-85353-7 (set) See Also BACKPEAK, INT80 Last Changed: MON 06 MAR 1989 19:38:58 --------------------------------------------------------SYS.HELPCAT2.INDEX INDEX Format INDEX OPT string CORNER value * HEIGHT value WIDTH value CHARACTERSIZE value COLUMNS value PAGE value PAGELIMIT value PARAGRAPH value * SIZE value * PAGEVARIABLE string NOPAGE bool NAMES bool TITLES bool FULL bool GRAPH stream OUT stream Purpose To display an index of online spectra in various formats Arguments OPT string (default: ALL) selects class of spectra to be presented:- may be SINGLES, RESIDENT, DISC or ALL to get all classes CORNER value (Default: 0) XY coords of bottom left hand corner and top right corner of rectangular area on screen in which the page of index is shown HEIGHT value (Default: 7) minimum number of lines to be visible in box WIDTH value (Default: 80) minimum width of box in characters CHARACTERSIZE value (Default: 0) if non zero then forces the size of characters used COLUMNS value (Default: 4) number of colums across width of display box in which information is displayed. PAGE value (Default: 1) which page of a multipage index to be shown PAGELIMIT value (Default: 0) maximum page of a multipage index to be shown PAGEVARIABLE string (Default: null) JCL variable in which number of page actually displayed is returned PARAGRAPH value (Default: 64) text paragraph numbers for box, headings/footings and body of index SIZE value (Default: 4096) sizes of paragraphs in bytes NAMES bool (Default: set) if set then just the names of the spectra are displayed TITLES bool (Default: unset) if set then the names and titles of the spectra are displayed Overrides NAMES. FULL bool (Default: unset) if set displays spectrum attributes in addition to names and titles. Overrides TITLES and NAMES. GRAPH stream (Default: */LSB/NEW) graphics output stream OUT stream (Default: */NEW) reporting stream Examples INDEX ALL NAMES COLUMNS 8 CORNER 100 3000 3300 4000 displays just the proper names of all online spectra laid out in 8 columns in a wide box at the top of the screen INDEX SINGLES FULL CORNER 100 550 3300 4000 PAGE 2 displays all details of singles spectra in a large box occupying most of the screen. The index will occupy more than one page and the second one is requested Notes The program follows the conventions of the LAYOUT program in drawing a rectangular box with bands at top and bottom for annotations using specified graphic text paragraphs. In this case the footings displayed are a set of lightpen sensitive commands for manipulating the display. These commands are implemented elsewhere as macros. Graphics output is constrained to occupy the rectangular box specified by the CORNER arguments. A character size and number of columns are chosen (possibly overriding the requested value) so that a minimal number of lines of index are visible in the box. Option FULL forces the number of columns to one. The index is then logically formatted as a number of pages with each page filling the box exactly. Only the requested page is actually drawn. The pages of a multipage index can be inspected by invoking the program repetitively with the PAGE argument incrementing by one and all other arguments fixed. The proper names of the spectra are drawn lightpen sensitive. --------------------------------------------------------SYS.HELPCAT2.LAYOUT LAYOUT Format LAYOUT FROM stream PAGE value PAGELIMIT value OPT string HEADINGS string FOOTINGS string PREFIX string CORNER value HEIGHT value WIDTH value CHARACTERSIZE value PARAGRAPH value SIZE value PAGEVARIABLE value NOPAGE bool GRAPH stream OUT stream Purpose to display text on the graphics screen Arguments FROM Argtype: stream Default: %C the file of text to be displayed PAGE Argtype: value default: 1 number of page within file to be displayed PAGELIMIT Argtype: value default: 0 if non zero then the maximum page number to which the file is read OPT Argtype: string Default: TEXT specifies how the data in the FROM file is to be formatted. May be one of TEXT, EXAMINE, MENU, FORMATTED, PAGED HEADINGS Argtype: string * Default: null heading text strings - see notes FOOTINGS Argtype: string * Default: null footing text strings - see notes PREFIX Argtype: string Default: null not implemented CORNER Argtype: value * Default: 0 XY coords of bottom left hand corner and top right corner of rectangular area on screen in which the text is shown HEIGHT Argtype: value Default: 40 minumum number of lines of text per page WIDTH Argtype: value Default: 60 minumum width of displayed page in characters CHARACTERSIZE Argtype: value Default: 0 character size code for S1112 display - if non zero overrides HEIGHT and WIDTH COLUMNS Argtype: value Default: 60 not implemented PARAGRAPH Argtype: value * Default: 64 set of upto 3 paragraph numbers to be used for main text, box outline, and heading/footing annotations respectivley. SIZE Argtype: value * Default: 4096 sizes in bytes of areas reserved in display file for each paragraph PAGEVARIABLE Argtype: string Default: null name of JCL variable in which number of page actually displayed is returned NOPAGE Argtype: bool Default: none if true suppresses display of page number in heading GRAPH Argtype: stream Default: */LSB/NEW graphics output stream OUT Argtype: stream Default: */NEW reporting stream Examples LAYOUT .mydata PAGE 3 PARAGRAPH 5 displays the third page of the text file .mydata using graphic text paragraph 5 Notes The program is intended as a utility for presenting text data on the S1112 graphics screen for various purposes for which options are provided. The general format consists of a box outline containing the main body of text from the FROM stream with reserved areas demarcated at top and bottom for heading and footing annotations. In all cases the program assumes that a graphics frame is current. The region of the screen used is determined by the CORNER arguments and the program selects a character size (unless overridden by the CHARACTERSIZE argument) so that at least HEIGHT lines of WIDTH characters will be visible. The CORNER values are rounded down so that a box drawn around the text exactly encloses the displayed characters. Sufficient space at the top and bottom of the box is reserved for the HEADINGS and FOOTINGS strings if these are present and each of these is displayed one per line. These strings may contain embedded layout control sequences in accordance with the protocol of the TEXT command and may be used to make the annotations lp sensitive, for example. The PARAGRAPH and SIZE arguments set the paragraph numbers and display file sizes of the graphics elements reserved for the main body, box outline, and headings/footings respectively. If these are not all supplied then the later values default to the last one defined. If a value of zero is supplied for a PARAGRAPH number then the program does not attempt to draw the corresponding construct. This can be used to prevent the program from redrawing the annotations and the box outline for example. The layout of the main body of text depends on the OPT argument as follows: For option TEXT each record of the FROM file is given a separate line. The file is logically formatted as a number of pages with each page filling the main area exactly. Only the requested page is actually drawn. The pages of a multipage file can be inspected by invoking the program repetitively with the PAGE argument incrementing by one and all other arguments fixed. Unless suppressed by the NOPAGE argument or limited by the PAGELIMIT argument the program reads the entire file and places an indication of the page displayed and the total number of pages in the file at bottom right of the headings area. If a PAGELIMIT argument is supplied then the program stops reading the file after the specified number of pages and indicates the presence of more pages to follow in the page number annotation. In option EXAMINE the program assumes that the FROM file contains the LIST stream output of the EXAMINE program when used to inspect a catalogue with the default options. The EXAMINE banners are ignored and the file names tabulated as lp sensitive strings in the main area. The paging mode of operation as described for the TEXT option is active. In option MENU the records of the FROM file are laid out end to end in rows in the main area. Each record is made lp sensitive though they may contain their own format control sequences. Paging mode is used. In option FORMATTED it is assumed that the records of the file contain embedded formatting control sequences and so paging mode is suppressed. Each record is treated as if it were a single string argument of the TEXT command. The starting coordinates of the main text default to the top left corner of the main text area, the charactersize defaults to that determined by the HEIGHT, WIDTH or CHARACTERSIZE arguments, and the formatting option to the default used by the TEXT command. Finally, in option PAGED the source is expected to be a document generated by the LP option of the text formatter ROFF. This is characterised by the use of DM control orders for overprinting and top-of-form. The PAGED option is sensitive to the use of overprinting to achieve underlining (the S1112 cannot generate true underline characters, so displaced minus signs are substituted) and also it counts top-of-form control orders to determine page numbers. The HEIGHT and WIDTH arguments are used to establish a charactersize in the absence of a non-zero CHARACTERSIZE argument. It is up to the user to ensure that the CORNER arguments specify enough screen area to accomodate the pages of the source ROFFed document. No clipping is performed. --------------------------------------------------------SYS.HELPCAT2.LIVE LIVE Format LIVE REFRESH bool GRAPH stream OUT stream Purpose Brings up to date displays of any online spectra in the current frame. If the JCL variable AUTOSCALE is TRUE then any 1D spectrum displays are auto Y-scaled to fit their display boxes. Arguments REFRESH Argtype: bool Default: none if set then the program will perform one spectrum refresh cycle. GRAPH Argtype: stream Default: */LSB/NEW graphics output stream - only useful if * . OUT Argtype: stream Default: */NEW report stream. Examples LIVE REFRESH brings the display up to date last modified: FRI 20 JAN 1989 18:09:18 --------------------------------------------------------SYS.HELPCAT2.LISTOPT LISTOPT Format LISTOPT OPTCODE string LISTID string IN stream OUT stream GRAPH stream PLOT stream Purpose To allow a user to interactively change the values of JCL variables controlling his current graphics session options. There are three sets of JCL variables currently in use and these are denoted by different values of the argument LISTID. The program displays a table containing the names of various options and their current values together with a list of permitted values in the case of certain string valued options. These can be edited by 1) picking the variable name and typing in the new value or 2) picking a new option from the displayed list. The program is terminated by picking 'EXIT' or some other termination option displayed in the table. Arguments OPTCODE Argtype: string Default: 1 The operation required: 1 make the table and prompt the user to interact with it 2 is used if the options table is already displayed LISTID Argtype: string Default: 0 The option table required: 0) variables controlling the display of spectra and background fitting, 1) variables which set the mask used to make a search for a specified header in the user's spectrum database, 2) variables defining the header sub-fields used in the creation of new headers. IN Argtype: stream 1 Default: * The terminal input stream OUT Argtype: stream 2 Default: * The terminal output stream GRAPH Argtype: stream 7 Default: * The graphics output stream. PLOT Argtype: stream 8 Default: * The graphics input stream. Notes The program assumes that a graphics frame is current and generates a frame database record of type LIST for each line of the table it presents. On termination the program sets the JCL string variable COMMAND to the value 'EXIT', 'QUIT', or 'RESET' depending on the termination option picked by the user. --------------------------------------------------------SYS.HELPCAT2.MOVETAG MOVETAG* Format MOVETAG [CHANNEL] value1 [[TYPE] value2] [ALL^CURRENT^BOX value3] TO [value4] Purpose Moves a tag of a given type on a given channel of one or more displayed spectra to a different channel. The command operates on either ALL displayed spectra, the CURRENT spectrum box, or the spectra in a specified BOX. The default is the current box. Example MOVETAG 1000 TO 1001 moves the cursor tag from channel 1000 of the current spectrum to channel 1001. --------------------------------------------------------SYS.HELPCAT2.PIWINDOW PIWINDOW Format PIWINDOW (PROFORMA SHOWMWINDOWS) GRAPH stream OUT stream PIWINDOW (PROFORMA STOREWINDOWS) GRAPH stream OUT stream Purpose to display and set windows on a PI M-spectrum Arguments PROFORMA Argtype: proforma Default: none selects action to be performed GRAPH Argtype: stream Default: */LSB/NEW graphics output stream OUT Argtype: stream Default: */NEW reporting stream Examples PIWINDOW (P=SHOWMWINDOWS) displays current set of M-windows on the currently displayed PI M-spectrum Notes The program action depends on the value of its PROFORMA argument as follows: SHOWMWINDOWS - provided the current graphics frame contains a PI M-spectrum and this is the currently selected spectrum then the program inquires the set of M-windows on it and diplays them as annotated tags with MARKTYPE=10. The MARKINDEX field is used to order the tags. The JCL variable CURRENTBIF is set to the name of the bi-parameter interface module supporting the spectrum eg PI3. STOREMWINDOWS - again, provided that the current spectrum in the display frame is a PI M-spectrum, the program scans the frame database for tags of MARKTYPE=10 attached to the spectrum. The M-windows for the spectrum are then reset at the tagged channels. Any new E-spectra implied by setting the windows on the M-spectrum are created with the default attributes associated with the M-spectrum. --------------------------------------------------------SYS.HELPCAT2.POLYEDIT POLYEDIT Format POLYEDIT WINDOW value GATE value COORDS value * OPT string BOX value VERTEX value * FUZZY value GRAPH stream OUT stream Purpose to perform a variety of editing functions on polygons representing the gates of 2D windows overlaid on displays of 2D spectra Arguments WINDOW Argtype: value Default: 0 window number identifying polygon to be edited GATE Argtype: value Default: 0 gate number identifying polygon within window COORDS Argtype: value * Default: -1 X and Y coords of channel at which new vertex is to be placed OPT Argtype: string Default: null option controlling editing action as follows: DELETE removes a vertex, a gate, a window, all windows in a box, or all windows ADD appends a further vertex to a specific gate polygon CLOSE joins the final vertex of a specific polygon to the first REPLACE removes a vertex specified by the VERTEX argument from a given polygon and replaces it with one at COORDS INSERT introduces a new vertex at COORDS in the edge which passes nearest the point VERTEX. HIGHLIGHT highlights a specific edge or a whole polygon by drawing the edge(s) in broken lines LOWLIGHT removes highlighting from a single gate, window or box REDRAW redraws all polygons in a single or all displayed BOXes PICK returns the coordinates of the vertex nearest to the point defined by the VERTEX argument. VERTEX Argtype: value * Default: -1 X and Y coords of a channel which is close enough to an existing vertex or edge to uniquely identify it for the INSERT, REPLACE, and HIGHLIGHT options. BOX Argtype: value Default: 0 number of display box in which to confine editing FUZZY Argtype: value Default: 4 the accuracy with which the VERTEX arguments must be specified in order to uniquely locate an edge or vertex of a polygon, measured in spectrum channels GRAPH Argtype: stream default:*/LSB/NEW graphics output stream OUT Argtype: stream Default: */NEW reporting stream Examples POLYEDIT WINDOW 3 GATE 5 OPT DELETE deletes the polygon corresponding to gate 5 of window 2 POLYEDIT WINDOW 4 GATE 0 OPT DELETE deletes all the polygons corresponding to window 4 POLYEDIT WINDOW 2 GATE 1 COORDS 10 20 OPT ADD appends a new vertex at (10,20) to the polygon corresponding to gate 1 of window 2 Notes The program assumes that the current graphics frame contains a 2D spectrum. It edits both the graphics and the POLY type frame database records. A 'closed' polygon is one in which the final vertex is joined by an edge to the first vertex, otherwise the polygon is said to be 'open'. An extra vertex may be ADDed to an open polygon or INSERTed into an edge of a closed polygon. Vertices and edges need not be exactly specified. The command will accept VERTEX arguments that are within FUZZY channels of a unique edge or vertex. Smaller values for FUZZY require greater accuracy (zero means VERTEX has to be exact) and larger values permit less are more forgiving. Too large a value may leave the program undecided as to which edge or vertex you mean. All modifications are checked to ensure that the polygons never self-intersect. Highlighting is achieved by drawing the polygons with dotted edges; a vertex is highlighted by moving the lightpen cursor over it. The DELETE, REDRAW, and HIGHLIGHT options operate on all vertices, gates, windows and boxes if the corresponding VERTEX, GATE, WINDOW and BOX arguments take the default values. If the program is unable to complete the requested option then the JCL variables CONDCODE and ERRMESSAGE are set to the following values: 1 no current graphics frame 2 bad WINDOW, GATE, BOX, or other argument 3 unknown option 4 no 2D spectrum in display 5 frame database full 6 all graphics keys/elements in use 7 WINDOW, GATE or BOX not specified 8 too many vertices in polygon 9 polygon would self-intersect 10 unable to identify EDGE or VERTEX uniquely 11 polygon's graphic element full --------------------------------------------------------SYS.HELPCAT2.PROMPT PROMPT* Format PROMPT rest of command Purpose outputs the remainder of the command line with leading blanks removed to the 'promptline'. This is a line of text normally at the foot of the graphics screen where the command program outputs prompts for you to enter commands or data. When the command program is waiting for a command the promptline contains the characters 'READY', and this is removed as soon as a command is received. Thus the promptline is a good indication of the state of the command program and should always be checked if you are not sure what is happenning! Every ENTER command in a JCL macro should be preceeded by a suitable PROMPT command to remind the user of the required parameter(s), and this rule is followed by the SAP macros. When a graphics frame is current a PROMPT command is treated as a TEXT (qv) command with a single string argument ('rest-of-command') and a default paragraph selection and coordinate positioning sequence that results in the promptline appearing at the foot of the screen. 'rest-of-command' may thus contain TEXT control sequences to vary the position and other attributes of the promptline. The promptline is automatically replaced by 'READY' when the command completes. PROMPT with a null argument removes the promptline. When no graphics frame is current (eg when in NORMAL mode) PROMPT is treated as SAY and the command program READYs appear in the scroll area as in a normal vdu session. Examples PROMPT pick a channel on the spectrum or type a channel number results in the characters 'pick a channel.....number' appearing at the foot of the graphics screen. PROMPT $X0$Y2000$C4$F another prompt results in the characters ' another prompt' appearing at coordinates (0,2000) in character size 4 and flashing. PROMPT empties the promptline. --------------------------------------------------------SYS.HELPCAT2.RETAIN RETAIN* Format RETAIN [ALL^CURRENT^BOX boxno] Purpose Stores the current display coordinates of the specified spectra in the frame database. You can subsequently return to this display state by using the REVERT command. The command operates on either ALL displayed spectra, the CURRENT spectrum box, or the spectra in a specified BOX. The default is the current box. --------------------------------------------------------SYS.HELPCAT2.REVERT REVERT* Format REVERT [ALL^CURRENT^BOX boxno] Purpose Restores the display of the specified spectra to the coordinates current at the time of the last RETAIN command acting on the spectra. If no such command was issued then the action is as for RESET. The command operates on either ALL displayed spectra, the CURRENT spectrum box, or the spectra in a specified BOX. The default is the current box. --------------------------------------------------------SYS.HELPCAT2.RELKIN RELKIN Format RELKIN REACTION string BEAMENERGY string EXCITATION string ANGLE string STATES string SPECTRUM string OPT string LIST stream TO stream OUT stream Purpose Online relativistic kinematics assistance. The calculations have been cribbed from a RELKIN code supplied by Brian Fulton Arguments REACTION Argtype: string Default: null formula for the reaction in the form TARGET(INCIDENT,SCATTERED)RESIDUAL BEAMENERGY Argtype: string Default: null the energy of the incident nuclei in MEV in real or integer format EXCITATION Argtype: string Default: 0.0 the energy of excitation of the target nucleus in MEV in real or integer format (required for COMPUTE and SHOWCHANNEL options) ANGLE Argtype: string Default: 0.0 the lab angle of the scattered nucleus in degrees in real or integer format STATES Argtype: string Default: RESIDUAL qualifies the SHOWSTATES option by selecting states of either the RESIDUAL or the SCATTERED nucleus SPECTRUM Argtype: string Default: null the name of an energy spectrum for the scattered nucleus LINEARly calibrated in MEV (required for the SHOWCHANNEL and SHOWSTATES options) OPT Argtype: string Default: null selects the action of the program. COMPUTE simply calculates the kinematics of the reaction specified by the REACTION, BEAMENERGY, EXCITATION, ANGLE, and STATES arguments and outputs the results on the LIST stream. SHOWCHANNEL calulates the kinematics as for COMPUTE then takes the calculated energy of the scattered nucleus and the calibration associated with the spectrum given by the SPECTRUM argument and derives the channel number corresponding to this energy. The channel number is output in the form of an executable TAG command (qv) on the TO stream. SHOWSTATES acceses a nuclear data file giving the excitation levels of either the residual or scattered nucleus depending on the STATES argument. A SHOWCHANNEL calculation is then performed for each of these excitation energies resulting in a file of executable TAG commands output on the TO stream LIST Argtype: stream 6 Default: */NEW results of the kinematics calculations TO Argtype: stream 4 Default: */NEW output file of TAG command(s) resulting from the SHOWCHANNEL and SHOWSTATES options OUT Argtype: stream 2 Default: */NEW error reports Examples RELKIN REACTION 28SI(12C,16O) BEAMENERGY 30.3 ANGLE 11.5 OPT COMPUTE computes the kinematics for the reaction of Carbon12 on Silicon28 at 30.3 MEV. Oxygen16 nuclei are detected at a lab angle of 11.5 degrees. RELKIN REACTION 28SI(12C,16O) BEAMENERGY 30.3 ANGLE 11.5 OPT SHOWSTATES SPECTRUM AD3 TO &TAGS produces a file of TAG commands showing where on the spectrum AD3 (measuring the energies of the 16O nuclei scattered at 11.5 degrees) peaks due to the excited states of the 24MG residual nucleus can be expected Notes The program is intended to assist in the analysis of energy spectra from particle scattering experiments. The user is expected to make a guess as to what reaction is occuring (eg when target contaminants are suspected), then, using data on nuclear excitation levels, the program is able to show where peaks due to the reaction can be expected to lie on a given spectrum. The program can also be used in calibrating such spectra. If a rough calibration based on a prominent ground state peak is first made then the SHOWSTATES option may be able to locate enough peaks for a more refined calibration. The nuclear data is held in files in the catalogue LOCAL.USERPROG.DATA.NUCLEI. The file for say Magnesium24 is LOCAL.USERPROG.DATA.NUCLEI.N24MG. Each file has one record per level consisting of the excitation energy in MEV in F6.3 format, a 1X space, and then upto 16 characters of annotation. The TAG commands produced by the SHOWSTATES option carry the corresponding level annotation in the LABEL argument. This helps to identify the tags when displayed on a spectrum. The file for 24MG looks like this: 0.000 0+ 1.369 2+ 4.123 4+ 4.238 2+ 5.236 3+ 6.010 4+ 6.432 0+ Users are encouraged to create new levels files for themselves as and when the nuclei arise in the course of experiments. --------------------------------------------------------SYS.HELPCAT2.SCALE SCALE* Format SCALE [[X] value1] [[Y] value2] [ALL^CURRENT^BOX boxno] Purpose To zoom in and out on displayed spectra by scaling the currently displayed coordinate ranges in X and Y by constant factors. The origin of the scaling is the bottom left hand corner of the spectrum box. The command operates on either ALL displayed spectra, the CURRENT spectrum box, or the spectra in a specified BOX. The default is the current box. Examples SCALE X 5 zooms in on the current spectrum box by dividing the range of channels displayed by 5. SCALE Y -2 BOX 3 zooms out from box 3 by multiplying the range of counts visible by 2. SCALE 2 2 ALL zooms in on all spectra by a factor of 2 in both X and Y. --------------------------------------------------------SYS.HELPCAT2.SDBINDEX SDBINDEX Format SDBINDEX OPT string CORNER value * HEIGHT value WIDTH value CHARACTERSIZE value COLUMNS value PAGE value PAGELIMIT value PARAGRAPH value * SIZE value * PAGEVARIABLE string NOPAGE bool NAMES bool TITLES bool FULL bool GRAPH stream OUT stream Purpose to display a catalogue of SDB format spectrum files (or other files) Arguments OPT Argtype: string Default: ALL selects the catalogue of spectrum files to be presented CORNER Argtype: value * Default: 0 XY coords of bottom left hand corner and top right corner of rectangular area on screen in which the page of index is shown HEIGHT Argtype: value Default: 7 minimum number of lines to be visible in box WIDTH Argtype: value Default: 80 minimum width of box in characters CHARACTERSIZE Argtype: value Default: 0 if non zero then forces the size of characters used COLUMNS Argtype: value Default: 4 number of colums across width of display box in which information is displayed. PAGE Argtype: value Default: 1 which page of a multipage index to be shown PAGELIMIT Argtype: value Default: 0 maximum page of a multipage index to be shown PAGEVARIABLE Argtype: string Default: null JCL variable in which number of page actually displayed is returned PARAGRAPH Argtype: value * Default: 64 text paragraph numbers for box, headings/footings and body of index SIZE Argtype: value * Default: 4096 sizes of paragraphs in bytes NAMES Argtype: bool default:none if set then just the names and types of the files are displayed TITLES Argtype: bool default:none if set then the catalogue is assumed to contain SDB format spectrum files, and their file names, types and titles are displayed. FULL Argtype: bool Default: none if set then the catalogue is assumed to contain SDB format spectrum files, and their attributes and labels are displayed in addition to names and titles. Overrides TITLES and NAMES. GRAPH Argtype: stream default:*/LSB/NEW graphics output stream OUT Argtype: stream Default: */NEW reporting stream Examples SDBIDEX OPT .RUN23 NAMES COLUMNS 4 CORNER 100 3000 3300 4000 displays just the names and filetypes of files in catalogue .RUN23 laid out in 4 columns in a wide box at the top of the screen SDBINDEX .CALIB.RUN1 FULL CORNER 100 550 3300 4000 PAGE 2 displays full details of files in catalogue .CALIB.RUN1 in a large box occupying most of the screen. The index will occupy more than one page and the second one is requested Notes The program follows the conventions of the LAYOUT program in drawing a rectangular box with bands at top and bottom for annotations using specified graphic text paragraphs. In this case the footings displayed are a set of lightpen sensitive commands for manipulating the display. These commands are implemented elsewhere as macros. Graphics output is constrained to occupy the rectangular box specified by the CORNER arguments. A character size and number of columns are chosen (possibly overriding the requested value) so that a minimal number of lines of index are visible in the box. The index is then logically formatted as a number of pages with each page filling the box exactly. Only the requested page is actually drawn. The pages of a multipage index can be inspected by invoking the program repetitively with the PAGE argument incrementing by one and all other arguments fixed. The names and types of the files are drawn lightpen sensitive. Option FULL forces the number of columns to 1 and displays the spectrum label (if any) immediately above the other spectrum details. If one or more successive labels are identical then the second and subsequent ones are suppressed. This produces an index display not entirely dissimilar from the familiar LISTDSM style of index. If the file given by the OPT argument is not a catalogue but an LST file then option FULL will list the file. The program uses the H(idden) feature of graphic text paragraphs to ensure that any text input as a result of a lightpen pick on a file name or footing menu is prefixed with the name of the JCL macro used to process the pick. --------------------------------------------------------SYS.HELPCAT2.SHIFT SHIFT* Format SHIFT [[X] value1] [[Y] value2] [ALL^CURRENT^BOX boxno] Purpose To pan displayed spectra left/right and up/down by adding constant factors to the coordinates of the bottom left hand corner of the spectrum box(es). The factors are specified as fractions of the currently displqyed X and Y ranges. The command operates on either ALL displayed spectra, the CURRENT spectrum box, or the spectra in a specified BOX. The default is the current box. Examples SHIFT X 10 pans right on the current spectrum (ie higher channel numbers become visible) by one tenth of the displayed range of channels SHIFT Y -2 pans down the current spectrum (ie smaller counts become visible) by half the range of displayed counts. --------------------------------------------------------SYS.HELPCAT2.SPECTRA SPECTRA Format SPECTRA OPT string SPECTRUM string * LIMIT value * COUNT string * CONTOURS value * SYMBOLS string STYLE string * NORM string * PARTITION value BOX value CORNER value * OUT stream GRAPH stream Purpose Displays one and two dimensional spectra. A region of the display screen called a partition can be formatted into upto 16 boxes each of which can contain one or more spectra. There are options for adding and removing spectra, clearing the screen, defining or changing the area of a partition and redrawing 2d spectra with different contour levels and 'colour' symbols. Arguments OPT Argtype: string Default: NEW One of the following functions: NEW, ADD, REMOVE, OVERLAP, UNOVERLAP, CLEAR, PARTITION, REDRAW, NEWCAL, NEWSTYLE SPECTRUM Argtype: string * Default: none The identifier of the spectrum to be drawn. LIMIT Argtype: value * Default: spectrum dependent Two limits used to initially window the displayed spectrum viz base and range for a 1d spectrum, and the coordinates of the channel at the bottom left corner for a 2d spectrum If not supplied defaults to the entire spectrum COUNT Argtype: string * Default: spectrum dependent for 1d spectra, the least and the greatest count to be shown. If not supplied defaults to the minimum and maximum count CONTOURS Argtype: value * Default: 0 10 100 1000 for 2d spectra, the contour levels distinguished by the 'colour' symbols SYMBOLS Argtype: string Default: .+O* for 2d spectra, the characters used like colours to distinguish different count levels STYLE Argtype: string * Default: HISTOGRAM The style in which a 1d spectrum is to be drawn may be any of HISTOGRAM, DOTS, or CHARACTER. If CHARACTER style is chosen then a second STYLE argument in the range 1..8 selects the particular character to be used to represent the counts. NORM Argtype: string Default: LIN The normalistion of a 1d spectrum may be LIN, LOG or SQRT for linear, logarithmic or square-root respectively. PARTITION Argtype: value Default: 1 a number (1,2,...) identifying a partition BOX Argtype: value Default: 1 a number (1,2,...) identifying a display box for REMOVE CORNER Argtype: value * Default: none the coordinates of the lower left and top right corners of a rectangular partition in which the spectra are drawn OUT Argtype: stream 2 Default: * The terminal output stream. GRAPH Argtype: stream 7 Default: * The graphics output stream. Notes The action of the program depends upon the OPT argument as follows: NEW: the given partition is cleared of all spectra, reformatted with as many display boxes as SPECTRUM arguments, and each spectrum drawn in its own box subject to the LIMIT, CONTOURS, SYMBOLS, STYLE and NORM arguments. The area occupied by the partition is changed if four CORNER arguments are given. The last spectrum drawn becomes the current spectrum. ADD: as for NEW except that the partition is not first cleared. Instead the display boxes are reformatted to allow room for the incoming spectra. REMOVE: the display box defined by the PARTITION and BOX arguments is removed from the screen and its partition reformatted for the remaining boxes. All other arguments are ignored. The current spectrum may become undefined. CLEAR: all spectra in a given partition (or all partitions if the PARTITION argument is zero) are removed. The current spectrum may become undefined. OVERLAP: the spectra given by the SPECTRUM arguments are displayed in the same display box as that of the current spectrum. The last one to be displayed becomes the current spectrum. UNOVERLAP: the current spectrum is removed from its display box, possibly leaving an empty box. All other arguments are ignored. The current spectrum becomes undefined. PARTITION: a new partition is defined, or an existing one reformatted to occupy the area defined by the CORNER arguments. All other arguments are ignored. REDRAW: the current 2d spectrum (if any) is redrawn subject to the LIMIT, CONTOURS and SYMBOLS arguments. If these are not supplied then the corresponding display attribute remains unchanged. NEWCAL: the calibration of the current spectrum is reread and saved for use by the TAG command. NEWSTYLE: the current spectrum is redisplayed subject to the STYLE argument(s). All other arguments are ignored. Examples SPECTRA OPT NEW SPECTRUM .RUN23.GELIA .RUN23.GELIB PARTITION 1 empties partition 1 and displays two spectra in separate boxes. All channels are displayed and the counts scaled to fit neatly into the display box. SPECTRA OPT PARTITION PARTITION 1 CORNER 80 550 3152 3900 reformats partition 1 to occupy the rectangle with lower left corner at (80,550) and upper right corner at (3152,3900). SPECTRA OPT OVERLAP SPECTRUM H2S3 STYLE CHARACTER 2 displays spectrum H2S3 in the same box as the current spectrum in 'character' style using character number 2 rather than in 'histogram' style. SPECTRA OPT REDRAW CONTOURS 10 20 30 40 50 SYMBOLS ' .+O *' LIMIT 128 128 redraws the current 2d spectrum with new contour levels and 'colour' characters with channel (128,128) appearing at the lower left hand corner. Note the use of quotes around the SYMBOLS argument allowing the first 'colour' character to be a space character. --------------------------------------------------------SYS.HELPCAT2.TAG TAG* Format TAG [CHANNEL] value1 [[TYPE] value2] [ALL^CURRENT^BOX value3] [LABEL labeltext] Purpose Draws a tag of a given type on a given channel of one or more displayed spectra, and optionally appends a text label. The type attribute is used to distinguish tags used to demarcate integration and background domains. The default type, zero, denotes the dotted cursor tag which carries channel value, channel count, and, if the spectrum is calibrated, channel energy annotations. The channel count annotation is obtained by accessing the histogram point stored in the S1112 display file and suffers from a rounding error on 32 bit precision spectra. The command operates on either ALL displayed spectra, the CURRENT spectrum box, or the spectra in a specified BOX. The default is the current box. Example TAG 1000 moves the cursor tag to channel 1000 of the current spectrum. TAG 256 TYPE 5 LABEL this is channel 256 puts a type=5 tag on channel 256 of the current spectrum box and labels it 'this is channel 256' --------------------------------------------------------SYS.HELPCAT2.TEXT TEXT* Format TEXT [string]^ Purpose To display text on the graphics screen. The argument strings contain the characters to be displayed and embedded control characters. The latter are used to define X and Y coordinates, charactersize, and other attributes such as blink-rate, visibility and lightpen sensitivity. There are facilities for formatting text strings into rectangular tables, for blanking/showing and emptying/filling existing numbered tables and for controlling the interpretation of lightpen detects on sensitive text. Syntax of the TEXT command The format of the command is TEXT ... Each consists of characters to be displayed and/or embedded control sequences flagged by an escape character. The displayed characters are grouped into numbered paragraphs. Each paragraph corresponds to a set of graphics elements in a key unique to the paragraph. These graphics elements are accounted using frame database records of type=8. The first graphics primitive produced by a call of the TEXT command causes the allocation of an element in the key corresponding to the currently selected paragraph. All graphics elements are closed when the command terminates. The syntax of the TEXT command recognises sequences of consecutive displayable characters as 'tokens'. Tokens are normally delimited by the start and end of the arguments and by certain embedded control sequences. Tokens are the textual units that are formatted by the $O layout options, and also the minimal unit of text that can be made lightpen sensitive. Lightpen sensitive tokens are delimited in the S1112 display file by an undisplayed escape character. GCOMM handles lightpen picks by scanning the display file forwards and backwards from the picked character until the escape character is detected. The entire token string (which may contain embedded blanks) is then extracted and substituted into the GCOMM input buffer. Coordinates are expressed in a fixed frame of reference in which the screen is a 4096 by 4096 square. Control sequences have the form: [] At the start of interpretation of each TEXT command the standard defaults are reinstated. This resets the escape character to $. The control sequences are as follows: $An Allocate display file. A graphics key of n bytes is reserved for the paragraph selected by the preceding $N sequence. If the paragraph already exists (has a key) no action is taken. The paragraph becomes current. End-of-token is implied. $Cn Character size: subsequent characters will be drawn with character size n as defined by the GF2LIB character size codes. $D Delete paragraph: all text in the current paragraph is removed by the deletion of all elements in the paragraphs graphics key. $Ec Escape character: the escape character is changed to c. $F Flashing on: subsequent characters are drawn blinking until cancelled by $G. End-of-token is implied. $G Flashing off: subsequent characters do not flash. End-of-token is implied. $In Horizontal increment: the inter-token X increment is set to n units. $Jn Vertical increment: the inter-token Y increment is set to n units. $Ln Throw lines: advance the pen position by n vertical inter-token increments. $M More token: the current token is not terminated by the end of the current argument unless it is the last one in the command line. $Nn Select paragraph: paragraph n becomes the current paragraph. End-of-token is implied. If paragraph n does not exist then n specifies the paragraph to be created by the next $A sequence. $On set formatting option: the integer n is treated as a 16 bit field which determines how the pen position is changed at the end of each token. 15 - set X coord to that of start character of last token 14 - set Y coord to that of start character of last token 13 - set X coord to that specified in last $X sequence 12 - set Y coord to that specified in last $Y sequence 11 - advance X coord by spacing specified by last $I sequence 10 - advance Y coord by spacing specified by last $J sequence $P light pen on: subsequent tokens are drawn lightpen sensitive until cancelled by $Q. End-of-token is implied. $Q lightpen off: subsequent tokens are not lightpen sensitive. End-of-token is implied. $Sn insert spaces: the pen position is advanced by n character widths at the current character size. $T set transparent mode: the remaining characters in the current are displayed as presented without interpretation of any embedded control sequences. $U unshow paragraph: the current paragraph is made invisible by a BLANK operation on its key. $V reveal paragraph: the current paragraph is made visible by a SHOW operation on its key. $Xn set X coordinate: the pen position X coord is set to n. $Yn set Y coordinate: the pen position Y coord is set to n. $Z break token: the current token is terminated without performing the end-of-token formatting selected by $O. The default conditions reinstated at the start of each TEXT command are as follows: escape character $; no blink; not lightpen sensitive; no paragraph selected; pen at (0,0); character size 0; X token spacing 0; Y token spacing -character height; formatting option bits 10 and 13 giving vertical columns of tokens with normal character height spacing. Application programs can generate TEXT compatible graphics using the following set of Babbage callable routines: OPENGTEXT () PUTGTEXT (,string length,string pointer) CONTROLGTEXT (parameter,control character) CLOSEGTEXT () The caller must ensure that the current graphics frame database segment is in CST1 and a graphics output stream opened by an INITG call. A sequence of mixed PUTGTEXT and CONTROLGTEXT calls must be bracketed by a call on OPENGTEXT and CLOSEGTEXT. Each string passed in a PUTGTEXT call is treated in the same way as the arguments of TEXT. CONTROLGTEXT allows a single control sequence to be actioned by passing the parameter in RA and the control character (ASCII) in RX. OPENGTEXT resets options to the defaults described above. A non-zero value returned in RA is a JCL error code and OPENGTEXT must be called again before continuing. Possible error codes are: 62 not in graphics mode 70 no graphics frame 72 all space used (in frame database) 73 all ids used (in frame database) 81 bad graphic text syntax 82 bad graphic text paragraph 83 all graphics elements used 84 frame too complicated 85 graphic text element full (paragraph key to small) 86 graphic text too long (more than 255 characters) --------------------------------------------------------SYS.HELPCAT2.UNTAG UNTAG* Format UNTAG [[CHANNEL] value1] [[TYPE] value2] [ALL^CURRENT^BOX value3] Purpose Removes tags of given type from given channels of one or more spectra. If a type is unspecified then all types are removed. If a channel is unspecified then all channels are untagged. The command operates on either ALL displayed spectra, the CURRENT spectrum box, or the spectra in a specified BOX. The default is the current box. Example UNTAG 1000 removes all tags on channel 1000 on the current spectrum. UNTAG ALL removes all tags of all types from all displayed spectra. --------------------------------------------------------SYS.HELPCAT2.WINDOW WINDOW* Format WINDOW [[X] val1 val2] [[Y] val3 val4] [ALL^CURRENT^BOX boxno] Purpose To set a window in X and Y on some or all of the currently displayed spectra. 'val1' and 'val2' are the lower and upper channels to be displayed and 'val3' and 'val4' are the minimum and maximum channel counts respectively. The command operates on either ALL spectra, the CURRENT spectrum box or a specified spectrum BOX. The default is the current spectrum box. Examples WINDOW X 200 400 displays channels 200 to 400 of the current spectrum leaving Y unchanged. WINDOW 0 1024 0 10000 ALL displays channels 0 to 1024 of all currently displayed spectra with a maximum count of 10000. --------------------------------------------------------SYS.HELPCAT2.XSTATE XSTATE Format XSTATE CORNER value * GRAPH stream OUT stream Purpose to report on EbyE stream connections, EbyE tape allocations, and experiment status Arguments CORNER Argtype: value * Default: 0 XY coords of bottom left corner and top right corner of rectangular box on screen in which the report is formatted GRAPH Argtype: stream Default: */LSB/NEW graphics output stream OUT Argtype: stream Default: */NEW reporting stream Examples XSTATE CORNER 100 3000 3300 4000 displays experiment status information in a wide box at the top of the screen. Notes The program draws in graphics text paragraph 65 in the current graphics frame. If paragraph 65 already exists it is emptied and reused otherwise 1000 bytes of display file are allocated. Graphics output is constrained to occupy the rectangular box specified by the CORNER arguments. The information presented consists of: i) FROM and TO EbyE stream connections ii) EbyE tapes mounted iii) data taking status - GOING or HALTED --------------------------------------------------------.SOURCE.MACROS.KINEMAT MACRO RK OPT STRING () SETTING STRING () SELFHELP IF HELPMODE THEN GOTO HELPLAB IF '' EQ '' THEN << // Exec // FINDPARTITION 1 P1 // Run // SPECTRA OPT ADD - PARTITION 99 - CORNER [P1XBASE] [P1YBASE] - [P1XBASE]+[P1XRANGE] [P1YBASE]+[P1YRANGE] // Run // SPECTRA OPT ADD - PARTITION 1 - CORNER [P1XBASE] [P1YBASE] - [P1XBASE]+[P1XRANGE] [P1YBASE]+[P1YRANGE]-750 SET P1YRANGE [P1YBASE]+[P1YRANGE] SET P1YBASE [P1YRANGE]-700 SET P1XRANGE P1XRANGE+P1XBASE ///B // Run // LAYOUT FROM %I+ - CORNER 1600 [P1YBASE] 3100 [P1YRANGE] - OPT FORMATTED - PARAGRAPH 11 - CHARACTERSIZE 2 - NOPAGE - HEADINGS 'Relativistic Kinematics (RK) commands' $O@24 RK commands $PRK INITIAL$Q calibration of spectrum $PRK COMPUTE ENERGY$Q of exit particle $PRK SHOW CHANNEL$Q of single reaction $PRK SHOWSTATES RESIDUAL$Q $PRK SHOWSTATES SCATTERED$Q $PRK QUIT$Q from kinematics functions + ///B LABDISPLAY: ///B // Run // LAYOUT FROM %I+ - CORNER 80 [P1YBASE] 1580 [P1YRANGE] - OPT FORMATTED - PARAGRAPH 10 - CHARACTERSIZE 2 - NOPAGE - HEADINGS 'Relativistic Kinematics (RK) parameters' $O@24 $PRK BEAM$Q energy: [RKBEAMENERGY] MEV $PRK TARGET$Q nucleus: [RKTARGET] $PRK INCIDENT$Q particle: [RKBEAM] $PRK EXIT$Q particle: [RKPARTICLE] $PRK RESIDUAL$Q nucleus: [RKRESIDUAL] $PRK EXCITATION$Q energy: [RKEXCITE] MEV $PRK ANGLE$Q of detector: [RKANGLE] degrees $L-6$S30suggested nuclei: $S30$P16O$Q $P12C$Q $P[HTARGET]$Q $L2$S30($P0.0$Q) + ///B RETURN >> IF '' EQ 'BEAM' OR '' EQ 'beam' THEN << IF '' NE '' THEN << SET RKBEAMENERGY '' GOTO LABDISPLAY >> PROMPT Enter your BEAM energy in MEV eg 80.0: ENTER REAL RKBEAMENERGY IF ERROR THEN RETURN GOTO LABDISPLAY >> IF '' EQ 'TARGET' OR '' EQ 'target' THEN << IF '' NE '' THEN << SET RKTARGET '' GOTO LABDISPLAY >> PROMPT Enter your TARGET nucleus (eg 30SI): ENTER STRING RKTARGET IF ERROR THEN RETURN GOTO LABDISPLAY >> IF '' EQ 'INCIDENT' OR '' EQ 'incident' THEN << IF '' NE '' THEN << SET RKBEAM '' GOTO LABDISPLAY >> PROMPT Enter your INCIDENT particle (eg 12C): ENTER STRING RKBEAM IF ERROR THEN RETURN GOTO LABDISPLAY >> IF '' EQ 'EXIT' OR '' EQ 'exit' THEN << IF '' NE '' THEN << SET RKPARTICLE '' GOTO LABDISPLAY >> PROMPT enter your EXIT particle (eg 16O): ENTER STRING RKPARTICLE IF ERROR THEN RETURN GOTO LABDISPLAY >> IF '' EQ 'RESIDUAL' OR '' EQ 'residual' THEN << IF '' NE '' THEN << SET RKRESIDUAL '' GOTO LABDISPLAY >> PROMPT Enter your RESIDUAL particle (eg 24MG): ENTER STRING RKRESIDUAL IF ERROR THEN RETURN GOTO LABDISPLAY >> IF '' EQ 'EXCITATION' OR '' EQ 'excitation' THEN << IF '' NE '' THEN << SET RKEXCITE '' GOTO LABDISPLAY >> PROMPT Enter excitation energy of residual nucleus in MEV: ENTER REAL RKEXCITE IF ERROR THEN RETURN GOTO LABDISPLAY >> IF '' EQ 'ANGLE' OR '' EQ 'angle' THEN << IF '' NE '' THEN << SET RKANGLE '' GOTO LABDISPLAY >> PROMPT Enter exit particle angle in degrees: ENTER REAL RKANGLE IF ERROR THEN RETURN GOTO LABDISPLAY >> IF '' EQ 'INITIAL' THEN << SWITCH RKINITIALCALIBRATION RETURN >> IF '' EQ 'COMPUTE' THEN << SWITCH RKCOMPUTE RETURN >> IF '' EQ 'SHOW' AND '' EQ 'CHANNEL' THEN << SWITCH RKSHOWCHANNEL RETURN >> IF '' EQ 'SHOWSTATES' THEN << SWITCH RKSHOWSTATES RETURN >> IF '' EQ 'QUIT' THEN << TEXT $N10$D IF ERROR THEN CONTINUE TEXT $N11$D IF ERROR THEN CONTINUE // Exec // FINDPARTITION 99 P1 // Run // SPECTRA OPT ADD - PARTITION 1 - CORNER [P1XBASE] [P1YBASE] - [P1XBASE]+[P1XRANGE] [P1YBASE]+[P1YRANGE] RETURN >> RETURN HELPLAB: COPY %H+ [HELPSTREAM] OUT SINK ///H .sp The RK function does relativistic kinematics calculations using a version of the RELKIN program supplied by Brian Fulton. It can be used to help you identify peaks appearing in the energy spectra of detected particles. RK presents you with a form which you have to fill in to define such things as the beam energy and ion species, the target nucleus, and the angle of your detector. Once you have filled in all the parameters appering in the form you can use any of the following commands. The parameters can be changed at any time by just editing the form. RK INITIAL CALIBRATION Can be used to make a first stab at a calibration of a particle spectrum. It makes a simple linear two point calibration. You have to identify the reaction giving rise to a single peak in your spectrum and enter the channel at the centre of this peak. The RELKIN program is used to calculate the energy of this peak based on the Relativistic Kinematics parameters you have currently set. The second point for the calibration is simply got by assuming that channel zero corresponds to zero measured energy. RK COMPUTE Runs RELKIN to compute the scattered particle energy. You have to supply an excitation energy parameter for this option. RK SHOW CHANNEL Runs RELKIN and tags your spectrum where the peak for your reaction should appear. You have to supply an excitation energy parameter for this option. RK SHOWSTATES Runs RELKIN for all states of either your residual or your scattered nucleus found in a nucleus database and tags where they should appear on your spectrum. Any excitation energy parameter you may have set is ignored. The SHOWSTATES options expect to find files of nuclear level data in the catalogue LOCAL.USERPROG.DATA.NUCLEI. For example, the file for 16O is: .sp $$$$$$LOCAL.USERPROG.DATA.NUCLEI.N16O (note the N16O) .sp and looks something like this: .nf 0.0 0+$ 6.049 0+$ 6.134 3-$ 6.919 2+$ 7.117 1-$ 8.772 2-$ .fi Each record corresponds to a single excitation level. The first six characters give the excitation energy in MEV and the remainder of the record is used purely for annotating the tags. ///H + END MACRO RKCOMPUTE // Run // RELKIN REACTION '[RKTARGET]([RKBEAM],[RKPARTICLE])' - BEAMENERGY [RKBEAMENERGY] - EXCITATION [RKEXCITE] - ANGLE [RKANGLE] - TO SINK - LIST [RECORDFILE] - OPT LIST END MACRO RKINITIALCALIBRATION EMPTY &CALDATA LABENTER: SET NOERRS PROMPT Enter channel number where your reaction peak occurs ENTER REALCHANNEL CALCHAN IF ERROR EQ TRUE THEN << IF ERRVAL EQ WRONGTYPE THEN << UNSET NOERRS [COMMAND] IF ERROR EQ TRUE THEN CONTINUE GOTO LABENTER >> UNSET NOERRS GOTO LABENTER >> // Run // RELKIN REACTION '[RKTARGET]([RKBEAM],[RKPARTICLE])' - BEAMENERGY [RKBEAMENERGY] - EXCITATION [RKEXCITE] - ANGLE [RKANGLE] - TO SINK - LIST [RECORDFILE] - OPT LIST OUTPUT &CALDATA SAY 0.0 0.0 [CALXERROR] [CALYERROR] SAY [CALCHAN] [RKENERGY] [CALXERROR] [CALYERROR] OUTPUT * PROMPT UNSET NOERRS // Run // CAL OUT [RECORDFILE] - SPECTRUM [CURRENTSPECTRUM] - OPT LINEAR- FROM &CALDATA - UNITS [CALUNITS] IF DSMLISTSTATE EQ 2 THEN SET DSMLISTSTATE=1 // Run // SPECTRA OPT NEWCAL EMPTY &CALDATA RETURN END MACRO RKSHOWCHANNEL // Run // RELKIN REACTION '[RKTARGET]([RKBEAM],[RKPARTICLE])' - BEAMENERGY [RKBEAMENERGY] - EXCITATION [RKEXCITE] - ANGLE [RKANGLE] - SPECTRUM [CURRENTSPECTRUM] - TO &RKTAGS - OPT SHOWCHANNEL // Exec // &RKTAGS END MACRO RKSHOWSTATES OF STRING (RESIDUAL) // Run // RELKIN REACTION '[RKTARGET]([RKBEAM],[RKPARTICLE])' - BEAMENERGY [RKBEAMENERGY] - EXCITATION 0.0 - ANGLE [RKANGLE] - STATES - SPECTRUM [CURRENTSPECTRUM] - TO &RKTAGS - OPT SHOWSTATES // Exec // &RKTAGS RETURN END MACRO SK OPT STRING () SETTING1 STRING () SETTING2 STRING () // Magnetic Spectrometer Kinematics assistance SELFHELP IF HELPMODE THEN GOTO HELPLAB IF '' EQ '' THEN << // Exec // FINDPARTITION 1 P1 // Run // SPECTRA OPT ADD - PARTITION 99 - CORNER [P1XBASE] [P1YBASE] - [P1XBASE]+[P1XRANGE] [P1YBASE]+[P1YRANGE] // Run // SPECTRA OPT ADD - PARTITION 1 - CORNER [P1XBASE] [P1YBASE] - [P1XBASE]+[P1XRANGE] [P1YBASE]+[P1YRANGE]-750 SET P1YRANGE [P1YBASE]+[P1YRANGE] SET P1YBASE [P1YRANGE]-700 SET P1XRANGE P1XRANGE+P1XBASE LABDISP1: ///B // Run // LAYOUT FROM %I+ - CORNER 1600 [P1YBASE] 3100 [P1YRANGE] - OPT FORMATTED - PARAGRAPH 11 - CHARACTERSIZE 2 - NOPAGE - HEADINGS 'Spectrometer Kinematics (SK) commands' $O@24$J-72 $PSK INITIAL$Q calibration of spectrum $PSK COMPUTE ENERGY$Q of exit particle $PSK SHOW CHANNEL$Q of single reaction $PSK SHOWSTATES RESIDUAL$Q $PSK SHOWSTATES SCATTERED$Q $PSK SHOWSTATES MUTUAL$Q $PSK RANGE$Q [RKMIN] [RKMAX] $PSK QUIT$Q from kinematics functions $PSK REMOVE$Q clears all tags present + ///B LABDISPLAY: ///B // Run // LAYOUT FROM %I+ - CORNER 80 [P1YBASE] 1580 [P1YRANGE] - OPT FORMATTED - PARAGRAPH 10 - CHARACTERSIZE 2 - NOPAGE - HEIGHT 10 - HEADINGS 'Spectrometer Kinematics (SK) parameters' $O@24$J-72 $PSK BEAM$Q energy: [RKBEAMENERGY] MEV $PSK TARGET$Q nucleus: [RKTARGET] $PSK INCIDENT$Q particle: [RKBEAM] $PSK EXIT$Q particle: [RKPARTICLE] $PSK RESIDUAL$Q nucleus: [RKRESIDUAL] $PSK EXCITATION$Q energy: [RKEXCITE] MEV $PSK CHARGE$Q state: [RKCHARGE] $PSK FIELD$Q in dipole: [RKFIELD] $PSK ANGLE$Q of detector: [RKANGLE] degrees $L-8$S30suggested nuclei: $S30$P16O$Q $P12C$Q $P[HTARGET]$Q $L2$S30($P0.0$Q) + ///B RETURN >> IF '' EQ 'BEAM' OR '' EQ 'beam' THEN << IF '' NE '' THEN << SET RKBEAMENERGY '' GOTO LABDISPLAY >> PROMPT Enter your BEAM energy in MEV eg 80.0: ENTER REAL RKBEAMENERGY IF ERROR THEN RETURN GOTO LABDISPLAY >> IF '' EQ 'TARGET' OR '' EQ 'target' THEN << IF '' NE '' THEN << SET RKTARGET '' GOTO LABDISPLAY >> PROMPT Enter your TARGET nucleus (eg 30SI): ENTER STRING RKTARGET IF ERROR THEN RETURN GOTO LABDISPLAY >> IF '' EQ 'INCIDENT' OR '' EQ 'incident' THEN << IF '' NE '' THEN << SET RKBEAM '' GOTO LABDISPLAY >> PROMPT Enter your INCIDENT particle (eg 12C): ENTER STRING RKBEAM IF ERROR THEN RETURN GOTO LABDISPLAY >> IF '' EQ 'EXIT' OR '' EQ 'exit' THEN << IF '' NE '' THEN << SET RKPARTICLE '' GOTO LABDISPLAY >> PROMPT Enter your EXIT particle (eg 16O): ENTER STRING RKPARTICLE IF ERROR THEN RETURN GOTO LABDISPLAY >> IF '' EQ 'RESIDUAL' OR '' EQ 'residual' THEN << IF '' NE '' THEN << SET RKRESIDUAL '' GOTO LABDISPLAY >> PROMPT Enter your RESIDUAL particle (eg 24MG): ENTER STRING RKRESIDUAL IF ERROR THEN RETURN GOTO LABDISPLAY >> IF '' EQ 'EXCITATION' OR '' EQ 'excitation' THEN << IF '' NE '' THEN << SET RKEXCITE '' GOTO LABDISPLAY >> PROMPT Enter excitation energy of residual nucleus in MEV: ENTER REAL RKEXCITE IF ERROR THEN RETURN GOTO LABDISPLAY >> IF '' EQ 'CHARGE' OR '' EQ 'charge' THEN << IF '' NE '' THEN << SET RKCHARGE '' GOTO LABDISPLAY >> PROMPT Enter charge state of exit particle: ENTER REAL RKCHARGE IF ERROR THEN RETURN GOTO LABDISPLAY >> IF '' EQ 'FIELD' OR '' EQ 'field' THEN << IF '' NE '' THEN << SET RKFIELD '' GOTO LABDISPLAY >> PROMPT Enter spectrometer dipole field in Tesla: ENTER REAL RKFIELD IF ERROR THEN RETURN GOTO LABDISPLAY >> IF '' EQ 'ANGLE' OR '' EQ 'angle' THEN << IF '' NE '' THEN << SET RKANGLE '' GOTO LABDISPLAY >> PROMPT Enter exit particle angle in degrees: ENTER REAL RKANGLE IF ERROR THEN RETURN GOTO LABDISPLAY >> IF '' EQ 'INITIAL' THEN << SWITCH SKINITIALCALIBRATION RETURN >> IF '' EQ 'COMPUTE' THEN << SAY Runs BROKIN to give exit particle energy SWITCH SKCOMPUTE RETURN >> IF '' EQ 'SHOW' AND '' EQ 'CHANNEL' THEN << SAY Runs BROKIN and tags spectrum where peak for this reaction SAY should appear SWITCH SKSHOWCHANNEL RETURN >> IF '' EQ 'SHOWSTATES' THEN << SWITCH SKSHOWSTATES RETURN >> IF '' EQ 'RANGE' OR '' EQ 'range' THEN << IF '' NE '' THEN << SET RKMIN TEST '' NE '' THEN SET RKMAX ELSE << PROMPT Enter maximum channel ..... ENTER CHANNEL RKMAX PROMPT >> IF RKMIN GT RKMAX THEN << SET RKTEMP RKMIN SET RKMIN RKMAX SET RKMAX RKTEMP >> GOTO LABDISP1 >> PROMPT Enter minimum channel .... ENTER CHANNEL RKMIN PROMPT Enter maximum channel .... ENTER CHANNEL RKMAX PROMPT IF RKMIN GT RKMAX THEN << SET RKTEMP RKMIN SET RKMIN RKMAX SET RKMAX RKTEMP >> GOTO LABDISP1 >> IF '' EQ 'REMOVE' OR '' EQ 'remove' THEN UNTAG ALL IF '' EQ 'QUIT' THEN << TEXT $N10$D IF ERROR THEN CONTINUE TEXT $N11$D IF ERROR THEN CONTINUE // Exec // FINDPARTITION 99 P1 // Run // SPECTRA OPT ADD - PARTITION 1 - CORNER [P1XBASE] [P1YBASE] - [P1XBASE]+[P1XRANGE] [P1YBASE]+[P1YRANGE] RETURN >> RETURN HELPLAB: COPY %H+ [HELPSTREAM] OUT SINK ///H .sp The SK function does online relativistic calculations for the magnetic spectrometer using a version of the BROKIN program supplied by Brian Fulton. You can use it to help identify peaks appearing in position spectra from the focal plane detector. These spectra have to be calibrated in CENTIMETERs. Once this calibration is made the BROKIN program can compute the expected distance along the wire for particles leaving any given reaction and then work out at which channel on your position spectrum a peak should appear. SK INITIAL CALIBRATION Can be used to make a first stab at a calibration of a particle spectrum. It makes a simple linear two point calibration. The BROKIN program is used to calculate the energy of this peak based on the Spectrometer Kinematics parameters you have currently set. SK will then prompt the user for a second channel number corresponding to a requested excitation energy. The calibration will then be calculated. SK SHOW STATES Runs BROKIN for all states of either the residual, scattered or both nuclei (mutual) found in the nucleus database and tags where they should appear on the spectrum SK COMPUTE Runs the BROKIN program on your currently set Spectrometer Kinematics parameters. SK SHOW CHANNEL Runs the BROKIN program on your current Spectrometer Kinematics reaction reaction parameters, and tags your position spectrum where a peak from this reaction is expected to appear. SK RANGE Specifies the range in channels over which the states will be shown. It is possible that there will be insufficient tags for the number of states for a full spectrum, especially with SHOWSTATES MUTUAL; under such circumstances a warning message will be displayed. ///H + END MACRO SKCOMPUTE PROMPT Calculating ..... // Run // BROKIN REACTION '[RKTARGET]([RKBEAM],[RKPARTICLE])' - BEAMENERGY [RKBEAMENERGY] - EXCITATION [RKEXCITE] - CHARGE [RKCHARGE] - FIELD [RKFIELD] - ANGLE [RKANGLE] - SPECTRUM [CURRENTSPECTRUM] - LIST [RECORDFILE] - OPT COMPUTE END MACRO SKINITIALCALIBRATION IF CALUNITS NE 'CM' THEN SET CALUNITS = 'CM' EMPTY &CALDATA LABENTER: SET NOERRS PROMPT Enter channel number where your reaction peak occurs ENTER REALCHANNEL CALCHAN IF ERROR EQ TRUE THEN << IF ERRVAL EQ WRONGTYPE THEN << UNSET NOERRS [COMMAND] IF ERROR EQ TRUE THEN CONTINUE GOTO LABENTER >> UNSET NOERRS GOTO LABENTER >> PROMPT Running BROKIN to calculate energy of this peak... // Run // BROKIN REACTION '[RKTARGET]([RKBEAM],[RKPARTICLE])' - BEAMENERGY [RKBEAMENERGY] - EXCITATION [RKEXCITE] - CHARGE [RKCHARGE] - FIELD [RKFIELD] - ANGLE [RKANGLE] - SPECTRUM [CURRENTSPECTRUM] - LIST SINK - OPT COMPUTE SET RKTEMPX CALCHAN SET RKTEMPY RKDISTANCE SET RKTEMPDX CALXERROR SET RKTEMPDY CALYERROR LABENTER1: SET NOERRS PROMPT Enter channel number where another reaction peak occurs ENTER REALCHANNEL CALCHAN IF ERROR EQ TRUE THEN << IF ERRVAL EQ WRONGTYPE THEN << UNSET NOERRS [COMMAND] IF ERROR EQ TRUE THEN CONTINUE GOTO LABENTER1 >> UNSET NOERRS GOTO LABENTER1 >> LABENTER2: SET NOERRS PROMPT Enter Excitation for this state... ENTER REAL RKTEMPE IF ERROR EQ TRUE THEN << IF ERRVAL EQ WRONGTYPE THEN << UNSET NOERRS [COMMAND] IF ERROR EQ TRUE THEN CONTINUE GOTO LABENTER2 >> UNSET NOERRS GOTO LABENTER2 >> PROMPT Running BROKIN to calculate energy of this peak... // Run // BROKIN REACTION '[RKTARGET]([RKBEAM],[RKPARTICLE])' - BEAMENERGY [RKBEAMENERGY] - EXCITATION [RKTEMPE] - CHARGE [RKCHARGE] - FIELD [RKFIELD] - ANGLE [RKANGLE] - SPECTRUM [CURRENTSPECTRUM] - LIST SINK - OPT COMPUTE OUTPUT &CALDATA SAY [CALCHAN] [RKDISTANCE] [CALXERROR] [CALYERROR] SAY [RKTEMPX] [RKTEMPY] [RKTEMPDX] [RKTEMPDY] OUTPUT * PROMPT UNSET NOERRS // Run // CAL SPECTRUM [CURRENTSPECTRUM] - OPT LINEAR - FROM &CALDATA - OUT [RECORDFILE] - UNITS [CALUNITS] IF DSMLISTSTATE EQ 2 THEN SET DSMLISTSTATE=1 // Run // SPECTRA OPT NEWCAL RETURN END MACRO SKSHOWCHANNEL PROMPT Calculating ..... // Run // BROKIN REACTION '[RKTARGET]([RKBEAM],[RKPARTICLE])' - BEAMENERGY [RKBEAMENERGY] - EXCITATION [RKEXCITE] - CHARGE [RKCHARGE] - FIELD [RKFIELD] - ANGLE [RKANGLE] - SPECTRUM [CURRENTSPECTRUM] - LIST SINK - TO &RKTAGS - OPT SHOWCHANNEL // Exec // &RKTAGS END MACRO SKSHOWSTATES OF STRING (RESIDUAL) PROMPT Calculating ..... // Run // BROKIN REACTION '[RKTARGET]([RKBEAM],[RKPARTICLE])' - BEAMENERGY [RKBEAMENERGY] - EXCITATION 0.0 - CHARGE [RKCHARGE] - FIELD [RKFIELD] - ANGLE [RKANGLE] - STATES - SPECTRUM [CURRENTSPECTRUM] - LIMIT [RKMIN],[RKMAX] - TO &RKTAGS - OPT SHOWSTATES // Exec // &RKTAGS RETURN END --------------------------------------------------------COMMON.DBFORMAT DATA CHAPTER DATABASEFORMATS // A variety of types of database records are in use. // Most of the records contribute to a model of the displayed picture // but some are used for ancillary purposes. // Types which are graphics items have // 1<=typecode<=127, non-graphics items have 128<=typecode<=255. // The following types are currently in use: // 1) histogram // 2) line(s) of a list // 3) single marker // 4) box information // 5) 2d spectrum // 6) page of a list // 7) window on 2d spectrum // 8) 'text' record (used for prompts and menus) // 128) calibration // 130) information on number of splits and current spectrum // 131) partition descriptor // 132) joy stick descriptor FORMAT HISTFORM << BYTE HISTTYPECODE, HISTLENGTH HALF HISTID HALF HISTKEY // graphics key HALF HISTELEMENT // graphics element DIRECT VECTOR [0,63] OF BYTE HISTDISPID // spectrum name HALF HISTPOSIDH // box number << BYTE HISTPARTNO, HISTBOXNO >> HALF HISTPOSIDL // overlap number HALF HISTX1 // base X coord HALF HISTX2 // x range FULL HISTY1 // base y coord FULL HISTY2 // y range HALF HISTSTYLE // style parameter HALF HISTCALRECID // DB id of calibration record >> LITERAL HISTTYPE=1, EXTHISTFORM=EXTENT HISTFORM, HISTPOSIDHOFF=72, HISTPOSIDHLEN=2, HISTPOSIDHPOSIDLLEN=4 FORMAT LISTFORM << BYTE LISTTYPECODE, LISTLENGTH HALF LISTID HALF LISTKEY // graphics key HALF LISTELEMENT // graphics element HALF LISTLINENO // line number HALF LISTYCOORD // base y coord DIRECT VECTOR [0,11] OF BYTE LISTDATA >> LITERAL LISTTYPE=2, EXTLISTFORM=EXTENT LISTFORM, LISTELEMENTOFF=6, LISTELEMENTLEN=2, LISTLINENOOFF=8, LISTLINENOLEN=2 FORMAT MARKFORM << BYTE MARKTYPECODE, MARKLENGTH HALF MARKID HALF MARKKEY // graphics key HALF MARKELEMENT // graphics element HALF MARKPOSIDH // box number << BYTE MARKPARTNO, MARKBOXNO >> HALF MARKTYPE // marker type code HALF MARKCHANNELNUMBER // channel its on HALF MARKINDEX // sequence number >> LITERAL MARKERTYPE=3, EXTMARKFORM=EXTENT MARKFORM, MARKPOSIDHOFF=8, MARKPOSIDHLEN=2, MARKTYPEOFF=10, MARKTYPELEN=2, MARKINDEXOFF=14, MARKLABELOFF=16 FORMAT BOXFORM << BYTE BOXTYPECODE, BOXLENGTH HALF BOXID HALF BOXKEY // graphics key HALF BOXELEMENT // graphics element HALF BOXUSAGE // ???? HALF BOXPOSIDH // box position number << BYTE BOXPARTNO, BOXBOXNO >> HALF BOXPOSIDL // overlap count HALF BOXSTARTX // screen base x coord HALF BOXSTARTY // screen base y coord HALF BOXRANGEX // screen x range HALF BOXRANGEY // screen y range HALF RESETX1 // reset x base coord HALF RESETX2 // reset x range HALF CONTRACTX1 // contract x base coord HALF CONTRACTX2 // contract x range HALF CURRENTX1 // present x base coord HALF CURRENTX2 // present x range HALF BOXDUMMY FULL RESETY1 // reset y base coord FULL RESETY2 // reset y range FULL CONTRACTY1 // contract y base coord FULL CONTRACTY2 // contract y range FULL CURRENTY1 // preset y base coord FULL CURRENTY2 // present y range HALF BOXNORM // y normalisation code HALF BOXTITLEELEMENT // graphics element containing title HALF BOXANNOTELEMENT // graphics element containing xy annotations HALF BOXINTELEMENT // graphics element for PEAKSUM result >> LITERAL BOXTYPE=4, EXTBOXFORM=EXTENT BOXFORM, BOXPOSIDHOFF=10, BOXPOSIDHLEN=2 LITERAL MAX2DCONTOURS = 16 FORMAT TWODFORM << BYTE TWODTYPECODE, TWODLENGTH HALF TWODID HALF TWODKEY // graphics key HALF TWODELEMENT // graphics element DIRECT VECTOR [0,63] OF BYTE TWODDISPID // spectrum name HALF TWODPOSIDH // display box number << BYTE TWODPARTNO, TWODBOXNO >> HALF TWODPOSIDL // unused HALF TWODBOXELEMENT // graphics element of box HALF TWODTITLEELEMENT // graphics element of title HALF TWODSTARTX // screen base coord HALF TWODSTARTY // screen base y coord HALF TWODRANGEX // screen x range HALF TWODRANGEY // screen y range HALF TWODX1 // spectrum X base HALF TWODX2 // spectrum X range HALF TWODY1 // spectrum Y base HALF TWODY2 // spectrum Y range HALF TWODCURRENTX1 // present x base coord HALF TWODCURRENTX2 // present x range HALF TWODCURRENTY1 // present y base coord HALF TWODCURRENTY2 // present y range FULL TWODCURRENTZ1 FULL TWODCURRENTZ2 HALF TWODNOCONTOURS // number of contours below DIRECT VECTOR [0,MAX2DCONTOURS-1] OF HALF TWODCONTOURS // Z contours DIRECT VECTOR [0,MAX2DCONTOURS] OF BYTE TWODCOLOURS // pseudo colours BYTE // padding when MAX2DCONTOURS is even >> LITERAL TWODTYPE=5, EXTTWODFORM=EXTENT TWODFORM FORMAT PAGEFORM << BYTE PAGETYPECODE, PAGELENGTH HALF PAGEID HALF PAGEKEY // graphics key HALF PAGEELEMENT // graphics element >> LITERAL PAGETYPE=6, EXTPAGEFORM=EXTENT PAGEFORM FORMAT WINDOWFORM << BYTE WINDOWTYPECODE, WINDOWLENGTH HALF WINDOWID HALF WINDOWKEY // graphics key HALF WINDOWELEMENT // graphics element HALF WINDOWPOSIDH << BYTE WINDOWPARTNO,WINDOWBOXNO >> HALF WINDOWPOINTS // vertex count DIRECT VECTOR [0,43] OF FULL WINDOWC // (x,y) vertex coord list >> LITERAL WINDOWTYPE=7, EXTWINDOWFORM=EXTENT WINDOWFORM FORMAT POLYFORM << BYTE POLYTYPECODE, POLYLENGTH HALF POLYID HALF POLYKEY // graphics key HALF POLYELEMENT // graphics element HALF POLYWINDOW // window numnber HALF POLYGATE // gate number HALF POLYVERTICES // vertex count HALF POLYBOX // underlying display box << BYTE POLYPARTNO, POLYBOXNO >> HALF POLYHIGHLIGHT // display highlighting HALF POLYSPARE DIRECT VECTOR [0,43] OF FULL POLYVERTEXLIST // (x,y) coord list >> LITERAL POLYTYPE=7, EXTPOLYFORM=EXTENT POLYFORM FORMAT TEXTFORM << BYTE TEXTTYPECODE, TEXTLENGTH HALF TEXTID HALF TEXTKEY // graphics key HALF TEXTELEMENT // graphics element HALF TEXTPARAGRAPH // text 'paragraph' number HALF TEXTSPARE // unused DIRECT VECTOR [0,-1] OF BYTE TEXTHIDDEN >> LITERAL TEXTTYPE=8, EXTTEXTFORM=EXTENT TEXTFORM FORMAT SCALFORM << BYTE SCALTYPECODE, SCALLENGTH HALF SCALID HALF SCALKEY // graphics key HALF SCALELEMENT // graphics element HALF SCALPOSIDH // box number << BYTE SCALPARTNO, SCALBOXNO >> HALF SCALNUM // scaler count HALF SCALX HALF SCALY >> LITERAL SCALTYPE=9, EXTSCALFORM=EXTENT SCALFORM FORMAT CALFORM << BYTE CALTYPECODE, CALLENGTH HALF CALID HALF CALSPARE HALF CALNOTERMS // polynomial order DIRECT VECTOR [0,3] OF REAL CALIBTERMS // poly coefficients DIRECT VECTOR [0,19] OF BYTE CALIBUNITS // units string DIRECT VECTOR [0,19] OF BYTE CALIBTYPE // type code >> LITERAL CALTYPE=128, EXTCALFORM=EXTENT CALFORM /!FORMAT BMANFORM /! << /! BYTE BMANTYPECODE, BMANLENGTH /! HALF BMANID /! HALF BMANFRAMENO /! HALF BMANBUFFNO /! HALF BMANUSAGE /! >> /!LITERAL BMANTYPE=129, EXTBMANFORM=EXTENT BMANFORM, BMANFRAMENOOFF=4, /!BMANFRAMENOLEN=2 FORMAT CURRENTFORM << BYTE CURRENTTYPECODE, CURRENTLENGTH HALF CURRENTID HALF CURRENTHISTID // DB id of histogram record HALF CURRENTBOXID // DB id of box record HALF CURRENTSPLITS // replaced by CURRENTBOXES - now spare HALF CURRENTMARKERS // number of markers available HALF CURRENTTWODID // DB id of TWOD record HALF CURRENTPARTITIONS // number of partitions in frame HALF CURRENTBOXES // number of boxes in frame (1d and 2d) HALF CURRENTHISTS // number of 1d histograms in frame HALF CURRENTTWODS // number of 2d maps in frame >> LITERAL CURRENTTYPE=130, EXTCURRENTFORM=EXTENT CURRENTFORM FORMAT PARTITIONFORM << BYTE PARTTYPECODE, PARTLENGTH HALF PARTID HALF PARTPOSIDH << BYTE PARTPARTNO, PARTBOXNO >> HALF PARTPOSIDL HALF PARTXBASE HALF PARTYBASE HALF PARTXRANGE HALF PARTYRANGE >> LITERAL PARTITIONTYPE=131, EXTPARTITIONFORM=EXTENT PARTITIONFORM /!FORMAT JOYSTICKFORM /! << /! BYTE JOYSTICKTYPECODE, JOYSTICKLENGTH /! HALF JOYSTICKID /! DIRECT VECTOR [0,3] OF BYTE MOVEMENTS /! DIRECT VECTOR [0,3] OF HALF THRESHOLDS /! DIRECT VECTOR [0,3] OF HALF SCALEFACTORS /! >> /!LITERAL JOYSTICKTYPE=132, EXTJOYSTICKFORM=EXTENT JOYSTICKFORM END --------------------------------------------------------SYS.HELPCAT2.SUMMARY Summary of library commands in the NSF data acquisition package AID Extract help from a library macro APROBE Inquire status of attached data collection session BACKPEAK Background subtraction and peak fitting BACKSPACE Backspace EbyE tape by one physical block BIPARAM Setting up biparameter ADC interfaces BIWINDOW Setting mass windows in biparameter interfaces BOXDUMP Formatted dump of S1112 display file BROKIN Relativistic kinematics for QMG2 spectrometer BUTTON Associate a command with a function key CAL Calibrate a spectrum CHATDCP Conduct dialogue with attached data collection session CLEAR Zero one or more online spectra CLEARSTATISTICS Zero EbyE statistics CP2DLOG Plot a 2d spectrum on Diablo colour inkjet printer DATABASE Functions on graphics frame database segment DBDUMP Formatted dump of graphics frame database segment DCMINFO Inquire availability of data collection modules DCP Send line of text to attached data collection session DCPCALL Implements dozens of data colection commands DEMOUNT Remove an EbyE tape from its tape drive DIABLO Plot a 2d spectrum on Diablo colour inkjet printer DIGFILT Obtain a background by a digital filtering technique DISCREST Restore online spectra from disc (see DISCSAVE) DISCSAVE Save online spectra in disc files DISCSORT Replay EbyE data from disc instead of tape DSCHEME Compile and plot a decay scheme diagram DSMP Implements a number of disc spectrum commands EBYEFROM Connects EbyE stream to an Eventmanager/tape drive EBYETO Specifies destination of data from the EbyE stream EC316 Writes data to an EC316 module in a graphics terminal CAMAC crate EMINFO Displays Eventmanager current trigger and ADC channel setup ENTER Sets a JCL variable to a value entered by lightpen or keyboard ESCAPES Locates escape peaks in a calibrated spectrum EVENT Defers an online command to a specified time in the future EXPFIT Displays an Exp. fit to a decay curve, and provides results FAX Produces a hardcopy facsimile of the graphics screen contents FINDCHAN Returns the channel of given energy, in a calibrated spectrum FRAME Allows creation, selection, & deletion of graphics frames FROMSDB Translates binary SDB files to text GAMBAK Calculates a bgrd function for Ge(Li) gamma ray spectrum peaks GAMMADB Provides access to a database containing gamma ray energies GO Enables data collection/replay GRAPHICS Switches the command program to graphics mode HALT Disables data collection/replay HP2D 2d plotting facility (GHOST80) with various options INDEX Displays an index of online spectra in various formats INQUIRET Sets status of EbyE tape drives in JCL variables INT Sums the channel contents of a spectrum between two limits JOIN Converts binary output data to a SKETCHER commands input file LAYOUT Displays text on a graphics screen inside a box (various options) LEVELS Constructs energy level diagrams LISTOPT Allows JCL variables to be changed interactively LISTSDB Lists information about SDB files LIVE Displays online spectra, and periodically refreshes the display LSFIT Performs a non-linear least squares fit to a spectrum/data file LZRPLOT Displays a 2d spectrum on the laser printer (various options) MARKLIST Lists markers shown on a displayed spectrum MORETEXT Displays text on the graphics screen MOVETAG Moves a tag from one channel to another NEXTTIME Performs arithmetic on the [DATETIME] string NORMAL Switches the command program to normal mode ONLINETI Gives a title to an online spectrum PEAK2 Locates and fits peaks to a spectrum PEAKFIND Locates peaks in a spectrum PIWINDOW Displays and sets windows on a PI M-spectrum POLYEDIT Edits 2D window gates on 2D spectra POSITION Positions an open EbyE tape file at a given tape block PREMOUNT Mounts an EbyE tape on a tape drive PRESET Loads an initial value into a "preset" scaler PROMPT Puts a string of text on the promptline (or elsewhere) RELKIN Provides assistance with Relativistic Kinematics RESET Displays a spectrum in it's coordinate space RETAIN Stores the current display coordinates of a spectrum REVERT Displays a spectrum in it's "RETAINed" coordinate space REWIND Rewinds an open EbyE tape file SAMPO80 Analyses gamma ray spectra SCALE Alters the viewport of a displayed spectrum (zooms in/out) SCALERS Selects a set of scalers to be enabled SCOMBINE Spectrum modification program SDBINDEX Displays catalogues of SDB files SHIFT Pans displayed spectra left or right SHOWSTAT Displays current values of EbyE statistics SINGLES Establishes singles spectra on one or more ADCs SKETCHER Draws graphs interactively SMOOTH Smooths a spectrum using binonial weighting SORTCALL Invokes sort program intrinsic commands SPECEDIT Another spectrum modification program SPECPLOT Produces an annotated plot of a program SPECTRA Displays 1D and 2D spectra interactively (various options) TAG Draws a marker (tag) on a selected channel TERMINAL Terminal environment control TEXT Displays text on the graphics screen TOSDB Translates a text spectrum file into a binary SDB file TRIGGER Defines the ADCs making up a multiparameter event TWODCOMB Combines two 2D spectra TWODCOMP Compresses a 2D spectrum TWODCONT Gives the count in a channel of a 2D spectrum TWODWIND Produces 2 1D spectra from a slice of a 2D spectrum UNTAG Removes tags from channels UPROBE Returns the status of an attached data collection module USERGATI Selects the gating mode for singles ADCs VARIABLE Outputs values of JCL variables WINDOW Sets a window on displayed spectra XCOMMENT Writes comment records into an outgoing EbyE stream XDBCALL Implements commands for accessing XDB XSTATE Displays EbyE stream connections, tape allocations, & expt. status