The on-ground Bad Pixel CALDB File contains for each pixel a column 'TIME' including the mission elapsed time at which the pixel is first recognized as bad. The Disabled Pixel File stores the list of pixels disabled by the on-board software which, for the current observation, monitors the behaviour of each detector pixel in discrete time intervals. The Disabled Pixel File also stores, for each disabled pixel, the corresponding time interval in the columns 'TIME' and 'TIME_STOP'.
All events are checked and flagged using the information obtained from the input bad pixel files. The user has an option to choose which bad pixel file to use. For the on-ground Bad Pixel CALDB File the task reads the 'TIME' column and, for a given observation, considers only the pixels identified as bad at the observation start date. In the case of the Disabled Pixel File, the pixels are flagged as bad by the task only during the time interval between the values of the columns 'TIME' and 'TIME_STOP'.
To flag events, the 'nuflagbad' module adds a new column, named 'STATUS', to the event file. The format of this column is a 16-bit binary number. The value of the 'STATUS' column specifies the quality of the flagging (i.e. if the event falls on a stable bad pixel from the on-ground CALDB File or on an on-board disabled pixel).
The task also flags events if any of the 8 neighborhood pixels falls on a bad pixel or outside the detector boundaries (i.e. the event is located on a detector edge). The position of these neighbor pixels is stored in a new column 'BADPOS' added by the task. The format of this column is a 8-bit binary number.
A specific keyword named 'NUFLAG' is added in the output file by the task.
The list of flags in the 'STATUS' column is the following:
Events STATUS flagsb0000000000000000 Good event b0000000000000001 Event falls in a bad pixel from on-ground CALDB Bad Pixel File b0000000000000010 Event falls in a bad pixel from on-board disabled pixel b0000000000000100 Event falls in a bad pixel from user bad pixel file b0000000000001000 Event has a neighbor bad from bad/disabled/user pixel list b0000000000010000 Event falls in a detector edge pixel
The list of bad pixels is stored in four distinct new extensions, named 'BADPIX', one for each of the four detectors. Optionally, if requested by the user through the parameter 'outbpfile', the bad pixels list is also written in a separate output file.
The bad pixel extensions contain the positional and temporal information and a 16-bit binary number column, named 'BADFLAG', indicating the class of the bad pixel with the following meaning:
Bad pixels BADFLAG flagsb0000000000000001 Bad pixel from on-ground CALDB Bad Pixel File b0000000000000010 Disabled pixel from on-board software b0000000000000100 Bad pixel in the file provided by the user
> nuflagbad infile=nu40060001001A_uf.evt outfile=nu40060001001A_out.evt dispixfile=nu40060001001A_dspx.fits outbpfile=nu40060001001A_bp.fits
> nuflagbad infile=nu40060001001A_uf.evt outfile=nu40060001001A_out.evt dispixfile=nu40060001001A_dspx.fits userbpfile=userbadpix.fits outbpfile=NONE