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

Skip the navigation links
Last modified: 8 Feb 2008
Hardcopy (PDF): A4 | Letter

HRC-I Degap Correction

CIAO 4.0 Science Threads



Overview

Last Update: 8 Feb 2008 - added deprecated thread message to Synopsis

Synopsis:

This thread has been deprecated and will be removed in the next CIAO release. Instead of running this thread, follow the Reprocessing Data to Create a New Level=2 Event File thread.

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.

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 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.2.0, we will complete this thread in its entirety.



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 4.0): 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.

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 LETG/HRC-I Grating Spectra 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
25 Jan 2008 updated for CIAO 4.0: removed outdated cal updates
08 Feb 2008 added deprecated thread message to Synopsis

Return to Threads Page: Top | All | Data Prep
Hardcopy (PDF): A4 | Letter
Last modified: 8 Feb 2008


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.