get_arf_plot

sherpa.astro.ui.get_arf_plot(id: IdType | None = None, resp_id: IdType | None = None, recalc: bool = True, copy: bool = True)

Return the data used by plot_arf.

Changed in version 4.19.0: The plot object is now copied by default. To get the previous behaviour set the copy attribute to False.

Parameters:
idint, str, or None, optional

The data set with an ARF. If not given then the default identifier is used, as returned by get_default_id.

resp_idint, str, or None, optional

Which ARF to use in the case that multiple ARFs are associated with a data set. The default is None, which means the first one.

recalcbool, optional

If False then the results from the last call to plot_arf (or get_arf_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.

Returns:
arf_plota sherpa.astro.plot.ARFPlot instance
Raises:
sherpa.utils.err.ArgumentErr

If the data set does not contain PHA data.

See also

plot

Create one or more plot types.

plot_arf

Plot the ARF associated with a data set.

Examples

Return the ARF plot data for the default data set:

>>> aplot = get_arf_plot()
>>> aplot.y.max()
676.95794677734375

Return the ARF data for the second response of the data set labelled ‘histate’, and then plot it:

>>> aplot = get_arf_plot('histate', 2)
>>> aplot.plot()