vice.main_sequence_mass_fraction¶
Calculate the main sequence mass fraction for a single stellar population at a given age. This quantity represents the fraction of the stellar population’s mass that is still in the form of stars on the main sequence.
Signature: vice.main_sequence_mass_fraction(age, IMF = “kroupa”, m_upper = 100, m_lower = 0.08)
Parameters¶
- agereal number
The age of the stellar population in Gyr.
- IMF
str
[case-insensitive] or<function>
[default“kroupa”] The assumed stellar initial mass function (IMF). Strings denote built-in IMFs. Functions must accept only one numerical parameter and will be interpreted as a custom, arbitrary stellar IMF.
Recognized built-in IMFs:
Note
Functions do not need to be normalized. VICE will take care of this automatically.
- m_upperreal number [default100]
The upper mass limit on star formation in solar masses.
- m_lowerreal number [default0.08]
The lower mass limit on star formation in solar masses.
Returns¶
- msmfreal number
The value of the main sequence mass fraction for a stellar population at the specified age under the specified parameters.
Notes¶
Note
VICE operates under the approximation that stars have a mass-luminosity relationship given by:
leading to a mass-lifetime relation that is also a power-law, given by:
Raises¶
- TypeError
age is not a real number
IMF is neither a string nor a function
m_upper is not a real number
m_lower is not a real number
postMS is not a real number
- ValueError
age < 0
built-in IMF is not recognized
m_upper <= 0
m_lower <= 0
m_lower >= m_upper