vice.mlr.larson1974 =================== Compute either the lifetime or the mass of a dying star according to the mass-lifetime relation of Larson (1974) [1]_. **Signature**: vice.mlr.larson1974(qty, postMS = 0.1, which = "mass") .. versionadded:: 1.3.0 Parameters ---------- qty : float Either the mass of a star in :math:`M_\odot` or the age of a stellar population in Gyr. Interpretion set by the keyword argument ``which``. postMS : float [default : 0.1] The ratio of a star's post main sequence lifetime to its main sequence lifetime. Zero to compute the main sequence lifetime alone, or the main sequence turnoff mass when ``which == "age"``. which : str [case-insensitive] [default : "mass"] The interpretation of ``qty``: either ``"mass"`` or ``"age"`` (case-insensitive). If ``which == "mass"``, then ``qty`` represents a stellar mass in :math:`M_\odot` and this function will compute a lifetime in Gyr. Otherwise, ``qty`` represents the age of a stellar population and the mass of a star with the specified lifetime will be calculated. Returns ------- x : float If ``which == "mass"``, the lifetime of a star of that mass and metallicity in Gyr according to Larson (1974). If ``which == "age"``, the mass of a star in :math:`M_\odot` with the specified lifetime in Gyr. Notes ----- Larson (1974) present the following fit to the compilation of evolutionary lifetimes presented in Tinsley (1972) [2]_: .. math:: \log_{10} \tau = \alpha + \beta \log_{10}(M/M_\odot) + \gamma (\log_{10}(M/M_\odot))^2 where :math:`\alpha` = 1 for :math:`\tau` measured in Gyr, :math:`\beta` = -3.42, and :math:`\gamma` = 0.88. Though this form was originally presented in Larson (1974), the values of the coefficients were taken from David, Forman & Jones (1990) [3]_ and Kobayashi (2004) [4]_. The timescale :math:`\tau` quantifies only the main sequence lifetime of stars; the parameter ``postMS`` specifies the length of the post main sequence lifetime. This parameterization neglects the metallicity dependence of the mass-lifetime relation. In solving the inverse function (i.e. mass as a function of lifetime), the solution proceeds analytically according to the quadratic formula where subtraction is chosen in the numerator over addition as this is the physical solution. Example Code ------------ >>> import vice >>> vice.mlr.larson1974(1) # the lifetime of the sun 11.0 >>> vice.mlr.larson1974(1, postMS = 0) # main sequence lifetime only 10.0 >>> vice.mlr.larson1974(1, which = "age") # what mass lives 1 Gyr? 2.1529829084164525 >>> vice.mlr.larson1974(2, which = "age") # 2 Gyr? 1.698651828235309 >>> vice.mlr.larson1974(2, postMS = 0, which = "age") # MS lifetime only 1.6460010348842196 >>> vice.mlr.larson1974(3) 0.40734775084938435 >>> vice.mlr.larson1974(3, postMS = 0) 0.3703161371358039 >>> vice.mlr.larson1974(3, which = "age") 1.4882047037330677 .. [1] Larson (1974), MNRAS, 166, 585 .. [2] Tinsley (1972), A&A, 20, 383 .. [3] David, Forman & Jones (1990), ApJ, 359, 29 .. [4] Kobayashi (2004), MNRAS, 347, 740