Note: calling the programs mentioned in this documentation without an agument prompts the programs to write 'help' descriptions of their use. This is where you find the latest updates also!.
Severeal things must be prepared before gates can be set on the (non-linear) matrices generated by the smalnl sorting package.
Following is a "preparation" section and a "final use" section.
First one must find the background factor f to be applied to the first level background subtraction:
<>.mpg - f * <>.mbgchich is done gate by gate, that is: a gate is set on both the primary gated matrix <>.mpg and the background matrix <>.mbg. The fist level background subtracted gate is this first gate with a fraction of the latter gate subtracted.
The factor f in this background subtraction is found using the following procedure:
tl% bg_gen x.spe 0 0 0 230 15 y.spe spe_name:, 2047 ch, rec 24/24-8188/8188 read 2047 channels [1][wait][3] -> y.spe ... display: x.cmd
example: tl% pb_rat x.spe y.spe sd_prim_gates.dat total projection spectrum> spe_name:, 2046 ch, rec 24/24-8188/1222445952 sum of counts 2639557632.000000 associated smooth background> spe_name: , 2046 ch, rec 24/24-8188/1222751133 sum of counts 1625447296.000000 gatefile name> gate 1: from 515 to 518 gate 2: from 600 to 603 gate 3: from 681 to 685 gate 4: from 762 to 765 gate 5: from 917 to 919 gate 6: from 991 to 997 sum counts in gate(tp): 39208528.000000 sum counts in gate(bg): 29388896.000000 bg/tp ratio...........: 0.749554
tl% tp_bg ang86 ang86.tpx x.x will read primary gated matrix: ang86.mpg will read background matrix...: ang86.mbg will read matrix factor file..: ang86.fac peak/background ratio: 0.749554 reading matrix ang86.mpg... reading matrix ang86.mbg... counting... sum of counts in pg: 8024379.000000 sum of counts in bg: 324315072.000000 -> background factor: 0.018546 making total projection... writingwriting __done
<>.mpg primary gated matrix <>.mbg background matrix <>.fac first level background subtraction factor <>.tpx tp after 1 level background subtraction <>.bgx __associated smooth backgroundFor the actual gate setting use program gg. It can run in two modes: one where the gates set on the nonlinear matrix are expanded into a linear equivalent spectra and another mode where it just extracts a gate (useful for a case where the matrices are actually linear). An example of the first type:
tl% gg ang86 sd_sec_gates.gat _a86 lookup.dat 1.0 4000 will read primary gated matrix: ang86.mpg will read background matrix...: ang86.mbg will read matrix factor file..: ang86.fac tpx (1 level backgnd sub).....: ang86.tpx tpx (1 level backgnd sub).....: ang86.bgx generic file name id string...: _a86 will use lookup table.........: lookup.dat final spectrum dispersion.....: 1.00 kev final spectrum length.........: 4000 read 8192 lines from lookup.dat gatefile: sd_sec_gates.gat # of gates: 6 gate 1: name> 0257 - from 425 to 429 gate 2: name> 0300 - from 487 to 490 gate 3: name> 0340 - from 545 to 548 gate 4: name> 0380 - from 600 to 603 gate 5: name> 0459 - from 700 to 704 gate 6: name> 0496 - from 746 to 764 peak/background ratio: 0.755290 reading matrix ang86.mpg... reading matrix ang86.mbg... projecting... sum of counts in pg: 8024379.000000 sum of counts in bg: 324315072.000000 -> background factor: 0.018688 spe_name:There are 6 (possible) arguments to the program (3 must be given). The first one specifies the matrices and factor file etc. to use. You just supply the generic name and gg will add the extensions when it reads the matrix and spectra. The next argument is the gate file (nearly in Radford format; click here for full documentation) and the next again is a generic file name used to identify the gates written out. The 1.0 specifies 1.0 kev/ch and here we ask for 4000 channels of expanded channels to be written out. Note: 1)the sum of the gates is also written out and 2)calling the program gg without arguments will give some help., 2047 ch, rec 24/24-8188/8188 spe_name: , 2047 ch, rec 24/24-8188/8188 1 * bf: 0.0022952 -> g0257_a86.spe 2 * bf: 0.0019125 -> g0300_a86.spe 3 * bf: 0.0019965 -> g0340_a86.spe 4 * bf: 0.0020691 -> g0380_a86.spe 5 * bf: 0.0031496 -> g0459_a86.spe 6 * bf: 0.0118014 -> g0496_a86.spe sum: -> sum_a86.spe
An example of the use of the gg program without expanding the gates to 'constant dispersion equivalent' spectra is given below (note: the program will automatically check if you have specified a lookup table or not).
tl%gg ang86 sd_sec_gates.gat _a86 will read primary gated matrix: ang86.mpg will read background matrix...: ang86.mbg will read matrix factor file..: ang86.fac tpx (1 level backgnd sub).....: ang86.tpx tpx (1 level backgnd sub).....: ang86.bgx generic file name id string...: _a86 will NOT use non-lin energy lookup table gatefile: sd_sec_gates.gat # of gates: 6 gate 1: name> 0257 - from 425 to 429 . . ... etc