| AHELP for CIAO 4.5 Sherpa v1 | get_rmf |
Context: data |
Synopsis
Return a source or background RMF by data set ID
Syntax
get_rmf( [id, resp_id, bkg_id] )
Description
The get_rmf command returns the RMF 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_rmf 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").
Example 1
sherpa> load_pha("source.pi")
sherpa> load_rmf("source.rmf")
sherpa> rmf1=get_rmf()Get the first RMF loaded in association with default data set 1 and store it as "rmf1". The contents may be printed:
sherpa> print(rmf1) name = source.rmf detchans = 1024 energ_lo = Float64[1090] energ_hi = Float64[1090] n_grp = UInt64[1090] f_chan = UInt32[1090] n_chan = UInt32[1090] matrix = Float64[572598] offset = 1 e_min = Float64[1024] e_max = Float64[1024]
Example 2
sherpa> print(get_rmf("src",2))
NonePrint the second RMF associated with the data set "src". There is only one RMF 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_rmf command is used to populate the 'rmf' argument of 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 RMF data set associated with default data set id=1 is stored in variable 'rmf', 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, 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_specresp, get_staterror, get_syserror, load_bkg_rmf, load_multi_rmfs, load_rmf, set_rmf, unpack_rmf
- 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
- 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)