예제 #1
0
def test_temperature_ax():
    tmodel = pa.tmodels.TCEA(pressure)
    profile = tmodel([-4.0, -1.0, 0.0, 0.0, 1000.0, 0.0])
    plt.figure(0)
    plt.clf()
    ax = plt.subplot(221)
    ax = pp.temperature(pressure, profiles=profile, ax=ax)
예제 #2
0
def test_temperature_bounds_1sigma():
    tmodel = pa.tmodels.TCEA(pressure)
    profile = tmodel([-4.0, -1.0, 0.0, 0.0, 1000.0, 0.0])
    bounds = [
        tmodel([-4.0, -0.9, 0.0, 0.0, 1000.0, 0.0]),
        tmodel([-4.0, -1.1, 0.0, 0.0, 1000.0, 0.0]),
    ]
    ax = pp.temperature(pressure, profiles=profile, bounds=bounds)
    ax.set_ylabel(r"$F_{\rm p}/F_{\rm s}$ (ppt)", fontsize=fs)
    if ax.get_ylim()[1] < 4:
        ylim = ax.get_ylim()
        yticks = [ytick for ytick in ax.get_yticks() if ytick % 1.0 == 0]
        ax.set_yticks(yticks)
        ax.set_ylim(ylim)

for i in range(nphase):
    rect = [xmin2, ymin, xmax2, ymax]
    ax = mc3.plots.subplotter(rect, margin, i + 1, nx=1, ny=3)
    ax.clear()
    for k in range(2):
        pp.temperature(pyrat.atm.press,
                       bounds=tpost[k, i, 1:3],
                       theme=themes[k],
                       alpha=[alpha[k], 0.5],
                       ax=ax,
                       lw=1.5,
                       fs=fs)
        ax.plot(tpost[k, i, 0], pyrat.atm.press / pc.bar, c=c_model[k], lw=1.5)
    ax.tick_params(direction='in', labelsize=fs, top=True, right=True)
    ax.set_xlim(400, 2400)
    ax.set_ylim(ymax=1e-6)
    if i != 2:
        ax.set_xlabel('')
plt.savefig('plots/WASP43b_stevenson-mendonca_spectra_temperatures.pdf')

# ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
themes = ['blue', 'green', 'red', 'orange']
rc = 'navy darkgreen darkred darkorange'.split()
hpdc = 'cornflowerblue limegreen red gold'.split()
    ax.set_xticks(pyrat.inputs.logxticks)
    if j >= npanels - 2:
        ax.set_xlabel('Wavelength (um)', fontsize=fs)
    else:
        ax.set_xticklabels([])
    ylim = ax.get_ylim()
    yticks = [ytick for ytick in ax.get_yticks() if ytick % 1.0 == 0]
    ax.set_yticks(yticks)
    ax.set_ylim(ylim)

for j, i in enumerate(plot_models[k]):
    rect = [xmin2, ymin1, xmax2, ymax1]
    ax = mc3.plots.subplotter(rect, margin2, j + 1, nx, ny, ymargin)
    pp.temperature(pyrat.atm.press,
                   bounds=temp_posteriors[k, 0, i, 1:3],
                   ax=ax,
                   theme=[c_data[0], '0.5'],
                   alpha=[1.0, 0.6],
                   fs=fs)
    pp.temperature(pyrat.atm.press,
                   bounds=temp_posteriors[k, 1, i, 1:3],
                   ax=ax,
                   theme='orange',
                   alpha=[0.7, 0.3],
                   fs=fs)
    for l in range(nphase):
        ax.plot(atm_models[k]['temp'][4 * l],
                pyrat.atm.press / pc.bar,
                alpha=0.4,
                lw=1.0,
                c='0.4')
    ax.plot(atm_models[k]['temp'][4 * i],
예제 #5
0
def test_temperature_custom_colors():
    tmodel = pa.tmodels.TCEA(pressure)
    profile = tmodel([-4.0, -1.0, 0.0, 0.0, 1000.0, 0.0])
    ax = pp.temperature(pressure, profiles=profile, colors=['r'])
예제 #6
0
def test_temperature_labels():
    tmodel = pa.tmodels.TCEA(pressure)
    profile = tmodel([-4.0, -1.0, 0.0, 0.0, 1000.0, 0.0])
    ax = pp.temperature(pressure, profiles=profile, labels=['model'])
예제 #7
0
def test_temperature_minimal(ndim):
    tmodel = pa.tmodels.TCEA(pressure)
    profile = tmodel([-4.0, -1.0, 0.0, 0.0, 1000.0, 0.0])
    if ndim == '2d':
        profile = [profile]
    ax = pp.temperature(pressure, profiles=profile)
예제 #8
0
    ax.set_xlim(1.05, 5.1)
    if j == ny - 1:
        plt.xlabel('Wavelength (um)', fontsize=fs)
    else:
        ax.set_xticklabels([])
    ylim = ax.get_ylim()
    yticks = [ytick for ytick in ax.get_yticks() if ytick % 1.0 == 0]
    ax.set_yticks(yticks)
    ax.set_ylim(ylim)

for j, i in enumerate(plot_models):
    rect = [xmin2, ymin, xmax2, ymax]
    ax = mc3.plots.subplotter(rect, margin, j + 1, nx=1, ny=ny)
    pp.temperature(pyrat.atm.press,
                   bounds=tpost[0, i, 1:3],
                   ax=ax,
                   theme=themes[0],
                   alpha=[1.0, 0.6],
                   fs=fs)
    pp.temperature(pyrat.atm.press,
                   bounds=tpost[1, i, 1:3],
                   ax=ax,
                   theme='orange',
                   alpha=[0.7, 0.3],
                   fs=fs)
    for k in range(2):
        ax.plot(tpost[k, i, 0], pyrat.atm.press / pc.bar, c=c_model[k], lw=1.5)
    ax.tick_params(labelsize=fs - 1, axis='x', direction='in')
    ax.tick_params(labelsize=fs - 2, axis='y', direction='in')
    ax.set_ylabel('Pressure (bar)', fontsize=fs, labelpad=0.5)
    ax.set_xlim(200, 2300)
    ax.set_ylim(ymax=1e-7)