Synopsis
Plot the fit results, and the data/model ratio, for the background of a PHA data set.
Syntax
plot_bkg_fit_ratio(id: int | str | Sequence[int | str] | None = None, bkg_id: int | str | None = None, replot: bool = False, overplot: bool = False, clearwindow: bool = True, **kwargs) No return value.
Description
This creates two plots - the first from `plot_bkg_fit` and the second from `plot_bkg_ratio` - for a data set.
Example
Plot the background fit and the ratio of the background to this fit for the default data set:
>>> plot_bkg_fit_ratio()
PARAMETERS
The parameters for this function are:
| Parameter | Type information | Definition |
|---|---|---|
| id | int, str, sequence of int or str, or None, optional | The data set that provides the data. If not given then the default identifier is used, as returned by `get_default_id` . |
| bkg_id | int, str, or None, optional | Identify the background component to use, if there are multiple ones associated with the data set. |
| replot | bool, optional | Set to True to use the values calculated by the last call to `plot_bkg_fit_ratio` . 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)? |
Notes
For the residual plot, the ylog setting is ignored, and the Y axis is drawn using a linear scale.
Changes in CIAO
Changed in CIAO 4.18
Multiple data sets can be displayed by using a list of identifiers. Per-plot options can now be given by using a list of values.
Changed in CIAO 4.13
The overplot option now works.
Added in CIAO 4.12
Bugs
See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.
See Also
- plotting
- plot_bkg_fit, plot_bkg_fit_delchi, plot_bkg_fit_resid