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

Skip the navigation links
Last modified: 4 February 2008

URL: http://cxc.harvard.edu/ciao3.4/download/scripts/index.html
Hardcopy (PDF): A4 | Letter

CIAO 3.4 Contributed Scripts



Introduction

Many data analysis tasks, particularly those that involve a formulaic procedure or many repetitions of a process, can be greatly simplified with scripts. Analysis scripts allow users to extend the functionality of a software package by writing custom "tools" to fit their specific needs. CIAO provides extensive support for the S-Lang scripting language, but shell and Perl scripts can also be used.

The scripts on this page are written and maintained by local CIAO users at the CXC. We provide them here because many users have found them helpful in their data analysis. In addition, scripts are sometimes written to address known problems or limitations of the CIAO software that affect many users. Most of the scripts have an associated analysis thread that explains their use.

We hope you will find these scripts helpful in your own data analysis. However, please be aware that these are not official CIAO tools, meaning that they are not fully supported by the CXC. When using one of these scripts, you should always be aware of exactly what the script is doing, as you are responsible for the validity of any scientific results obtained from it. If you find a problem with a script, please notify the CXC Helpdesk so that we can alert the script's maintainer. However, some scripts are no longer maintained by their original author, so we cannot guarantee when or if problems with scripts will be fixed.


Installation

The installation instructions explain how to install the script package (CIAO_scripts.tar), as well as how to run individual scripts.


Download the Scripts

CIAO_scripts.tar Last Updated:
04 Feb 2008
All the scripts listed on this page, packaged for seamless integration with CIAO; see README_CIAO_scripts for more information.

A VERSION.CIAO_scripts file is included in the scripts package. This allows you to check if you are working with the newest set of scripts:

unix% cat $ASCDS_CONTRIB/VERSION.CIAO_scripts 
04 Feb 2008  15:00:55 EST

The VERSION.CIAO_scripts file is updated when you install a newer scripts package.

History of Changes

Package Version Script Changes
04 Feb 2008 add_grating_spectra Updated to v3.4. Several broken Unix "tail" commands were replaced with the CIAO tool dmkeypar.
13 Sept 2007 show_tgain_corr.sl Updated to version v1.7.
The script uses new calibration files released in CALDB 3.4.1.
25 Apr 2007 acis_bkgrnd_lookup Updated to version v1.12.
The script has been updated for use with the new ACIS blank-sky background files released in CALDB 3.4.0. The script is NOT backward-compatible; you must upgrade to CALDB 3.4.0 to use acis_bkgrnd_lookup v1.12. A list of specific changes made is available in the help file ("ahelp acis_bkgrnd_lookup").
merge_all Updated to version v3.6.
A "[subspace -expno]" filter was added to the dmmerge command. This is needed as a workaround for a problem merging data with different EXPNO ranges. If you intend to create lightcurves binned on exposure number, read the caveat in the help file ("ahelp merge_all").
show_tgain_corr
show_tgain_corr.sl
Updated to version v1.6.
The scripts use new calibration files released in CALDB 3.4.0.

The Script Update History has a record of all changes made to the scripts package since the most recent CIAO release.


Scripts included in the Package (by category)

