NAME

bcfindloc -- Calculate the BURSTCUBE likelihood source position from multiple detectors simulated rate and create a localization map.

USAGE

bcfindloc infile outprefix burstgti attitude occultation emin emax

DESCRIPTION

This task calculates the BURSTCUBE likelihood positon of a source and outputs a file with a map in the primary header in AIT projection header and a first extension with HEAPIX representation. The values in the map represent the part of the sky occulted by the earth (pixel set to 0) or not occulted pixel set =1 and the pixels with the probably position have values between 0-1 (probability). It uses as input the occultaion map calculated by 'bcoccult', the attitude file relevant to the observation and the science array file output of 'bcevtreb', the gti file the output of 'bctimebst' and the calibration file containing the counts simulated for different models at differet sky location.

'bcfindloc' read the simulated calibration file, which contains theta, and phi and a HEAPIx value together with rates, and use the quaternians in the attitute within the gti to calculate new theta and phi appropriate to the obervation. The rates corresponding to the new theta and phi and the near 4 pixels are weighted average and the results places in pixel number of a HEAPIX map. This step is perform for each quaternian included in the burst interval and the maps for each quaternian are multiplied by the duration of the quanternian. All maps are summed together so that each pixel contains counts. This procedure is done for each detector.

The log-likehood is calculated for each pixel using the source and background counts, with the specific energy range, from the detectors expected counts file from CALDB adjusted for the attitude for each of the HEALPIx of the map. The likehood map is multiple by the occulatation map and the higher value within this map is the "best position location" of the event for that spectral simulated model.

If there are multiple models in the simulated CALDB file the task chooses the best model for the output map, but also save the maps for the different models in a file with prefix "temp". The task needs to have set the location of the REFDATA directory that contains the headers of the output file and the CALDB location to accees teh calibration data.

PARAMETERS

infile [file name]
Name of FITS files or @filename containing list of files (one per line). The file inputs for this task are the array files as genrated by 'bcrebevt'

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

burstgti [file name]
Name of the FITS good time interval file containing time interval for burst. The file inout for this task is the output of 'bctimebst'

attitude [file name]
Name of the FITS attitude file.

occultation [file name]
Name of the FITS Occultation file. This file input for this task is output of 'bcoccult'.

emin [float]
Minimum energy in keV to consider.

emax [float]
Maximum energy in keV to consider.

(simloc='CALDB') [string]
Name of the FITS file containing the simulated counts for a given model for each detector. Default will search CALDB

(extension='all') [string]
The simulated counts file contains several models layout one per extension. This paramater allows to specify the extension to use for specific models either comma-separated list (1,2,3...) or 'all' to use all extensions.

(poly=3) [int]
The order of the polynimial used to fit the background. The default is set to 3, a compromise to not overfitting the data and avoid edge effects. Not recommended to change.

(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' (hi dden).

EXAMPLES

  1. bcfindloc
  2. 
    

BUGS

SEE ALSO

LAST MODIFIED

Feb 2025