astromodels.functions.functions_1D.powerlaws module

class astromodels.functions.functions_1D.powerlaws.Band(**kwargs)[source]

Bases: Function1D

description :

Band model from Band et al., 1993, parametrized with the peak energy

latex : $K begin{cases} left(frac{x}{piv}right)^{alpha} exp left(-frac{(2+alpha) x}{x_{p}}right) & x leq (alpha-beta) frac{x_{p}}{(alpha+2)} \ left(frac{x}{piv}right)^{beta} exp (beta-alpha)left[frac{(alpha-beta) x_{p}}{piv(2+alpha)}right]^{alpha-beta} &x>(alpha-beta) frac{x_{p}}{(alpha+2)} end{cases} $

parameters :

K :

desc : Differential flux at the pivot energy initial value : 1e-4 min : 1e-50 is_normalization : True transformation : log10

alpha :

desc : low-energy photon index initial value : -1.0 min : -1.5 max : 3

xp :

desc : peak in the x * x * N (nuFnu if x is a energy) initial value : 500 min : 10 transformation : log10

beta :

desc : high-energy photon index initial value : -2.0 min : -5.0 max : -1.6

piv :

desc : pivot energy initial value : 100.0 fix : yes

evaluate(x, K, alpha, xp, beta, piv)[source]
static info()
class astromodels.functions.functions_1D.powerlaws.Band_Calderone(**kwargs)[source]

Bases: Function1D

description :

The Band model from Band et al. 1993, implemented however in a way which reduces the covariances between the parameters (Calderone et al., MNRAS, 448, 403C, 2015)

latex : $ text{(Calderone et al., MNRAS, 448, 403C, 2015)} $

parameters :

alpha :

desc : The index for x smaller than the x peak initial value : -1 min : -10 max : 10

beta :

descindex for x greater than the x peak (only if opt=1, i.e., for the

Band model)

initial value : -2.2 min : -7 max : -1

xp :

desc : position of the peak in the x*x*f(x) space (if x is energy, this is the nuFnu or SED space) initial value : 200.0 min : 1e-10 transformation : log10

F :

desc : integral in the band defined by a and b initial value : 1e-6 min: 1e-50 is_normalization : True transformation : log10

a:

desc : lower limit of the band in which the integral will be computed initial value : 1.0 min : 0 fix : yes

b:

desc : upper limit of the band in which the integral will be computed initial value : 10000.0 min : 0 fix : yes

opt :

desc : option to select the spectral model (0 corresponds to a cutoff power law, 1 to the Band model) initial value : 1 min : 0 max : 1 fix : yes

evaluate(x, alpha, beta, xp, F, a, b, opt)[source]
static ggrb_int_cpl(a, Ec, Emin, Emax)[source]
static info()
class astromodels.functions.functions_1D.powerlaws.Band_grbm(**kwargs)[source]

Bases: Function1D

description :

Band model from Band et al., 1993, parametrized with the cutoff energy

latex : $ $

parameters :

K :

desc : Differential flux at the pivot energy initial value : 1e-4 min : 1e-50 is_normalization : True transformation : log10

alpha :

desc : low-energy photon index initial value : -1.0 min : -1.5 max : 3

xc :

desc : cutoff of exp initial value : 500 min : 10 transformation : log10

beta :

desc : high-energy photon index initial value : -2.0 min : -5.0 max : -1.6

piv :

desc : pivot energy initial value : 100.0 fix : yes

evaluate(x, K, alpha, xc, beta, piv)[source]
static info()
class astromodels.functions.functions_1D.powerlaws.Broken_powerlaw(**kwargs)[source]

Bases: Function1D

description :

A broken power law function

latex : $ f(x)= K~begin{cases}left( frac{x}{x_{b}} right)^{alpha} & x < x_{b} \ left( frac{x}{x_{b}} right)^{beta} & x ge x_{b} end{cases} $

parameters :

K :

desc : Normalization (differential flux at x_b) initial value : 1.0 min : 1e-50 is_normalization : True transformation : log10

xb :

desc : Break point initial value : 10 min : 1.0 transformation : log10

alpha :

desc : Index before the break xb initial value : -1.5 min : -10 max : 10

beta :

desc : Index after the break xb initial value : -2.5 min : -10 max : 10

piv :

desc : Pivot energy initial value : 1.0 fix : yes

