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

Remove ACIS Pixel Randomization

[CIAO 3.4 Science Threads]



Overview

Last Update: 1 Dec 2006 - updated for CIAO 3.4: removed use of "rand_pha=no" in acis_process_events, as most users should keep the PHA randomization (see the Apply/Remove PHA Randomization thread); CIAO version in warnings

Synopsis:

The CXC standard data processing (SDP) randomizes the positions of events detected within a given pixel. This randomization is done to remove the instrumental "gridded" appearance of the data and to avoid any possible aliasing affects associated with this spatial grid. The default randomization is adequate for most users.

Purpose:

To generate a new level=2 event file with the pixel randomization removed. Disabling pixel randomization can somewhat improve the resolution of on-axis Chandra sources. This procedure may be useful for users interested in closely-spaced point sources in a crowded field or closely-spaced features in an extended source.

Read this thread if:

you are working with an ACIS observation and would like to remove the randomization. Be aware that there are no calibration products appropriate for data processed with the randomization disabled.

Related Links:

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




Contents



Get Started

Sample ObsID used: 1838 (ACIS-S, G21.5-09)

File types needed: evt1; evt2 (optional); flt1; asol1; bpix1

If you created a new bad pixel file by running the Create a New ACIS Bad Pixel File: Identify ACIS Hot Pixels and Cosmic Ray Afterglows thread, use that file in this analysis. Otherwise, use the bpix1.fits file from the Archive.

This thread can also be run directly on the level=2 event file for imaging data; see the Running on Level=2 Event File section for details. If you are analyzing grating data, however, you must run this thread on the level=1 event file.

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

Related acis_process_events threads

There are other threads that should be considered, since they may affect how acis_process_events is run. The Create a New Level=2 Event File thread shows how to combine all of these options into a single run of acis_process_events.



Generate A New Level=1 Event File

Determine the eventdef parameter

The eventdef parameter specifies the names and data types of the columns in the output event data file. Four predefined strings are included in the parameter file for acis_process_events:

READMODE DATAMODE event mode eventdef string
TIMED (V)FAINT timed exposure (very) faint stdlev1
TIMED GRADED timed exposure graded grdlev1
CONTINUOUS CC(33)_FAINT continuous clocking (3x3) faint cclev1
CONTINUOUS CC(33)_GRADED continuous clocking (3x3) graded ccgrdlev1

If you are unsure of the event mode of your observation, the information can be found in the READMODE and DATAMODE values stored in the file header:

unix% dmkeypar acisf01838_000N001_evt1.fits READMODE echo+
TIMED

unix% dmkeypar acisf01838_000N001_evt1.fits DATAMODE echo+
FAINT

This is a timed exposure faint observation, so the proper eventdef parameter is "stdlev1." The full parameter syntax of each eventdef string may be found in plist acis_process_events.


Run acis_process_events

Since it is necessary to recalculate the coordinates when removing the pixel randomization, we need to supply the proper aspect solution:

unix% punlearn acis_process_events
unix% pset acis_process_events infile=acisf01838_000N001_evt1.fits
unix% pset acis_process_events outfile=acis_1838_new_evt1.fits
unix% pset acis_process_events badpixfile=acis_1838_new_bpix1.fits
unix% pset acis_process_events acaofffile=pcadf084244404N001_asol1.fits
unix% pset acis_process_events eventdef=")stdlev1"
unix% pset acis_process_events rand_pix_size=0.0
unix% acis_process_events
Input event file or stack (acisf01838_000N001_evt1.fits): 
Output event file name (acis_1838_new_evt1.fits): 
aspect offset file ( NONE | none | <filename>) (pcadf084244404N001_asol1.fits):

