Last modified: December 2019

AHELP for CIAO 4.12 Sherpa v1


Context: info


Display the background unconvolved model


show_bkg_source([id=None, bkg_id=None, outfile=None, clobber=False] )


The show_bkg_source() function displays the details of the unconvolved source models assigned to PHA background data sets which have been loaded into Sherpa, by data set ID. For each model, the current parameter values are returned (including minimum and maximum values), along with parameter type (thawed or frozen) and units. This information can be saved in a text file by specifying a filename in the 'outfile' argument.

The command output looks like:

Background Source: 1:1
   Param        Type          Value          Min          Max      Units
   -----        ----          -----          ---          ---      -----
   c1.c0        thawed            1            0  3.40282e+38           

Background Source: 2:1
   Param        Type          Value          Min          Max      Units
   -----        ----          -----          ---          ---      -----
   c2.c0        thawed            1            0  3.40282e+38                   


Example 1

sherpa> show_bkg_source()

The function show_bkg_source() can be called with no arguments, in which case the details of all unconvolved background models assigned to background data sets will be displayed.

Example 2

sherpa> show_bkg_source(2, 1)

The data set id arguments are used to specify that the unconvolved model assigned to the first background data set loaded in association with source data set 2 should be displayed (id=2, bkg_id=1). If only the source data set id "2" had been entered, without specifying a background id, all unconvolved background models associated with data set 2 would be returned.

Example 3

sherpa> show_bkg_source(2, "unc_model.bkg", True)

Here, the outfile argument is used to save the unconvolved model information for all background data sets loaded with source data set 2 in the file 'unc_model.bkg'. This file will be overwritten if it already exists in the current working directory, since 'clobber' is set to True.

Changes in CIAO 4.12

PAGER environment variable is no-longer used

Paging of the screen output is now handled by Python rather than using an external tool defined by the PAGER environment variable. This means that paged output should now appear in Jupyter notebooks.


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

See Also

get_bkg, get_bkg_plot, set_bkg, subtract, unsubtract
list_bkg_ids, list_functions, list_model_ids, show_all, show_bkg_model, show_conf, show_covar, show_data, show_fit, show_method, show_model, show_proj, show_source, show_stat
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_order_plot, get_par, get_pileup_model, get_source, get_source_component_image, get_source_component_plot, image_model, image_model_component, image_source, image_source_component, integrate, 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
get_lrt_plot, get_lrt_results, get_pvalue_plot, get_pvalue_results, plot_bkg, plot_cdf, plot_model, plot_model_component, plot_pdf, plot_pvalue, plot_scatter, plot_source, plot_source_component, plot_trace
delete_psf, load_conv
save_delchi, save_resid
calc_chisqr, calc_energy_flux, calc_model_sum, calc_photon_flux, calc_source_sum, calc_stat, eqwidth
contour_model, contour_ratio, contour_resid, get_ratio, get_resid