The various commands in
There are three areas (in memory or on disk) that will hold one
scan (spectrum) each. In the following these will be refered to
as
normally holds the scan on which the user wants to perform
an action. As a rule, a command takes the scan from
is used for averaging scans. Commands that act on
may hold a temporary scan, e.g. the results of a baseline or gaussian fit. There are commands to copy/subtract it to/from the work area.
source.nnnn
where source
are the alphanumerical characters of the source name
(i.e. blanks, punctuation etc. are not used) and nnnn
will be the
scan number (ranging from 0000
to 9999
, bigger numbers will
be taken modulo 10000).
If the user wishes he/she can always use whatever file name he/she wants, the price to be paid is a somewhat more complicated syntax to retrieve them later on (see command description for get and put ).
These files will consist of two binary records, the first one being a header of fixed length, and the second one the channel values as 32 bit floating point numbers, the number of which is recorded in the header. A C-callable library is available to read and write these scans (a FORTRAN version would be easy to produce on request).
A typical
#include <stdio.h>
#include "drp.h"
SCAN myscan;
main()
{
int i;
GetScan(&myscan); /* get scan from CWORK */
/* perform some action on each channel */
for (i=0; i<myscan.NChannel; i++) {
.....
}
PutScan(&myscan); /* put back to CWORK */
exit(0); /* indicate success to shell */
}
Next Chapter, Previous Chapter
Table of contents of this chapter, General table of contents
Top of the document, Beginning of this Chapter