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

Synopsis

Module function to estimate errors for an array of data

Syntax

Array_Type compute_errors(Array_Type)

Error Return Value: NULL

Argument:

(1) Array of values of type Float_Type or Double_Type

Description

This function estimates the errors for each element of the input array given Sherpa's current STATISTIC setting. (Note that these data need not have been input into Sherpa!) Thus there is an implicit assumption that the input array elements are counts. If the input array elements are not counts, then one could, e.g., create a new S-Lang function to compute the errors properly.

This function is only appropriate for use with data-based variances: chi gehrels, chi dvar, and chi parent.

Note that currently, the input array cannot be of type Integer_Type. This will be fixed in a future version of the module. To check the type of the array, use the S-Lang function _typeof:

sherpa> a = [5,3,9]
sherpa> _typeof(a)
Integer_Type
sherpa> compute_errors(a)
NULL

One can get around this error by explicitly typecasting the array:

sherpa> a = typecast(a,Double_Type)
sherpa> foo = compute_errors(a)
sherpa> print(foo)
3.39792
2.93649
4.1225

See the related function compute_statistic.

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.