NAME
bcprod -- Create lightcurves and spectra for a given burst from a time dependent spectral array data and GTI
USAGE
bcprod infile outprefix burstgti radec erange1 erange2 erange3 timebin1 timebin2 (poly) refdata
DESCRIPTION
This tasks takes as input files a list of array files (one file per detector) as created by bcrebevt and the GTI
created from bctimebst and calculates lightcurve files, spectral files and plots of the products.
'bcprod' reads the total time interval on burst and on background extensions from the GTI file
and uses these time periods to calculate the spectra.
For the source spectra (one for each detectors) it adds all counts per channels within the total time on burst.
For the background it fits the data with a polynomial of the order specified by the parameter poly.
The fitting is performed channel by channel and background values are interpolated for the burst time
region based on background fit. The background spectra (one per detectors) are output as results of this
procedure and background value for the lightcurves are stored with the lightcurve output.
From the input parameter 'radec', 'bcprod' queries CALDB to retrieve the appropriate response file
and write the filename in the source spectral file in the keyword "RESPFILE".
The spectral files output are; a) source and background as type I format where there is one spectrum for
the entire time interval, b) source and background as type II format where there is one spectrum for each
timebin as for the original array input data file.
The lightcurves are extracted in three energy bands (see parameters 'erange1', 'erange2', 'erange3')
and the total band with two different time binning (see parameters 'timebin1' and 'timebin2')
for each of the detectors.
The layout of the lightcurve for each detector contains eight extensions: four are using the 'timebin1' where
each has data for a specific energy band and similarly the other four with 'timebin2'.
Each extension contains the backgroud subtracted rate and error (RATE and ERROR columns), the
not background subtracted rate and error (TOTRATE and TOTRATE_ERROR columns) and the background rate
and error (BKGRATE and BKGRATE_ERROR columns)
'bcprod' also creates plots to show the lightcurves in all the available bands for each of the detectors
and the spectra for each detector together with the backgroud spectrum.
The task requires to have the CALDB and REFDATA environment variables set, the first is used for the calibration file
the second for the FITS template header of the output.
This task is applicable to BURSTCUBE or to diffent mission that provides the science and CALDB data in the same format.
PARAMETERS
- infile [file name]
- Name of FITS files or @filename containing list of files (one per line).
- outprefix [string]
- Prefix for all output files.
- burstgti [file name]
- GTI file containing the source and background times for detected burst. (Output from bctimebst)
- (radec=NONE) [string]
- Right Ascension and Declination in the form "ra,dec".
- erange1='50,100' [string]
- First energy range in the format 'low,high'. Units: keV
- erange2='100,300' [string]
- Second energy range in the format 'low,high'. Units: keV
- erange3='300,1000' [string]
- Third energy range in the format 'low,high'. Units: keV
- timebin1=0.064 [double]
- First binwidth to do rebinning by. Units: seconds
- timebin2=1.0 [double]
- Second binwidth to do rebinning by. Units: seconds
- (poly=3) [int]
- Order of polynomial for background fitting.
- (refdata=REFDATA) [string]
- Directory name where the FITS template for the output are located. By default this is set to enviroment variable
REFDATA.
- (chatter=1) [int]
- Level of chatter/verbosity of the task. Allow values are between 0-5 default is 1.
- (log=no) [bool]
- Flag to allow the log file creation. By default the log file is not created (log=no), if the parameter log is
set to 'yes' a log is created with a filename set to taskname_DDMMYYYY_HHMMSS.log.
- (clobber=no) [bool]
- Flag to overwrite existing output files. By default the file output are not overwrite (clobber=no)
- (mode = ql) [string ql|hl|q]
- Mode to query the parameter file. Acceptable values include:
'ql' (query and learn/remember), 'hl' (hidden and learn/remember), 'q' (query but don't remember), 'h' (hidden).
EXAMPLES
- bcprod infile=@data.lis outprefix=evt burstgti=burst.gti erange1='10,100' erange2='100,200' /
erange3='200,500' timebin1=0.064 timebin2=1 poly=2 refdata=REFDATA
BUGS
SEE ALSO
LAST MODIFIED
Feb 2025