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

Apply Barycenter Correction

[CIAO 3.4 Science Threads]



Overview

Last Update: 1 Dec 2006 - reviewed for CIAO 3.4: no changes

Synopsis:

The axbary tool is used to apply a barycenter correction to the times in an observation. This is necessary in order to account for the difference in photon arrival times as the Earth and Chandra move around the Sun.

Purpose:

To barycenter-correct the photon arrival times in the event file.

Read this thread if:

you are interested in performing absolute timing analysis on any dataset (imaging or grating).

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




Contents



Background Information

Simply put, axbary operates by copying the input event file and applying a barycenter correction to all the times. In all tables, the values in the TIME column will be corrected, as will the START and STOP columns in the GTI blocks. Time-related header keywords, such as TSTART and DATE-OBS, are also corrected. The time system (time scale) is set to TDB and the time reference position is set to the barycenter; they are changed from TT and the Chandra position.

The correction is calculated using the orbit ephemeris file (orbitfile), position (ra & dec), and a reference frame (refframe). If these parameters are not specified, default values are pulled from the event file header; see ahelp axbary for which keywords are used. The correction is based on either of the JPL solar system ephemerides -- DE200 and DE405; the default for Chandra files is the DE405 solar system ephemeris. DE405 is consistent with the ICRS reference system (as are Chandra coordinates) and is more accurate. However, many pulsar timing ephemerides are based on DE200 (which uses FK5). If your results are to be compared with data derived with DE200, this must be specified by the refframe parameter.



Get Started

Sample ObsID used: 133 (ACIS-I, PSR B0540-69)

File types needed: evt2; eph1

Run this thread on the level=2 event file, or at least after you've finished any GTI/time filtering you wish to do. If you correct the times and then use a GTI filter from the pipeline, you would be filtering out the wrong intervals since those times are not barycentered.

NOTE: the most common error made in running this tool is inputting an incorrect file to the orbitfile parameter. Use the orbit ephemeris file(s) - there may be more than one for the observation - which is of the form orbitf051004864N002_eph1.fits. In the standard data distribution, these files are located in the primary directory.

A complete collection of orbit ephemeris files are also available via FTP at ftp://cda.harvard.edu/pub/arcftp/bary/ephem.

If you can't find a level=1 orbit ephemeris file on the server, the level=0 one may be used. The L1 files are the definitive orbit ephemeris files which become available about a week after the dates they cover. In addition to that information, the L0 files contain an extrapolation into the future and are thus always available when the data become available. The file with the the latest start time that is still earlier than the start time of the observation should be used (see the Run axbary section of this thread for more information). Be sure to read the Ephemeris Accuracy caveat, especially if you plan on analyzing fast pulsar data.



Run axbary

As mentioned in the Get Started, you may have more than one orbit ephemeris file for your observation. In that case, choose the file that has the highest start time less than the start time of your data for use in the orbitfile parameter. For example:

unix% ls -1 orbit*
orbitf051004864N002_eph1.fits
orbitf051580864N002_eph1.fits

unix% dmkeypar acisf00133N002_evt2.fits TSTART echo+
52019386.118647

so we would use the file orbitf051580864N002_eph1.fits. (This is the only ephemeris file in the Archive for ObsID 133.)

Now run the tool:

unix% punlearn axbary
unix% pset axbary infile=acisf00133N002_evt2.fits
unix% pset axbary orbitfile=orbitf051580864N002_eph1.fits
unix% pset axbary outfile=acis_bary_evt2.fits 
unix% axbary
input orbit ephemeris file (orbitf051580864N002_eph1.fits): 
input event file (acisf00133N002_evt2.fits): 
output file (acis_bary_evt2.fits): 
 
axBary -i orbitf051580864N002_eph1.fits -f acisf00133N002_evt2.fits -o acis_bary_evt2.fits -debug
 
