Calculate the energy flux (unconvolved) for source or background
datasets using module functions in Sherpa.
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)
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
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.
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
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
- chandra
-
guide
- sherpa
-
bye,
calc_kcorr,
dataspace,
dcounts,
dollarsign,
echo,
eflux,
eqwidth,
erase,
flux,
get,
get_dcounts_sum,
get_dir,
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
|