|
|
|
|
Synopsislightcurves - routines to remove periods of anomalously high (or low) count rates in a lightcurve Syntax
require ("lightcurves");
DescriptionThe lightcurves module provides two routines that can be used to remove periods of high (or low) count rates in a lightcurve. The first - lc_clean() - is designed for use with the ACIS background files and is based on the lc_clean program created by Maxim Markevitch. The second - lc_sigma_clip() - is a simple sigma-clipping routine. See "ahelp lc_clean" and "ahelp lc_sigma_clip" for more information about the individual routines. Loading the moduleThe module can be loaded into a S-Lang interpreter - such as chips, sherpa, or slsh - by saying:
require ("lightcurves");
This only needs to be done once per session (when using an interactive shell such as chips or sherpa). Loading the module will make available the lc_clean and lc_sigma_clip routines. The two routines use different algorithms to detect flares in a light curve. Both are intended to be used with data that has relatively high count rates (i.e. ones in which bins are not expected to have no counts in them). The default mode is to create a plot showing the selected periods of the light curve, and to display the filter on screen. They can also be used to create a GTI file which encodes this information and can be used to filter the event file to remove these periods. Example 1
chips> lc_clean("bg.lc");
chips> add_window;
chips> lc_sigma_clip("bg.lc");Display the results of the two algorithms in two windows to aid comparison of the results. Example 2
chips> lc_clean("bg.lc"; outfile="clean.gti");Filter the light curve in the file bg.lc using the lc_clean algorithm and create a GTI file (clean.gti). This file can then be used to filter the event file (here assumed to be called evt2.fits) using dmcopy: unix% dmcopy "evt2.fits[@clean.gti]" evt2.cleaned.fits Example 3
chips> lc_sigma_clip("bg.lc"; outfile="clip.gti");Filter the light curve in the file bg.lc using the lc_sigma_clip algorithm and create a GTI file (clip.gti). This file can then be used to filter the event file (here assumed to be called evt2.fits) using dmcopy: unix% dmcopy "evt2.fits[@clip.gti]" evt2.cleaned.fits FORMAT OF LIGHT CURVESThe routines are designed to work with light curves that were created using the CIAO dmextract tool, run with the opt parameter set to ltc1. They should however also work with any file which has the following columns:
If the file contains OBJECT and OBS_ID keywords then these will be used to label the plot. CHANGES SINCE CIAO 4.1CIAO 4.1 - 1.1Both routines have been enhanced to better handle "extreme" lightcurves (i.e. those that contain large variations in the count rate) and lc_sigma_clip() can now handle lightcurves which result in a large number of GTIs being created. The screen output - when verbose is 1 - includes more information, including accounting for the DTCOR value (dead-time correction factor) if present in the lightcurve. CHANGES IN CIAO 4.1Combined the lc_clean and analyze_ltcrv scriptsThe lightcurves script is a combination of the lc_clean.sl and analyze_ltcrv.sl scripts from earlier releases of CIAO. Users who load analyze_ltcrv.sl or lc_clean.sl will find that a warning message is displayed, but that they should be able to use the commands as before. This is a temporary change, intended to avoid immediate disruption to scripts and workflow, but users are urged to update to using lightcurves.sl directly since the lc_clean() and lc_sigma_clip() routines it contains provide more options than the old versions. Renamed analyze_ltcrv to lc_sigma_clipThe analyze_ltcrv routine has been renamed to lc_sigma_clip. This routine can now create a GTI file rather than just printing the good time intervals to the screen. Improved (and common) optionsThe method for specifying optional arguments - such as the name of an output file - has been re-worked to use the qualifier support in S-Lang v2.1. Common options for the two routines now have the same name and behave the same way. Plot suppportPlots of the lightcurves, together with a histogram of the cleaned (and original) data are displayed by default (they can be turned off). If a GTI file is created then the time ranges excluded by this file are added to the plot (this can also be turned off). NOTESThis script is not an official part of the CIAO release but is made available as "contributed" software via the CIAO scripts page. Please see the installation instructions page for help on installing the package. BugsSee the bugs page for this script on the CIAO website for an up-to-date listing of known bugs. See Also
|
![]() |
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. |