Sersic
- class dysmalpy.models.Sersic(invq=1.0, noord_flat=False, baryon_type='gas+stars', **kwargs)[source]
Bases:
MassModel
,_LightMassModel
Mass distribution following a Sersic profile
- Parameters:
total_mass (float) – Log10 of the total mass in solar units
r_eff (float) – Effective (half-light) radius in kpc
n (float) – Sersic index
invq (float) – Ratio of the effective radius to the effective radius in the z-direction
noord_flat (bool) – If True, use circular velocity profiles derived in Noordermeer 2008. If False, circular velocity is derived through
v_circular
baryon_type ({'gas+stars', 'stars', 'gas'}) – What type of baryons are included. Used for dlnrhogas/dlnr
Notes
Model formula:
\[M(r) = M_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 mass, and can be solved for numerically.
\[\Gamma(2n) = 2\gamma (b_n,2n)\]Examples
import numpy as np from dysmalpy.models import Sersic import matplotlib.pyplot as plt plt.figure() plt.subplot(111, xscale='log', yscale='log') s1 = Sersic(total_mass=10, r_eff=5, n=1) r=np.arange(0, 100, .01) for n in range(1, 10): s1.n = n plt.plot(r, s1(r), color=str(float(n) / 15)) plt.axis([1e-1, 30, 1e5, 1e10]) plt.xlabel('log Radius [kpc]') plt.ylabel('log Mass Surface Density [log Msun/kpc^2]') plt.text(.25, 8.e7, 'n=1') plt.text(.25, 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
Circular velocity as a function of radius
Sersic asymmetric drift term
Sersic enclosed mass (linear)
evaluate
(r, total_mass, r_eff, n, mass_to_light)Sersic mass surface density
Conversion from mass to light as a function of radius
rhogas
(r)Mass density as a function of radius (if noord_flat; otherwise surface density)
Attributes Documentation
- mass_to_light = DysmalParameter('mass_to_light', value=1.0, fixed=True, prior=<dysmalpy.parameters.UniformPrior object>)
- n = DysmalParameter('n', value=1.0, bounds=(0, 8), prior=<dysmalpy.parameters.UniformPrior object>)
- noord_flat
- param_names = ('total_mass', 'r_eff', 'n', 'mass_to_light')
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>)
- total_mass = DysmalParameter('total_mass', value=1.0, bounds=(5, 14), prior=<dysmalpy.parameters.UniformPrior object>)
- tracer = 'mass'
Methods Documentation