Commit e73b78b0 by Orkun Şensebat

### Touch up plots

 ... @@ -2,7 +2,7 @@ import numpy as np ... @@ -2,7 +2,7 @@ import numpy as np import matplotlib.pyplot as plt import matplotlib.pyplot as plt import time import time showPlots = True showPlots = False # initialization # initialization wxyz = 4754 wxyz = 4754 ... @@ -109,17 +109,21 @@ E = count_coincidences(counts) ... @@ -109,17 +109,21 @@ E = count_coincidences(counts) # 1. as expected # 1. as expected # 2. from simulation results # 2. from simulation results plot_i = 1 # correlation # correlation phi = np.linspace(0, 360/n_configs*(n_configs-1), n_configs) phi = np.linspace(0, 360/n_configs*(n_configs-1), n_configs) phi_theory = np.linspace(0, 360/n_configs*(n_configs-1), n_configs*100) phi_theory = np.linspace(0, 360/n_configs*(n_configs-1), n_configs*100) theory = -np.cos(2 * phi_theory * (2 * np.pi / 360)) theory = -np.cos(2 * phi_theory * (2 * np.pi / 360)) plt.figure() plt.figure() plt.xlabel(r'$\Delta \varphi$') plt.xlabel(r'$\Delta \varphi$ in degrees') plt.ylabel(r'$$') plt.ylabel(r'Correlation function \langle x_1 x_2 \rangle') plt.plot(phi_theory, theory, '.', markersize=1, color='orange') plt.xlim([0, 360]) plt.plot(phi, E[12][plot_i, :], 'o', color='blue') plt.xticks([0, 90, 180, 270, 360]) plt.yticks([-1.0, -0.5, 0.0, 0.5, 1.0]) plt.plot(phi_theory, theory, color='black', label='Theory') plt.plot(phi, E[12][1, :], 'P', color='blue', label='W = 1\,\mathrm{ns}') plt.plot(phi, E[12][0, :], 'X', color='orange', label='W\\ \\to\\ \infty') plt.legend() plt.grid() plt.savefig('correlation.pdf') plt.savefig('correlation.pdf') if showPlots: if showPlots: plt.show() plt.show() ... @@ -128,12 +132,18 @@ plt.close() ... @@ -128,12 +132,18 @@ plt.close() # product of expectation values # product of expectation values line = np.zeros(phi_theory.shape) line = np.zeros(phi_theory.shape) plt.figure() plt.figure() plt.xlabel(r'\Delta \varphi') plt.xlabel(r'\Delta \varphi in degrees') plt.ylabel(r'$$') plt.ylabel(r'$\langle x_1 \rangle \langle x_2 \rangle$') plt.ylim([-1, 1]) plt.xlim([0, 360]) plt.xticks([0, 45, 90, 135, 180, 225, 270, 305, 360]) plt.ylim([-0.01, 0.01]) plt.plot(phi_theory, line, '.', markersize=1, color='orange') # plt.xticks([0, 45, 90, 135, 180, 225, 270, 305, 360]) plt.plot(phi, E[1][plot_i, :]*E[2][plot_i, :], 'o', color='blue') plt.xticks([0, 90, 180, 270, 360]) plt.yticks([-0.01, 0.0, 0.01]) plt.plot(phi_theory, line, linewidth=1, color='black', label='Theory') plt.plot(phi, E[1][1, :]*E[2][1, :], 'P', color='blue', label='$W = 1\,\mathrm{ns}$') plt.plot(phi, E[1][0, :]*E[2][0, :], 'X', color='orange', label='$W\\ \\to\\ \infty$') plt.legend() plt.grid() plt.savefig('expectation_value.pdf') plt.savefig('expectation_value.pdf') if showPlots: if showPlots: plt.show() plt.show() ... ...