Calculates the sum of observed counts data for source or background datasets.
sherpa> [B]DCOUNTS [# [ID]] [{(<value>) | (<min>:<max>) | (<region
descriptor>)} ]
DCOUNTS is used for summing source data counts, while BDCOUNTS is used
for summing background data counts.
# specifies the dataset over which the source model is evaluated. The
ID modifier is used only for summing background counts, and then if and
only if the Sherpa state object variable multiback is set to 1, i.e.,
if more than one background dataset is to be associated with a single
source dataset. The ID modifier may be any unreserved string (e.g., A,
foo, etc.), i.e., a string that is not a parsable command.
The default is to do summations for all datasets. The summation may be
computed at one energy/wavelength, over a range of
energies/wavelengths, or within a 2-D region, with the default being to
compute the flux the total available range.
For 1-D data, if
-
one energy (or wavelength or bin number) <value> is given,
then the data counts is returned for the bin associated with that value.
-
an energy or wavelength range is given with the
<min> and <max> arguments, then
the total summed data counts for the given range is returned.
-
no value or range is
specified, then the total summed data counts
for the full range of the dataset is returned.
For 2-D data, if a region descriptor is given, then
the summation of data counts within that region is returned;
otherwise, the summation is carried out over the entire input image.
Tip: To perform background subtraction in
Sherpa, the command SUBTRACT must be issued; this
is in contrast to XSPEC, which performs background
subtraction automatically.
The summation of data counts may be done using the
Sherpa/S-Lang module functions
get_dcounts_sum and
get_bdcounts_sum.
Calculate the summation of data counts over the full energy range:
sherpa> DCOUNTS
Observed counts for source dataset 1: 1688 counts
Calculate the summation of background data counts over the range 2 to 10 keV.
If the areas of the source and background extraction regions are different
(as manifested by differences in, e.g., the BACKSCAL
keywords in the headers of the source and background data files), then
the number of expected background counts in the source region will also be
shown.
sherpa> BDCOUNTS (2.0:10.0)
Observed counts for background dataset 1: 775 counts
...scaled to source region: 238.779 counts
Calculate the summation of data counts at a single energy (2.0 keV):
sherpa> DCOUNTS 1 (2.0)
Observed counts for source dataset 1: 23 counts
Calculate the summation of data counts over the energy range
2.0 to 4.0 keV:
sherpa> DCOUNTS 1 (2:4)
Observed counts for source dataset 1: 328 counts
Calculate the total flux within circles of radius 5 and 10 in
a 2-D image (note, the quotes are necessary):
sherpa> DCOUNTS 1 "CIRCLE(247,257,5)"
Observed counts for source dataset 1: 1331 counts
sherpa> DCOUNTS 1 "CIRCLE(247,257,10)"
Observed counts for source dataset 1: 3068 counts
- chandra
-
guide
- sherpa
-
bye,
calc_kcorr,
dataspace,
dollarsign,
echo,
eflux,
eqwidth,
erase,
flux,
get,
get_dcounts_sum,
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
|