evaluate(x, K, xb, alpha, beta, piv)[source]
static info()
class astromodels.functions.functions_1D.powerlaws.Cutoff_powerlaw(**kwargs)[source]

Bases: Function1D

description :

A power law multiplied by an exponential cutoff

latex : $ K~frac{x}{piv}^{index}~exp{-x/xc} $

parameters :

K :

desc : Normalization (differential flux at the pivot value) initial value : 1.0 is_normalization : True transformation : log10 min : 1e-30 max : 1e3 delta : 0.1

piv :

desc : Pivot value initial value : 1 fix : yes

index :

desc : Photon index initial value : -2 min : -10 max : 10

xc :

desc : Cutoff energy initial value : 10.0 transformation : log10 min: 1.0

evaluate(x, K, piv, index, xc)[source]
static info()
class astromodels.functions.functions_1D.powerlaws.Cutoff_powerlaw_Ep(**kwargs)[source]

Bases: Function1D

description :

A power law multiplied by an exponential cutoff parametrized with Ep

latex : $ K~frac{x}{piv}^{index}~exp{-x(2+index)/xp} $

parameters :

K :

desc : Normalization (differential flux at the pivot value) initial value : 1.0 is_normalization : True transformation : log10 min : 1e-30 max : 1e3 delta : 0.1

piv :

desc : Pivot value initial value : 1 fix : yes

index :

desc : Photon index initial value : -2 min : -10 max : 10

xp :

desc : peak in the x * x * N (nuFnu if x is a energy) initial value : 500 min : 10 max : 1e4 transformation : log10

evaluate(x, K, piv, index, xp)[source]
static info()
class astromodels.functions.functions_1D.powerlaws.DoubleSmoothlyBrokenPowerlaw(**kwargs)[source]

Bases: Function1D

description : A smoothly broken power law with two breaks as parameterized in Ravasio, M. E. et al. Astron Astrophys 613, A16 (2018).

latex : $begin{array}{l}begin{aligned}f(x)=& A x_{mathrm{b}}^{alpha_{1}}left[left[left(frac{x}{x_{mathrm{b}}}right)^{-alpha_{1} n_{1}}+left(frac{x}{x_{mathrm{b}}}right)^{-alpha_{2} n_{1}}right]^{frac{n_{2}}{n_{1}}}right.\&left.+left(frac{x}{x_{mathrm{j}}}right)^{-beta n_{2}} cdotleft[left(frac{x_{mathrm{j}}}{x_{mathrm{b}}}right)^{-alpha_{1} n_{1}}+left(frac{x_{mathrm{j}}}{x_{mathrm{b}}}right)^{-alpha_{2} n_{1}}right]^{frac{n_{2}}{n_{1}}}right]^{-frac{1}{n_{2}}}end{aligned}\text { where }\x_{mathrm{j}}=x_{mathrm{p}} cdotleft(-frac{alpha_{2}+2}{beta+2}right)^{frac{1}{left.beta-alpha_{2}right) n_{2}}}end{array}$

parameters :

K :

desc : Differential flux at the pivot energy initial value : 1e-4 min : 1e-50 is_normalization : True transformation : log10

alpha1 :

desc : photon index below xb initial value : -0.66

xb :

desc : break energy below xp initial value : 100 min : 1e-10 transformation : log10

n1 :

desc : curvature of the first break initial value : 2.0 min : 0 fix: True

alpha2 :

desc : photon index between xb and xp initial value : -1.5

xp :

desc : nuFnu peak initial value : 300 min : 1e-10 transformation : log10

n2 :

desc : curvature of the break at xp initial value : 2.0 min : 0 fix: True

beta :

desc : photon index above xp initial value : -2.5 max : 2

piv :

desc : pivot energy initial value : 1. fix : yes

evaluate(x, K, alpha1, xb, n1, alpha2, xp, n2, beta, piv)[source]
fix_curvature() None[source]

fix the two curvature parameters n1, n2

Returns:

free_curvature() None[source]

free the two curvature parameters n1, n2

Returns:

static info()
class astromodels.functions.functions_1D.powerlaws.Inverse_cutoff_powerlaw(**kwargs)[source]

Bases: Function1D

description :

A power law multiplied by an exponential cutoff [Note: instead of cutoff energy energy parameter xc, b = 1/xc is used]

latex : $K frac{x}{piv}^{index}exp{(-x~b)} $ parameters :

K :

desc : Normalization (differential flux at the pivot value) initial value : 1.0 is_normalization : True transformation : log10 min : 1e-30 max : 1e3 delta : 0.1

