コード例 #1
0
ファイル: make_COS_velplot.py プロジェクト: nhmc/H2
pl.rc('xtick.major', size=3)      # major tick size in points
pl.rc('xtick.minor', size=1.5)      # minor tick size in points
pl.rc('xtick.major', pad=3 )     # distance to major tick label in points
pl.rc('xtick.minor', pad=3 )     # distance to the minor tick label in points
pl.rc('ytick.major', size=3)      # major tick size in points
pl.rc('ytick.minor', size=1.5)      # minor tick size in points
pl.rc('ytick.major', pad=3 )     # distance to major tick label in points
pl.rc('ytick.minor', pad=3 )     # distance to the minor tick label in points

if 1:
    sp, transitions, model, models, ticks = make_models(opt)
    #sp.fl = convolve_psf(sp.fl, 1.5)
    cols = dict(model='r', resid='g', data='0.5')

    fig, axes = make_plot(sp, transitions, model, models, [], opt, width=4.2,
                          unrelated=unrelated, ncols=2, nrows=5,cols=cols,
                          aspect=0.6)

    fig.subplots_adjust(bottom=0.065,left=0.11)
    pl.figtext(0.018, 0.5, 'Transmission', rotation=90, va='center',fontsize=11)
    tickpos =  array([-110.26510868,  -93.01127355,  -72.24951539,
                      -49.79515804,
                      -26.07570683,    0.        ,   44.06937431,
                      68.34348321,
                      100.02608005,  124.18839882])

    for i,ax in enumerate(axes):
        ax.set_yticks([0., 0.5, 1])
        if i > 4:
            ax.set_yticklabels([])
        else:
コード例 #2
0
ファイル: make_HIRES_velplot.py プロジェクト: nhmc/H2
with open(cfgname, 'w') as fh:
    fh.write(cfg)

opt = parse_config(cfgname)

pl.rc('xtick',labelsize=11)
pl.rc('ytick',labelsize=11)
pl.rc('xtick.major', size=3)      # major tick size in points
pl.rc('xtick.minor', size=1.5)      # minor tick size in points
pl.rc('ytick.major', size=3)      # major tick size in points
pl.rc('ytick.minor', size=1.5)      # minor tick size in points

if 1:
    cols = dict(model='r', resid='g', data='0.5')
    sp, transitions, model, models, ticks = make_models(opt)
    fig, axes = make_plot(sp, transitions, model, models, [], opt, width=8,
                          cols=cols)
    fig.subplots_adjust(bottom=0.12,left=0.075)
    pl.figtext(0.014, 0.5, 'Transmission', rotation=90, va='center',fontsize=12)

    mg2796 = 2796.3542699
    waobs = (opt.redshift + 1) * mg2796
    tickpos = (ticks[ticks.wa0 == mg2796].wa / waobs  - 1) * c_kms
    print repr(tickpos)

    for i,ax in enumerate(axes):
        if i > 2:
            ax.set_yticklabels([])
        ax.minorticks_on()
        if i in (2, 5, 8):
            if i in (5,):
                ax.set_xlabel('Velocity offset (km s$^{-1}$)', fontsize=12)