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

Jump to: Description · Examples · Bugs · See Also

AHELP for CIAO 4.9 Sherpa v1


Context: data


Return a source or background ARF by data set ID


get_arf( [id, resp_id, bkg_id] )


The get_arf command returns the ARF data loaded in association with the specified source or background data set, by source, background, or response data set ID. The response ID denotes which response(s) in the source or background(s) data set(s) to return, in the event that more than one response has been loaded in association with a particular data set. The background ID denotes which background(s) response(s) in the source data set to return. The data returned by get_arf may be printed to the screen or stored in a variable, e.g. to be used in another command for explicitly defining a response in a model expression (see "ahelp set_full_model" and "ahelp get_response").

  • id - the id of the data set to use; if not given, uses the default data set 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; default is the first ARF
  • bkg_id - the id of the background to use, e.g. if more than one background is associated with the data; default is the first background data set

If the requested ARF does not exist (e.g. there is no ARF loaded), the command returns "None".

Example 1

sherpa> arf1=get_arf()

Get the first ARF loaded in association with default data set 1 and store it as "arf1". The contents may be printed:

sherpa> print(arf1)
name     = 3c273.arf
energ_lo = Float64[1090]
energ_hi = Float64[1090]
specresp = Float64[1090]
bin_lo   = None
bin_hi   = None
exposure = 38570.6924812

Example 2

sherpa> print(get_arf("src",2))

Print the second ARF associated with the data set "src". There is only one ARF for that data set, so the command returns "None".

Example 3

sherpa> fake_pha("faked", arf=get_arf(), rmf=get_rmf(), exposure=10000,

The get_arf command is used to populate the 'arf' argument in fake_pha for faking a data set using a specified instrument response. ("ahelp fake_pha").

Example 4

sherpa> arf = get_arf()
sherpa> rmf = get_rmf()
sherpa> set_full_model(rmf(arf(xsphabs.abs1*powlaw1d.p1)))

The 'instrument' version of the ARF data set associated with default data set id=1 is stored in variable 'arf', and used in the model expression of the set_full_model command for explicitly defining the instrument response. The multiplication with the exposure time is implicit in the model expression (see also "ahelp get_response").


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

See Also

get_conf, get_covar, get_int_proj, get_int_unc, get_proj, get_reg_proj, get_reg_unc
get_areascal, 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, load_arf, load_bkg_arf, load_multi_arfs, set_arf, unpack_arf
calc_stat_info, get_fit, get_stat_info
get_default_id, list_response_ids, list_stats
get_draws, get_iter_method_name, get_iter_method_opt, get_method
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
get_split_plot, plot_arf
get_kernel, get_psf
get_chisqr_plot, get_delchi_plot, get_prior, get_sampler, get_stat
get_analysis, get_rate
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: Smithsonian Institution, Copyright © 1998-2017. All rights reserved.