get_rmf_plot
- sherpa.astro.ui.get_rmf_plot(id: IdType | None = None, resp_id: IdType | None = None, recalc=True)
Return the data used by plot_rmf.
Added in version 4.16.0.
- Parameters:
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.recalc (bool, optional) – If
False
then the results from the last call toplot_rmf
(orget_rmf_plot
) are returned, otherwise the data is re-generated.
- Returns:
rmf_plot
- Return type:
a
sherpa.astro.plot.RMFPlot
instance- Raises:
sherpa.utils.err.ArgumentErr – If the data set does not contain PHA data.
Examples
Return the RMF plot data for the default data set:
>>> rplot = get_rmf_plot()
Return the RMF data for the second response of the data set labelled ‘histate’, and then plot it:
>>> rplot = get_rmf_plot('histate', 2) >>> rplot.plot()