average3.py 文件源码

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

项目:picasso 作者: jungmannlab 项目源码 文件源码
def hist_multi_channel(self, locs):

        oversampling = self.parameters_dialog.oversampling.value()
        self.oversampling = oversampling
        if locs is None:
            locs = self.locs
        n_channels = len(locs)

        hues = np.arange(0, 1, 1 / n_channels)
        colors = [colorsys.hsv_to_rgb(_, 1, 1) for _ in hues]

        renderings = []
        for i in range(n_channels):
            if self.dataset_dialog.checks[i].isChecked():
                renderings.append(render.render_hist3d(locs[i], oversampling, self.t_min, self.t_min, self.t_max, self.t_max, self.z_min, self.z_max, self.pixelsize))
        n_locs = sum([_[0] for _ in renderings])
        images = np.array([_[1] for _ in renderings])

        pixmap1 = self.pixmap_from_colors(images,colors,2)
        pixmap2 = self.pixmap_from_colors(images,colors,0)
        pixmap3 = self.pixmap_from_colors(images,colors,1)

        return pixmap1, pixmap2, pixmap3
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号