NAME

bcrebevt -- Rebin event data by time and energy or prepare binned data for subsequent analysis and plot the results

USAGE

bcrebevt infile outdir chanbin (ebounds) (rebin) (timebin) (plotbin)

DESCRIPTION

BurstCube collect the data in three different modes: The BurstsCube science data are collected in three different modes: Trigger Time Tag Event (T3E or Requested Time Tag Event, RTTE), Alert Trigger Data (ATD) and Continuous Binned Data (CBD). Data are collected on board by events. The events collected are binned on board and send on ground as CBD data where a channel spectra is calculated every NN seconds. If a trigger occurs the data are downloaded as T3E as well as the ATD. The FITS data format for CBD and ATD consists of a table with a TIME column and an column contains an array with counts accumlated in 16 channels instead the T3E has in each row the time of the event and channel. The ADT icludes time interval only around the burst and the FITS file contains several extensions with different time binned 0.064s, 0.256s, 1.024s, 4.096s. The CBD file contains one extension with a single binning time.

This task prepares the data with a common data format for following analysis by creating a FITS output file with three extensions. The first extension contains :a) a TIME column, b) a COUNTS column with array of counts in different channels (spectrum) and c) a SUMCOUNTS column with the sum of the counts in the array. The output file is equispaced in time and is referenced in this help and other burstcube tasks as array. The other two extesions contains the Good Time Interval (GTI) and the Energy Boundary (EBOUND) information. If the input is an event file the data are rebinned by channel (see paramater chanbind) and time (see parameter timebin). To rebin by energy it requires the CALDB files that contain the channel number and the associated energy (EBOUND) and the REBIN file that contains the channel minimun, maximum and the rebinning factor. For BurstCube there are only two possible spectral rebinning : 64 channels or 16 channels. If the input file is a CBD or ADT the data are with not rebinned neither by time or energy and the output is identical to the input with the column SUMCOUNTS added as well as the GTI and EBOUND extensions. If the input file is an ADT, the extension would need to be specified when input the else by default the task will use the first extension.
The task also creates plots to show the lightcurve and spectrum for each detector and the data used in the plots are also written in a corresponding text files. 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.

PARAMETERS

infile [file name]
Name of FITS files or @filename containing list of files (one per line). The extension may be specified within this parameter by adding to the filename +N or [N] where N is the extension number

outprefix [string]
Prefix to be used by all output files by this task.

timecol=TIME [string]
Name of the column containing the time information. By default is set to TIME.

rebincol=PHA [string]
Name of the column containing the information for the channel binning. By default is set to PHA. The channel binning is only applicable to the EVENT file

chanbin=16 [int]
Number of channels to rebin the EVENT data. Possible values are 16 or 64. The parameter does not apply to ADT and CBD which have counts already in 16 channels.

(ebounds=CALDB) [string]
Name of the FITS calibration file containing the energy bundaries (file with the EBOUNDS extension) for each detector. By deafult is set to CALDB and the file is read from teh Calibration Database.

(rebin=CALDB) [string]
Name of the FITS calibration file containing the rebinning scheme (file with the REBIN extension) for each detector. By deafult is set to CALDB and the file is read from the Calibration Database. NOTE the rebinning ofr this input file needs to be consistent with the value in the parameter chanbin.

timebin=0.032 [double]
Time bin width in seconds used to rebin the input EVENT data. This is not applicable if the input file contains CBD or ATD data

(plotbin=0.128) [double]
Bin width in seconds used for lightcurve plots.

(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 value 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 teh 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

  1. bcrebevt infile=@data.lis outfrefix=temp timecol=TIME rebincol=PHA chanbin=64 timebin=0.032
  2. 
    

BUGS

SEE ALSO

LAST MODIFIED

Mar 2024