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

Skip the navigation links
Last modified: 14 Sep 2007
Hardcopy (PDF): A4 | Letter

HRC-I Degap Correction

[CIAO 3.4 Science Threads]



Overview

Last Update: 14 Sep 2007 - updated for CALDB 3.4.1: new HRC-I degap files

Synopsis:

The algorithm used to determine the centroid of the charge cloud exiting the rear microchannel plate of the HRC (and hence the x-ray event position) introduces systematic errors in the event positions, which are manifested by regularly spaced gaps in both x and y in HRC images. The degap correction is applied to compensate for this problem in the level=1 event file.

Purpose:

To generate a new level=2 event file with the HRC-I degap corrections applied.

Read this thread if:

you are working with an HRC-I dataset affected by the Calibration Updates.

Calibration Updates:

Get Started shows how to check the CALDBVER for your data.

  • CALDB v3.4.1 (14 Sep 2007): A new gap lookup table, hrciD1999-07-22gaplookupN0003.fits, is needed to improve the off-aimpoint gap map solution for HRC-I at certain locations. The CALDB 3.4.1 section of the CIAO release notes has more information.
  • CALDB v3.4.0 (16 May 2007): New time-dependent gain maps for the HRC-I were added to the CALDB. The CALDB 3.4.0 section of the CIAO release notes explains how the files will affect your analysis.
  • CALDB v3.3.0 (18 Dec 2006): New time-dependent gain maps for the HRC-I were added to the CALDB. The How CIAO 3.4 and CALDB 3.3.0 Affect Your Analysis section of the CIAO release notes explains how the files will affect your analysis.
  • CALDB v3.2.3 (10 Aug 2006): The new gap lookup table, hrciD1999-07-22gaplookupN0002.fits, will improve the encircled energy fraction for any on-axis point sources. As such it represents the latest and best degap correction data available for the Chandra HRC-I.

    A new gain map file for HRC-I, hrciD1998-10-30gainN0002.fits, has also been released. This file corrects an error in the version N0001 of this gain map, released in CALDB 3.2.0 (November 2005). Users who applied the hrciD1998-10-30gainN0001.fits gain map and are using PI values in their science (e.g. quantile color-color analysis) should reprocess the data; the gain file name is stored in the GAINCORF header keyword.

    Further details on both calibration changes and information on when to reprocess are available from the How CALDB 3.2.3 Affects Your Analysis section of the release notes.

  • CALDB v3.2.0 (21 Nov 2005): The first gain correction maps for HRC-I data are now available: $CALDB/data/chandra/hrc/bcf/gain/hrciD1998-10-30gainN0001.fits and $CALDB/data/chandra/hrc/bcf/gain/hrciD1999-10-04gainN0001.fits. For more information, refer to CALDB 3.2.0 release notes and the Gain Response of the HRC webpage.
  • CALDB v3.1.0 (23 Jun 2005): The degap algorithm was changed in CIAO 3.2.2 to use a different calibration file format. The new HRC-S file is $CALDB/data/chandra/hrc/bcf/gaplookup/hrciD1999-07-22gaplookupN0001.fits. This change is transparent to users; it is not necessary to reprocess data that have had the degap correction applied.
  • CALDB v2.4 (19 Mar 2001): A new event hyperbolic test (FPTEST) coefficients file was released.
  • CALDB v2.2 (25 Jan 2001): The new degap correction degap calibration file (hrciD1999-07-22gapN0002.fits) constitutes a significant improvement over the old one.

Related Links:

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




Contents



Get Started

Sample ObsID used: 144 (HRC-I, G21.5-0.9)

File types needed: evt1; bpix; flt1; asol1

If you created a new bad pixel file by running the Creating a New Observation-Specific HRC Bad Pixel File thread, use that file in this analysis. Otherwise, use the bpix1.fits file from the Archive.

In this thread, we assume that all relevant files are in the same working directory.

Check the CALDBVER keyword in the header:

unix% dmkeypar hrcf00144_000N003_evt1.fits CALDBVER echo+
2.8

Since this data was processed with a CALDBVER lower than 3.3.0, we will complete this thread in its entirety.

The HRC AMP_SF Correction and Reducing Tap-Ringing Distortions should also be considered, since it may affect how hrc_process_events is run.



Generate A New Level=1 Event File

Run hrc_process_events

Running hrc_process_events with the SDP level=1 event file as the input will produce a new level=1 event file. Doing a "punlearn hrc_process_events" sets the degapfile to the default (CALDB); this ensures that the degap corrections will be picked up.

