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

Skip the navigation links
Last modified: 1 Dec 2006
Hardcopy (PDF): A4 | Letter

Use Observation-specific Bad Pixel Files

[CIAO 3.4 Science Threads]



Overview

Last Update: 1 Dec 2006 - reviewed for CIAO 3.4: include link to the Creating a New Observation-Specific HRC Bad Pixel File thread

Synopsis:

Several of the CIAO data analysis tools directly use calibration data from the tool's parameter file, but many access it via calls to the ardlib.par parameter file. Although the majority of these calibration files are now controlled by the Chandra Calibration Database (CALDB), the observation-specific bad pixel list must still be set by the user. This 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.

Read this thread if:

you are beginning a new ACIS or HRC analysis session.

Related Links:

Proceed to the HTML or hardcopy (PDF: A4 | letter) version of the thread.




Contents



Get Started

Sample ObsIDs used: 1843 (ACIS-I, G21.5-0.9); 144 (HRC-I, G21.5-0.9); 1557 (HRC-S, G21.5-09)

File types needed: evt2; bpix1

If you have created a new bad pixel file by following one of these threads:

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_new_bpix1.fits
    (created with the ACIS hot pixel tools)

  • HRC-I: /data/ObsID144/secondary/hrcf00144_000N003_bpix1.fits

  • HRC-S: /data/ObsID1557/secondary/hrcf00144_000N003_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.

Download the script

This section of the thread uses the acis_set_ardlib script. The most recent version of acis_set_ardlib is v1.5 (07 January 2005):

unix% grep Id `which acis_set_ardlib`
% $Id: acis_set_ardlib,v 1.5 2005/01/07 20:03:07 dburke Exp $

Please check that you are using the most recent version before continuing. If you do not have the script installed or need to update to a newer version, please refer to the Scripts page.


Running acis_set_ardlib

Prior to version 1.5, the script would look for a file that ended in "bpix1.fits" in the current and ../secondary/ directories. The script now requires you to supply the full filename. This change was made to allow easy use of the output from acis_run_hotpix, as the new bad pixel file is not required to end in bpix1.fits.

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_new_bpix1.fits 
Updated ardlib parameter file: /home/username/cxcds_param/ardlib.par
  AXAF_ACIS0_BADPIX_FILE -> /data/ObsID1843/acis1843_new_bpix1.fits[BADPIX0]
  AXAF_ACIS1_BADPIX_FILE -> /data/ObsID1843/acis1843_new_bpix1.fits[BADPIX1]
  AXAF_ACIS2_BADPIX_FILE -> /data/ObsID1843/acis1843_new_bpix1.fits[BADPIX2]
  AXAF_ACIS3_BADPIX_FILE -> /data/ObsID1843/acis1843_new_bpix1.fits[BADPIX3]
  AXAF_ACIS4_BADPIX_FILE -> CALDB
  AXAF_ACIS5_BADPIX_FILE -> CALDB
  AXAF_ACIS6_BADPIX_FILE -> /data/ObsID1843/acis1843_new_bpix1.fits[BADPIX6]
  AXAF_ACIS7_BADPIX_FILE -> /data/ObsID1843/acis1843_new_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:

unix% dmkeypar acisf01843N001_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_new_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_000N003_bpix1.fits
HRC-S
unix% pset ardlib \
      AXAF_HRC-S_BADPIX_FILE=/data/ObsID1557/secondary/hrcf01557_000N002_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 | more

Parameters for /home/username/cxcds_param/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_new_bpix1.fits[BADPIX0] Enter ACIS-0 Bad Pixel File
AXAF_ACIS1_BADPIX_FILE = /data/ObsID1843/acis1843_new_bpix1.fits[BADPIX1] Enter ACIS-1 Bad Pixel File
AXAF_ACIS2_BADPIX_FILE = /data/ObsID1843/acis1843_new_bpix1.fits[BADPIX2] Enter ACIS-2 Bad Pixel File
AXAF_ACIS3_BADPIX_FILE = /data/ObsID1843/acis1843_new_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_new_bpix1.fits[BADPIX6] Enter ACIS-6 Bad Pixel File
AXAF_ACIS7_BADPIX_FILE = /data/ObsID1843/acis1843_new_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_000N003_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_000N002_bpix1.fits Enter HRC-S Badpix file
.
. (lines omitted)
.

Note that the parameter file now resides in the local parameter directory (/home/username/cxcds_param) 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_new_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

Return to Threads Page: Top | All | Data Prep
Hardcopy (PDF): A4 | Letter
Last modified: 1 Dec 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.