Chandra X-Ray Observatory (CXC)
Skip to the navigation links
Last modified: 18 October 2012

URL: http://cxc.harvard.edu/ciao/download/scripts/contents.html

Scripts Package:
List of Scripts and Modules


Data Retrieval | Data Preparation | Imaging Analysis | Grating Analysis | PSFs | Utilities | Modules

Data Retrieval

find_chandra_obsid Provide command-line access to the Chandra Footprint service, allowing users to find - and optionally download - publicly-available Chandra data by position or object name

Thread: How to Download Chandra Data from the Archive

download_chandra_obsid Provides easy command-line downloads of public Chandra data

Thread: How to Download Chandra Data from the Archive

Data Preparation

chandra_repro Data reprocessing script that runs all the recommended analysis threads for a given set of observations. [Updated] (15 Oct 2012)

Thread: Reprocessing Data to Create a New Level=2 Event File

acis_bkgrnd_lookup Find the ACIS "blank-sky" datasets in the CALDB matching your observation

Thread: Analysing the ACIS Background with the "Blank-Sky" Files

hrc_bkgrnd_lookup Find the HRC-I background event and spectrum files in the CALDB matching your observation

Thread: The HRC-I Background Event Files, The HRC-I Background Spectra Files

deflare

Run either lc_clean or lc_sigma_clip from the command line to filter flares from a lightcurve. These lightcurve routines are provided by the lightcurves module.

Thread: Filtering lightcurves

Imaging Analysis

fluximage Create exposure-corrected images and exposure maps for an observation [Updated] (15 Oct 2012)

Thread:

merge_obs; reproject_obs; flux_obs Combine an arbitrary number of ObsIDs to create exposure maps and exposure-corrected images. These scripts replace the deprecated merge_all script. [New] (15 Oct 2012)

Thread:

specextract Create source and background PHA or PI spectra and the associated unweighted or weighted ARF and RMF files for point and extended sources

Thread: Extract Spectrum and Response Files for an Extended Source or a Pointlike Source

combine_spectra Sums multiple imaging source PHA spectra, and (optionally) the associated background PHA spectra and source and background ARF files

Thread: Coadding Spectra and Responses

make_instmap_weights

A command-line interface to the save_instmap_weights Sherpa command. The output from this script can be used as input to the bands parameter of merge_obs, flux_obs, and fluximage or the spectrumfile parameter of mkinstmap.

Thread: Calculating Spectral Weights for mkinstmap

merge_all Combine an arbitrary number of ObsIDs to create exposure maps and fluxed images. This script is deprecated; the merge_obs and reproject_obs scripts should be used instead.

Grating Analysis

A number of scripts for grating data analysis which use ISIS, the Interactive Spectral Interpretation System, are available from the MIT/CXC S-Lang Packages webpage. Note that ISIS is not packaged with CIAO; users have to download and install it separately.

add_grating_orders Add positive and negative diffraction orders of a grating PHA spectra and the corresponding ARFs

Thread: Extract Coadded and Grouped Nth-Order Source & Background Spectra and ARFs

add_grating_spectra Add two source and background grating PHA spectra, average the corresponding ARFs, and group the coadded spectrum

Thread: Add Grating Spectra and Average ARFs

fullgarf Create a grating ARF for a particular order

Thread: Create Grating ARFs for HETG/ACIS-S and LETG/ACIS-S data

tg_bkg Create PHA background file for use in XSPEC

Thread: PHA Background File for XSPEC

PSFs

save_chart_spectrum Create a source spectrum for which you would like a PSF to be simulated; the spectrum is used as input to ChaRT

Thread: Preparing to Run ChaRT

make_psf_asymmetry_region Creates a region file indicating the location of the PSF asymmetry found in HRC and ACIS data, as discussed in the Probing higher resolution: an asymmetry in the Chandra PSF

Utilities

acis_clear_status_bits Clear (set to 0) ACIS status bits before reprocessing with acis_process_events