axBary: Principal HDU  -  TIERRELA = 0.000000, TIERABSO = 0.001000
axBary: Clock correction 0.000000 -  TIERABSO = -1.000000
axBary: Using JPL Planetary Ephemeris DE-405
axBary: bary stuff initialized in HDU 0
axBary: HDU 0 TSTART = 52019386.118647, TSTOP = 52031409.369079
axBary: HDU 0 TSTART = 52019410.783395, TSTOP = 52031434.021589 (corrected)
axBary: Using JPL Planetary Ephemeris DE-405
axBary: bary stuff initialized in HDU 1
axBary: HDU 1 TSTART = 52019386.118647, TSTOP = 52031409.369079
axBary: HDU 1 TSTART = 52019410.783395, TSTOP = 52031434.021589 (corrected)
axBary: Using JPL Planetary Ephemeris DE-405
axBary: bary stuff initialized in HDU 2
axBary: HDU 2 TSTART = 52019386.118647, TSTOP = 52031409.369079
axBary: HDU 2 TSTART = 52019410.783395, TSTOP = 52031434.021589 (corrected)
axBary: Using JPL Planetary Ephemeris DE-405
axBary: bary stuff initialized in HDU 3
axBary: HDU 3 TSTART = 52019386.118647, TSTOP = 52031409.369079
axBary: HDU 3 TSTART = 52019410.783395, TSTOP = 52031434.021589 (corrected)
axBary: Using JPL Planetary Ephemeris DE-405
axBary: bary stuff initialized in HDU 4
axBary: HDU 4 TSTART = 52019386.118647, TSTOP = 52031409.369079
axBary: HDU 4 TSTART = 52019410.783395, TSTOP = 52031434.021589 (corrected)
axBary: Using JPL Planetary Ephemeris DE-405
axBary: bary stuff initialized in HDU 5
axBary: HDU 5 TSTART = 52019386.118647, TSTOP = 52031409.369079
axBary: HDU 5 TSTART = 52019410.783395, TSTOP = 52031434.021589 (corrected)
axBary: Using JPL Planetary Ephemeris DE-405
axBary: bary stuff initialized in HDU 6
axBary: HDU 6 TSTART = 52019386.118647, TSTOP = 52031409.369079
axBary: HDU 6 TSTART = 52019410.783395, TSTOP = 52031434.021589 (corrected)
axBary: Using JPL Planetary Ephemeris DE-405
axBary: bary stuff initialized in HDU 7
axBary: HDU 7 TSTART = 52019386.118647, TSTOP = 52031409.369079
axBary: HDU 7 TSTART = 52019410.783395, TSTOP = 52031434.021589 (corrected)

The contents of the parameter file may be checked with plist axbary.

You can now use dmlist to compare the arrival times in the two files:

unix% dmlist acisf00133N002_evt2.fits"[cols time]" data rows=1:5
 
--------------------------------------------------------------------------------
Data for Table Block EVENTS
--------------------------------------------------------------------------------
 
ROW    time                
 
     1  52021125.5213043019
     2  52021125.5213043019
     3  52021125.5213043019
     4  52021125.5213043019
     5  52021125.5213043019

unix% dmlist acis_bary_evt2.fits"[cols time]" data rows=1:5
 
--------------------------------------------------------------------------------
Data for Table Block EVENTS
--------------------------------------------------------------------------------
 
ROW    time                
 
     1  52021150.1838450283
     2  52021150.1838450283
     3  52021150.1838450283
     4  52021150.1838450283
     5  52021150.1838450283

In this case, the time transformation results in a 25 second difference between the events in the two files. Barycenter corrections can be anywhere between -500 and +500 seconds, depending on source position and time of year.




Summary

This thread is now complete; all the events in the file have been barycenter corrected. Note that although is does not hurt to run this thread more than once on the same dataset, nothing will be changed after the first run.




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


     orbitfile = orbitf051580864N002_eph1.fits input orbit ephemeris file
        infile = acisf00133N002_evt2.fits   input event file
       outfile = acis_bary_evt2.fits output file
           (ra = INDEF)           RA to be used for barycenter corrections
          (dec = INDEF)           Dec to be used for barycenter corrections
     (refframe = INDEF)           Reference frame to be used
      (clobber = no)              Clobber existing file
         (mode = ql)              
    

History

16 Dec 2004 reviewed for CIAO 3.2: no changes
08 Dec 2005 updated for CIAO 3.3: the case of two parameter names has been changed: "orbitFile" is now "orbitfile" and "refFrame" is "refframe".
01 Dec 2006 reviewed for CIAO 3.4: no changes

Return to Threads Page: Top | All | Timing
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.