Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: 22 June 2011

URL: http://cxc.harvard.edu/sherpa/scripts/index.html

Quick Scripts


This page provides quick access to the Sherpa 4.3 Python scripts used in the Sherpa threads. Each script below is also included in the "Scripting It" section at the bottom of the corresponding thread.

Fitting Data

Script

Perform a basic fit to a PHA data set. Load the data and instrument responses, filter the data, subtract the background, define a source model expression, fit the model to the data, and examine the quality of the fit.

Script

Empirically fit 1-D data from an ASCII file with polynomials of several orders. Define a parameter expression to link the polynomial offset with one of the constants. Plot the data and fits, and customize the plots with ChIPS commands.

Script

Change the grouping of a data set after it has been read into Sherpa with the group commands.

Script

Simultaneously model multiple independent data sets.

Script

Fit a source and/or background spectrum with a single model expression including components convolved by different responses.

Script

Fit a spectral data set with a multi-component source model.

Script

Simultaneously fit source and background spectra with proper and distinct RMFs and ARFs.

Script

Include a pileup model in the source model expression used to fit a data set.

Script

Perform a basic fit to a FITS image data set.

Script

Plot radial and elliptical profiles of an imaging fit.

Script

Use a file-based exposure map model to fit image data.

Script

Fit image data using a PSF image as the convolution kernel.

Script

Fit image data with a manually defined model expression which includes both convolved and unconvolved components.

Script

Perform a basic fit to a ACIS-S/HETG grating data set.

Script

Fit the overlapping spectral orders of a HRC-S/LETG data set.

Script

Perform a simple fit to a line feature in an ACIS-S/HETG spectrum. Calculate the error bars on the line normalizations, positions, and widths, and calculate the line equivalent widths.

Script

Perform a simple fit to several line features in an ACIS-S/LETG spectrum. Calculate the error bars on the line normalizations, positions, and widths, and calculate the line equivalent widths.

Script

Create the unconvolved source spectrum required as input to ChART or MARX for simulating the Chandra PSF.

Plotting Data

Script

Plot spectral data in Sherpa using common options.

Computing Statistics

Script

Estimate confidence intervals for fit parameters.

Script

Determine flux uncertainties by sampling fit parameter values using an uncorrelated, normal distribution.

Simulating Data

Script

Perform a basic 1-D data simulation using the fake_pha command.

Script

Simulate a spectrum of a point source obtained with the ACIS-S detector aboard Chandra, with and without consideration of a background component.

Script

Simulate a spectrum of a point source as observed with a different Chandra instrument configuration than that used to produce an existing data set.

Script

Simulate source spectra as they would be produced with the CAT spectrometer aboard the International X-Ray Observatory (IXO), based on current IXO/CAT response information.

Script

Create the unconvolved source spectrum required as input to ChART or MARX for simulating the Chandra PSF.

Miscellaneous

Script

Learn how to calculate the K-correction for a given spectral model, redshift, and energy range using the Sherpa calc_kcorr command.


Last modified: 22 June 2011
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email:   cxchelp@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2019. All rights reserved.