Scripts and Modules
|find_chandra_obsid||Provides command-line access to the Chandra Footprint service, allowing users to find—and optionally download—publicly-available Chandra data by position or object name|
|download_chandra_obsid||Provides easy command-line downloads of public Chandra data|
|search_csc||Retrieve source properties and associated data products for a single position and radius from the Chandra Source Catalog.|
|obsid_search_csc||Retrieve source properties and associated data products for a given ObsID from the Chandra Source Catalog.|
Displays the LaTeX dataset identifier macro used to
describe observations in papers written for AAS managed
See: CDA Data Literature Links for more information.
|download_obsid_caldb||*EXPERIMENTAL* Downloads only the subset of Calibration Database (CalDB) files required to analyze one observation at a time. As additional observations are processed, the CalDB will grow incrementally as new files are accrued.|
|chandra_repro||Data reprocessing script that runs all the recommended analysis threads for a given set of observations.|
|acis_bkgrnd_lookup||Find the ACIS "blank-sky" datasets in the CALDB matching your observation|
|hrc_bkgrnd_lookup||Find the HRC-I background event and spectrum files in the CALDB matching your observation|
|blanksky||Tailor an unscaled blanksky background file compatible with a given observed events file that combines and reprojects the necessary background files from the CalDB. The background scaling factors for each chip are calculated and stored in the file header.|
Thread: Filtering lightcurves
|r4_header_update||Check the header of the input file and add the parameter block and/or SIM-related keywords introduced in the latest archive reprocessing.|
|splitobs||Automates the steps necessary to separate multi-ObI and interleaved-mode observations into individual directories compatible with chandra_repro. For multi-ObI grating observations, the REGION block is attached to the level 2 event file.|
|summarize_status_bits||Create an on-screen summary of the status bits in an event file to show the number of rows with each bit set and what the bit means.|
|gti_align||For ACIS observations only. Synchronizes the input GTIs to the ACIS exposure boundaries. For most users, this is a tiny fraction of the total exposure time; however, if the observation has many GTIs then the accumulated error can be significant.|
|multi_chip_gti||Create a single mutli-chip GTI from individual GTIs.|
|monitor_photom||Create light curves from the aspect camera optical monitor data.|
|correct_periscope_drift||Corrects for small (~0.1″) alignment drifts over the course of recent, long (>50 ks) observations of bright, on-axis (<2′) point sources with minimal pileup.|
|fluximage||Create exposure-corrected images and exposure maps for an observation|
|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.|
|specextract||Create source and background PHA or PI spectra and the associated unweighted or weighted ARF and RMF files for point and extended sources|
|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
|srcflux||Compute various estimates of the net source flux, given an event file and a location.|
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.
|ecf_calc||Extract encircled counts fraction profile, as a function of distance, for a circular region around a source position.|
|apply_fov_limits||Creates an image of an event file using the limits from the FOV file.|
|readout_bkg||Model the Out of Time (OOT) contribution of bright and extended sources to the ACIS background. The OOT events are detected during the ~0.04s it takes to transfer each exposure into the readout array during which source events are detected at a random CHIPY location.|
|blanksky_image||Create scaled background and background-subtracted images given an observation-specific blanksky background file and a reference image file.|
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.
|combine_grating_spectra||Combine Chandra gratings PHA files and their associated response files. Replaces add_grating_orders and add_grating_spectra.|
|add_grating_orders REMOVED||This script has been removed in CIAO 4.8 as it has been replaced by combine_grating_spectra.|
|add_grating_spectra REMOVED||This script has been removed in CIAO 4.8 as it has been replaced by combine_grating_spectra.|
|fullgarf||Create a grating ARF for a particular order|
|tg_bkg||Create PHA background file for use in XSPEC|
Thread: PHA Background File for XSPEC
|mktgresp||Create the ARF and RMF files for each grating-order and arm for Type II PHA file outputted by tgextract and tgextract2 or the specified Type I PHA file.|
|tgsplit||Split a Type II grating PHA file into several Type I files|
|tgmask2reg; reg2tgmask||Create custom region extraction masks for tgextract2.|
|detilt||Corrects the time-dependent tilt by adjusting the TG_D value of events from HRC-S/LETG observations by applying a linear correction as a function of TG_MLAM.|
|dewiggle||Removes small "wiggles" and straighten the dispersed HRC-S/LETG spectrum by correcting the TG_D value of events which cannot be corrected by the HRC-S degapping procedure in reprocessing.|
|symmetrize||Adjusts the TG_D values of all HRC-S/LETG events to make the cross-dispersion profiles more symmetric about TG_D=0 so that EEFRAC values will be accurate even when using narrower-than-standard spectral extraction regions.|
|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|
|psfsize_srcs||Create a circular region that encloses the specified fraction of the PSF at specified energy.|
|src_psffrac||Determine the PSF fraction a circular region encloses at a specified energy.|
|simulate_psf||An interface to simplify running MARX for both raytrace PSF simulations or projecting ChaRT/SAOTrace rayfiles to the detector-plane for an existing observation.|
|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|
|check_ciao_caldb||A tool to test the installation of the CIAO Calibration Database (CALDB)|
|check_ciao_version||A tool to test the installation of the CIAO and the Calibration Database (CALDB)|
|convert_xspec_user_model||Compile an XSpec user-model for use in Sherpa.|
|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
A script for splitting the source and background regions created by the roi tool.
Thread: An Image of Diffuse Emission
|install_marx||Automates the standard steps necessary to download, build, and install the latest version of MARX. MARX can be used to simulate Chandra observations and can used with ChaRT to simulate the Chandra PSF.|
chips> from lightcurves import * chips> lc_sigma_clip("lc_c7.fits")
Python class supports stacks of field-of-view (FOV) files that can be queried to see which ObsIDs include a given celestial position.
Utility routines for ChIPS users including xlabel, ylabel, title, xlog, ylog, xylog, xlin, ylin, xylin, xlim, ylim, xylim, and add_ds9_contours.
Provides the add_fov_region routine for displaying a Chandra FOV file as a set of polygons in a ChIPS plot.
Provides a limited emulation of matplotlib pyplot module, allowing for pyplot commands to be used in ChIPS.
Python decorators for ChIPS, allowing multiple ChIPS commands to appear all together.
Provides routines to create a Cube Helix color lookup table, that monotonically increases in brightness.
Utility routines for Crates users, including write_columns, write_arrays, make_table_crate, make_image_crate, add_colvals, scale_image_crate, smooth_image_crate, read_ds9_contours, and simplecoordtransform.
The lightcurves module contains two routines for identifying flares in lightcurves:
|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.|
Utility routines for Sherpa users. The sherpa_utils module contains routines for calculating the weights file for mkinstmap.
|sherpa_contrib.xspec.local||Load compiled XSpec user-model with Python lmod function.|
|sherpa_contrib.xspec.xsconvolve||Provies an interface to the XSpec convolution models in Sherpa.|
Provides routines for converting between sexadecial format and decimal degrees, including dec2deg, deg2dec, ra2deg, deg2ra, and sex2deg.
A collection of routines for spherical and cartesian coordinate systems, based on the code from the pyslalib module.