singles.py 文件源码

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

项目:astromalign 作者: dstndstn 项目源码 文件源码
def get_symbols_for_filts(uf):
    # Plot colors
    #cc = ['r','g','b','m','k']
    # blue to red
    cc = [colorsys.hsv_to_rgb(h, 1., 1.)
          for h in np.linspace(0.666, 0., len(uf), endpoint=True)]
    # normalize
    cc = [x / np.sum(x) for x in cc]
    # darken green
    for x in cc:
        x[1] *= 0.7
    # Plot symbols
    ss = ['*','x','o','^','s']
    # filter-to-color and filter-to-symbol maps
    fcmap = dict([(f,cc[i%len(cc)]) for i,f in enumerate(uf)])
    fsmap = dict([(f,ss[i%len(ss)]) for i,f in enumerate(uf)])

    return cc, ss, fcmap, fsmap
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号