Last modified: December 2022

URL: https://cxc.cfa.harvard.edu/ciao/ahelp/acis_set_ardlib.html
AHELP for CIAO 4.16

acis_set_ardlib

Context: Tools::Response

Synopsis

Sets the bad pixel parameters of the ardlib file to the given file

Syntax

acis_set_ardlib  badpixfile [absolutepath] [ardlibfile] [verbose]

Description

This script tells ardlib to use the specified ACIS bad pixel file. It does this by setting the AXAF_ACIS<n>_BADPIX_FILE parameters in the ardlib parameter file for all the blocks in the input file which match the string "BADPIX<n>", and all the other ACIS badpixel values are set to CALDB. It does not work with HRC bad pixel files.

Each Chandra observation comes with an observation-specific bad pixel file (the *bpix1.fits file in the primary/ directory of the distribution). It is also possible to create a bad pixel file in CIAO, with the "acis_run_hotpix" tool (see "ahelp acis_run_hotpix"). See the "Use Observation-specific Bad Pixel Files" and "Identify ACIS Hot Pixels and Cosmic Ray Afterglows" threads for more information.


Examples

Example 1

unix% acis_set_ardlib bpix1.fits

This sets the ACIS bad pixel parameters to use bpix1.fits, for all the BADPIX<n> blocks in that file. The script will print out the settings of all the AXAF_ACIS<n>_BADPIX_FILE parameters and the location of the ardlib parameter file. For example, if the bad-pixel file is in the directory /data/source/repro/ and only contains a BADPIX7 block then the output would look like:

Updated ardlib parameter file: /home/ciaouser/cxcds_param4/ardlib.par
  AXAF_ACIS0_BADPIX_FILE -> CALDB
  AXAF_ACIS1_BADPIX_FILE -> CALDB
  AXAF_ACIS2_BADPIX_FILE -> CALDB
  AXAF_ACIS3_BADPIX_FILE -> CALDB
  AXAF_ACIS4_BADPIX_FILE -> CALDB
  AXAF_ACIS5_BADPIX_FILE -> CALDB
  AXAF_ACIS6_BADPIX_FILE -> CALDB
  AXAF_ACIS7_BADPIX_FILE -> /data/source/repro/bpix1.fits[BADPIX7]
  AXAF_ACIS8_BADPIX_FILE -> CALDB
  AXAF_ACIS9_BADPIX_FILE -> CALDB

Example 2

unix% acis_set_ardlib ../bpix1.fits

This sets the ACIS bad pixel parameters to use ../bpix1.fits. Using the default parameter settings - namely absolutepath=yes - means that the file name will be changed to an absolute path before the parameter names are set.

Example 3

unix% acis_set_ardlib bpix1.fits verbose=0

This runs the script without producing any screen output.


Parameters

name type ftype def min max reqd
badpixfile string input ""     yes
absolutepath boolean   yes      
ardlibfile string input ardlib      
verbose integer   0 0 5  

Detailed Parameter Descriptions

Parameter=badpixfile (string required filetype=input default="")

Bad pixel file for the observation.

This parameter is used to specify the name of the bad pixel file to use in the ardlib parameter file. It is searched for blocks that are called "BADPIX<n>", and the corresponding AXAF_ACIS<n>_BADPIX_FILE parameters in ardlib are set. Those chips which do not have a BADPIX block are set to "CALDB".

Parameter=absolutepath (boolean default=yes)

Use an absolute path in the parameter file.

Should the AXAF_ACIS<n>_BADPIX_FILE parameters use the absolute path to the bad pixel file? If set to yes then the current working directory is prepended to the badpixfile parameter, which is then cleaned up to remove all occurrences of "." and "..". If set to no then the badpixfile parameter is used.

The following table shows what the AXAF_ACIS0_BADPIX_FILE parameter would be set to when:

absolutepath parameter AXAF_ACIS0_BADPIX_FILE setting
yes /data/chandra/obs/bpix1.fits[BADPIX0]
no ../obs/bpix1.fits[BADPIX0]

Parameter=ardlibfile (string filetype=input default=ardlib)

Parameter file to change.

The name of the parameter file to change. This should be left as "ardlib" for most users.

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

Verbosity (0 for no screen output)

If set to 0 then the script will produce no screen output, other than parameter prompts, unless there is an error. When set to the default value of 1, the script will display the values of the AXAF_ACIS<n>_BADPIX_FILE parameters after it has set them. Values of 2 and higher provide debugging information.


Changes in the scripts 4.8.1 (December 2015) release

The code has been updated to avoid warning messages from NumPy version 1.9. There is no difference to how the script behaves.

Changes in the scripts 4.7.2 (April 2015) release

Missing chips are set to CALDB

The script now sets the AXAF_ACIS<n>_BADPIX_FILE parameters to CALDB if there is no corresponding BADPIX<n> block in the bad-pixel file. This was done to avoid problems when switching between observations, which could lead to invalid (or missing) bad-pixel files being used.

About Contributed Software

This script is not an official part of the CIAO release but is made available as "contributed" software via the CIAO scripts page. Please see this page for installation instructions.


Bugs

There are no known bugs for this tool.

See Also

calibration
ardlib
psf
psf
tools::aspect
asphist, dither_region
tools::background
acis_bkgrnd_lookup, hrc_bkgrnd_lookup, readout_bkg
tools::composite
combine_grating_spectra, combine_spectra, specextract
tools::coordinates
sky2tdet
tools::core
dmextract
tools::response
acis_fef_lookup, addresp, dmarfadd, eff2evt, find_mono_energy, fullgarf, make_instmap_weights, mean_energy_map, mkacisrmf, mkarf, mkexpmap, mkgarf, mkgrmf, mkinstmap, mkpsfmap, mkrmf, mkwarf, psf_project_ray, rmfimg
tools::statistics
aprates