Thread: Reprocessing Data to Create a New Level=2 Event File and the chandra_repro script.

acis_fef_lookup Find the FITS Embedded Function file for use by mkrmf

Thread: Extract a Spectrum and Response Files for a Pointlike Source and Step-by-Step Guide to Creating a Spectrum (among others)

acis_set_ardlib Update ardlib.par files to find bad pixel lists

Thread: Setting the Observation-specific Bad Pixel Files

check_ciao_caldb A tool to test the installation of the CIAO Calibration Database (CALDB)

Thread: What CALDB version are you using?

check_ciao_version A tool to test the installation of the CIAO and the Calibration Database (CALDB)
check_ctiapp.sh Adds the CTI_APP header keyword to a file, using the value of the CTI_CORR header keyword to set the correct value.
get_fov_limits Calculates the sky limits (i.e. bounding box) for all the chips in a Chandra FOV file
get_sky_limits Find the required binning to match two images

Thread: Match the Binning of an Image

splitroi

A script for splitting the source and background regions created by the roi tool.

Thread: An Image of Diffuse Emission

Modules

Python modules must be imported into an interpreter - such as ChIPS, Sherpa, or IPython - in order to use the functions. For example:

chips> from lightcurves import *
chips> lc_sigma_clip("lc_c7.fits")
ciao_contrib

The ciao_contrib module loads in all the routines from the sherpa_contrib, chips_contrib, and crates_contrib modules. The available modules include:

  • the ciao_contrib.runtool module for running CIAO tools as if they were Python functions;

  • the ciao_contrib.smooth module for smoothing 2D data (gaussian, top hat, box car, and using a kernel read from a file or an image);

  • the ciao_contrib.stacklib module for converting between CIAO stacks and Python arrays;

  • the ciao_contrib.caldb module for access to version information of the installed CALDB;

  • and the ciao_contrib.cda.search and ciao_contrib.cda.data modules for searching and accessing publically-available data from the Chandra Data Archive.

Thread:

ciao_contrib.utils

The ciao_utils module contains simple data-analysis routines: simple_stats and simple_hist.

chips_contrib.utils

Utility routines for ChIPS users including xlabel, ylabel, title, xlog, ylog, xylog, xlin, ylin, xylin, xlim, ylim, xylim, and add_ds9_contours.

chips_contrib.regions

Provides the add_fov_region routine for displaying a Chandra FOV file as a set of polygons in a ChIPS plot.

crates_contrib.utils

Utility routines for Crates users, including write_columns, write_arrays, make_table_crate, make_image_crate, add_colvals, add_keyval, scale_image_crate, smooth_image_crate, read_ds9_contours, and simplecoordtransform.

Thread:

lightcurves

The lightcurves module contains two routines for identifying flares in lightcurves:

  1. lc_clean: clean a lightcurve to match the ACIS "blank-sky" datasets;
  2. lc_sigma_clip: an alternative algorithm for cleaning lightcurves that uses sigma clipping to reject outliers.

Thread:

sherpa_contrib.profiles Allows users to create radial (or elliptical) profiles of 2D imaging data, including model fits, from within Sherpa to allow users to visually inspect the quality of the results.

Thread: Radial and elliptical profiles of Image Data

sherpa_contrib.utils

Utility routines for Sherpa users. The sherpa_utils module contains routines for calculating the weights file for mkinstmap.

Thread:

chips_contrib.images

Provides the imextent routine that creates a linear 2D transform for an image, which can then be used in add_image.

coords.format

Provides routines for converting between sexadecial format and decimal degrees, including dec2deg, deg2dec, ra2deg, deg2ra, and sex2deg.

coords.resolver

The identify_name routine uses the CADC name resolver to try and identify the location of a source by name.

coords.utils

A collection of routines for spherical and cartesian coordinate systems, based on the code from the pyslalib module.


Last modified: 18 October 2012
CXC logo

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-2012. All rights reserved.