Calculates the sum of observed counts in source and background datasets using module functions in Sherpa.
Struct_Type get_dcounts_sum(Struct_Type)
Struct_Type get_bdcounts_sum(Struct_Type)
Struct_Type get_net_counts_sum(Struct_Type)
Struct_Type get_dcounts_sum([Integer_Type[,{Float_Type | Array_Type}]])
Struct_Type get_bdcounts_sum([Integer_Type[,{Float_Type | Array_Type}]])
Struct_Type get_net_counts_sum([Integer_Type[,{Float_Type |
Array_Type}]])
Error Return Values: NULL
Arguments:
(1) Structure of form returned by get_flux_str; or
(1) Dataset number (default 1)
(2) Evaluation point, or lower-upper bounds (default use all data)
(3) Model component or stack name (default use all appropriate models)
These functions retrieve the summation of observed data counts.
get_net_counts_sum retrieves the summation of observed
source, i.e., background-subtracted counts. Note that
this function does not require the data to be background-subtracted.
The output of get_flux_str(), a structure, can be used as
input to get_dcounts_sum() and
get_bdcounts_sum(). One would retrieve this default
structure, modify its field values, and pass it to
get_dcounts_sum() et al. See the example below.
Note that numerical arguments are interpreted using Sherpa's
current
ANALYSIS setting.
The structure output by these functions contains the following fields:
get_dcounts_sum Structure Fields
dataset |
the dataset for which the counts summation is evaluated |
range |
the single point at which the counts is determined,
or the range over which the counts are summed; if NULL,
the summation is done over the entire dataset range |
comp |
NULL for these functions |
value |
the summation of counts |
units |
NULL for these functions |
See the related Sherpa command
DCOUNTS for more information.
Determine the number of counts in a dataset between 2 and 10 keV:
sherpa> foo = get_flux_str()
sherpa> print(foo)
dataset = 1
range = NULL
comp = NULL
sherpa> foo.range = [2,10]
sherpa> print(get_dcounts_sum(foo).value)
518
sherpa> print(get_net_counts_sum(foo).value)
279.221
- chandra
-
guide
- sherpa
-
bye,
calc_kcorr,
dataspace,
dcounts,
dollarsign,
echo,
eflux,
eqwidth,
erase,
flux,
get,
get_dir,
get_eflux,
get_eqwidth,
get_filename,
get_flux2d,
get_flux_str,
get_lfactorial,
get_mcounts_sum,
get_pflux,
get_source_components,
get_verbose,
groupbycounts,
guess,
is,
journal,
list,
list_par,
mcounts,
numbersign,
paramest,
plot_eprof,
plot_rprof,
prompt,
reset,
run,
set,
set_analysis,
set_axes,
set_coord,
set_dataspace,
set_dir,
set_verbose,
setplot,
sherpa-module,
sherpa_plotfns,
sherpa_utils,
show,
simspec,
use,
version
|