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

Skip the navigation links
Last modified: March 2007

URL: http://cxc.harvard.edu/ciao3.4/lc_clean.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 lc_clean Context: tools

Synopsis

lc_clean.sl - Clean a lightcurve to match the ACIS "blank-sky" datasets

Description

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.

Example 1

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

Example 2

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

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: March 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.