STScI Logo

xflux xray.xspectral


NAME · USAGE · DESCRIPTION · PARAMETERS · EXAMPLES · TIME_REQUIREMENTS
BUGS · SEE_ALSO

NAME

xflux -- calculates the flux and luminosity within an energy band or the flux and luminosity density at a specific energy

USAGE

xflux fluxinter energy distance

DESCRIPTION

The xflux task can be run in two separate modes. One mode calculates the integrated flux and luminosity between a range of photon energies. The second mode calculates the flux and luminosity density at a specific energy. The mode is determined by the format of the energy parameter. Both the observed and unabsorbed (before galactic absorption) flux are computed. The luminosity is computed within the source-frame (e.g. before being redshifted or absorbed). Fluxes and luminosities are written to the file root_flux.tab. Flux and luminosity densities are written to the file root_fd.tab. This routine does not compute errors in the flux or luminosity. If the spectral model has multiple components, the user can calculate individual fluxes by running singlefit on each component, and then running xflux on each intermediate spectral file.

NOTE: XFLUX will only calculate the luminosity in the rest frame of the source if the spectral model used when running FIT included the redshift of the source. This includes the power-law model.

PARAMETERS

fluxinter = "" prompt = spectrum intermediate file [root_int.tab]

This file contains the final (best fit) model spectrum produced during execution of fit or singlefit.

energy = "" prompt = energy or range of energies in keV

If one value for the energy is input then a flux and luminosity density is calculated. If two energies are input separated by a colon, the integrated flux and luminosity between the two energies is calculated.

distance = "" prompt = distance e.g. 5kpc or 1.0z

The distance to the source in either kpc or redshift.

(pkgpars = "") [pset]

The name of the file containing the xspectral package wide parameters. If the name is null ("") then the parameters found for the pkgpars task will be used.

(defaultunits = "kpc") [string]

Default units of distance for luminosity calculation. Used if not specified in the distance parameter.

(Hubble_const = 50.0) [real]

Hubble constant in units of km/s/Mpc. This is used to calculate the luminosity if the distance is input as a redshift.

(deceleration = 0.0) [real]

The cosmological deceleration parameter.

(clobber = no) [boolean]

This parameter determines whether output files are overwritten. If clobber = no, new calculations are appended to the output tables.

EXAMPLES

The first two examples use the file "snr_int.tab" as input. This file is produced by the example in the help file for the singlefit task.

1. The following example calculates the flux and luminosity between 0.2 and 2.0keV for a source at 2.0kpc.


xs> xflux fluxinter="snr" energy="0.2:2.0" distance="2.0kpc"

Output file: snr_flux.tab
Model: abs(22.3800)*pow(0.0300 5.8300)
Absorption type: Morrison & Maccammon
Units:
        flux (ergs/cm**2/s)
        luminosity (10**34 ergs/s)
        energy (keV)
        H_0 (km/s/Mpc)

Compute flux and luminosity for energy range :

    flux    unabs_f       L      lo_energy  hi_energy   D_kpc    z    H_0   q_0
    ----    -------      ---     ---------  ---------   -----   ---   ---   ---

  1.67E-11   8.51E-7    4.07E4      0.20       2.00     2.00E0 INDEF  50.0  0.0

The _flux.tab file can be displayed using tprint.

2. The following example calculates the flux and luminosity density at 1.0Kev for a source at a distance of 2.0kpc.


xs> xflux fluxinter="snr" energy="1.0" distance="2.0kpc"

Output file: snr_fd.tab
Model: abs(22.3800)*pow(0.0300 5.8300)
Absorption type: Morrison & Maccammon
Units:
        flux density (microJy = 10**-29 ergs/cm**2/s/Hz)
        luminosity density (10**34 ergs/s/Hz)
        energy (keV)
        H_0 (km/s/Mpc)

Compute flux density and luminosity density for energy :

    flxd    unabs_f      Ld       energy    D_kpc    z    H_0   q_0
    ----    -------      --       ------    -----   ---   ---   ---

    2.13E0    7.10E2  3.40E-16     1.00     2.00E0 INDEF  50.0  0.00

The _flux.tab file can be displayed using tprint.

3. If your best fit is:

	abs(17)*raymond(5.5 1.3 c 100)+ray(-0.3 2.4 c 100)
first run FIT with:
	abs(17)*raymond(5.5 1.3 c 100)
then run XFLUX, then run FIT with:
	ray(5.2 2.4 c 100)
Run XFLUX on this output, and add together the two results from XFLUX.

Caution: Remember to adjust the normaliztion properly, and to apply the absorption to both models if it is linked (the above example it is not).

TIME REQUIREMENTS

This tasks normally executes promptly, in less than 10 seconds.

BUGS

SEE ALSO

fit, singlefit


Source Code · Search Form · STSDAS