| AHELP for CIAO 4.5 Sherpa v1 | get_arf_plot |
Context: data |
Synopsis
Return the data and preferences defining an ARF plot
Syntax
get_arf_plot( [id, resp_id] )
Description
The get_arf_plot() command returns the data and preferences which define a plot of ARF (auxiliary response function) data in a Sherpa session. Once an ARF associated with a data set is loaded, this command can be used to list the x, y, x error, and y error data arrays used in the ARF plot created with plot_arf() or plot(), in addition to the values for the x label, y label, title, and other plotting preferences. The information returned by get_arf_plot() may be stored in a variable, or printed to the screen, as shown in the examples section.
- id - the id of the dataset to use; if not given, uses the default dataset id (id=1 by default, see "ahelp get_default_id")
- resp_id - the id of the ARF to use, e.g. if more than one is associated with the data set; default is the first ARF loaded for the given data set ID (resp_id=1)
Attributes:
- title - title of plot
- xlabel - x axis label
- ylabel - y axis label
- units - units of grid
- xlo - grid array, low bins
- xhi - grid array, high bins
- flux - unconvolved counts
- y - convolved counts
- plot_prefs - dictionary of plotting preferences
Example 1
sherpa> print(get_arf_plot())
When called with no arguments within the print() command, get_arf_plot() returns the data and preferences associated with the plot of the first ARF loaded for data set 1.
sherpa> print(get_arf_plot())
x = [ 0.305 0.315 0.325 ..., 10.975 10.985 10.995]
y = [ 24.6003 59.3127 73.6197 ..., 0.6435 0.6227 0.6021]
yerr = None
xerr = [ 0.01 0.01 0.01 ..., 0.01 0.01 0.01]
xlabel = Energy (keV)
ylabel = cm^2
title = source.arf
plot_prefs = {'symbolstyle': 0, 'linethickness': 3, 'linestyle': 1, 'linecolor': 'red'}
Example 2
sherpa> arf_plot=get_arf_plot(3, 2)
This command stores to the variable "arf_plot" the data and preferences defining the plot of the second ARF loaded for data set 3. The contents may be printed with 'print(arf_plot)'.
Example 3
sherpa> get_arf_plot().plot_prefs
This command lists the library of plotting preferences available for get_arf_plot(), and can be used to modify the plot settings:
sherpa> get_arf_plot().plot_prefs
{'linecolor': 'red', 'linestyle': 1, 'linethickness': 3, 'symbolstyle': 0}
sherpa> get_arf_plot().plot_prefs["linestyle"]=3
sherpa> get_arf_plot().plot_prefs
{'linecolor': 'red', 'linestyle': 3, 'linethickness': 3, 'symbolstyle': 0}
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, get_data_prof, get_data_prof_prefs, get_delchi_prof, get_delchi_prof_prefs, get_fit_prof, get_model_prof, get_model_prof_prefs, get_resid_prof, get_resid_prof_prefs, get_source_prof, get_source_prof_prefs, plot_chart_spectrum, prof_data, prof_delchi, prof_fit, prof_fit_delchi, prof_fit_resid, prof_model, prof_resid, prof_source
- data
- get_areascal, get_arf, 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_stats
- methods
- get_draws, get_iter_method_name, get_iter_method_opt, get_method
- modeling
- get_model, get_model_component, get_model_component_image, get_model_component_plot, get_model_plot, get_num_par, get_order_plot, get_par, get_pileup_model, get_response, get_source, get_source_component_image, get_source_component_plot, image_source, normal_sample, t_sample, uniform_sample
- plotting
- get_energy_flux_hist, get_lrt_plot, get_lrt_results, get_photon_flux_hist, get_pvalue_plot, get_pvalue_results, get_split_plot, plot, plot_arf, plot_bkg, plot_cdf, plot_chisqr, plot_data, plot_delchi, plot_energy_flux, plot_fit, plot_lrt, plot_model, plot_model_component, plot_order, plot_pdf, plot_photon_flux, plot_pvalue, plot_ratio, plot_resid, plot_scatter, plot_source, plot_source_component, plot_trace, set_xlinear, set_xlog, set_ylinear, set_ylog
- psfs
- get_kernel, get_psf, plot_kernel
- statistics
- get_chisqr_plot, get_delchi_plot, get_prior, get_sampler, get_stat
- utilities
- get_analysis, get_rate
- visualization
- contour_resid, get_ratio, get_resid, image_getregion

![[Sherpa Logo]](../imgs/sherpa_logo_navbar.gif)