vice.milkyway.RIa

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

Default: “plaw”

The delay-time distribution (DTD) for type Ia supernovae to adopt. If type str, VICE will use a built-in DTD:

  • “exp” : \(R_\text{Ia} \sim e^{-t}\)

  • “plaw” : \(R_\text{Ia} \sim t^{-1.1}\)

When using the exponential DTD, the e-folding timescale is set by the attribute tau_ia.

Functions must accept time in Gyr as the only parameter and return the rate at that delay-time.

Tip

A custom DTD does not need to be normalized by the user. VICE will take care of this automatically.

Note

Saving functional attribute with VICE outputs requires the package dill, an extension to pickle in the Python standard library. It is recommended that VICE users install dill >= 0.2.0.

Example Code

>>> import math as m
>>> import vice
>>> mw = vice.milkway(name = "example")
>>> mw.RIa = "exp"
>>> mw.RIa
"exp"
>>> def f(t):
        if t < 0.2:
                return 1
        else:
                return m.exp(-(t - 0.2) / 1.4)
>>> mw.RIa = f