ReliablePy.py 文件源码

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

项目:python-mrcz 作者: em-MRCZ 项目源码 文件源码
def permissiveMask( self, volumeThres, gaussSigma = 5.0, gaussRethres = 0.07, smoothSigma=1.5 ):
        """
        Given a (tight) volumeThres(hold) measured in Chimera or IMS, this function generates a 
        Gaussian dilated mask that is then smoothed.  Everything is done with Gaussian operations 
        so the Fourier space representation of the mask should be relatively smooth as well, 
        and hence ring less.

        Excepts self.mrc to be loaded.  Populates self.mask.  

        """
        thres = self.mrc > volumeThres; thres = thres.astype('float32')

        gaussThres = scipy.ndimage.gaussian_filter( thres, gaussSigma )
        rethres = gaussThres > gaussRethres; rethres = rethres.astype('float32')

        self.mask = scipy.ndimage.gaussian_filter( rethres, smoothSigma )
        print( "permissive mask complete, use ioMRC.writeMRC(self.mrc, 'maskname.mrc') to save" )
        pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号