Skip to the navigation links
Last modified: 24 October 2024

URL: https://cxc.cfa.harvard.edu/ciao/merging/timing.html

Merging Central

Timing Analysis Across Multiple Observations



Using merged data sets.

Timing Analysis with Combined Observations

As in the spectral case, in general, merged observations should not be used for timing analysis. Different pointings, roll angles, bad pixels, and other instrumental effects can lead to incorrect count rates. However, in conditions similar to those described in Caveat: Extracting Spectra from Merged Datasets, "reasonable" results can be obtained when extracting a light curve.

In the following example(s), we use three pointings of the lenticular "Cartwheel" Galaxy (ObsIDs 2019, 9531, 9807) over a ~7 year period, of the 'ULX N10' point source (\(\alpha = \mathrm{00^{h}37^{m}39.38^{s}}, \delta = \mathrm{-33^{\circ} 43' 23.08''}\); A&A 426 787, MNRAS 406 1116), which corresponds to the Chandra Source Catalog master source 2CXO J003739.3-334323, which we make use of for our extraction source and background regions.

unix% cat ULX-N10.wcs.reg
ellipse(0:37:39.3936,-33:43:23.517,0.02693',0.02205',100.05401)

unix% cat ULX-N10.bkg.wcs.reg
ellipse(0:37:39.3929,-33:43:23.522,0.13467',0.11023',100.05404)
-ellipse(0:37:39.3929,-33:43:23.522,0.02963',0.02425',100.05404)

Approach I:

Time order matters when combining separate light curve files.

For example:

bash/dash/zsh (t)csh
unix% tbin=2592.8 set tbin=2592.8
unix% lc_bin="bin time=::${tbin}" set lc_bin="bin time=::${tbin}"
unix% efilt="500:7000" set efilt="500:7000"
unix% src="sky=region(cartwheel.wcs.reg)" set src="sky=region(cartwheel.wcs.reg)"
unix% bkg="sky=region(cartwheel.bkg.wcs.reg)" set bkg="sky=region(cartwheel.bkg.wcs.reg)"
unix% dmextract infile="cartwheel_2019_reproj_evt.fits[${src},${efilt}][${lc_bin}]" \ ? outfile=2019_${tbin}s.lc bkg="cartwheel_2019_reproj_evt.fits[${bkg},${efilt}]" opt=ltc1 clobber+ unix% dmextract infile="cartwheel_9531_reproj_evt.fits[${src},${efilt}][${lc_bin}]" \ ? outfile=9531_${tbin}s.lc bkg="cartwheel_9531_reproj_evt.fits[${bkg},${efilt}]" opt=ltc1 clobber+ unix% dmextract infile="cartwheel_9807_reproj_evt.fits[${src},${efilt}][${lc_bin}]" \ ? outfile=9807_${tbin}s.lc bkg="cartwheel_9807_reproj_evt.fits[${bkg},${efilt}]" opt=ltc1 clobber+ unix% dmmerge infile=2019_${tbin}s.lc,9531_${tbin}s.lc,9807_${tbin}s.lc \ ? outfile=lightcurve_merged_${tbin}s.lc clobber+ unix% dmmerge infile=9807_${tbin}s.lc,9531_${tbin}s.lc,2019_${tbin}s.lc \ ? outfile=lightcurve_merged-timereverse_${tbin}s.lc clobber+ unix% dmmerge infile=9531_${tbin}s.lc,2019_${tbin}s.lc,9807_${tbin}s.lc \ ? outfile=lightcurve_merged-timedisordered_${tbin}s.lc clobber+
[NOTE]
Note

An extra complication neglected in this case example (badpixels, effective area, detector effects on response, etc.), is that timing analysis also depends on the number of active CCDs that are readout, and/or any sub-arrays used. For instance, in our example two of the ObsIDs have five active CCDs with a TIMEDEL of 3.141 (s) and DTCOR of 0.9869 while the remaining ObsID uses six CCDs with TIMEDEL of 3.241 (s) and DTCOR of 0.9873. These are not big differences, but integrated over thousands of frames, it can have an effect.

For plotting purposes, if the light curve is being plotted as unconnected scatter plot, the order doesn't matter. However, for use in downstream processing, it will matter for many tools, if the software does not perform sorting internally, there can be a runtime failure.

Compare the Effect of Merging Order on Light Curve Files

[Thumbnail image: compare ordering on merging light curve files]

[Version: full-size]

[Print media version: compare ordering on merging light curve files]

Compare the Effect of Merging Order on Light Curve Files

The merging order of extracted light curve files affects the resultant combined light curve. The left hand plots are the light curves, as net count rate as a function of time and the right hand side plots are the time stamped, extracted light curve row number (array index number). The upper plots are from combining the individual light curves in time order while the lower plots are combining the light curve files in time-reverse. The middle plots are from combining the light curves unordered with time. The color bar represents the FITS light curve table row of the plotted data set.

Approach II (not recommended):

Extracting a light curve from a merged event file, which was combined without concern for time order, will generate a properly ordered light curve.

[WARNING]
Warning

This example is only applicable to ACIS data and is much more likely to functionally fail or provide erroneous results. If different sets of CCDs amongst the ObsIDs are used then the incorrect GTI will be used for a subset of the events, and if different number of CCDs or if mixing sub-arrays and full frame data sets, then different TIMEDEL and DTCOR will be applied.

The merging order of events files does not affect the resulting extracted light curve since dmextract will sort the events by time when extracted. However the large time gaps in the data will be included in the light curves since the data set is binned with time.

Compare the Effect of Merging Order on Events Files and Extracted Light Curve

[Thumbnail image: compare light curves extracted from merged event files]

[Version: full-size]

[Print media version: compare light curves extracted from merged event files]

Compare the Effect of Merging Order on Events Files and Extracted Light Curve

The merging order of events files does not affect the resulting extracted light curve. The left hand plots are the light curves, as net count rate as a function of time and the right hand side plots are the time stamped, extracted light curve row number (array index number). The upper plots are extracted from events files merged in time order while the lower plots are extracted from events files merged in time-reverse. The middle plots are from light curves extracted events files unordered in time. Take note of the zero-valued time bins that are included for the time gaps between observations. The color bar represents the FITS light curve table row of the plotted data set.

[NOTE]
Note

If there are large time gaps, then extracting the lightcurve from a merged event file will result in a significantly larger output file since it will need to write time bins that contain zero counts.

  unix% ls -alh merged*2592.8s*.lc
  -rw-r--r-- 1 user group  14M Feb 17  2023 merged_2592.8s.lc
  -rw-r--r-- 1 user group  14M Feb 17  2023 merged_time-disordered_2592.8s.lc
  -rw-r--r-- 1 user group  14M Feb 26 14:11 merged_timereverse_2592.8s.lc

  unix% ls -alh lightcurve*2592.8s*.lc
  -rw-r--r-- 1 user group 155K Feb 26 16:41 lightcurve_merged_2592.8s.lc
  -rw-r--r-- 1 user group 155K Feb 26 16:41 lightcurve_merged-timedisordered_2592.8s.lc
  -rw-r--r-- 1 user group 155K Feb 26 16:41 lightcurve_merged-timereverse_2592.8s.lc

The general suggestion is to go along with Approach I and handle time ordering when merging the light curve files together. The minor hassle in doing so early on will avoid possible downstream headaches whilst also minimizing resultant file sizes.

Other Considerations

General Caveats