fontsize = '14'
N=100
# Data for plotting
v=0.4
t_max = 5.0
gamma = (1-v**2)**(-0.5)
# beta = np.arctan(gamma)
t = np.linspace(0.0, t_max, N)
s0=2
s1 = 0*t
light = t
ss = s0 + v*t
# s = 1 + np.sin(2 * np.pi * t)

fig, ax = texfig.subplots()
ax.plot(s1, t, color='k', lw=2)
ax.plot(ss, t, color='k', lw=2)

# Luz 1
t_0 = 0.8
dt_0 = 0.8
tt_max = s0 + v*t_0
tt = np.linspace(0.0, tt_max, N)

dist_0 = s0 + v*t_0
t_prime = np.linspace(t_0, tt_max+t_0, N)
li_1 = dist_0 - tt
ax.plot(li_1, t_prime, color='gold', zorder=0)

# Legenda Luz 1
Esempio n. 2
0
plt.yscale('log')

plt.xlabel(r'scale factor \(a\)')
plt.ylabel(r'tensor perturbations \(|h|\)')

handles, labels = plt.gca().get_legend_handles_labels()
slope_handle = plt.Line2D((0,1),(0,0), c='black', ls='dotted')
plt.legend(handles + [ slope_handle, bg_legend_handle ], labels + [ r"analytic slope $h(a) \propto a^{-\left(1+\frac{\alphaM}{2}\right)}$", "for  " + r"$k=0.01$, $\cT=1$" ], loc='lower left')

texfig.savefig('plots/growing_aM')


# varying both alphaM and beta

plt.clf()
fig, axes = texfig.subplots(width=tex_width, nrows=2, ncols=2, sharex=True, sharey=True)

for (i, row) in enumerate([["0", "0.1"], ["0.4", "1"]]):
    for (j, beta_str) in enumerate(row):
        ax = axes[i][j]
        plt.sca(ax)

        plot_parametric_evolution('varying_aM0_beta_' + beta_str, ur'\alphaMnot', LCDM_pvalue=0)

        ax.set_title(ur'$\beta=' + beta_str + '$')

        ax.set_xscale('log')
        ax.set_yscale('log')

        if i==1:
            ax.set_xlabel(r'scale factor \(a\)')