lc_clean.sl - Clean a lightcurve to match the ACIS "blank-sky" datasets
The script lc_clean.sl is used to select those regions of the
lightcurve that do not contain flares. The algorithm used is
taken from the lc_clean program created by Maxim Markevitch,
and is different from that used by the analyze_ltcrv.sl
script.
The script is run from within ChIPS ("ahelp chips"), as shown in
the example, or Sherpa ("ahelp sherpa"). To load the script:
chips> () = evalfile( "lc_clean.sl" )
This step is only necessary once per ChIPS or Sherpa session.
This script is used in the Using the ACIS "Blank-Sky" Background Files thread.
chips> lc->verbose = 1
chips> lc_clean( "evt2_bg.lc" )
The script is run with all default parameter values,
except the verbose flag is set to 1 to produce extra
screen output:
Parameters used to clean the lightcurve are:
mean = NULL
clip = 3
max_scale = 1.2
max_sigma = NULL
minfrac = 0.1
outfile = NULL
verbose = 1
Total number of bins in lightcurve = 38
Max length of one bin = 255.997 s
Num. bins with a smaller exp. time = 9
Number of bins with a rate of 0 ct/s = 7
Calculated an initial mean (sigma-clipped) rate of 0.489577 ct/s
Lightcurve limits use a scale factor of 1.2 about this mean
Filtering lightcurve between rates of 0.407981 and 0.587492 ct/s
Number of good time bins (drawn in green) = 29
Mean level of filtered lightcurve = 0.488992 ct/s
chips> lc->verbose = 0
chips> lc->outfile = "evt2_bg.gti"
chips> lc_clean( "evt2_bg.lc" )
Since an output file is specified, the lc_clean() function
runs the dmgti tool using the calculated range, and
creates the an GTI file named "evt2_bg.gti".
The screen output for this run is:
Total number of bins in lightcurve = 38
Max length of one bin = 255.997 s
Num. bins with a smaller exp. time = 9
Number of bins with a rate of 0 ct/s = 7
Calculated an initial mean (sigma-clipped) rate of 0.489577 ct/s
Lightcurve limits use a scale factor of 1.2 about this mean
Filtering lightcurve between rates of 0.407981 and 0.587492 ct/s
Number of good time bins (drawn in green) = 29
Mean level of filtered lightcurve = 0.488992 ct/s
Creating GTI file
Created: evt2_bg.gti
|