unix% punlearn hrc_process_events
unix% pset hrc_process_events infile=hrcf00144_000N003_evt1.fits
unix% pset hrc_process_events outfile=hrc_144_new_evt1.fits
unix% pset hrc_process_events badpixfile=hrcf00144_000N003_bpix1.fits
unix% pset hrc_process_events acaofffile=pcadf084154631N003_asol1.fits
unix% pset hrc_process_events badfile=NONE
unix% hrc_process_events
input level 0 event file/stack (hrcf00144_000N003_evt1.fits): 
output level 1 file (hrc_144_new_evt1.fits): 
bad pixel file ( NONE | none | <filename>) (hrcf00144_000N003_bpix1.fits):
aspect offset file ( NONE | none | <filename>) (pcadf084154631N003_asol1.fits): 
# hrc_process_events (CIAO 3.4): The following error occurred 2104 times:
        dsHPEEVENTSEQERR -- WARNING: Out of sequence events discovered in hrcf00144_000N003_evt1.fits.

There are a couple things to note here:

  • The warnings may be ignored. The first one is due to the fact that there is no gain file available for HRC-I. We could have set gainfile=none to avoid seeing this message. The second warning is explained in this FAQ.

  • In some cases there will be more than one asol1.fits file for an observation. All the files must be input to the acaofffile parameter in chronological order (the time is in the filename, so "ls" lists them in order), either as a list or as a stack (see ahelp stack for more information.)

The contents of the parameter file may be checked using plist hrc_process_events.


If you are working with grating data, you should now proceed to the Obtain Grating Spectra from LETG/HRC-I Data thread to create a new level=2 event file (and a new PHA file). Otherwise, finish running this thread.



Generate A New Level=2 Event File

1. Filter on status

Now we apply the status filter that is specific to HRC-I observations; a value of 0 demands that the bit be flagged as "good", an "x" indicates that either status (0/1) is acceptable:

unix% punlearn dmcopy
unix% dmcopy "hrc_144_new_evt1.fits[status=xxxxxx00xxxx0xxx00000000x0000000]"  \
      hrc_144_flt1_evt1.fits

2. Apply GTI filter

Finally, the Good Time Intervals (GTIs) supplied by the pipeline need to be applied. We simultaneously eliminate unnecessary columns from the output.

unix% punlearn dmcopy
unix% dmcopy \
      "hrc_144_flt1_evt1.fits[EVENTS][@hrcf00144_000N003_std_flt1.fits][cols -crsu,-crsv,-amp_sf,-av1,-av2,-av3,-au1,-au2,-au3,-raw,-sumamps]" \
      hrc_144_evt2.fits

Be sure to include the @ symbol in the filter expression; the command will not be executed properly if it is omitted.




Summary

The new level=2 event file, hrc_144_evt2.fits, is now complete.

Next, read the Computing Average HRC Dead Time Corrections thread to see if you need to recompute the deadtime statistics for your dataset.




Parameters for /home/username/cxcds_param/hrc_process_events.par


#
#  Parameters for the hrc_process_events task
#
        infile = hrcf00144_000N003_evt1.fits    input level 0 event file/stack
       outfile = hrc_144_new_evt1.fits output level 1 file
    badpixfile = hrcf00144_000N003_bpix1.fits bad pixel file ( NONE | none | <filename>)
    acaofffile = pcadf084154631N003_asol1.fits aspect offset file ( NONE | none | <filename>)
      (geompar = geom)            Parameter file for Pixlib Geometry files
