# to do: define fld_slice
# Animation 1:
nfig += 1
f_title = r''
x_lab = [r'$\alpha$',r'',r'']
y_lab = [r'',r'',r'']
z_lab = [r'',r'$\delta\phi$',r'$\chi$']

fig = plt.figure()
ax0 = fig.add_axes([0.075,0.75,0.2,0.2])
ax1 = Axes3D(fig, rect=(0.3,0.5,0.65,0.5), azim=azim, elev=elev, proj_type='ortho')
ax2 = Axes3D(fig, rect=(0.3,0,0.65,0.5), azim=azim, elev=elev, proj_type='ortho')
fld_slice = [ax0,ax1,ax2]
fig_n = 'fld_slice_anim' + str(nfig) + run_ident[0] + '.mp4'

ax0.plot(np.log(en[:,a_i]), pot.V(en[:,phi_i], pot.chi_min(en[:,phi_i]))/pot.V_0(en[:,phi_i],en[:,0]), ls=':', c='k', label=r'$V_{\mathrm{min}}|_{\langle \phi \rangle}/V_0$')
ax0.plot(np.log(en[:,a_i]), en[:,rhoP_i]/pot.V_0(en[:,phi_i],en[:,0]), ls='-.', c='k', label=r'$V/V_0$')
ylim = ax0.get_ylim()
line = ax0.plot([np.log(en[0,a_i]),np.log(en[0,a_i])], ylim ,ls='-', c='g', lw=1)
ax0.set_ylim(ylim)

# to do: set titles and labels
# to do: set figure size
def init_anim1():
	fig.suptitle(f_title)
	for i in range(0,len(fld_slice)):
		fld_slice[i].set_xlabel(x_lab[i])
		fld_slice[i].set_ylabel(y_lab[i])
	for i in range(1,len(fld_slice)):
		fld_slice[i].set_zlabel(z_lab[i])
	#for axis in fld_slice:
예제 #2
0
            en[i, :, rhoG_i] / en[i, :, rho_i],
            ls='-',
            c='r',
            label=r'Gradient')
    ax.plot(np.log(en[i, :, a_i]),
            en[i, :, rhoP_i] / en[i, :, rho_i],
            ls='-',
            c='b',
            label=r'Potential')
    ax.plot(np.log(en[i, :, a_i]),
            en[i, :, rhoP_i] / pot.V_0(en[i, :, phi_i], en[i, :, chi_i]),
            ls='-.',
            c='g',
            label=r'$V/V_0$')
    ax.plot(np.log(en[i, :, a_i]),
            pot.V(en[i, :, phi_i], pot.chi_min(en[i, :, phi_i])) /
            pot.V_0(en[i, :, phi_i], en[i, :, chi_i]),
            ls='..',
            c='g',
            label=r'$V_{\mathrm{min}}|_{\langle \phi \rangle}/V_0$')
ylim = ax.get_ylim()
ax.plot([np.log(en[0, dv_i[0], a_i]),
         np.log(en[0, dv_i[0], a_i])],
        ylim,
        ls='-',
        c='g',
        lw=0.5)
ax.plot([np.log(en[0, dv_i[1], a_i]),
         np.log(en[0, dv_i[1], a_i])],
        ylim,
        ls='-',
예제 #3
0
import potential as pot

import numpy as np
import matplotlib.pyplot as plt

plt.rc('text', usetex=True)
plt.rc('font', family='serif')

pot = pot.Potential('quadratic')

if (pot.phimin() == 0.0):
    print("Test Phimin Okay")
else:
    print("Test phimin Failed")
    #throw TestFail exception

plot_phi = np.linspace(-3.0, 3.0, 10000)

plt.xlabel('$\phi$')
plt.ylabel('$V(\phi)$')
plt.plot(plot_phi, pot.V(plot_phi), 'r')
plt.savefig('test_V_plot.png', dpi=150)
plt.close()

plt.xlabel('$\phi$')
plt.ylabel('$V(\phi)$')
plt.plot(plot_phi, pot.Vdd(plot_phi), 'r')
plt.savefig('test_Vdd_plot.png', dpi=150)
plt.close()
예제 #4
0
# Save/show figs
SAVE_FIGS = False
SHOW_FIGS = True

# Set potential parameters
pot.init_param(phi_p, phi_w, m2_p, lambda_chi_in=lambda_chi, POTOPT_in=POTOPT)

# Set field limits
n_pts = 2**8
f1_lim = [phi_p + 1.25 * phi_w, phi_p - 1.25 * phi_w]
f2_lim = [-1.25 * pot.chi_min(phi_p), 1.25 * pot.chi_min(phi_p)]
f1 = np.linspace(f1_lim[0], f1_lim[1], n_pts)
f2 = np.linspace(f2_lim[0], f2_lim[1], n_pts)
X, Y = np.meshgrid(f1, f2)

v = pot.V(X, Y)  #pot.V_int(X,Y)+pot.V_0_chi(X,Y)#
clip_lim = pot.V(X, 0, baseline=True) + pot.V_0_chi(0, 1. * pot.chi_min(phi_p))
v_clip = np.where(v <= clip_lim, v, np.nan)

# Plot
nfig = 0

# Point of view
elev = 45.
azim = 135.
dist = 10.

# Plot 1: Plot of m^2_{eff}(\phi) along side surface plot of V(\phi,\chi)
nfig += 1
fig_n = 'potential_plt' + str(nfig) + '_' + str(POTOPT) + '_' + '.png'
x_lab = [r'$\phi-\phi_p$', r'$\phi-\phi_p$']