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

Skip the navigation links
Last modified: 21 Feb 2007
Hardcopy (PDF): A4 | Letter

HRC-S Degap Correction

[CIAO 3.4 Science Threads]



Overview

Last Update: 21 Feb 2007 - replace POG link with pointer to calibration page

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-S degap corrections applied.

Read this thread if:

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

Calibration Updates:

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

  • CALDB v3.2.0 (21 Nov 2005): A first iteration of corrections for the known non-linearity in the HRC-S/LETG spatial wavelength scale is now available. It will improve the performance of the LETGS, but does not account fully for all the systematic errors in the dispersion relation. The RMS deviation of the wavelength differences drop from 0.014 A (0.010 A over just the central plate) prior to the correction, to 0.010 A (0.006 A over the central plate).

    The new file is $CALDB/data/chandra/hrc/bcf/gaplookup/hrcsD1999-07-22gaplookupN0002.fits.

  • 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/hrcsD1999-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.6 (7 Jun 2001): The new degap correction degap calibration file (hrcsD1999-07-22gapN0002.fits) constitutes a significant improvement over the old one.
  • CALDB v2.4 (19 Mar 2001): A new event hyperbolic test (FPTEST) coefficients file was released.

Related Links:

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




Contents



Get Started

Sample ObsID used: 1557 (HRC-S, G21.5-09)

File types needed: evt1; bpix1; 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 hrcf01557_000N002_evt1.fits CALDBVER echo+
2.6

Since this data was processed with a CALDBVER lower than 3.2.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 newest degap corrections will be picked up.

unix% punlearn hrc_process_events
unix% pset hrc_process_events infile=hrcf01557_000N002_evt1.fits
unix% pset hrc_process_events outfile=hrc_1557_new_evt1.fits
unix% pset hrc_process_events badpixfile=hrcf01557_000N002_bpix1.fits
unix% pset hrc_process_events acaofffile=pcadf100494341N001_asol1.fits
unix% pset hrc_process_events instrume=hrc-s
unix% pset hrc_process_events badfile=NONE
unix% hrc_process_events
input level 0 event file/stack (hrcf01557_000N002_evt1.fits): 
output level 1 file (hrc_1557_new_evt1.fits): 
bad pixel file ( NONE | none | <filename>) (hrcf01557_000N002_bpix1.fits): 
aspect offset file ( NONE | none | <filename>) (pcadf100494341N001_asol1.fits): 
# hrc_process_events (CIAO 3.4): The following error occurred 2482 times:
        dsHPEEVENTSEQERR -- WARNING: Out of sequence events discovered in hrcf01557_000N002_evt1.fits.
# hrc_process_events (CIAO 3.4): The following error occurred 224 times:
        WARNING: can't find a proper degap value for this raw coord. in hrcf01557_000N002_evt1.fits

There are several things to note here:

  • The warnings may be ignored; they are explained in the hrc_process_events "out of sequence" and hrc_process_events "no degap value" FAQs.

  • 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).

  • If the data were taken with HRC-S in imaging mode (header keyword DETNAM = HRC-SI), you must change the parameters which are set by default to "CALDB" to "CALDB(DETECTOR=HRC-S)" before running hrc_process_events; see ahelp caldb for more information.

    unix% plist hrc_process_events |grep CALDB
         (gainfile = CALDB)           gain correction image file ( NONE | none | <filename>)
        (degapfile = CALDB)           degap factors (NONE | none | COEFF | <filename>)
          (hypfile = CALDB)           Hyperbolic test coefficients file ( 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>)
    
    unix% pset hrc_process_events gainfile="CALDB(DETECTOR=HRC-S)" \ 
          degapfile="CALDB(DETECTOR=HRC-S)" hypfile="CALDB(DETECTOR=HRC-S)" \ 
          tapfile="CALDB(DETECTOR=HRC-S)" ampsatfile="CALDB(DETECTOR=HRC-S)" \
          evtflatfile="CALDB(DETECTOR=HRC-S)"
    

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-S 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-S observations; a value of 0 demands that the bit be flagged as "good", a value of x indicates that either status (0/1) is acceptable. The pha filter removes about 25% of the background with no X-ray losses; see this FAQ:

unix% punlearn dmcopy
unix% dmcopy "hrc_1557_new_evt1.fits[pha=0:254,status=xxxxxx00xxxx0xxx0000x000x00000xx]" \
      hrc_1557_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_1557_flt1_evt1.fits[EVENTS][@hrcf01557_000N002_std_flt1.fits][cols -crsu,-crsv,-amp_sf,-av1,-av2,-av3,-au1,-au2,-au3,-raw,-sumamps]" \
      hrc_1557_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_1557_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 = hrc_evt1.fits    input level 0 event file/stack
       outfile = hrc_new_evt1.fits output level 1 file
    badpixfile = hrcf01557_000N001_bpix1.fits bad pixel file ( NONE | none | <filename>)
    acaofffile = pcadf100494341N001_asol1.fits aspect offset file ( NONE | none | <filename>)
      (geompar = geom)            Parameter file for Pixlib Geometry files
(alignmentfile = )acaofffile -> pcadf100494341N001_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-s)           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 degap file released in CALDB 3.2.0 means that users may want to reprocess their data, especially if they are working with HRC-S/LETG grating data
01 Dec 2006 updated for CIAO 3.4: added link Computing Average HRC Dead Time Corrections thread in Summary; CIAO version in error and warning
21 Feb 2007 replace POG link with pointer to calibration page

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