synthpop.modules.initial_mass_function.piecewise_powerlaw
Initial mass function for a piecewise power law, e.g.:
For M ≤ m1: ξ(M) ∝ M^-a0
For m1 < M ≤ m2: ξ(M) ∝ M^-a1
For m2 < M: ξ(M) ∝ M^-a2
The number of splitpoints is modifiable.
Classes
Initial mass function generator for a piecewise power law |
Module Contents
- class synthpop.modules.initial_mass_function.piecewise_powerlaw.PiecewisePowerlaw(min_mass=None, max_mass=None, alphas: tuple[float] = 1, splitpoints: tuple[float] = (), **kwargs)
Bases:
synthpop.modules.initial_mass_function._initial_mass_function.InitialMassFunctionInitial mass function generator for a piecewise power law
Attributes:
- min_massfloat
lower initial mass limit
- max_massfloat
upper initial mass limit
- alphasndarray [float]
power law indices for the mass chunks from lower mass to higher
- splitpointsndarray [float]
mass values where pieces split; length must be length alphas minus 1
- imf_name = 'Piecewise Powerlaw'
- alphas = 1
- splitpoints = ()
- get_functions(alphas, splitpoints)
- get_imf_parts(m_upper, m_lower, a, alpha)
- get_F_parts(m_upper, m_lower, a, alpha) Callable
- get_F_inv_parts(m_upper, m_lower, p_upper, p_lower, a, alpha)
- imf(m_in)
Initial mass function
Parameters
m_in: initial mass
Returns
prob: probability at the initial mass
- F_imf(m_in)
Integral of the initial mass function from 0 to m_in
Parameters
m_in: initial mass
Returns
F: integral
- grid_max = 10000
- grid_min = 0