RMFPlot
- class sherpa.astro.plot.RMFPlot[source] [edit on github]
Bases:
HistogramPlot
Create plots of the ancillary response file (RMF).
A full RMF is a matrix that is hard to visualize. Here, we select a few specific energies and show the response function for those energies as histograms.
Attributes Summary
The preferences for the plot.
The labels for each line.
Plot preferences
Title of plot
Return (xlo + xhi) / 2
The upper edges of each bin.
Label for X axis
The lower edges of each bin.
The response for a specific energy or channel.
Label for Y axis
Methods Summary
overplot
(*args, **kwargs)plot
([overplot, clearwindow])Plot the data.
prepare
(rmf[, data])Fill the fields given the RMF.
Attributes Documentation
- histo_prefs = {'alpha': None, 'capsize': None, 'color': None, 'ecolor': None, 'label': None, 'linestyle': 'solid', 'linewidth': None, 'marker': 'None', 'markerfacecolor': None, 'markersize': None, 'xerrorbars': False, 'xlog': False, 'yerrorbars': False, 'ylog': False}
The preferences for the plot.
- labels = None
The labels for each line.
- Type:
List of strings
- n_lines = 5
- rmf_plot_prefs = {'alpha': None, 'capsize': None, 'color': None, 'ecolor': None, 'label': None, 'linestyle': 'solid', 'linewidth': None, 'marker': 'None', 'markerfacecolor': None, 'markersize': None, 'xerrorbars': False, 'xlog': True, 'yerrorbars': False, 'ylog': True}
Plot preferences
- title = ''
Title of plot
- x
Return (xlo + xhi) / 2
This is intended to make it easier to swap between plot- and histogram-style plots by providing access to an X value.
- xhi = None
The upper edges of each bin.
- Type:
array_like
- xlabel = ''
Label for X axis
- xlo = None
The lower edges of each bin.
- Type:
array_like
- y = None
The response for a specific energy or channel.
- Type:
array_like
- ylabel = ''
Label for Y axis
Methods Documentation
- overplot(*args, **kwargs) [edit on github]
- plot(overplot=False, clearwindow=True, **kwargs)[source] [edit on github]
Plot the data.
This will plot the data sent to the prepare method.
- Parameters:
overplot (bool, optional) – If
True
then add the data to an existing plot, otherwise create a new plot.clearwindow (bool, optional) – Should the existing plot area be cleared before creating this new plot (e.g. for multi-panel plotcs)?
**kwargs – These values are passed on to the plot backend, and must match the names of the keys of the object’s plot_prefs dictionary.
- prepare(rmf, data=None)[source] [edit on github]
Fill the fields given the RMF.
- Parameters:
RMF – The RMF to plot
data (DataPHA instance, optional) – The
units
attribute of this object is used to determine whether the X axis should be in Angstrom instead of KeV (the default).