Last modified: June 2019

AHELP for CIAO 4.16 Sherpa


Context: contrib


Create and view spectral files for MARX (CIAO contributed package).


from sherpa_contrib.marx import *


The sherpa_contrib.marx module provides routines for creating and viewing the input spectral files for users of MARX (the Chandra simulator) and is provided as part of the CIAO contributed scripts package.

Loading the routines

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

from sherpa_contrib.marx import *
from sherpa_contrib.all import *

where the second form loads in all the Sherpa contributed routines, not just the marx module.


The marx module currenly provides the following routines:

Function name Description
save_marx_spectum Writes out the model spectrum in the units used by by MARX
plot_marx_spectum Plot the model spectrum in the units used by MARX
get_marx_spectum Get the model spectrum in the units used by MARX

See the ahelp file for the routine and the contributed scripts page for further information.

Changes in the scripts 4.11.4 (2019) release

Plotting can now use matplotlib

The plot_marx_spectrum() routine now uses the Sherpa plot backend (controlled by the plot_pkg setting in a user's ~/.sherpa.rc file), rather than always using ChIPS. The Y axis now displays the units required by MARX - namely photon/cm^2/s/keV - rather than photon/cm^2/s. As part of this update the extra labelling in the plot - that gave the model name and dataset identifier - have been removed (although the model name is now included in the plot title).

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.10.3 (October 2018) release

The sherpa_contrib.marx module - which provides the save_marx_spectrum, plot_marx_spectrum, and get_marx_spectrum routines - is new in this release


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

See Also

get_marx_spectrum, plot_marx_spectrum, save_marx_spectrum