Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: December 2013

URL: http://cxc.harvard.edu/sherpa/ahelp/get_order_plot.html
Jump to: Description · Examples · Bugs · See Also


AHELP for CIAO 4.9 Sherpa v1

get_order_plot

Context: modeling

Synopsis

Return the data and preferences defining a plot of model spectral orders

Syntax

get_order_plot( [id, orders] )

Description

The get_order_plot() function returns the data and preferences defining a 1-D plot of a convolved source model, by data set ID and spectral order; such a plot is created with plot_order(). Once a model is assigned to a loaded PHA data set, this command can be used to list the x, y, x error, and y error data arrays used in the model order plot created with plot_order(), in addition to the values for the x label, y label, title, and other plotting preferences. The information returned by get_order_plot() may be stored in a variable, or printed to the screen, as shown in the examples section.

  • id - the id of the data set to use; if not given, uses the default dataset id (id=1 by default, see "ahelp get_default_id")
  • orders - array of spectral orders to be plotted; default=1st order

Example 1

sherpa> print(get_order_plot())

When called with no arguments from within the print command, get_order_plot() returns the data and preferences characterizing the most recent model order plot produced with plot_order().

sherpa> print(get_order_plot())
xlo    = [[  7.3000e-03   1.4600e-02   2.9200e-02 ...,   9.9426e+00   9.9572e+00
    9.9718e+00]]
xhi    = [[ 0.0146  0.0292  0.0438 ...,  9.9572  9.9718  9.9864]]
y      = [[ 0.      0.      0.     ...,  0.9077  0.8883  0.8693]]
xlabel = Energy (keV)
ylabel = Counts/sec/keV
title  = Model Orders [1]
histo_prefs = {'linethickness': 2, 'linecolor': '0xaaaaea'}

Example 2

sherpa> print(get_order_plot(id=1, orders=[2,3]))

If supplied with a data set ID and order number(s), get_order_plot() returns the data and preferences which would characterize the corresponding 1-D model order plot produced with plot_order().

sherpa> print(get_order_plot(1, [2,3]))
xlo    = [[  1.0000e+00   2.0000e+00   3.0000e+00 ...,   8.1900e+03   8.1910e+03
    8.1920e+03]
 [  1.0000e+00   2.0000e+00   3.0000e+00 ...,   8.1900e+03   8.1910e+03
    8.1920e+03]]
xhi    = [[  2.0000e+00   3.0000e+00   4.0000e+00 ...,   8.1910e+03   8.1920e+03
    8.1930e+03]
 [  2.0000e+00   3.0000e+00   4.0000e+00 ...,   8.1910e+03   8.1920e+03
    8.1930e+03]]
y      = [[ 0.0001  0.0001  0.0001 ...,  0.0025  0.0025  0.0025]
 [ 0.0001  0.0001  0.0001 ...,  0.0025  0.0025  0.0025]]
xlabel = Channel
ylabel = Counts/sec
title  = Model Orders [2, 3]
histo_prefs = {'linethickness': 2, 'linecolor': '0xaaaaea'}

Example 3

sherpa> order2_plot=get_order_plot(4, 2)

This command stores to the variable "order2_plot" the data and preferences defining the model plot of the second order of data set 4 (using its associated model). The contents may be printed with 'print(order2_plot)'.

Bugs

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

See Also

confidence
get_conf, get_covar, get_int_proj, get_int_unc, get_proj, get_reg_proj, get_reg_unc
contrib
get_chart_spectrum
data
get_areascal, get_arf, get_arf_plot, get_axes, get_backscal, get_bkg, get_bkg_plot, get_bkg_scale, get_coord, get_counts, get_data, get_data_plot, get_dep, get_dims, get_error, get_exposure, get_grouping, get_indep, get_quality, get_rmf, get_specresp, get_staterror, get_syserror
filtering
get_filter
fitting
calc_stat_info, get_fit, get_stat_info
info
get_default_id, list_model_ids, list_stats, show_bkg_model, show_bkg_source
methods
get_draws, get_iter_method_name, get_iter_method_opt, get_method
modeling
add_model, add_user_pars, clean, create_model_component, delete_bkg_model, delete_model, delete_model_component, get_model, get_model_autoassign_func, get_model_component, get_model_component_image, get_model_component_plot, get_model_plot, get_num_par, get_par, get_pileup_model, get_response, get_source, get_source_component_image, get_source_component_plot, image_model, image_model_component, image_source, image_source_component, integrate, integrate1d, link, load_table_model, load_template_model, load_user_model, normal_sample, reset, save_model, save_source, set_bkg_model, set_full_model, set_model_autoassign_func, set_pileup_model, set_source, set_xsabund, set_xscosmo, set_xsxsect, set_xsxset, t_sample, uniform_sample
plotting
get_lrt_plot, get_lrt_results, get_pvalue_plot, get_pvalue_results, get_split_plot, plot_cdf, plot_model, plot_model_component, plot_pdf, plot_pvalue, plot_scatter, plot_source, plot_source_component, plot_trace
psfs
delete_psf, get_kernel, get_psf, load_conv
saving
save_delchi, save_resid
statistics
get_chisqr_plot, get_delchi_plot, get_prior, get_sampler, get_stat
utilities
calc_chisqr, calc_energy_flux, calc_model_sum, calc_photon_flux, calc_source_sum, calc_stat, eqwidth, get_analysis, get_rate
visualization
contour_model, contour_ratio, contour_resid, get_ratio, get_resid, image_getregion

Last modified: December 2013
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email:   cxchelp@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2017. All rights reserved.