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

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/reproject_events.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 reproject_events Context: tools

Synopsis

Regrid an event file (or stack) to a common tangent point

Syntax

reproject_events infile outfile match [aspect] [random] [geompar]
[verbose] [clobber] [mode]

Description

`reproject_events' changes the sky coordinate tangent point in an event file. There are two modes of operation: (1) the easy version in which the new sky coordinates are evaluated assuming the old aspect solution was correct, and (2) the serious version in which the user supplies a new aspect solution and the sky coordinates are calculated from scratch, independent of the original aspect solution.

With match=filename

The first version (with "match=matchfile" and "aspect=none") is helpful in preparing to merge event lists with slightly different aimpoints.

With match=none

The second version (with "match=none" and "aspect=@aspectfiles") is helpful when you need to fix an old event list which was processed with a bad aspect solution, and you have somehow obtained (or hacked together) a new aspect solution file.

Each event in the input file is copied to the output. If aspect=none, its sky pixel coordinates are recalculated by evaluating the corresponding celestial coordinates using the old sky pixel values and the coordinate system in the header, then calculating new sky pixel coordinates using the tangent point from the match file (or the tangent point values explicitly supplied in the parameter string, see examples). Note that this won't give you good results if the positions in the file were wrong to start with, but it's fine if you want to say "make this event file compatible with that one".

If an aspect solution file, or stack of aspect solution files, is supplied in the aspect parameter, the new focal plane DETX,DETY and sky X,Y pixel coordinates are calculated from the CHIPX, CHIPY coordinates using the aspect solution. The DETX,DETY depend on the SIM offsets, which change with time due to telescope bending and which are provided in the aspect solution file as determined from observations of the instrument fiducial lights. The X,Y are calculated from DETX,DETY using the telescope pointing direction supplied in the aspect file. If a match parameter is supplied, the X,Y are evaluated relative to the specified match tangent point; if match=none, the original tangent point in the input file is used.

Pixel randomization may also be applied, if an aspect solution is used to reproject. The CXC standard data processing (SDP) applies a 0.5 pixel randomization to event locations to blur instrumental features on scales smaller than the instrumental resolution. For comparison to SDP data, this randomization should be applied. This tool does *not* apply this randomization by default.

As a special case, if the input event file does not have a time column, times are assigned internally to each photon randomly within the GTI for its chip. This allows users to reproject background event files whose photon times are not matched to the actual observation time.

NOTES

  • reproject_events is *not* meant to be used on solar system objects to remove orbital motion. The 'sso_freeze' program should be used for this purpose

Example 1

reproject_events acis0474.fits new0474.fits aspect=asol0474.fits
match=none

Reapplies the aspect solution to an event file.

Example 2

reproject_events acis0474.fits new0474.fits aspect=none
match=acis1055.fits

Regrids the sky pixel coordinates of file 0474 to match the tangent point of file acis1055.fits.

Example 3

reproject_events acis0474.fits new0474.fits aspect=asol0474.fits
match=acis1055.fits

As with the previous example, but this time we also use the aspect solution to recalculate the focal plane (DETX,DETY) coordinates and improve the sky pixel calculation.

Example 4

reproject_events acis0474.fits new0474.fits aspect=asol0474.fits
match="98.9430 -75.2317" random="0"

Regrids the sky pixel coordinates of file 0474 to match the given RA and Dec in degrees, using the aspect solution to improve the DET and SKY coordinate systems. The 0.5-pixel randomization is applied, using the TIME value of each event as the randomization seed.

Example 5

reproject_events "blank_sky_aciss3.fits[cols -time]" bkgrd_my_obs.fits
my_obs.fits aspect=my_obs.aspect random=0

Regrids the blank sky pixel coordinates of blank_sky_aciss3.fits to match the tangent point of file my_obs.fits. The aspect file provides the aspect solution for the events. This reprojection is particularly useful for the case where diffuse emission covers the CCD so that a separate background local to the observation can not be obtained. A description of the use of blank sky observations is available at: http://cxc.harvard.edu/ciao/threads/acisbackground/.

The data model filter "[cols -time]" is used to remove the TIME column from blank_sky_aciss3.fits. This filter is not needed if the file does not contain a TIME column.

In this mode the random parameter is used as the seed number for randomly selecting the aspect solution for each event.

Example 6

reproject_events @input.lis @output.lis aspect=none match=acis1055.fits

Regrids the sky pixel coordinates of each file listed in input.lis to match the tangent point of file acis1055.fits. No aspect files used in this case.

Parameters

name type ftype def min max reqd stacks
infile file input       yes yes
outfile file output       yes yes
match file input none     yes  
aspect file input       no yes
random integer   -1     no  
geompar file   geom        
verbose integer   0 0 5 no  
clobber boolean   no     no  

Detailed Parameter Descriptions

Parameter=infile (file required filetype=input stacks=yes)

Input dataset/block specification

Input event filename. If the value begins with '@', the input files will be obtained from a stack list.

Parameter=outfile (file required filetype=output stacks=yes)

Output dataset or stack name. If input is a stack, output must be a stack with the same number of entries.

Parameter=match (file required filetype=input default=none)

Coordinate system to match to. Can be (1) a filename (not a stack), in which case the coordinate system in the file is used; (2) "none", in which case the coordinate system in the input file is used (useful when reapplying a new aspect file); (3) a pair of numbers separated by space or comma, interpreted as the new tangent point RA and Dec in degrees.

Parameter=aspect (file not required filetype=input stacks=yes)

Aspect file, value can be "none" or a stack.

The aspect solution files for Chandra have names like pcadNNNasol1.fits. There may be more than one asol1 file for an observation, in which case use an ascii file asol.lis in which each line is the name of one of the asol1 files and set "aspect=@asol.lis".

If present, the program uses the aspect file stack to recalculate the DETX,DETY and X,Y values. DETX,DETY (focal plane coordinates) are calculated using the fiducial light-derived SIM offsets to determine the position of the mirror relative to the chips, and the PIXLIB parameters to determine the locations of the chips on the SIM. X,Y (sky pixel coordinates) are then calculated from DETX,DETY using the RA, Dec and roll for the appropriate event time and the grid point specified by the "match" parameter.

Parameter=random (integer not required default=-1)

Random seed for 0.5-pixel randomization. The randomization is performed by default for CXC Pipeline processed data to remove instrumental artifacts on scales smaller than the actual spatial resolution. A reprojected file should have this randomization for accurate comparison to data produced by the standard pipeline. Any positive integer value is allowed. Also, random = 0 will use the time of the event and random = -1 will not randomize.

Parameter=geompar (file default=geom)

The name of the Pixlib Geometry parameter file.

Parameter=verbose (integer not required default=0 min=0 max=5)

Controls screen output information, value is 0 (no info) to 5 (most info).

Parameter=clobber (boolean not required default=no)

Overwrite output if it exists? (yes/no)

CHANGES IN CIAO 3.2

Several improvements were made in the handling of files with no TIME column: better handling of background files which have incorrect data subspaces; fixed a problem with the setting of the seed for the random-number generator; and improved warning messages when the TIME filter does not match that of the aspect solution.

CHANGES IN CIAO 3.0

Eliminated crash for situation of absent time column and match=none

Bugs

See the bugs page for this tool on the CIAO website for an up-to-date listing of known bugs.

Hardcopy (PDF): A4 | Letter
Last modified: December 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.