Compare commits
2 Commits
master
...
angle_depe
Author | SHA1 | Date | |
---|---|---|---|
|
78d008aa5a | ||
|
1bf927329d |
@ -1,7 +1,7 @@
|
||||
# Simulation part
|
||||
num_walker=20000
|
||||
# Motion model part
|
||||
delta=126e3
|
||||
delta=161e3
|
||||
eta=0.0
|
||||
# Distribution part
|
||||
tau=1e-3
|
||||
@ -16,8 +16,8 @@ techo_stop=40e-6
|
||||
techo_steps=5
|
||||
# STE part
|
||||
tevo_start=2e-6
|
||||
tevo_stop=120e-6
|
||||
tevo_steps=121
|
||||
tevo_stop=50e-6
|
||||
tevo_steps=49
|
||||
tmix_start=1e-5
|
||||
tmix_stop=1e1
|
||||
tmix_steps=61
|
||||
tmix_steps=31
|
||||
|
79
main.py
79
main.py
@ -8,28 +8,36 @@ motion = 'IsotropicAngle'
|
||||
distribution = 'Delta'
|
||||
# parameter = {}
|
||||
parameter = {
|
||||
"angle": [10, 109.47],
|
||||
"angle": np.linspace(1, 180, num=180),
|
||||
"eta": 0.1
|
||||
# "sigma": 0.1,
|
||||
# "tau": np.logspace(-1, 1, num=3)
|
||||
}
|
||||
|
||||
parameter = prepare_rw_parameter(parameter)
|
||||
|
||||
fig_tau_cc, ax_tau_cc = plt.subplots()
|
||||
ax_tau_cc.set_title('tau_cc')
|
||||
# fig_tau_cc, ax_tau_cc = plt.subplots()
|
||||
# ax_tau_cc.set_title('tau_cc')
|
||||
#
|
||||
# fig_beta_cc, ax_beta_cc = plt.subplots()
|
||||
# ax_beta_cc.set_title('beta_cc')
|
||||
#
|
||||
# fig_finfty_cc, ax_finfty_cc = plt.subplots()
|
||||
# ax_finfty_cc.set_title('f_infty_cc')
|
||||
#
|
||||
# fig_tau_ss, ax_tau_ss = plt.subplots()
|
||||
# ax_tau_ss.set_title('tau_ss')
|
||||
#
|
||||
# fig_beta_ss, ax_beta_ss = plt.subplots()
|
||||
# ax_beta_ss.set_title('beta_ss')
|
||||
#
|
||||
# fig_finfty_ss, ax_finfty_ss = plt.subplots()
|
||||
# ax_finfty_ss.set_title('f_infty_ss')
|
||||
|
||||
fig_beta_cc, ax_beta_cc = plt.subplots()
|
||||
ax_beta_cc.set_title('beta_cc')
|
||||
|
||||
fig_finfty_cc, ax_finfty_cc = plt.subplots()
|
||||
ax_finfty_cc.set_title('f_infty_cc')
|
||||
|
||||
fig_tau_ss, ax_tau_ss = plt.subplots()
|
||||
ax_tau_ss.set_title('tau_ss')
|
||||
|
||||
fig_beta_ss, ax_beta_ss = plt.subplots()
|
||||
ax_beta_ss.set_title('beta_ss')
|
||||
|
||||
fig_finfty_ss, ax_finfty_ss = plt.subplots()
|
||||
ax_finfty_ss.set_title('f_infty_ss')
|
||||
tau_ss_angles = []
|
||||
tau_cc_angles = []
|
||||
tau_2_angles = []
|
||||
angles = []
|
||||
|
||||
for variation in parameter:
|
||||
print(f"\nRun RW for {motion}/{distribution} with arguments {variation}\n")
|
||||
@ -39,17 +47,34 @@ for variation in parameter:
|
||||
|
||||
vary_string, tau_cc, beta_cc, finfty_cc = fit_and_save_ste(conf_file, 'coscos', plot_decays=False, verbose=False)
|
||||
_, tau_ss, beta_ss, finfty_ss = fit_and_save_ste(conf_file, 'sinsin', plot_decays=False, verbose=False)
|
||||
_, tau_2, beta_2, finfty_2 = fit_and_save_ste(conf_file, 'f2', plot_decays=True, verbose=True)
|
||||
_, tau_2, beta_2, finfty_2 = fit_and_save_ste(conf_file, 'f2', plot_decays=False, verbose=True)
|
||||
|
||||
ax_tau_cc.semilogy(tau_cc[:, 0], tau_cc[:, 1], label=vary_string)
|
||||
ax_tau_cc.axhline(tau_2[:, 1], color='k', linestyle='--')
|
||||
ax_beta_cc.plot(*beta_cc.T, label=vary_string)
|
||||
ax_finfty_cc.plot(*finfty_cc.T, label=vary_string)
|
||||
ax_tau_ss.semilogy(tau_ss[:, 0], tau_ss[:, 1], label=vary_string)
|
||||
ax_tau_ss.axhline(tau_2[:, 1], color='k', linestyle='--')
|
||||
ax_beta_ss.plot(*beta_ss.T, label=vary_string)
|
||||
ax_finfty_ss.plot(*finfty_ss.T, label=vary_string)
|
||||
# ax_tau_cc.semilogy(tau_cc[:, 0], tau_cc[:, 1], label=vary_string)
|
||||
# ax_tau_cc.axhline(tau_2[:, 1], color='k', linestyle='--')
|
||||
# ax_beta_cc.plot(*beta_cc.T, label=vary_string)
|
||||
# ax_finfty_cc.plot(*finfty_cc.T, label=vary_string)
|
||||
# ax_tau_ss.semilogy(tau_ss[:, 0], tau_ss[:, 1], label=vary_string)
|
||||
# ax_tau_ss.axhline(tau_2[:, 1], color='k', linestyle='--')
|
||||
# ax_beta_ss.plot(*beta_ss.T, label=vary_string)
|
||||
# ax_finfty_ss.plot(*finfty_ss.T, label=vary_string)
|
||||
|
||||
for ax in [ax_tau_cc, ax_beta_cc, ax_finfty_cc, ax_tau_ss, ax_beta_ss, ax_finfty_ss]:
|
||||
angles.append(variation['angle'])
|
||||
tau_ss_angles.append(tau_ss[0, 1])
|
||||
tau_cc_angles.append(tau_cc[0, 1])
|
||||
tau_2_angles.append(tau_2[0, 1])
|
||||
|
||||
|
||||
fig, ax = plt.subplots()
|
||||
ax.semilogy(angles, tau_ss_angles, 'o', label='SS (4.9mus)')
|
||||
ax.plot(angles, tau_cc_angles, 'o', label='CC (4.9mus)')
|
||||
ax.plot(angles, tau_2_angles, 'o', label='F2')
|
||||
ax.legend()
|
||||
|
||||
np.savetxt('angle_eta.dat', np.c_[angles, tau_cc_angles, tau_ss_angles, tau_2_angles], header='#x\tcc\tss\tf2')
|
||||
|
||||
fig2, ax2 = plt.subplots()
|
||||
ax2.plot(angles, np.array(tau_cc_angles)/np.array(tau_2_angles), 'o')
|
||||
|
||||
# for ax in [ax_tau_cc, ax_beta_cc, ax_finfty_cc, ax_tau_ss, ax_beta_ss, ax_finfty_ss]:
|
||||
# ax.legend()
|
||||
plt.show()
|
Loading…
x
Reference in New Issue
Block a user