Currently, tape_to_1d is a sorting program which creates gated spectra based on double, triple or quadrupole gating. The program reads the file which is used as input to butcher, thus making it compatible with the gator program.
tape_to_1d.inc. An example of the contents of
tape_to_1d.incis given below:
sd2.butcher 4096,2,0 Yes hg191_4k.2DP hg191_4k.cntsThe first line gives the name of the butcher input file. The butcher file defines all gated spectra which tape_to_1d will create. Currently, one can create up to 250 spectra with each spectrum having up to 900 gates associate with it.
The second line contains the number of channels for each spectrum, the compression factor applied to the pseudo event (see below), and a so-called cleanliness factor. The restrictions on these parameters are given as follows:
The third line contains either "Yes" or "No" to indicate whether or not the raw 2-dimensional projection is to be created. The fourth line gives the name of the 2-D projection file and is only required if line three is "Yes".
The fifth line give the name of the count-file. This file keeps tract of the number of counts each doubple gate contributes to a spectrum. It is used in later programs to perform background subtraction of the spectra.
The second file needed by tape_to_1d is the output file created by Ben Crowell's gator program. Since this file is used as the input to his butcher program, it will be referred to in the remaining portion of this document as the butcher file. To create this file, one must first create a gator file. The gator file defines all of the spectra and gates to be applied to each spectraum Once you have created the gator file run the program with this command line.
gator sd2.gator > sd2.butcherOnce these two files are created you are set to go. Place your tape in the appropriate drive and give the command
tape_to_1dOf course, if you want to run the program in the background and send the text written to the screen to a log file, you should give the command.
tape_to_1d > myfile.log &
The source files for tape_to_1d currently sit in the directory
/dk/gam1/disk2/util/src/incub8r. The standard usersub is located
t21d_usersub.f in this directory. In order to make your
customized version of tape_to_1d, you copy this file along with the make file
which is called
t21d_usersub.f contains three subroutines,
Userinit is called once by tape_to_1d, and any initializations
you wish to do can be coded here. For example, if you wanted to
gain shift the event stream from 0.5 kev/channel to 0.55 kev/channel,
generate an array of random numbers in the
userinit and pass them
via a common block to the
called at the end of sort and could be used to print out information obtained
during the sort such as the Ge multiplicity before and after applying the
sob. Sob will read the tape_to_1d.inc file and perform the subtraction. It will also ask you whether or not you wish to create the error spectrum as well, thus the results are compatible with those of butcher. The subtracted spectra will have a "s1" or "s2" appended to the name depending whether or not you used the cnt-file for the subtraction. Thus, if your raw spectrum file is called gate_303_343.spe, the results of the subtraction will be stored in gate_303_343s2.spe (if you use cnt-file option). The error spectrum would be called gate_303_343.err.