vice.singlezone.IMF

Type : str [case-insensitive] or <function>

Default : “kroupa”

New in version 1.2.0: In versions >= 1.2.0, users may construct a function of mass to describe the IMF.

The assumed stellar initial mass function (IMF). If assigned a string, VICE will adopt a built-in IMF. Functions must accept stellar mass as the only parameter and are expected to return the value of the IMF at that mass (it need not be normalized).

Built-in IMFs:

  • “kroupa” [1]

  • “salpeter” [2]

Note

VICE has analytic solutions to the cumulative return fraction and the main sequence mass fraction for built-in IMFs. If assigned a function, VICE will calculate these quantities numerically, increasing the required integration time.

Example Code

>>> import vice
>>> sz = vice.singlezone(name = "example")
>>> sz.IMF = "kroupa"
>>> def f(m):
        if m < 0.5:
                return m**-1.2
        else:
                return m**-2.2
>>> sz.IMF = f