field.py 文件源码

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

项目:synthesizAR 作者: wtbarnes 项目源码 文件源码
def peek(self, figsize=(10, 10), color='b', alpha=0.75,
             print_to_file=None, **kwargs):
        """
        Show extracted fieldlines overlaid on HMI image.
        """
        fig = plt.figure(figsize=figsize)
        ax = fig.gca(projection=self.hmi_map)
        self.hmi_map.plot()
        ax.set_autoscale_on(False)
        for stream, _ in self.streamlines:
            ax.plot(self._convert_angle_to_length(stream[:, 0]*u.cm,
                                                  working_units=u.arcsec).to(u.deg),
                    self._convert_angle_to_length(stream[:, 1]*u.cm,
                                                  working_units=u.arcsec).to(u.deg),
                    alpha=alpha, color=color, transform=ax.get_transform('world'))

        if print_to_file is not None:
            plt.savefig(print_to_file, **kwargs)
        plt.show()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号