batdetmask - retrieve BAT gross detector quality map from CALDB


batdetmask date outfile


batdetmask retrieves a gross detector quality map (bad pixel map) from CALDB for the time of a given observation. This quality map is meant to reflect any operational issues that affected the BAT science data quality which are not easily extractable from the filter file or other telemetry. The user is not excused from doing other routine quality filtering, for example for SAA or noisy detectors. Thus, this task is most useful for doing gross filtering of data at the observation level to remove detectors with known bad data.

The master quality maps are stored in CALDB. This task is merely an interface to retrieve the correct map for the right time. The user can specify the time explicitly, or an FITS file which contains the time in a header keyword. The retrieved quality map can also be combined with an existing user quality map using the detmask parameter.

The result is a detector quality map suitable for input to any BAT task which accepts the detmask parameter.


date [string]
The date of observation. This can be either the date of the exact form "YYYY-MM-DDThh:mm:ss"; OR the Swift mission elapsed time in seconds as a real number; OR a file name which contains the observation time in a header keyword.

outfile [filename]
Name of the output detector quality map file.

(keyword = "TSTART") [string]
If the "date" parameter specifies a file, then the file is searched for a header keyword of this name. The keyword value may be of either of the time formats listed for the "date" parameter.

(detmask = "NONE") [string]
The name of a user quality map which should be combined with the one from CALDB, or NONE if only the CALDB map is desired.

(outcaldbmask = "NONE") [string]
Upon return, this parameter is set to the global quality map and extension found from CALDB which matches the time of the observation.

(outdetmask = "NONE") [string]
Upon return, this parameter is set to the detector mask which was selected (including file name and extension), based on the time of the observation.

(clobber = NO) [boolean]
If the output file already exists, then setting "clobber = yes" will cause it to be overwritten.

(chatter = 2) [integer, 0 - 5]
Controls the amount of informative text written to standard output.


1. Retrieve the detector quality map for June 5, 2005,

        batdetmask 2005-06-05T00:00:00 master.detmask
2. Retrieve the detector quality map based on the TSTART keyword in file myfile.dpi.
        batdetmask myfile.dpi master.detmask keyword=TSTART




Aug 2007