new_kroupa_mass_distribution¶
-
amuse_util.ic.
new_kroupa_mass_distribution
(number_of_particles: int, mass_min: unit<MSun> = quantity<0.01 MSun>, mass_max: unit<MSun> = quantity<100.0 MSun>, random: bool = True, \*, m_to_n_tol: float = 1e-07)[source]¶ Kroupa (2001) mass distribution in SI units with custom minimum mass.
Modified version of amuse.ic.brokenimf.new_kroupa_mass_distribution that allows for a minimum mass, as well as maximum mass The default mass range is [0.01, 0.08, 0.5, 100.0] MSun and power-law exponents of each mass range: [-0.3, -1.3, -2.3]
- Parameters
- number_of_particles: int
the number of particles {number_of_particles}
- mass_min: float quantity
the minimum mass, will modify the default minimum mass range
- mass_max: float quantity
the cut-off mass (defaults to 100.0 MSun)
- random: int, random number generator
ex: np.random.default_rng(seed=0) will default to random seed
- m_to_n_tol: float
fractional error between
target_mass
and mass(imf(N))
- Returns
- kroupa: (N, ) list quantity
list of masses length
number_of_particles
Notes
if number_of_particles has units of mass, treated as Mtot, and will find number_of_particles via Newton-Raphson iteration.