About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2007

URL: http://cxc.harvard.edu/ciao4.0/analyze_ltcrv.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 4.0 analyze_ltcrv Context: tools

Synopsis

analyze_ltcrv.sl - An algorithm for cleaning lightcurves

Description

The analyze_ltcrv.sl script analyzes a lightcurve, e.g. created by dmextract. It performs an iterative sigma-clipping algorithm, removing those points that fall outside +/-3 sigma from the mean at each iteration until all data points are within +/-3 sigma. This algorithm is robust but not perfect; it can easily "overclean" a noisy lightcurve and should not be used blindly. The output is a list of the accepted time periods and their lengths.

The output time periods can then be used to filter the event list, either by using dmgti to create a GTI file, or directly within a DM filter expression.

The script is run from within slsh ("ahelp slsh"), as shown in the example. To load the script:

slsh> () = evalfile("analyze_ltcrv.sl")

This step is only necessary once per slsh session.

This script is used in the Filtering Lightcurves thread.

RUN-TIME ERROR MESSAGES

When analyze_ltcrv.sl prints an error message, the "myerror" routine also prints a S-lang run-time error:

** ERROR **
 analyze_ltcrv() stopped as unable to read data from file

./analyze_ltcrv.sl:63:myerror:Run-Time Error

As long as this is preceded by a script error ("** ERROR **"), it may be ignored. If it does not appear that a script error condition was met, contact the CXC HelpDesk for assistance.

Example

slsh> analyze_ltcrv("lc_c7.fits")

Running analyze_ltcrv.sl from within slsh. The screen output is:

((time > 77377570.949648) && (time < 77399570.949648))  ; 22.00 ksec
((time > 77404770.949648) && (time < 77406770.949648))  ;  2.00 ksec

These time periods can be used to filter the event list, either by using dmgti to create a GTI file, or directly within a DM filter expression.

CHANGES IN CIAO 4.0/ANALYZE_LTCRV.SL 1.6

Removal of plotting routines

The plotting routines have been removed from the script, since they will not work in ChIPS 4.0. Otherwise, analyze_ltcrv.sl functionality is unchanged. The plotting functionality will be replaced soon.

Code updates

The script has been updated to use the cxcdm module in place of VARMM (Variable, Math and Macro S-Lang library).

NOTES

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

Bugs

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

Hardcopy (PDF): A4 | Letter
Last modified: December 2007



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.