vice.singlezone.tau_star ======================== Type : real number or ```` Default : 2.0 The star formation rate per unit gas supply in Gyr, defined by .. math:: \tau_\star \equiv M_\text{g}/\dot{M}_\star where :math:`M_\text{g}` is the ISM gas mass and :math:`\dot{M}_\star` is the star formation rate. Numbers will be interpreted as a constant value. Functions must accept either one or two parameters, the first of which will always be time in Gyr. In infall and gas modes, the second parameter will always be interpreted as the gas mass in :math:`M_\odot`, but in star formation mode, it will be interpreted as the star formation rate in :math:`M_\odot/yr`. This approach allows this attribute to vary with either the gas mass or the star formation rate in simulation (depending on which mode the model is ran in). .. versionadded:: 1.2.0 Prior to version 1.2.0, a functional form for this attribute had to accept only one numerical parameter, always interpreted as time in Gyr. .. tip:: In infall and gas modes, this parameter can be set to infinity to forcibly shut off star formation. .. tip:: When adopting a functional form for this attribute which depends on the gas supply itself via a pure power-law, we recommend users make use of the attributes ``schmidt``, ``schmidt_index``, and ``MgSchmidt``. These control the parameters of the power-law and allow VICE to calculate the values internally, resulting in shorter integration times. .. note:: When the attribute ``schmidt == True``, this is interpreted as the prefactor on gas-dependent star formation efficiency: .. math:: \tau_\star^{-1} = \tau_{*,\text{specified}}^{-1} \left( \frac{M_\text{g}}{M_\text{g,Schmidt}} \right)^{\alpha} where :math:`\alpha` is the power-law index on gas-dependent star formation efficiency, set by the attribute ``schmidt_index``, and :math:`\tau_{*,\text{specified}}` is the value of this attribute. .. note:: Saving functional attributes with VICE outputs requires the package dill_, an extension to ``pickle`` in the Python_ standard library. It is recommended that VICE user's install dill_ >= 0.2.0. .. _dill: https://pypi.org/project/dill/ .. _Python: https://docs.python.org/library/ .. note:: In the interstellar medium and star formation literature, this parameter is often referred to as the depletion timescale. In this documentation and in much of the galactic chemical evolution literature, it is often referred to as the "star formation efficiency timescale." .. note:: If the user assigns this attribute a function which is ran through a Cython_ compiler, the corresponding Cython_ source code must be compiled with the ``binding = True`` directive. This allows VICE to inspect the signature of the compiled function; otherwise, assigning the function to this attribute will raise a ``ValueError``. .. _Cython: https://cython.org/ Example Code ------------ >>> import vice >>> sz = vice.singlezone(name = "example") >>> sz.tau_star = 1 >>> def f(t): if 5 <= t <= 6: return 1 else: return 2 >>> sz.tau_star = f