(alignmentfile = )acaofffile -> pcadf084154631N002_asol1.fits) sim/fam alignment file ( NONE | none | <filename>)
      (obsfile = NONE)            obs.par file for output file keywords ( NONE | none | <filename>)
     (gainfile = CALDB)           gain correction image file ( NONE | none | <filename>)
      (ADCfile = NONE)            ADC correction table file ( NONE | none | <filename>)
    (degapfile = CALDB)           degap factors (NONE | none | COEFF | <filename>)
      (hypfile = CALDB)           Hyperbolic test coefficients file ( NONE | none | <filename>)
 (ampsfcorfile = CALDB)           caldb file for amp_sf_correction( NONE | none | <filename>)
      (tapfile = CALDB)           tap ring test coefficients file ( NONE | none | <filename>)
   (ampsatfile = CALDB)           ADC saturation test file ( NONE | none | <filename>)
  (evtflatfile = CALDB)           Event flatness test file ( NONE | none | <filename>)
      (badfile = NONE)            output level 1 bad event file
      (logfile = stdout)          debug log file (STDOUT | stdout | <filename>)
     (eventdef = )stdlev1 -> {d:time,s:crsv,s:crsu,s:amp_sf,s:av1,s:av2,s:av3,s:au1,s:au2,s:au3,
l:raw,s:chip,l:tdet,f:det,f:sky,s:pha,s:pi,s:sumamps,s:chip_id,x:status}) output format definition
  (badeventdef = )badlev1 -> {d:time,s:crsu,s:crsv,s:au1,s:au2,s:au3,s:av1,s:av2,s:av3,s:pha}) output format definition
   (grid_ratio = 0.5)             charge ratio
    (pha_ratio = 0.5)             pha ratio
  (wire_charge = 0)               turn on center wire test (-1=off,0=on)
         (cfu1 = 1.0)             u axis 1st order cor. factor
         (cfu2 = 0)               u axis 2nd order cor. factor
         (cfv1 = 1.0)             v axis 1st order cor. factor
         (cfv2 = 0)               v axis 2nd order cor. factor
  (time_offset = 0)               Offset to add to event time field to synch w/ fam data
     (amp_gain = 75.0)            amp gain
     (instrume = hrc-i)           hrc instrument- used for parameter file
(do_amp_sf_cor = no)              perform amp_sf correction (y/n) ?
     (do_ratio = yes)             perform ratio validity checks
       (tstart = TSTART)          header key containing default time value (HSI)
        (tstop = TSTOP)           header key containing time of last event
      (clobber = no)              Overwrite output event file if it already exists?
      (verbose = 0)               level of debug detail (0=none, 5=most)
    (rand_seed = 1)               random seed (for pixlib), 0 = use time dependent seed
(rand_pix_size = 0.0)             pixel randomization width (-size..+size), 0.0 = no randomization
        (start = coarse)          start transformations at [coarse,chip,tdet]
         (stop = sky)             end transformations at [none,chip,tdet,det,sky]
      (badlev1 = {d:time,s:crsu,s:crsv,s:au1,s:au2,s:au3,s:av1,s:av2,s:av3,s:pha}) event format definition string
      (hsilev1 = {d:time,s:crsu,s:crsv,s:au1,s:au2,s:au3,s:av1,s:av2,s:av3,s:chipx,s:chipy,s:tdetx,s:tdety,
s:x,s:y,l:fpz,s:pha,s:vstat,s:estat}) event format definition string
      (stdlev1 = {d:time,s:crsv,s:crsu,s:amp_sf,s:av1,s:av2,s:av3,s:au1,s:au2,s:au3,l:raw,s:chip,l:tdet,
f:det,f:sky,s:pha,s:pi,s:sumamps,s:chip_id,x:status}) event format definition string
      (simlev1 = {l:tick,i:scifr,i:mjf,s:mnf,s:evtctr,s:crsu,s:crsv,s:au1,s:au2,s:au3,s:av1,s:av2,s:av3,
s:tdetx,s:tdety,s:pha,s:vstat,s:estat}) sim event definition string
      (fltlev1 = {d:time,s:crsv,s:crsu,s:amp_sf,s:av1,s:av2,s:av3,s:au1,s:au2,s:au3,s:chipx,s:chipy,l:tdetx,
l:tdety,s:detx,s:dety,s:x,s:y,s:pha,s:sumamps,s:chip_id,l:status}) event format definition string
         (mode = ql)              



History

14 Dec 2004 reviewed for CIAO 3.2: no changes
23 Jun 2005 CIAO 3.2.2 patch: Calibration Update that is transparent to users; it is not necessary to reprocess data that have had the degap correction applied
20 Dec 2005 updated for CIAO 3.3: new HRC-I gain map files were released in CALDB 3.2.0; the new calibration is automatically applied if you run this thread
10 Aug 2006 updated for CALDB 3.2.3: corrected HRC-I gain map file and new degap have been released; the new calibration is automatically applied if you run this thread
18 Dec 2006 updated for CIAO 3.4: new calibration files in CALDB 3.3.0; added link to Computing Average HRC Dead Time Corrections thread in Summary; CIAO version in error
21 Feb 2007 replace POG link with pointer to calibration page
01 May 2007 updated for CALDB 3.4.0: new HRC-I gain map files
14 Sep 2007 updated for CALDB 3.4.1: new HRC-I degap files

Return to Threads Page: Top | All | Data Prep
Hardcopy (PDF): A4 | Letter
Last modified: 14 Sep 2007


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.