scopesim_templates.stellar.imf.Kennicutt_1983#
- class scopesim_templates.stellar.imf.Kennicutt_1983(multiplicity=None)#
Bases:
IMF_broken_powerlawDefine IMF from Kennicutt (1983). Mass range is 0.1 M_sun - inf M_sun.
- __init__(multiplicity=None)#
Methods
__init__([multiplicity])calc_multi(newMasses, compMasses, ...)Calculate multiples more efficiently.
dice_star_cl(r)Given a list of random numbers (r), return a list of masses selected from the IMF.
generate_cluster(totalMass[, seed])Generate a cluster of stellar systems with the specified IMF.
getMassBetween(massLo, massHi)Return the integrated mass between some low and high mass value.
getProbabilityBetween(massLo, massHi)Return the integrated probability between some low and high mass value.
int_mxi(massLo, massHi)Return the integrated total mass between some low and high stellar mass value.
int_mxi_cl(left, right)int_xi(massLo, massHi)Return the integrated probability between some low and high mass value.
int_xi_cl(left, right)Helper function.
m_xi(m)Mass-weighted probability m*xi.
mxi_cl(m)Helper function.
norm_cl_wk04(Mcl[, Mmax, Mmin])Helper function.
normalize(Mcl[, Mmin, Mmax])Normalize the IMF to a total cluster mass within a specified minimum and maximum stellar mass range.
prim_mxi(a)Helper function.
prim_xi(a)Helper function.
xi(m)Probability density describing the IMF.
xi_cl(m)Helper function.
xi_new(m)Probability density describing the IMF.
- calc_multi(newMasses, compMasses, newSystemMasses, newIsMultiple, CSF, MF)#
Calculate multiples more efficiently.
Helper function; We will use array operations as much as possible.
- dice_star_cl(r)#
Given a list of random numbers (r), return a list of masses selected from the IMF.
- generate_cluster(totalMass, seed=None)#
Generate a cluster of stellar systems with the specified IMF.
Randomly sample from an IMF with specified mass limits until the desired total mass is reached. The maximum stellar mass is not allowed to exceed the total cluster mass. The simulated total mass will not be exactly equivalent to the desired total mass; but we will take one star above or below (whichever brings us closer to the desired total) the desired total cluster mass break point.
Primary stars are sampled from the IMF, companions are generated based on the multiplicity properties provided.
- Parameters:
- Returns:
masses (numpy float array) – List of primary star masses.
isMultiple (numpy boolean array) – List of booleans with True for each primary star that is in a multiple system and False for each single star.
companionMasses (numpy float array) – List of
- getMassBetween(massLo, massHi)#
Return the integrated mass between some low and high mass value.
- getProbabilityBetween(massLo, massHi)#
Return the integrated probability between some low and high mass value.
- int_mxi(massLo, massHi)#
Return the integrated total mass between some low and high stellar mass value. Be sure to normalize the IMF instance beforehand.
- int_xi(massLo, massHi)#
Return the integrated probability between some low and high mass value.
- int_xi_cl(left, right)#
Helper function.
- m_xi(m)#
Mass-weighted probability m*xi.
- mxi_cl(m)#
Helper function.
- norm_cl_wk04(Mcl, Mmax=None, Mmin=None)#
Helper function.
- normalize(Mcl, Mmin=None, Mmax=None)#
Normalize the IMF to a total cluster mass within a specified minimum and maximum stellar mass range.
- prim_mxi(a)#
Helper function.
- prim_xi(a)#
Helper function.
- xi(m)#
Probability density describing the IMF.
Input: m - mass of a star
Output: xi - probability of measuring that mass.
- xi_cl(m)#
Helper function.
- xi_new(m)#
Probability density describing the IMF.
Input: m - mass of a star
Output: xi - probability of measuring that mass.