|
@@ -48,10 +48,11 @@ if __name__ == '__main__':
|
|
|
cap_sigma = point_to_cap_map(sigma_m, a_bar, theta0, params)
|
|
|
ex_cap = expansion.SphericalCap(theta0_k=theta0, sigma1=cap_sigma, omega_k=np.array([[0, 0], [np.pi, 0]]), l_max=30)
|
|
|
|
|
|
- theta = np.linspace(0, np.pi, 1000)
|
|
|
+ theta = np.linspace(0, np.pi, 1001)
|
|
|
phi = 0.
|
|
|
dist = 1
|
|
|
|
|
|
+ potential_ic = potentials.inverse_patchy_particle_potential(theta, dist, a_bar, -2 * sigma_m, (sigma_m, sigma_m), params, 30)
|
|
|
potential1 = potentials.charged_shell_potential(theta, phi, dist, ex_point, params)
|
|
|
potential2 = potentials.charged_shell_potential(theta, phi, dist, ex_gauss, params)
|
|
|
potential3 = potentials.charged_shell_potential(theta, phi, dist, ex_cap, params)
|
|
@@ -60,24 +61,31 @@ if __name__ == '__main__':
|
|
|
|
|
|
# expansion.plot_theta_profile_multiple([ex_point, ex_gauss, ex_cap], ['IC', 'Gauss', 'cap'], num=1000)
|
|
|
|
|
|
- # fig, ax = plt.subplots()
|
|
|
- # ax.plot(theta, potential1.T, label='IC')
|
|
|
- # ax.plot(theta, potential2.T, label='Gauss')
|
|
|
- # ax.plot(theta, potential3.T, label='cap')
|
|
|
- # ax.tick_params(which='both', direction='in', top=True, right=True, labelsize=12)
|
|
|
- # ax.set_xlabel(r'$\theta$', fontsize=13)
|
|
|
- # ax.set_ylabel(r'$\phi$', fontsize=13)
|
|
|
- # plt.legend(fontsize=12)
|
|
|
- # plt.tight_layout()
|
|
|
+ fig, ax = plt.subplots()
|
|
|
+ ax.plot(theta, 1000 * potential1.T, label='CS', linewidth=2)
|
|
|
+ # ax.plot(theta, potential_ic.T, label='IC', ls=':', linewidth=2, marker='o', markevery=50, mfc='none')
|
|
|
+ ax.scatter(theta[::50], 1000 * potential_ic.T[::50], marker='o', label='IC', facecolors='none', edgecolors='tab:red')
|
|
|
+ ax.plot(theta, 1000 * potential2.T, label='Gauss', linewidth=2, ls='--')
|
|
|
+ ax.plot(theta, 1000 * potential3.T, label='cap', linewidth=2, ls='--')
|
|
|
+ ax.tick_params(which='both', direction='in', top=True, right=True, labelsize=12)
|
|
|
+ ax.set_xlabel(r'$\theta$', fontsize=15)
|
|
|
+ ax.set_ylabel(r'$\phi$ [mV]', fontsize=15)
|
|
|
+ custom_ticks = [0, np.pi / 4, np.pi / 2, 3 * np.pi / 4, np.pi]
|
|
|
+ custom_labels = ['0', r'$\pi/4$', r'$\pi/2$', r'$3\pi/4$', r'$\pi$']
|
|
|
+ plt.axhline(y=0, color='black', linestyle=':')
|
|
|
+ plt.axvline(x=target_patch_size, color='black', linestyle=':')
|
|
|
+ plt.xticks(custom_ticks, custom_labels, fontsize=13)
|
|
|
+ plt.legend(fontsize=12)
|
|
|
+ plt.tight_layout()
|
|
|
# plt.savefig(Path("/home/andraz/ChargedShells/Figures/potential_shape_comparison.png"), dpi=600)
|
|
|
- # plt.show()
|
|
|
-
|
|
|
- path_comparison = rotational_path.PathExpansionComparison([ex_point, ex_gauss, ex_cap],
|
|
|
- path_plot.QuadPath,
|
|
|
- dist=2,
|
|
|
- params=params)
|
|
|
- path_comparison.plot(['IC', 'Gauss', 'cap'],
|
|
|
- save_as=Path("/home/andraz/ChargedShells/Figures/energy_shape_comparison_kR1.png"))
|
|
|
+ plt.show()
|
|
|
+
|
|
|
+ # path_comparison = rotational_path.PathExpansionComparison([ex_point, ex_gauss, ex_cap],
|
|
|
+ # path_plot.QuadPath,
|
|
|
+ # dist=2,
|
|
|
+ # params=params)
|
|
|
+ # path_comparison.plot(['IC', 'Gauss', 'cap'],
|
|
|
+ # save_as=Path("/home/andraz/ChargedShells/Figures/energy_shape_comparison_kR1.png"))
|
|
|
|
|
|
|
|
|
|