PlotSDSSImage.py 文件源码

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

项目:ugali 作者: DarkEnergySurvey 项目源码 文件源码
def run(self):
    coords = self.opts.coords
    names = vars(self.opts).get('names',len(coords)*[''])
    labels=[n.lower().replace(' ','_').replace('(','').replace(')','') for n in names]

    for name,label,coord in zip(names,labels,coords):
        glon,glat = coord[0],coord[1]
        print '\t',name,'(%.2f,%.2f)'%(glon,glat)
        fig,ax = plt.subplots(1,1,figsize=(8,8))
        plotter =ugali.utils.plotting.BasePlotter(glon,glat,self.config,radius=0.5)
        plotter.image_kwargs.update(opt='GL',xsize=800)
        plotter.drawImage(ax,invert=False)
        fig.suptitle(label)
        outfile='%s_sdss_image.png'%label
        plt.savefig(outfile,dpi=200)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号