There are several things to note:

  • 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 comma-separated list or as a stack (see ahelp stack for more information).

  • You may see a warning about the number of event islands that contain one or more bad pixels:

    # acis_process_events (CIAO 3.4): The following error occurred 26941
      times: dsAFEBADPCNTERR -- WARNING: Event island contains 1 or more bad pixels.
    

    It is explained in this FAQ and may be ignored.

  • It is important to note the unusual syntax of the eventdef parameter; the tool will not access the predefined string if the leading ")" is missing (see example 6 of ahelp parameter).

    The content of the parameter file may be checked using plist acis_process_events.

The new level=1 event file is named acis_1838_new_evt1.fits. See the final section of the ACIS Gain Map thread to generate a new level=2 event file.



Running on Level=2 Event File (Optional)

Since removing the pixel randomization does not affect any of the status, grade, or time filters, it may be run on level=2 imaging data. If you are analyzing grating data, you must run this thread on the level=1 event file, then complete the appropriate "Obtain Grating Spectra" thread to create an new level=2 event file.

In this case, several additional parameter are set so that acis_process_events does not try to randomize PHA (rand_pha=no), calculate the PI channels (calculate_pi=no), or compute event grading (doevtgrade=no). A level=2 event file is used as input, and it is not necessary to re-apply the bad pixel file:

unix% punlearn acis_process_events
unix% pset acis_process_events infile=acisf01838N001_evt2.fits
unix% pset acis_process_events outfile=acis_1838_new_evt2.fits
unix% pset acis_process_events acaofffile=pcadf084244404N001_asol1.fits
unix% pset acis_process_events \
      eventdef='{d:time,s:ccd_id,s:node_id,i:expno,s:chip,s:tdet,f:det,f:sky,l:pha,f:energy,l:pi,s:fltgrade,s:grade,x:status}'
unix% pset acis_process_events rand_pha=no
unix% pset acis_process_events doevtgrade=no
unix% pset acis_process_events gradefile=none
unix% pset acis_process_events calculate_pi=no
unix% pset acis_process_events rand_pix_size=0.0
unix% acis_process_events
Input event file or stack (acisf01838N001_evt2.fits): 
Output event file name (acis_1838_new_evt2.fits): 
aspect offset file ( NONE | none | <filename>) (pcadf084244404N001_asol1.fits):
# acis_process_events (CIAO 3.4): WARNING: The time-dependent gain adjustment to PHA 
                                  will not be (re)computed or removed because doevtgrade=no.
# acis_process_events (CIAO 3.4): WARNING: The values of PHA, ENERGY, PI, FLTGRADE 
                                  and GRADE may be inaccurate because doevtgrade=no.
# acis_process_events (CIAO 3.4): WARNING: The values of ENERGY and PI may be 
                                  inaccurate because calculate_pi=no.

Note that a custom "level 2" eventdef parameter is specified. The reason for this is explained in the "Why is my level 2 event file larger than the one from the pipeline?" FAQ.

The warnings are expected, and are trigged as a result of the doevtgrade parameter setting.

The new level=2 imaging event file is acis_1838_new_evt2.fits.




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


#--------------------------------------------------------------------------
#
#  acis_process_events.par- Parameter file for acis_process_events program
#
#--------------------------------------------------------------------------
        infile = acisf01838_000N001_evt1.fits   Input event file or stack
       outfile = acis_1838_new_evt1.fits Output event file name
    acaofffile = pcadf084244404N001_asol1.fits aspect offset file ( NONE | none | <filename>)
    (apply_cti = yes)             Apply CTI adjustment?
  (apply_tgain = yes)             Apply time-dependent gain adjustment?
