analyze_ltcrv.sl - An algorithm for cleaning lightcurves
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 graph of the
lightcurve, showing suggested excluded points in red and
accepted points in green, together with 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 ChIPS ("ahelp chips"), as shown
in the example. To load the script:
chips> () = evalfile("analyze_ltcrv.sl")
This step is only necessary once per ChIPS session.
This script is used in the Filtering Lightcurves thread.
chips> analyze_ltcrv("lc_c7.fits")
Running analyze_ltcrv.sl from within ChIPS. 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.
|