|
|
|
|
Synopsislc_clean.sl - Clean a lightcurve to match the ACIS "blank-sky" datasets DescriptionThe 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 slsh ("ahelp slsh"), as shown in the example. To load the script: slsh> () = evalfile( "lc_clean.sl" ) This step is only necessary once per slsh session. This script is used in the Using the ACIS "Blank-Sky" Background Files thread. RUN-TIME ERROR MESSAGESWhen lc_clean.sl prints an error message, it may also print a S-lang run-time error: ** ERROR ** Unable to read input lightcurve. ./lc_clean.sl:148: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 1slsh> lc->verbose = 1 slsh> 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 Example 2slsh> lc->verbose = 0 slsh> lc->outfile = "evt2_bg.gti" slsh> 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 CHANGES IN CIAO 4.0/LC_CLEAN.SL 1.10Removal of plotting routinesThe plotting routines have been removed from the script, since they will not work in ChIPS 4.0. Otherwise, lc_clean.sl functionality is unchanged. The plotting functionality will be replaced soon. Code updatesThe script checks for the histogram module and defaults to the cxcdm module if histogram is unavailable. This replaces the CIAO 3.4 use of VARMM (Variable, Math and Macro S-Lang library). 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. |
![]() |
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. |