LightTruncateSersic
- class dysmalpy.models.LightTruncateSersic(tracer=None, **kwargs)[source]
Bases:
LightModel
,_DysmalFittable1DModel
Light distribution following a Sersic profile. Can be truncted.
- Parameters:
r_eff (float) – Effective (half-light) radius in kpc
L_tot (float) – Total luminsoity of untruncated Sersic profile. Arbitrary units.
n (float) – Sersic index
r_inner (float) – Inner truncation radius in kpc. Default: 0 kpc (untruncated)
r_outer (float) – Outer truncation radius in kpc. Default: np.inf kpc (untruncated)
tracer (string) – (Attribute): Name of the dynamical tracer
Notes
Model formula:
\[I(R) = I_e \exp \left\{ -b_n \left[ \left( \frac{R}{R_{\mathrm{eff}}} \right)^{1/n} -1 \right] \right\}\]The constant \(b_n\) is defined such that \(R_{\mathrm{eff}}\) contains half the total light, and can be solved for numerically as:
\[\Gamma(2n) = 2\gamma (b_n,2n)\]Examples
import numpy as np from dysmalpy.models import LightTruncateSersic import matplotlib.pyplot as plt plt.figure() plt.subplot(111, xscale='log', yscale='log') ls1 = LightTruncateSersic(r_eff=5, n=1, r_inner=1, r_outer=20, L_tot=1.e11, tracer='halpha') r=np.arange(0, 100, .01) for n in range(1, 10): ls1.n = n plt.plot(r, ls1(r), color=str(float(n) / 15)) plt.axis([0.8, 27, 1e5, 1e10]) plt.xlabel('log Radius [kpc]') plt.ylabel('log Intensity Surface Density [log Lsun/kpc^2]') plt.text(1.1, 7.e8, 'n=1') plt.text(1.1, 3.e9, 'n=10') plt.show()
(
Source code
,png
,hires.png
,pdf
)Attributes Summary
Names of the parameters that describe models of this type.
Methods Summary
evaluate
(r, L_tot, r_eff, n, r_inner, r_outer)Sersic light surface density.
Conversion from mass to light as a function of radius
Attributes Documentation
- L_tot = DysmalParameter('L_tot', value=1.0, bounds=(0, 50), prior=<dysmalpy.parameters.UniformPrior object>)
- n = DysmalParameter('n', value=1.0, bounds=(0, 8), prior=<dysmalpy.parameters.UniformPrior object>)
- param_names = ('L_tot', 'r_eff', 'n', 'r_inner', 'r_outer')
Names of the parameters that describe models of this type.
The parameters in this tuple are in the same order they should be passed in when initializing a model of a specific type. Some types of models, such as polynomial models, have a different number of parameters depending on some other property of the model, such as the degree.
When defining a custom model class the value of this attribute is automatically set by the
Parameter
attributes defined in the class body.
- r_eff = DysmalParameter('r_eff', value=1.0, bounds=(0, 50), prior=<dysmalpy.parameters.UniformPrior object>)
- r_inner = DysmalParameter('r_inner', value=0.0, bounds=(0, 10), prior=<dysmalpy.parameters.UniformPrior object>)
- r_outer = DysmalParameter('r_outer', value=inf, bounds=(0, inf), prior=<dysmalpy.parameters.UniformPrior object>)
Methods Documentation