| AHELP for CIAO 4.5 Sherpa v1 | get_arf |
Context: data |
Synopsis
Return a source or background ARF by data set ID
Syntax
get_arf( [id, resp_id, bkg_id] )
Description
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))
NonePrint 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,
bkg=get_bkg())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").
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_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
- filtering
- get_filter
- fitting
- calc_stat_info, get_fit, get_stat_info
- info
- get_default_id, list_response_ids, 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
- plotting
- get_split_plot, plot_arf
- psfs
- get_kernel, get_psf
- statistics
- get_chisqr_plot, get_delchi_plot, get_prior, get_sampler, get_stat
- utilities
- get_analysis, get_rate
- visualization
- get_ratio, get_resid, image_getregion

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