chianti.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:synthesizAR 作者: wtbarnes 项目源码 文件源码
def equilibrium_ionization(self, rate_matrix=None):
        """
        Calculate the ionization equilibrium for all ions of the element.

        Brief explanation and equations about how these equations are solved.
        """
        if rate_matrix is None:
            rate_matrix = self._rate_matrix()

        # Solve system of equations using SVD and normalize
        _, _, V = np.linalg.svd(rate_matrix.value)
        # Select columns of V with smallest eigenvalues (returned in descending order)
        ioneq = np.fabs(V[:, -1, :])
        ioneq /= np.sum(ioneq, axis=1)[:, np.newaxis]

        return u.Quantity(ioneq)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号