get_rmf_plot
- sherpa.astro.ui.get_rmf_plot(id: IdType | None = None, resp_id: IdType | None = None, recalc: bool = True, copy: bool = True)
Return the data used by plot_rmf.
Changed in version 4.19.0: The plot object is now copied by default. To get the previous behaviour set the
copyattribute toFalse.Added in version 4.16.0.
- Parameters:
- id
int,str,orNone,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,orNone,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.- recalcbool,
optional If
Falsethen the results from the last call toplot_rmf(orget_rmf_plot) are returned, otherwise the data is re-generated.- copybool,
optional Is the plot object copied before being returned? If so then the plot attributes will not be changed by multiple calls to this routine.
- id
- Returns:
- rmf_plot
asherpa.astro.plot.RMFPlotinstance
- rmf_plot
- Raises:
sherpa.utils.err.ArgumentErrIf 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()