Setting the Observation-specific Bad Pixel Files
CIAO 4.16 Science Threads
Overview
Synopsis:
The observation-specific bad pixel list must be set by the user in the ardlib.par parameter file when beginning any analysis session. The bad pixel list contains both the known bad pixels and columns for each chip, plus any additional ones for that specific observation.
Purpose:
To set the observation-specific bad pixel file for an analysis session. This ensures that the tools will locate the proper bad pixel file in ardlib.par when it is needed.
Related Links:
- Analysis Guide: ACIS Data Preparation
- Analysis Guide: HRC Data Preparation
-
HRC bad pixel calibration: In general, there are very few bad pixels in the HRC and they are mostly at the edges of the data.
Last Update: 13 Jan 2022 - Review for CIAO 4.14. Update file name version to match Repro5.
Contents
- Get Started
- Reminder: Reset ardlib Between Analysis Sessions
- ACIS Observations
- HRC Observations
- Check the Local ardlib.par File
- Summary
- Parameter files:
- History
Get Started
Download the sample data: 1843 (ACIS-I, G21.5-0.9); 144 (HRC-I, G21.5-0.9); 1557 (HRC-S, G21.5-09)
unix% download_chandra_obsid 1843,144,1557 evt2,bpix
If you have created a new bad pixel file by following one of these threads:
- Reprocessing Data to Create a New Level=2 Event File thread
- Customizing an ACIS Bad Pixel File thread
- New Observation-Specific HRC Bad Pixel File thread
use that file in this thread. Otherwise, use the bpix1.fits file from the Archive.
In the following examples, these filenames will be used:
-
ACIS: /data/ObsID1843/acis1843_repro_bpix1.fits
(created with the ACIS hot pixel tools) -
HRC-I: /data/ObsID144/secondary/hrcf00144_000N009_bpix1.fits
-
HRC-S: /data/ObsID1557/secondary/hrcf01557_000N005_bpix1.fits
Reminder: Reset ardlib Between Analysis Sessions
Use caution when analyzing more than one dataset; either "punlearn" or delete the ardlib.par file before you start processing another dataset.
If you find that tools/scripts complain about being unable to find the bad pixel file for an observation that is different from the one you are observing, chances are that you have not cleaned out your ardlib.par file.
ACIS Observations
The process of setting the bad pixel parameters for an ACIS observation has been simplified with the acis_set_ardlib script. If users prefer, it is also possible to set the parameters manually.
Running acis_set_ardlib
The absolutepath parameter ("yes" by default) tells the script to include the complete path to the file in ardlib.par, as shown in this example:
unix% punlearn ardlib unix% pwd /data/ObsID1843 unix% acis_set_ardlib acis1843_repro_bpix1.fits Updated ardlib parameter file: /home/username/cxcds_param4/ardlib.par AXAF_ACIS0_BADPIX_FILE -> /data/ObsID1843/acis1843_repro_bpix1.fits[BADPIX0] AXAF_ACIS1_BADPIX_FILE -> /data/ObsID1843/acis1843_repro_bpix1.fits[BADPIX1] AXAF_ACIS2_BADPIX_FILE -> /data/ObsID1843/acis1843_repro_bpix1.fits[BADPIX2] AXAF_ACIS3_BADPIX_FILE -> /data/ObsID1843/acis1843_repro_bpix1.fits[BADPIX3] AXAF_ACIS4_BADPIX_FILE -> CALDB AXAF_ACIS5_BADPIX_FILE -> CALDB AXAF_ACIS6_BADPIX_FILE -> /data/ObsID1843/acis1843_repro_bpix1.fits[BADPIX6] AXAF_ACIS7_BADPIX_FILE -> /data/ObsID1843/acis1843_repro_bpix1.fits[BADPIX7] AXAF_ACIS8_BADPIX_FILE -> CALDB AXAF_ACIS9_BADPIX_FILE -> CALDB
It is recommended that the script be run with absolutepath=yes so that the correct bad pixel file is accessed, regardless of the working directory.
The content of the parameter file may be checked using plist acis_set_ardlib.
Optional: Setting the ACIS parameters manually
If you prefer, it is possible to set the ARDLIB parameters manually instead. First determine which chips were on for the observation, then set the appropriate parameters. This example uses the foreach syntax for the csh or tcsh shell. If you are using another shell, e.g. bash, change the loop syntax accordingly.
unix% dmkeypar acisf01843N002_evt2.fits DETNAM echo+ ACIS-012367 unix% foreach d ( 0 1 2 3 6 7 ) foreach? pset \ ardlib AXAF_ACIS${d}_BADPIX_FILE = \ "/data/ObsID1843/acis1843_repro_bpix1.fits[BADPIX${d}]" foreach? end
HRC Observations
Setting the bad pixel file for HRC observations is straightforward, as there is only one ARDLIB parameter each for HRC-S and HRC-I.
- HRC-I
-
unix% pset ardlib \ AXAF_HRC-I_BADPIX_FILE=/data/ObsID144/secondary/hrcf00144_000N009_bpix1.fits
- HRC-S
-
unix% pset ardlib \ AXAF_HRC-S_BADPIX_FILE=/data/ObsID1557/secondary/hrcf01557_000N005_bpix1.fits
Check the Local ardlib.par File
Verify that ardlib.par now references the correct bad pixel files (this example shows the files for all three detectors):
unix% plist ardlib | less Parameters for /home/username/cxcds_param4/ardlib.par # Ardlib parameter file # Non-absolute file names are searched in the directories given # by the ArdlibDataPath variable. ArdlibDataPath = $ASCDS_CALIB Directory containing data files #=========================================================================== # Generic Mission Support #=========================================================================== . . (lines omitted) . #--------------------------------------------------------------------------- # AXAF ACIS Bad Pixel Files # Use "NONE" to ignore bad pixels. #--------------------------------------------------------------------------- AXAF_ACIS0_BADPIX_FILE = /data/ObsID1843/acis1843_repro_bpix1.fits[BADPIX0] Enter ACIS-0 Bad Pixel File AXAF_ACIS1_BADPIX_FILE = /data/ObsID1843/acis1843_repro_bpix1.fits[BADPIX1] Enter ACIS-1 Bad Pixel File AXAF_ACIS2_BADPIX_FILE = /data/ObsID1843/acis1843_repro_bpix1.fits[BADPIX2] Enter ACIS-2 Bad Pixel File AXAF_ACIS3_BADPIX_FILE = /data/ObsID1843/acis1843_repro_bpix1.fits[BADPIX3] Enter ACIS-3 Bad Pixel File AXAF_ACIS4_BADPIX_FILE = CALDB Enter ACIS-4 Bad Pixel File AXAF_ACIS5_BADPIX_FILE = CALDB Enter ACIS-5 Bad Pixel File AXAF_ACIS6_BADPIX_FILE = /data/ObsID1843/acis1843_repro_bpix1.fits[BADPIX6] Enter ACIS-6 Bad Pixel File AXAF_ACIS7_BADPIX_FILE = /data/ObsID1843/acis1843_repro_bpix1.fits[BADPIX7] Enter ACIS-7 Bad Pixel File AXAF_ACIS8_BADPIX_FILE = CALDB Enter ACIS-8 Bad Pixel File AXAF_ACIS9_BADPIX_FILE = CALDB Enter ACIS-9 Bad Pixel File #--------------------------------------------------------------------------- # AXAF HRC-I #--------------------------------------------------------------------------- AXAF_HRC-I_QE_FILE = CALDB Enter HRC-I Mean QE file AXAF_HRC-I_QEU_FILE = CALDB Enter HRC-I Mean QE file AXAF_HRC-I_BADPIX_FILE = /data/ObsID144/secondary/hrcf00144_000N009_bpix1.fits Enter HRC-I Badpix file #--------------------------------------------------------------------------- # AXAF HRC-S #--------------------------------------------------------------------------- AXAF_HRC-S1_QE_FILE = CALDB Enter HRC-S1 Mean QE file AXAF_HRC-S2_QE_FILE = CALDB Enter HRC-S2 Mean QE file AXAF_HRC-S3_QE_FILE = CALDB Enter HRC-S3 Mean QE file AXAF_HRC-S1_QEU_FILE = CALDB Enter HRC-S1 QE Uniformity file AXAF_HRC-S2_QEU_FILE = CALDB Enter HRC-S2 QE Uniformity file AXAF_HRC-S3_QEU_FILE = CALDB Enter HRC-S3 QE Uniformity file AXAF_HRC-S_BADPIX_FILE = /data/ObsID1557/secondary/hrcf01557_000N005_bpix1.fits Enter HRC-S Badpix file . . (lines omitted) .
Note that the parameter file now resides in the local parameter directory (/home/username/cxcds_param4) as a result of the pset steps. All the CIAO tools will now access this version rather than the default one.
Summary
Again, remember to "punlearn" or delete your ardlib.par file after completing analysis of this dataset to ensure that the proper bad pixel maps are used the next time that ardlib.par is referenced by a tool.
Parameters for /home/username/cxcds_param/acis_set_ardlib.par badpixfile = acis1843_repro_bpix1.fits Bad pixel file for the observation (absolutepath = yes) Use an absolute path in the parameter file (ardlibfile = ardlib) Parameter file to change (verbose = 1) Verbosity (0 for no screen output) (mode = ql)
History
05 Jan 2005 | updated for CIAO 3.2: ardlib.par has new contamination file parameters; added information on creating a new bad pixel file with the acis hot pixel tools |
20 Jan 2005 | revised to use new version of the acis_set_ardlib script; separated ACIS and HRC sections |
08 Dec 2005 | reviewed for CIAO 3.3: no changes |
01 Dec 2006 | reviewed for CIAO 3.4: include link to the Creating a New Observation-Specific HRC Bad Pixel File thread |
10 Jan 2008 | updated for CIAO 4.0: default parameter file is $HOME/cxcds_param4 |
12 Jan 2009 | updated for CIAO 4.1: foreach syntax is for (t)csh shell, user has to change syntax if using another shell |
06 May 2009 | check the version of the CIAO scripts package instead of the individual script |
05 Feb 2010 | updated for CIAO 4.2: link to the new Customizing an ACIS Bad Pixel File thread |
13 Jan 2011 | reviewed for CIAO 4.3: no changes |
05 Jan 2012 | reviewed for CIAO 4.4: no changes |
03 Dec 2012 | Review for CIAO 4.5; updated file name versions |
25 Nov 2013 | Review for CIAO 4.6; no changes. |
16 Dec 2014 | Reviewed for CIAO 4.7; no changes. |
29 Dec 2016 | Reviewed for CIAO 4.9; no changes. |
13 Jan 2022 | Review for CIAO 4.14. Update file name version to match Repro5. |