vice.milkyway.RIa ================= Type : ```` 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" : :math:`R_\text{Ia} \sim e^{-t}` - "plaw" : :math:`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. .. _dill: https://pypi.org/project/dill/ .. _Python: https://docs.python.org/library/ 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