Last modified: December 2024

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

plot_rmf

Context: plotting

Synopsis

Plot the RMF associated with a data set.

Syntax

plot_rmf(id=None, resp_id=None, replot=False, overplot=False,
clearwindow=True, **kwargs)

Description

Display the energy redistribution from the RMF component of a PHA data set. This plot selects a few specific energies and generates a plot with several histograms that show the energy redistribution for those specific energies.


Examples

Example 1

Plot the RMF for the default data set:

>>> plot_rmf()

Example 2

Plot the RMF from data set 1 and overplot the RMF from data set 2:

>>> plot_rmf(1)
>>> plot_rmf(2, overplot=True)

Example 3

Plot the RMFs labelled "rmf1" and "rmf2" for the "src" data set:

>>> plot_rmf("src", "rmf1")
>>> plot_rmf("src", "rmf2", overplot=True)

Example 4

The following example requires that the Matplotlib backend is selected, since this determines what extra keywords `plot_rmf` accepts. The RMFs from the default and data set 2 are drawn together, but the second curve is drawn with a dashed line.

>>> plot_rmf(ylog=True)
>>> plot_rmf(2, overplot=True, linestyle='dashed')

PARAMETERS

The parameters for this function are:

Parameter Type information Definition
id int, str, or None, optional The data set with a RMF. If not given then the default identifier is used, as returned by `get_default_id` .
resp_id int, str, or None, optional Which RMF to use in the case that multiple RMFs are associated with a data set. The default is none , which means the first one.
replot bool, optional Set to True to use the values calculated by the last call to `plot_data` . The default is False .
overplot bool, optional If True then add the data to an existing plot, otherwise create a new plot. The default is False .
clearwindow bool, optional Should the existing plot area be cleared before creating this new plot (e.g. for multi-panel plots)?

Changes in CIAO

Added in CIAO 4.16


Bugs

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

See Also

plotting
get_rmf_plot