reflector.py 文件源码

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

项目:smrt 作者: smrt-model 项目源码 文件源码
def absorption_matrix(self, frequency, eps_1, mu1, npol, compute_coherent_only):

        if self.specular_reflection is None and self.backscatter_coefficient is None:
            self.specular_reflection = 1

        if npol > 2:
            raise NotImplementedError("active model is not yet implemented, need modification for the third compunant")

        if isinstance(self.specular_reflection, dict):  # we have a dictionary with polarization
            abs_coeff = np.empty(npol*len(mu1))
            abs_coeff[0::npol] = 1 - self._get_refl(self.specular_reflection['V'], mu1)
            abs_coeff[1::npol] = 1 - self._get_refl(self.specular_reflection['H'], mu1)
        else:  # we have a scalar, both polarization are the same
            abs_coeff = 1 - np.repeat(self._get_refl(self.specular_reflection, mu1), npol)

        return scipy.sparse.diags(abs_coeff, 0)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号