Last modified: December 2021

URL: https://cxc.cfa.harvard.edu/sherpa/ahelp/sherpa_contrib.html
AHELP for CIAO 4.16 Sherpa

sherpa_contrib

Context: contrib

Synopsis

Contributed CIAO routines for Sherpa.

Syntax

import sherpa_contrib.all
from sherpa_contrib.all import *

Description

The sherpa_contrib package provides a number of useful routines for Sherpa users, and is provided as part of the CIAO contributed scripts package.

Loading the routines

The module can be loaded into Sherpa by using either of:

from sherpa_contrib.all import *
import sherpa_contrib.all

This will load in all the modules that are part of this package; this currently includes:

Module Description
sherpa_contrib.utils Routines for changing the normalization of models and calculating the weights file for mkinstmap.
sherpa_contrib.profiles Plot radial profiles of data and fits of imaging (2D) data.
sherpa_contrib.chart Routines for creating and visualizing the data files used by the Chandra Ray Tracer (ChaRT).
sherpa_contrib.marx Routines for creating the spectrum file used by MARX.

See the ahelp files for the individual packages and the contributed scripts page for further information.


Changes in the scripts 4.14.0 (December 2021) release

The renorm routine in sherpa_contrib.utils has seen minor improvements.

Changes in the scripts 4.13.0 (2020) release

XSPEC convolution models

As the XSPEC convolution models are now supported by Sherpa the load_xxx commands have been removed, as has the sherpa_contrib.xspec.xsconvolve module.

Changes in the scripts 4.11.4 (2019) release

Plotting can now use matplotlib

The plots created by sherpa_contrib.utils.plot_instmap_weights(), sherpa_contrib.chart.plot_chart_spectrum(), and sherpa_contrib.marx.plot_marx_spectrum() now use the Sherpa plot backend (controlled by the plot_pkg setting in a user's ~/.sherpa.rc file), rather than always using ChIPS. As part of this change the extra labelling of the plot_xxx_spectrum routines has been removed, so the plots may look slightly different.

The plots created by the sherpa_contrib.profiles set of functions, such as prof_data() and prof_fit_resid(), also now use the Sherpa plot backend.

To use Matplotlib, you should have:

unix% grep plot_pkg ~/.sherpa.rc
plot_pkg : pylab

Changes in the scripts 4.11.2 (April 2019) release

Fixes to save_marx_spectrum

The sherpa_contrib.marx.save_marx_spectrum() function now normalizes the output by the bin width, as expected by MARX.

Changes in the scripts 4.8.2 (January 2016) release

New routine

The sherpa_contrib.utils.renorm() function was added in this release.

ChART version 2 support

The sherpa_contrib.chart module has been updated to support version 2 of ChART.

Fixed routine

The sherpa_contrib.utils.estimate_weighted_expmap() function has been updated to work in CIAO 4.8.

Changes in the December 2010 Release

Module name change

To load in all the Sherpa contributed modules you now have to say one of

import sherpa_contrib.all
from sherpa_contrib.all import *

rather than

import sherpa_contrib
from sherpa_contrib import *

which now no longer loads in any code.

Removed modules

The sherpa_contrib.primini and sherpa_contrib.flux_dist modules have been removed since their functionality is now included in Sherpa.


Bugs

See the bugs pages for an up-to-date listing of known bugs.