get_flux(), get_pflux(), and get_bpflux() calculate the photon flux (unconvolved) for source and background
datasets using the module functions in Sherpa.
Struct_Type get_flux(Struct_Type)
Struct_Type get_bflux(Struct_Type)
Struct_Type get_flux([Integer_Type[,{Float_Type |
Array_Type}[,String_Type]]])
Struct_Type get_bflux([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_pflux and get_bpflux functions retrieve the photon flux,
nominally in units of photons/cm^2/s (if the flux is computed over a range), or
photons/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 (e.g. RMF, RSP etc.)
have been specified, etc.
The output of get_flux_str(), a structure, can be used as
input to get_pflux() and get_bpflux(). One
would retrieve this default structure, modify its field values, and
pass it to get_pflux() 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_flux 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
FLUX for more information.
Also see these related Sherpa/S-Lang module functions:
Related Sherpa/S-Lang Module Functions
get_pflux2d |
Returns photon fluxes in 2-D images
|
get_eflux | get_beflux |
Returns the unconvolved energy flux for source or background datasets
|
get_eflux2d |
Returns energy fluxes in 2-D images
|
get_mcounts_sum | get_bmcounts_sum |
Returns the sum of convolved model counts in source and background datasets
|
get_mcounts_sum2d |
Returns sums of model counts in 2-D images
|
get_dcounts_sum | get_bdcounts_sum | get_net_counts_sum |
Returns the sum of observed counts in source and background datasets
|
get_dcounts_sum2d |
Returns sums of observed counts in 2-D images
|
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> 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_pflux(1,[2,10])
sherpa> print(foo)
dataset = 1
range = Float_Type[2]
comp = NULL
value = 7.88051e-05
units = photons/cm**2/s
sherpa> print(foo.value)
7.88051e-05
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_flux(foo).value)
0.000166532
sherpa> print(get_flux(foo).units)
photons/cm**2/s
sherpa> print(get_pflux(,[2,10],"p").value)
0.000166532
- chandra
-
guide
- sherpa
-
bye,
calc_kcorr,
dataspace,
dcounts,
dollarsign,
echo,
eflux,
eqwidth,
erase,
flux,
get,
get_dcounts_sum,
get_dir,
get_eflux,
get_eqwidth,
get_filename,
get_flux2d,
get_flux_str,
get_lfactorial,
get_mcounts_sum,
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
|