GaussClasses.py 文件源码

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

项目:livespin 作者: biocompibens 项目源码 文件源码
def plot_gaussians3D(self, save=False, titlehist='', pathfig='', newfig=True):

        ax = extract.hist2d(titlehist, newfig=newfig)
        dx, dy = np.indices(self.shape)
        for n in xrange(0, len(self.params), 6):
            gaussunitaire = GaussianForFit(self.image, 1, params=self.params[n:n + 6])
            ax.scatter(gaussunitaire.params[1], gaussunitaire.params[2],
                       self.image[gaussunitaire.params[1], gaussunitaire.params[2]], color=self.colors[n % 5],
                       label="{0:.3f}".format(gaussunitaire.params[0]), alpha=0.7)
            ax.contour(dx, dy, gaussunitaire.gaussian, colors=self.colors[n % 5])
        if save:
            pylab.savefig(pathfig)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号