Module functions to retrieve predicted model counts, statistics, residuals, sigma residuals, and ratios from source and background datasets.
Array_Type get[_full]_[b]mcounts([Integer_Type])
Array_Type get[_full]_[b]statistics([Integer_Type])
Array_Type get[_full]_[b]residuals([Integer_Type])
Array_Type get[_full]_[b]delchi([Integer_Type])
Array_Type get[_full]_[b]ratio([Integer_Type])
Error Return Value: NULL
Arguments:
(1) data set number (default 1)
The function get_mcounts() calls the model associated with
the appropriate data set and returns an array containing the predicted model
counts amplitudes (i.e., the y-values of the predicted data).
The array contains only those y-values which fall within the filter.
The other functions all return the result of a comparison of the
predicted model counts amplitudes to the data set. Thus,
get_statistics() returns an array of statistics
(chi^2 only), get_residuals()
returns residuals (D_i - M_i),
get_delchi() returns residuals divided by sigma
((D_i - M_i) / sigma_i,
where sigma_i is the estimated error),
and get_ratio() returns ratios (D_i / M_i).
Arrays containing the whole, unfiltered sets of y-values
are returned by using the related functions that have ``full''
added to their names. Thus, e.g., get_mcounts() returns
the filtered array of predicted model counts, and
get_full_mcounts() returns the unfiltered array of
predicted model counts.
These functions all use the source model associated with the
appropriate data set. (If no argument is given, the default
is data set 1.) To instead use the background model and background
data set associated with the data set number, append ``b'' to the
function names, i.e., get_bmcounts() returns
the filtered array of predicted model counts, for the background
model, and get_full_bmcounts() returns the
unfiltered array of predicted model counts, for the background
model.
These quantities may be displayed, e.g., via the
Sherpa plotting commands
LPLOT [B]MCOUNTS,
LPLOT [B]STATISTICS,
LPLOT [B]RESIDUALS,
LPLOT [B]DELCHI,
and
LPLOT [B]RATION.
sherpa> data example.dat
sherpa> source = gauss
sherpa> foo = get_mcounts(1)
sherpa> printarr(foo,2)
0.162616
0.211218
sherpa> write models
Write X-Axis: Bin Y-Axis: Flux (Counts)
758 0.1626
759 0.2112
- chandra
-
guide
- sherpa
-
get_analysis,
get_arf_axes,
get_axes,
get_coord,
get_data,
get_energy_axes,
get_errors,
get_filter,
get_filter_expr,
get_fit,
get_fluxed_spectrum,
get_ftest,
get_metadata,
get_photon_axes,
get_photon_energy_axes,
get_photon_wave_axes,
get_qvalue,
get_raw_axes,
get_record,
get_source,
get_statistic,
get_syserrors,
get_wave_axes,
get_weights,
record,
save,
write
|