ccmod.py 文件源码

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

项目:sporco 作者: bwohlberg 项目源码 文件源码
def eval_gradf(self):
        """ Compute gradient in Fourier domain """

        # Compute X D - S
        self.Ryf = self.eval_Rf(self.Yf)

        # Map to spatial domain to multiply by mask
        Ry = sl.irfftn(self.Ryf, self.cri.Nv, self.cri.axisN)
        # Multiply by mask
        WRy = (self.W**2) * Ry
        # Map back to frequency domain
        WRyf = sl.rfftn(WRy, self.cri.Nv, self.cri.axisN)

        gradf = sl.inner(np.conj(self.Zf), WRyf, axis=self.cri.axisK)

        # Multiple channel signal, single channel dictionary
        if self.cri.C > 1 and self.cri.Cd == 1:
            gradf = np.sum(gradf, axis=self.cri.axisC, keepdims=True)

        return gradf
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号