Introductory
Script Associated thread(s) Language Version Last update
example1.sl - example12.sl S-Lang tips help page S-Lang 23-Oct-2001
Code and examples of use from ahelp slang tips
Data Preparation
Script Associated thread(s) Language Version Last update
acis_bkgrnd_lookup Using the ACIS "Blank-Sky" Background Files slsh 1.12 29-Mar-2007
Find the ACIS "blank-sky" datasets in the CALDB matching your observation; acis_bkgrnd_lookup help page
acis_set_ardlib Use Observation-specific Bad Pixel Files slsh 1.5 21-Jan-2005
Update ardlib.par files to find bad pixel lists; acis_set_ardlib help page
analyze_ltcrv.sl Filtering Lightcurves S-Lang 1.5 25-Jun-2003
An alternative algorithm for cleaning lightcurves; analyze_ltcrv.sl help file
lc_clean.sl Using the ACIS "Blank-Sky" Background Files S-Lang 1.9 20-Jun-2003
Clean a lightcurve to match the ACIS "blank-sky" datasets; lc_clean.sl help file
monitor_photom Processing ACA Monitor Window Data slsh 1.0 23-Jun-2005
Generate a photometric light curve for a Chandra target which was observed using an ACA monitor window; monitor_photom help file
show_tgain_corr Why topic: ACIS Time-dependent Gain slsh 1.6 16-Apr-2007
Determine the size of the ACIS time-dependent gain adjustment for a given source location; show_tgain_corr help file
show_tgain_corr.sl Why topic: ACIS Time-dependent Gain slsh 1.7 13-Sep-2007
Called by show_tgain_corr. Determine the size of the ACIS time-dependent gain adjustment for a given source location.
Imaging
Script Associated thread(s) Language Version Last update
acis_expmap Detecting Sources in Imaging Observations - Using celldetect sh 3.3 27-Sep-2005
Generate ACIS exposure maps for celldetect recursive blocking; acis_expmap help file
color_image Create A True Color Image sh 3.0 27-Feb-2001
Make a color JPG image; color_image help file
get_sky_limits Match the Binning of an Image slsh 1.6 2-Nov-2004
Find the required binning to match two images; get_sky_limits help page
merge_all Use merge_all Script to Compute ACIS Exposure Maps and Fluxed Images; Merging Data from Multiple Imaging Observations Perl 3.6 11-Apr-2007
Combine arbitrary number of ObsIDs, create exposure maps and fluxed images; merge_all help page
mkBgReg.pl, mkSubBgReg.pl Create an Image of Diffuse Emission Perl 1.1 11-Oct-2002
Create a smoothed, exposure-corrected image of diffuse emission; mkbgreg.pl help file and mksubbgreg.pl help file
spectrum.sl Calculating Spectral Weights S-Lang 2.1 11-Jul-2004
Calculate spectral weights for creating an instrument map using S-Lang; spectrum.sl help file
sstats.sl Calculating Statistics of Images S-Lang 0.4 4-Oct-2001
Use S-Lang to calculate statistics of images; sstats.sl help file
Imaging Spectroscopy
Script Associated thread(s) Language Version Last update
acis_fef_lookup Extract ACIS Spectra for Pointlike Sources and Make RMFs and ARFs and Step-by-Step Guide to Creating ACIS Spectra (among others) slsh 1.20 13-Feb-2007
Find the FITS Embedded Function file for use by mkrmf; acis_fef_lookup help page
acisspec Extracting Extended Source Spectra and Responses and Coadding Spectra and Weighted Responses sh 4.0 07-Feb-2007
Extract point-like and extended ACIS spectra with weighted responses or coadd acis spectra; acisspec help page
psextract Extract ACIS Spectra for Pointlike Sources and Make RMFs and ARFs sh 4.0 07-Feb-2007
Extract source and background ACIS spectra for point-like sources and build associated ARFs and RMFs; psextract help page
regions.sl Displaying the FEF Regions Covered by a Source S-Lang 1.2 17-Jul-2003
Display the FEF regions covered by a source; regions.sl help file
show_wgt.sl Weighting ARFs and RMFs: multiple sources S-Lang 1.2 22-Oct-2001
Examine the weights file created by mkwarf; show_wgt.sl help file
Grating Spectroscopy
Script Associated thread(s) Language Version Last update
add_grating_orders Extract Coadded and Grouped Nth-Order Source & Background Spectra and ARFs sh 2.2 22-May-2001
Add positive and negative diffraction orders of a grating PHA spectra and the corresponding ARFs; add_grating_orders help page
add_grating_spectra Add Grating Spectra and Average ARFs sh 3.4 4-Feb-2008
Add two source and background grating PHA spectra, average the corresponding ARFs, and group the coadded spectrum; add_grating_spectra help page
fullgarf Create Grating ARFs for HETG/ACIS-S and LETG/ACIS-S data sh 4.0.1 12-Feb-2007
Create a grating ARF for a particular order; fullgarf help page
tg_bkg Create PHA Background File for Use in XSPEC sh 1.1 28-Jul-2005
Create PHA background file for use in XSPEC; tg_bkg help file
tg_osort_img Create an Order-Sorting Image slsh 0.7 12-Dec-2005
Create an image that shows the density of events in different orders; tg_osort_img help file
tg_scale_reg Measure Grating Dispersion Distance slsh 1.4 12-Dec-2005
Display dispersion distance on the sky image of a grating observation; tg_scale_reg help file
Sherpa
Script Associated thread(s) Language Version Last update
chart_spectrum.sl Preparing to Run ChaRT S-Lang 1.0.1 18-Feb-2004
Create a source spectrum for input to ChaRT; chart_spectrum.sl help file
paramest.sl Computing Confidence Levels S-Lang 1.12 2-Nov-2004
Simplify the calculation of confidence levels using a S-Lang interface to the Sherpa parameter-estimation commands; paramest help page
setplot.sl Changing the look of Sherpa plots using setplot.sl S-Lang 1.3 2-Nov-2004
Simplify configuration of Sherpa plots; setplot help page
sherpa_plotfns.sl Fitting FITS Image Data
Advanced customization of Sherpa plots
S-Lang 1.29 2-Nov-2004
  • Customize Sherpa plots using S-Lang function hooks as described in ahelp sherpa_plotfns.
  • Create a radial (circlular or elliptical) profile of a two-dimensional fit; see the help pages for the plot_rprof() and plot_eprof() functions.
sherpa_utils.sl Changing the grouping scheme of a dataset within Sherpa
Calculating K-corrections using S-Lang and Sherpa
S-Lang 1.26 2-Nov-2004
A collection of useful functions for users of Sherpa. Includes: as well as other miscellaneous functions. See ahelp sherpa_utils for more information.
simspec Simulating 1-D Data: the S-lang Script simspec slsh 1.1 9-Feb-2006
Create and fit a simulated PHA spectrum; simspec help page
Hardcopy (PDF): A4 | Letter
Last modified: 4 February 2008


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.