plot_order

sherpa.astro.ui.plot_order(id=None, orders=None, replot=False, overplot=False, clearwindow=True, **kwargs)

Plot the model for a data set convolved by the given response.

Some data sets - such as grating PHA data - can have multiple responses. The plot_order function acts like plot_model, in that it displays the model after passing through a response, but allows the user to select which response to use.

Parameters
  • id (int or str, optional) – The data set that provides the data. If not given then the default identifier is used, as returned by get_default_id.

  • orders (optional) – Which response to use. The argument can be a scalar or array, in which case multiple curves will be displayed. The default is to use all orders.

  • replot (bool, optional) – Set to True to use the values calculated by the last call to plot_model. The default is False.

  • overplot (bool, optional) – If True then add the data to an exsiting 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)?

See also

get_order_plot()

Return the data used by plot_order.

plot()

Create one or more plot types.

plot_model()

Plot the model for a data set.

Examples

Display the source model convolved by the first response for the default data set:

>>> plot_order(orders=1)

Plot the source convolved through the first and second responses for the second data set (separate curves for each response):

>>> plot_order(2, orders=[1, 2])

Add the orders plot to a model plot:

>>> plot_model()
>>> plot_order(orders=[2, 3], overplot=True)