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

Synopsis

Calculate the energy flux (unconvolved) for source or background datasets using module functions in Sherpa.

Syntax

Struct_Type get_eflux(Struct_Type)
Struct_Type get_beflux(Struct_Type)
Struct_Type get_eflux([Integer_Type[,{Float_Type |
Array_Type}[,String_Type]]])
Struct_Type get_beflux([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

The get_eflux and get_ebflux functions retrieve the energy flux, nominally in units of erg/cm^2/s (if the flux is computed over a range), or erg/cm^2/s/keV (or per Angstrom) (if the flux is computed at a single point). The actual units depend upon the units of the input data and whether or not instrument models have been specified, etc.

The output of get_flux_str(), a structure, can be used as input to get_eflux() and get_beflux(). One would retrieve this default structure, modify its field values, and pass it to get_eflux() 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_eflux Structure Fields

Field Description
dataset the dataset for which the flux is evaluated
range the single point at which the flux is computed, or the range over which the flux is integrated; if NULL, the integral is done over the entire dataset range
comp the model stack or component for which the flux is computed; if NULL, the whole source/bg stack is used
value the computed flux value
units the flux units

See the related Sherpa command EFLUX for more information.

Example 1

Fit an absorbed power law function to the data set and compute the flux between 2 and 10 keV:

sherpa> source= xsphabs[abs]*pow[p1]
sherpa> ignore energy :0.3,10:
sherpa> subtract
sherpa> fit
 LVMQT: V2.0
 LVMQT: initial statistic value = 1401.63
 LVMQT: final statistic value = 235.824 at iteration 5
           abs.nH  0.0626393  10**22 atoms/cm**2  
            p1.gamma  1.70739     
            p1.ampl  6.81852e-05     

sherpa> foo=get_eflux(1,[2,10])
sherpa> print(foo)
dataset          =  1
range            =  Float_Type[2]
comp             =  NULL
value            =  7.72792e-14
units            =  ergs/cm**2/s
sherpa> print(foo.value)        
7.72792e-14

Example 2

Define a structure foo and use it to compute the flux 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_eflux(foo).value)
6.76339e-13
sherpa> print(get_eflux(foo).units)
ergs/cm**2/s
sherpa> print(get_eflux(,2.0,"p").value)
1.76965e-13

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.