About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/get_dcounts_sum.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 get_dcounts_sum Context: sherpa

Synopsis

Calculates the sum of observed counts in source and background datasets using module functions in Sherpa.

Syntax

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)

Description

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

Field Description
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.

Example

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

Bugs

See the Sherpa bug pages online for an up-to-date listing of known bugs.

Hardcopy (PDF): A4 | Letter
Last modified: December 2006



The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.