vice.singlezone.IMF =================== Type : ``str`` [case-insensitive] or ```` Default : "kroupa" .. versionadded:: 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 :ref:`cumulative return fraction ` and the :ref:`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 .. [1] Kroupa (2001), MNRAS, 322, 231 .. [2] Salpeter (1955), ApJ, 121, 161