piv :

desc : Pivot value initial value : 1 fix : yes

index :

desc : Photon index initial value : -2 min : -10 max : 10

b :

desc : inverse cutoff energy i.e 1/xc initial value : 1

evaluate(x, K, piv, index, b)[source]
static info()
class astromodels.functions.functions_1D.powerlaws.Powerlaw(**kwargs)[source]

Bases: Function1D

description :

A simple power-law

latex : $ K~frac{x}{piv}^{index} $

parameters :

K :

desc : Normalization (differential flux at the pivot value) initial value : 1.0 is_normalization : True transformation : log10 min : 1e-30 max : 1e3 delta : 0.1

piv :

desc : Pivot value initial value : 1 fix : yes

index :

desc : Photon index initial value : -2.01 min : -10 max : 10

tests :
  • { x : 10, function value: 0.01, tolerance: 1e-20}

  • { x : 100, function value: 0.0001, tolerance: 1e-20}

evaluate(x, K, piv, index)[source]
static info()
class astromodels.functions.functions_1D.powerlaws.Powerlaw_Eflux(**kwargs)[source]

Bases: Function1D

description :

A power-law where the normalization is the energy flux defined between a and b

latex : $F~frac{x}{piv}^{index} $ parameters :

F :

desc : Normalization (energy flux at the between a and b) erg /cm2 s initial value : 1.e-5 is_normalization : True transformation : log10 min : 1e-30 max : 1e3 delta : 0.1

piv :

desc : Pivot value initial value : 1 fix : yes

index :

desc : Photon index initial value : -2 min : -10 max : 10

a :

desc : lower energy integral bound (keV) initial value : 1 min : 0 fix: yes

b :

desc : upper energy integral bound (keV) initial value : 100 min : 0 fix: yes

evaluate(x, F, piv, index, a, b)[source]
static info()
class astromodels.functions.functions_1D.powerlaws.Powerlaw_flux(**kwargs)[source]

Bases: Function1D

description :

A simple power-law with the photon flux in a band used as normalization. This will reduce the correlation between the index and the normalization.

latex : $ frac{F(gamma+1)} {b^{gamma+1} - a^{gamma+1}} (x)^{gamma}$

parameters :

F :

desc : Integral between a and b initial value : 1 is_normalization : True transformation : log10 min : 1e-30 max : 1e3 delta : 0.1

index :

desc : Photon index initial value : -2 min : -10 max : 10

a :

desc : lower bound for the band in which computing the integral F initial value : 1.0 fix : yes

b :

desc : upper bound for the band in which computing the integral F initial value : 100.0 fix : yes

evaluate(x, F, index, a, b)[source]
static info()
class astromodels.functions.functions_1D.powerlaws.SmoothlyBrokenPowerLaw(**kwargs)[source]

Bases: Function1D

description :

A Smoothly Broken Power Law

Latex : $ $

parameters :

K :

desc : normalization initial value : 1 min : 1e-50 is_normalization : True transformation : log10

alpha :

desc : power law index below the break initial value : -1 min : -1.5 max : 2

break_energy:

desc: location of the peak initial value : 300 fix : no min : 10 transformation : log10

break_scale :

desc: smoothness of the break initial value : 0.5 min : 0. max : 10. fix : yes

beta:

desc : power law index above the break initial value : -2. min : -5.0 max : -1.6

pivot:

desc: where the spectrum is normalized initial value : 100. fix: yes

evaluate(x, K, alpha, break_energy, break_scale, beta, pivot)[source]
static info()
class astromodels.functions.functions_1D.powerlaws.Super_cutoff_powerlaw(**kwargs)[source]

Bases: Function1D

description :

A power law with a super-exponential cutoff

latex : $ K~frac{x}{piv}^{index}~exp{(-x/xc)^{gamma}} $

parameters :

K :

desc : Normalization (differential flux at the pivot value) initial value : 1.0 min : 1e-50 is_normalization : True transformation : log10

piv :

desc : Pivot value initial value : 1 fix : yes

index :

desc : Photon index initial value : -2 min : -10 max : 10

xc :

desc : Cutoff energy initial value : 10.0 min : 1.0 transformation : log10

gamma :

desc : Index of the super-exponential cutoff initial value : 1.0 min : 0.1 max : 10.0

evaluate(x, K, piv, index, xc, gamma)[source]
static info()