next up previous contents
Next: wgtiflt Up: Stage-I programs Previous: wfotfits

wgain

WGAIN -----

FUNCTION Program to calculate the detector gain from IFC photons

USAGE wgain ifcfile gainfile [gtifile] [options]

DESCRIPTION Accumulate per given timebin the energy spectrum of all events (photons) from the input file. Analyze this spectrum to find the channel position of the peaks for the Fe_55 and Cd-109 radiation sources respectively. Convert the channel values to kEV and from the nominal peak energies calculate the gain factor for each of them.

CALCULATION -----------

For establishing the detector gain or spectral response use is made of the events that are produced by the In-Flight Calibration radiation sources as detected during the Normal Mode operation of the WFCs. Extracting the IFC events is done by program 'wgtiflt'. There are nine Fe-55 radiation sources of which eight are emitting about 0.2 photons per second and 1 producing 10 photons per second plus one Cd-109 soiurce emitting about 1 photon per second. The detector positions and boxes from where the photon events are taken are stored and updated in the detector calibration file (wfc#.det) as part of the data extension named 'califc'. Calculating the detector gain is done by program 'wgain'. Per specified number of seconds the spectrum of the energy bands are accumulated and analyzed for finding peaks in two different regions covering respectively the Fe-55 (channels 7 thru 19) and Cd-109 (channels 24-31). The channel peaks are converted to KeV to compare with the nominal energy peaks at 5.98 and 22.6 KeV respectively. The chennel to energy conversion values are stored and updated in the detector calibration file (wfc#.det) as part of the data extension named 'phakev'.

PARAMETERS

ifcfile [string] The name of the event input FITS file. The file is assumed to be time ordered and free of Pseudo-events and contains only events originating from In-Flight calibration sources.

gainfile [string] The name of the output gain file that contains one record (row) for each timebin. A row contains colomns (fields) for the Fe-55/Cd-109 gain, Fe-55/Cd-109 mean channel, and Fe-55/Cd-109 channel FWHM.

(gtifile = "-") [string] The name of the Good Time Interval FITS file to be used to filter the input table by rejecteing events not covered by any of the intervals. If omitted the entire input file is processed and no events are rejected.

(calfile1 = "-" ) [string] The name of the input FITS file that contains the channel to energy conversion tables. The data only pertains to events of SAX/WFC-1.

(calfile2="-" ) [string] Same as for calfile1, only used for SAX/WFC-2

(bintime=200000.) [double] The time in seconds per energy accumulation. Providing a sufficiently large number will result in a single gain value for the whole input file.

(blockio=yes) [boolean] Option to write output data files in fast block transfer mode. This may introduce a non-standerd FITS format that cannot be used across different computer systems.

(title=" ") [string] User caption to be tagged to each output FITS file header

(verbsty=0) [integer] The verbosity level will control the output volume.

EXAMPLE Calculate the gain per hour

ft> wgain ifc_events gain_table gtifile=gti_events bintime=3600

REMARKS - The program uses the parameter passing of the FTOOLS convention. - Calculating the efficiency may be done in future.

SEE ALSO wfotfits, wgtiflt



next up previous contents
Next: wgtiflt Up: Stage-I programs Previous: wfotfits



Mark Savenije
Sat Jan 18 15:04:49 MET 1997