(alignmentfile = )acaofffile -> pcadf084244404N001_asol1.fits) sim/fam alignment file ( NONE | none | <filename>)
      (obsfile = NONE)            obs.par file for output file keywords ( NONE | none | <filename>)
      (geompar = geom)            Parameter file for Pixlib Geometry files
      (logfile = stdout)          debug log file ( STDOUT | stdout | <filename>)
    (gradefile = CALDB)           grade mapping file ( NONE | none | CALDB | <filename>)
     (gainfile = CALDB)           acis gain file ( NONE | none | CALDB | <filename>)
   (badpixfile = acis_1838_new_bpix1.fits) acis bad pixel file ( NONE | none | <filename>)
   (threshfile = CALDB)           split threshold file ( NONE | none | CALDB | <filename>)
      (ctifile = CALDB)           acis CTI file ( NONE | none | CALDB | <filename>)
    (tgainfile = CALDB)           gain adjustment file ( NONE | none | CALDB | <filename>)
     (eventdef = )stdlev1 -> {d:time,s:ccd_id,s:node_id,i:expno,s:chip,s:tdet,f:det,f:sky,s:phas,l:pha,l:pha_ro,
f:energy,l:pi,s:fltgrade,s:grade,x:status}) output format definition
   (doevtgrade = yes)             Determine event flight grade?
 (check_vf_pha = no)              Check very faint pixels?
(calc_cc_times = no)              Estimate the times of arrival for CC-mode observation?
        (trail = 0.027)           Trail fraction
     (spthresh = 13)              Default split threshold level (overridden by values in threshfile)
  (time_offset = 0)               Offset to add to event time field to synch w/ fam data
   (docentroid = no)              Determine pixel centroid for coord. conversion?
 (calculate_pi = no)              perform pha->pi conversion? (requires gain file)
 (pi_bin_width = 14.6)            Width of Pi bin in eV
  (pi_num_bins = 1024)            Number of values to bin energy into
 (max_cti_iter = 15)              Maximum iterations for the CTI adjustment of each event
 (cti_converge = 0.1)             The convergence criterion for each CTI-adjusted pixel in adu
       (tstart = TSTART)          header key containing start/default time value
        (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)
         (stop = sky)             end transformations at [chip,tdet,det,tan,sky,none]
     (instrume = acis)            axaf instrument- used for instrument parameter file
    (rand_seed = 1)               random seed (for pixlib), 0 = use time dependent seed
     (rand_pha = yes)             Randomize the pha value used in gain calculations
(rand_pix_size = 0)               pixel randomization width (-size..+size) 0=no randomization
      (stdlev1 = {d:time,s:ccd_id,s:node_id,i:expno,s:chip,s:tdet,f:det,f:sky,s:phas,l:pha,l:pha_ro,f:energy,
l:pi,s:fltgrade,s:grade,x:status}) TE faint modes event definition string
      (grdlev1 = {d:time,s:ccd_id,s:node_id,i:expno,s:chip,s:tdet,f:det,f:sky,l:pha,l:pha_ro,s:corn_pha,f:energy,
l:pi,s:fltgrade,s:grade,x:status}) TE graded event format definition string
       (cclev1 = {d:time,s:ccd_id,s:node_id,i:expno,s:chip,s:tdet,f:det,f:sky,f:sky_1d,s:phas,l:pha,l:pha_ro,
f:energy,l:pi,s:fltgrade,s:grade,x:status}) CC faint event format definition string
    (ccgrdlev1 = {d:time,s:ccd_id,s:node_id,i:expno,s:chip,s:tdet,f:det,f:sky,f:sky_1d,l:pha,l:pha_ro,s:corn_pha,
f:energy,l:pi,s:fltgrade,s:grade,x:status}) cc graded event format definition string
         (mode = ql)              



History

16 Dec 2004 updated for CIAO 3.2: use ACIS bad pixel file (badpixfile parameter)
11 Jan 2005 created Running on on Level=2 Event File section
01 Feb 2005 added note about "Event island contains 1 or more bad pixels" warning
20 Jun 2005 CIAO 3.2.2 patch: minor acis_process_events parameter change (default value of threshfile is CALDB instead of NONE)
28 Jul 2005 switched to a custom eventdef in the Running on Level=2 Event File section
09 Dec 2005 updated for CIAO 3.3: output filenames include ObsID
01 Dec 2006 updated for CIAO 3.4: removed use of "rand_pha=no" in acis_process_events, as most users should keep the PHA randomization (see the Apply/Remove PHA Randomization thread); CIAO version in warnings

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.