LogEmission

class sherpa.astro.optical.LogEmission(name='logemission')[source]

Bases: sherpa.models.model.RegriddableModel1D

Gaussian function for modeling emission (log of fwhm).

It is for use when the independent axis is in Angstroms.

fwhm

The full-width half-maximum of the model in km/s.

pos

The center of the gaussian, in Angstroms.

flux

The normalisation of the gaussian.

skew

The skew of the gaussian.

limit

This is a hidden parameter and is unused by the model.

Notes

The functional form of the model for points is:

f(x) = fmax * (x / pos)^arg                    if x <= pos

       fmax * (x / pos)^(-alpha)               otherwise

arg = log(2) / log(1 + 0.5 * fwhm / c)

arg1 = log(2) / log(1 + 0.5 * skew * fwhm / c)

alpha = arg                                    if skew == 1

      = arg1                                   otherwise

fmax = (arg - 1) * flux / (2 * pos)            if skew == 1

     = (arg - 1) * flux / (pos * (1 + (arg - 1) / (arg1 - 1)))

                                               otherwise

c = 2.9979e5

and for integrated data sets the low-edge of the grid is used.

Attributes Summary

thawedparhardmaxes
thawedparhardmins
thawedparmaxes
thawedparmins
thawedpars

Methods Summary

apply(outer, *otherargs, **otherkwargs)
calc(p, x[, xhi]) Evaluate the model on a grid.
get_center()
guess(dep, *args, **kwargs) Set an initial guess for the parameter values.
regrid(*arrays)
reset()
set_center(*args, **kwargs)
startup() Called before a model may be evaluated multiple times.
teardown() Called after a model may be evaluated multiple times.

Attributes Documentation

thawedparhardmaxes
thawedparhardmins
thawedparmaxes
thawedparmins
thawedpars

Methods Documentation

apply(outer, *otherargs, **otherkwargs)
calc(p, x, xhi=None, **kwargs)[source]

Evaluate the model on a grid.

Parameters:
  • p (sequence of numbers) – The parameter values to use. The order matches the pars field.
  • *args – The model grid. The values can be scalar or arrays, and the number depends on the dimensionality of the model and whether it is being evaluated over an integrated grid or at a point (or points).
get_center()
guess(dep, *args, **kwargs)

Set an initial guess for the parameter values.

Attempt to set the parameter values, and ranges, for the model to match the data values. This is intended as a rough guess, so it is expected that the model is only evaluated a small number of times, if at all.

regrid(*arrays)
reset()
set_center(*args, **kwargs)
startup()

Called before a model may be evaluated multiple times.

See also

teardown()

teardown()

Called after a model may be evaluated multiple times.

See also

setup()