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_mcounts_sum.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 get_mcounts_sum Context: sherpa

Synopsis

Module functions for computing the sum of convolved model counts in source and background datasets.

Syntax

Struct_Type get_mcounts_sum(Struct_Type)
Struct_Type get_bmcounts_sum(Struct_Type)
Struct_Type get_mcounts_sum([Integer_Type[,{Float_Type |
Array_Type}[,String_Type]]])
Struct_Type get_bmcounts_sum([Integer_Type[,{Float_Type |
Array_Type}[,String_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 convolved predicted model amplitudes.

The output of get_flux_str(), a structure, can be used as input to get_mcounts_sum() and get_bmcounts_sum(). One would retrieve this default structure, modify its field values, and pass it to get_mcounts_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_mcounts_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 the model stack or component for which the counts are summed; if NULL, the whole source/bg stack is used
value the summation of counts
units NULL for these functions

See the related Sherpa command MCOUNTS for more information.

Example

Fit a power-law to a dataset; compute the sum of model amplitudes 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_mcounts_sum(foo).value)
291.483
sherpa> print(get_mcounts_sum(,2.0,"p").value)
12.6129

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.