Skip banner and navigation tools.

 |  site map

Skip sidebars of related page links.

Exposure-correction of light-curves

As mentioned in the exposure maps thread, there are a number of bad columns on the XRT CCD which are permanently masked out. Exposure maps are used to correct the ARFs and, hence, the spectral flux. This method can be used to determine the orbit-by-orbit corrections for the light-curves as well. However, the Swift tool xrtlccorr is a useful way to determine these more quickly and easily for any light-curve bins which are no longer than a snapshot in duration. When multiple orbits need to be combined to get a detection of the source, (and the subsequent count-rate corrected before inclusion in the light-curve), then the exposure map method is required.

xrtlccorr

By default, xrtlccorr will determine a correction factor for every ~10 s of data (every 10 WT frames or 4 PC frames); this accounts for possible changes in attitude within a single snapshot of data. To calculate a single correction factor per snapshot, the command wtnframe=0 (or pcnframe=0) should be included on the command line. This is useful when a single light-curve point is required for the entire snapshot.

Note that the time bins of the input light-curve cannot be longer than 10 s. See the end of this thread for information about how to correct longer time bins.

Below, a PC light-curve extracted for the first observation of GRB 091029 is used as an example - creating just a single correction factor for each snapshot:

> xrtlccorr pcnframe=0

> Name of the input region file or NONE to read region from lcfile [ ] NONE
> Name of the input Light Curve FITS file or NONE to read region from regionfile [ ] PC.lc
> Name of the Corrected Light Curve [ ] PC_corr.lc
> Name of the output file [ ] pc.corr
> Name of the input Attitude FITS file [ ] sw00374210000pat.fits
> Name of the output Instrument Map File [ ] DEFAULT
> Name of the input Event FITS file [ ] sw00374210000xpcw3po_cl.evt
> Name of the input Housekeeping Header Packets FITS file [ ] sw00374210000xhd.hk


---------------------------------------------------------------------
                Running 'xrtlccorr_0.2.9'
---------------------------------------------------------------------
                 Input Parameters List:
Name of the input Light Curve file       :'10s.lc'
Name of the input region file            :'NONE'
Name of the output Light Curve file      :'10s_corr.lc'
Name of the output file                  :'10s.corr'
Name of the input TELDEF file            :'CALDB'
Name of the the input attitude file      :'sw00374210000pat.fits'
Should aberration be included in aspecting? : no
Interpolate Attitude values?             : no
Correct for PSF:                         : yes
Name of the PSF CALDB file               :'CALDB'
Source X coordinate                      : -1.000000
Source Y coordinate                      : -1.000000
Energy value for PSF and Vignetting correction : 1.500000
Name of the output Instrument Map file   :'DEFAULT'
Name of the input Event file             :'sw00374210000xpcw3po_cl.evt'
Name of the input FOV region file        :'CALDB'
Name of the input HK Header file         :'sw00374210000xhd.hk'
---------------------------------------------------------------------

xrtlccorr_0.2.9: Info: Name for the output instrument file is:
xrtlccorr_0.2.9: Info: '10s_srawinstr.img'
xrtlccorr_0.2.9: Info: regionfile set to NONE, the region will be read from lcfile
xrtlccorr_0.2.9: Info: Processing '10s.lc' file.
xrtlccorr_0.2.9: Info: Processing 'sw00374210000xpcw3po_cl.evt' file.
xrtlccorr_0.2.9: Info: Processing sw00374210000xhd.hk file.
xrtlccorr_0.2.9: Info: Processing '/usr/local/swift//caldb34/data/swift/xrt/bcf/instrument/swxregion20010101v004.fits' file.
xrtlccorr_0.2.9: Info: Processing '/usr/local/swift//caldb34/data/swift/xrt/cpf/vign/swxvign20010101v001.fits' CALDB file.
xrtlccorr_0.2.9: Info: Creating Raw Instrument Map.
xrtlccorr_0.2.9: Info: Processing '/usr/local/swift//caldb34/data/swift/xrt/bcf/teldef/swx20070911v001.teldef'  CALDB file.
xrtlccorr_0.2.9: Info: Appended 1 image in 10s_srawinstr.img file
xrtlccorr_0.2.9: Info: Appended 2 image in 10s_srawinstr.img file
xrtlccorr_0.2.9: Info: Appended 3 image in 10s_srawinstr.img file
xrtlccorr_0.2.9: Info: Appended 4 image in 10s_srawinstr.img file
xrtlccorr_0.2.9: Info: Appended 5 image in 10s_srawinstr.img file
xrtlccorr_0.2.9: Info: Appended 6 image in 10s_srawinstr.img file
xrtlccorr_0.2.9: Info: Appended 7 image in 10s_srawinstr.img file
xrtlccorr_0.2.9: Info: File '10s_srawinstr.img' successfully written.
xrtlccorr_0.2.9: Info: Creating rate correction file.
xrtlccorr_0.2.9: Info: The instrument map is corrected for vignetting
xrtlccorr_0.2.9: Info: set energy input parameter to 1.500000.
xrtlccorr_0.2.9: Info: File '10s.corr' successfully written.
xrtlccorr_0.2.9: Info: Correcting light curve.
xrtlccorr_0.2.9: Info: File '10s_corr.lc' successfully written.
---------------------------------------------------------------------
xrtlccorr_0.2.9: Exit with success.
---------------------------------------------------------------------

Note that the attitude file must match the file used when running xrtpipeline to create the event list; this will typically be the *pat.fits file with the latest version of the software. Further details are given on the xrtdigest and xrtpipeline pages.

The output FITS file pc.corr will have a correction factor for every snapshot (or every 10s if pcnframe=0 was not used). Using fv to open the file and look at the LCCORRFACT extension shows a 2 column table of the start time of the snapshot in MET (Mission Elapsed Time - seconds since 2001-01-01) and the corresponding correction factor. If the only correction is due to the source overlapping the bad columns, then this factor should be ≲ 2. If, however, the light-curve has been extracted with an annulus to avoid pile-up (or a very small extraction region has been used), this factor can be much larger.

If, as in the above example, a light-curve was given as the input to xrtlccorr, then the output light-curve file (PC_corr.lc) will have been corrected by the same factors given in pc.corr. Alternatively, if only the list of correction factors is required, the relevant extraction region can be given instead of the input light-curve. In this case, the region file should be in image pixels (not fk5) and should not contain anything other than a single line with the position, e.g. simply

circle(495.48608,476.91993,10.0)

Note that the corrected light-curve has not been background subtracted. this needs to be done separately, by using the standard FTool lcmath:

> lcmath err_mode=2
> Name of input FITS file [ ] PC_corr.lc
> Name of background FITS file [ ] PCback.lc
> Name of output FITS file [ ] PC_corr_sub.lc
> Scaling factor for input [ ] 1
> Scaling factor for background [ ] 0.25
> Add instead of subract? [ ] no
Net or Sum light curve will be corrected
WARNING: Light curves possibly asynchronous! Check output.
100% completed

The "scaling factor for background" is the ratio of the areas. In this case, the source region used was 30 pixels in radius, while the background region had a radius of 60 pixels, so the background area needs to be shrunk by 302/602 = 0.25. The warning about the light-curves possibly being asynchronous is generally caused by some of the background time bins not having any counts. If the light-curves do not actually overlap in time, an error will be generated.

N.B. The err_mode=2 command should ensure that the errors are propagated correctly, even when a source correction factor is included (see below). We caution that the error propagation for lcmath is only strictly valid for background subtraction in the case where there are more than about 10 counts bin-1 in the source light-curve.

Correcting longer time bins

Index