Skip to the navigation links
Last modified: December 2009

AHELP for CIAO 4.2


Context: tools


Regrid an event file to a different tangent point


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


`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.

Special Case: No Input Time Column

If the input event file does not have a time column, reproject_events takes the time range covered by the aspect solution (intersected with GTIs from the match file) and shifts and expands it to cover the time range in the background dataset. Then a random time within the range of the background data subspace is selected and assigned to the event. This allows users to reproject the ACIS blank-sky background event files, which do not contain TIME information.

Running the Tool Twice

If the tool is run on an event file which was created by reproject_events, the aspect solution file should be provided in the aspect parameter. Otherwise, the second projection may fail because of the changes that reproject_events makes in trying to go from sky to celestial coordinates with the reprojected WCS, and then celestial to sky with the matched WCS. If you provide the aspect solution file, the tool starts at chip coordinates and goes forward, which works.

Solar System Objects

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

Example 1

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

Reapplies the aspect solution to an event file.

Example 2

reproject_events acis0474.fits new0474.fits aspect=none

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

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.fits" bkgrd_my_obs.fits my_obs.fits
aspect=my_obs.aspect random=0

Regrids the blank sky pixel coordinates of blank_sky.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:

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.


name type ftype def min max reqd stacks
infile file input       yes no
outfile file output       yes no
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=no)

Input dataset/block specification

Input event filename.

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

Output dataset filename.

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

Coordinate system to match to. Can be (1) a filename, 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)


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

See Also

reproject_aspect, sso_freeze, wcs_match, wcs_update

Last modified: December 2009