About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/acis_build_badpix.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 acis_build_badpix Context: tools

Synopsis

Create an observation-specific bad-pixel file

Syntax

acis_build_badpix pbkfile berrfile calibfile biasfile evt0file outfile
[pbkext] [berrext] [maxerr] [procbias] [biasthresh] [evtsext]
[writebias] [outbias] [obsfile] [clobber] [verbose]

Description

The tool acis_build_badpix has two related uses. First, it is used to create an observation-specific bad-pixel file. The input for this file includes a list of known bad pixels and columns from the calibration database, observation-specific bias-parity error files (if any), and bias maps. The bias maps may be searched for pixels that have unusually high or low bias values. When appropriate, pixels adjacent to bad pixels are also identified as bad.

Second, acis_build_badpix is one of the tools in the hot-pixel tool suite. The bad-pixel output file of the tool acis_classify_hotpix is reprocessed using acis_build_badpix to insure that pixels adjacent to hot pixels are identified as bad, if necessary.

The output bad-pixel file includes the columns SHAPE ("point" or "rectangle"), COMPONENT (a sequential ID number), CHIPX, CHIPY, TIME (the beginning of the observation or cosmic-ray afterglow), TIME_STOP (the end of the observation or afterglow) and STATUS (a bit-encoded description of the reason a pixel is identified as bad (see table below).

Reasons a pixel is identified as "bad"

Bit Meaning
0 Known bad pixel
1 Known bad column
2 Bias-parity error
3 Bias value is 4095 adu.
4 Bias value is 4094 adu.
5 CHIPX is 1 or 1024 (i.e. inactive columns). [obsolete]
6 In timed-exposure mode observations, CHIPY is 1 or 1024 (i.e. inactive rows). [obsolete]
7 User defined
8 The pixel is horizontally, vertically or diagonally adjacent to a bad pixel.
9 For TIMED VFAINT mode observations, CHIPX is 2 or 1023 or CHIPY is 2 or 1023 (i.e. avoid having a 5 x 5 event island overlap the edge of a CCD). [obsolete]
10 For TIMED VFAINT mode observations, the pixel is horizontally, vertically or diagonally adjacent to a pixel for which bit eight is set to one. [obsolete]
11 CHIPX is 512 or 513. The events in these columns are often due to cosmic rays.
12 CHIPX is 256, 257, 768 or 769. The events in these columns are often due to cosmic rays.
13 FEP0 problem
14 The tools acis_find_hotpix and acis_classify_hotpix identified the pixel as being hot.
15 The tools acis_find_hotpix and acis_classify_hotpix identified the pixel as having a cosmic-ray afterglow. The start and stop times of the afterglow are specified in the columns TIME and TIME_STOP, respectively.
16 The tool acis_build_badpix identified the pixel as having a bad bias value.

Example 1

acis_build_badpix pbkfile="acisf079650447N002_pbk0.fits"
berrfile="none" calibfile="CALDB" biasfile=@bias_list.txt
evt0file="none" outfile="tmp1_bpix1.fits"
obsfile="axaff00732_000N002_obs0a.par"

In this example, the output bad-pixel file tmp1_bpix1.fits includes pixels and columns identified as bad in the CALDB file and pixels that have unusually large or small bias values. The file bias_list.txt includes the names of the bias map(s) for the observation, with one file name per line. There are no bias-parity error files for this observation. No Level 0 event files are used as input, because the observation was not performed using faint-with-bias mode. The output file is used as input for the tool acis_find_hotpix.

While the bias and bias-error files can be excluded, users are encouraged to include them as part of the input. Otherwise, some bad pixels may be overlooked.

Example 2

acis_build_badpix pbkfile="acisf079650447N002_pbk0.fits"
berrfile="none" calibfile="tmp2_bpix1.fits" biasfile=@bias_list.txt
evt0file="none" outfile="acisf00732_999N002_bpix1.fits"
obsfile="axaff00732_000N002_obs0a.par"

In this example, the input file tmp2_bpix1.fits is not a bad-pixel file in the calibration database, but the output of the tool acis_classify_hotpix. The output file created by acis_build_badpix includes pixels and columns identified as bad in the input file and, in some cases, pixels adjacent to the pixels in the input file. The output bad-pixel file should be used as input when making an imaging or grating ARF (see mkarf, mkgarf, mkwarf and acisspec) or when making an instrument map (see mkinstmap) by editing the ardlibpar file.

Parameters

name type ftype def min max reqd stacks
pbkfile file input       yes  
berrfile file input       yes yes
calibfile file input CALDB     yes  
biasfile file input       yes yes
evt0file file input none     yes yes
outfile file output       yes  
pbkext string   PBK     no  
berrext string   BERR     no  
maxerr integer   10     no  
procbias boolean   yes     no  
biasthresh integer   6 3 100 no  
evtsext string   EVENTS     no  
writebias boolean   no     no  
outbias string         yes  
obsfile string input       no  
clobber boolean   no     no  
verbose integer   0 0 5 no  

Detailed Parameter Descriptions

Parameter=pbkfile (file required filetype=input)

The name of the input parameter-block file (e.g. acisf079650447N002_pbk0.fits). The parameter-block file is used to determine which CCDs are active, the READMODE and DATAMODE and the values of CCD_ID, FEP_ID, ROWCNT, STARTROW, TSTART, TSTOP etc.

Parameter=berrfile (file required filetype=input stacks=yes)

The name(s) of the optional input bias-parity error file(s), if there are any. Pixels that have bias-parity errors are written to the output bad-pixel file. Occasionally, the pixels (CHIPX,CHIPY) = (1023,1) and (1024,1) are reported to have bias-parity errors for TIMED VFAINT mode observations even if the pixels are fine. This problem is due to the manner in which TIMED VFAINT mode data is handled onboard. The problem does not occur for other observing modes. The bias-parity data also provides a diagnostic for the rare "FEP0" problem (see maxerr).

Parameter=calibfile (file required filetype=input default=CALDB)

The name of the input bad-pixel file. This file may be a CALDB file, an observation-specific bad-pixel file (e.g. "acisf00732_000N002_bpix1.fits") or a file created by the tool acis_classify_hotpix. If a bias map is searched for pixels with unusually high or low bias values, then the pixels known to be bad are excluded from the search.

Parameter=biasfile (file required filetype=input stacks=yes)

The name(s) of the optional input bias map(s) for the observation (e.g. acisf079649146N002_0_bias0.fits). Pixels that have bias values of 4094 or 4095 adu are written to the output bad-pixel file. If procbias=yes, then the bias map(s) is searched for pixels whose bias values are either too low or too high (see biasthresh). If the bias value of a pixel is found to be too low or too high, the pixel is identified as bad in the output file.

Parameter=evt0file (file required filetype=input default=none stacks=yes)

If the observation was performed in faint-with-bias mode and an output bias map(s) is desired (i.e. writebias=yes), then the name(s) of the input Level 0 event data file(s) (e.g. acisf079650447N002_0_evt0.fits) must be specified using the parameter evt0file. The prefix of the name(s) of the output bias map(s) is specified using the parameter outbias.

Parameter=outfile (file required filetype=output)

The name of the output bad-pixel file. This file includes a list of the bad pixels and columns in the input bad-pixel file. The output file may also include the pixels adjacent to bad pixels and columns and pixels associated with bias errors or bad bias values.

Parameter=pbkext (string not required default=PBK)

The name (EXTNAME) of the extension in the parameter-block file that includes information about the active CCDs.

Parameter=berrext (string not required default=BERR)

The name (EXTNAME) of the extension in the bias-error file(s) that includes information about bias-parity errors.

Parameter=maxerr (integer not required default=10)

If a CCD has more than maxerr bias-parity errors, then the CCD is most likely suffering from the "FEP0" problem and the entire top half of the CCD is marked as bad. This problem is rare. The default value of this parameter should be adequate in most cases. Be cautious about using some other value.

Parameter=procbias (boolean not required default=yes)

If procbias=yes, then the bias map(s) is searched for pixels that have suspiciously high or low bias values. Pixels with suspicious bias values are written to the output file.

Parameter=biasthresh (integer not required default=6 min=3 max=100)

This parameter is used to determine which pixels in a bias map have suspiciously high or low values. Before performing the test, the median bias value of a column of a CCD is subtracted from the bias values of all the pixels in the column to obtain the adjusted biases. Pixels identified as bad in the calibration, bias-err and bias-map files are excluded from the computation of the median. If the adjusted-bias value of a pixel > biasthresh adu or < -biasthresh adu, then the pixel is identified as bad and written to the output file. The default value of this parameter should be adequate in most cases. Be cautious about using some other value.

Parameter=evtsext (string not required default=EVENTS)

The name (EXTNAME) of the extension in the Level 0 event-data file(s) that includes the list of event information.

Parameter=writebias (boolean not required default=no)

If writebias=yes and the input includes Level 0 faint-with-bias mode event-data file(s), then a bias map will be created for each CCD used from the bias information in the event file(s). The file name prefix for each bias is specified by the parameter outbias.

Parameter=outbias (string required)

The file name prefix of the output bias map(s) created if writebias=yes and the input includes faint-with-bias mode Level 0 event-data file(s).

Parameter=obsfile (string not required filetype=input)

The name of the input observation-parameter file (e.g. axaff00732_000N002_obs0a.par). This file is used to populate some of the header keywords of the output file. If you do not have the file, it can be created from the header of a Level 1 or Level 2 event file by using the tool dmmakepar.

Parameter=clobber (boolean not required default=no)

If clobber=yes and a file exists that has the same name as the name of the output file, then the existing file is overwritten. If clobber=no, then the existing file remains unchanged.

Parameter=verbose (integer not required default=0 min=0 max=5)

This parameter determines the amount of messages that is generated by acis_build_badpix. If verbose=0, very few messages are reported. If verbose=5, the largest amount of messages is produced.

CHANGES IN CIAO 3.4

STATUS

If a pixel is bad for more than one reason, then the STATUS value for the pixel has a bit set to one for each reason.

CHANGES IN CIAO 3.3

Parameter File

The outbias parameter has been changed to be a hidden parameter. The kernel parameter has been removed.

CHANGES IN CIAO 3.2.2

The use of STATUS bit ten has been disabled. The pixels in the output file will not have bit ten set to one. If bit ten is set to one in the input file, the bit will be set to zero.

Bit ten is associated with the sixteen pixels around the outer edge of a 5 pixel x 5 pixel island. Originally, if a pixel was identified as bad, then these sixteen pixels had bit ten set to one to identify them as being "adjacent" to a bad pixel if the observation was performed in TIMED VFAINT mode. As a result, if any of the pixels in a 5 pixel x 5 pixel event island were bad, then the event was flagged as being bad and excluded from the Level 2 event data file. However, only the central 3 pixel x 3 pixel event island is used to compute the pulse height (PHA, ENERGY, PI) and grade (FLTGRADE and GRADE). To avoid discarding events unnecessarily, the code was changed to disable the use of bit ten. Note that bit eight is still used. Therefore, if any of the eight pixels around the outer edge of a 3 pixel x 3 pixel island are bad, the event is flagged as being bad and excluded from the Level 2 event data file. The outer sixteen pixels are only used to search for potential cosmic-ray events if check_vf_pha=yes.

Bugs

See the bugs page for this tool on the CIAO website for an up-to-date listing of known bugs.

Hardcopy (PDF): A4 | Letter
Last modified: December 2006



The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.