move files

This commit is contained in:
Dominik Demuth 2024-11-11 11:04:00 +01:00
parent 1eb3e3be2d
commit 79ad5794b7
2 changed files with 20 additions and 9 deletions

View File

@ -1,11 +1,14 @@
# Simulation part # Simulation part
num_walker=20000 num_walker=20000
# Motion model part # Motion model part
delta=161e3 delta=126e3
eta=0.2 eta=0.0
# Distribution part # Distribution part
# this tau value is overwritten if sim is run with test.py # this tau value is overwritten if sim is run with test.py
tau=1e-1 tau=1e-1
angle1=2
angle2=30
probability1=0.98
# Spectrum part # Spectrum part
dwell_time=1e-6 dwell_time=1e-6
num_acq=4096 num_acq=4096
@ -14,8 +17,11 @@ techo_stop=40e-6
techo_steps=5 techo_steps=5
# STE part # STE part
tevo_start=1e-6 tevo_start=1e-6
tevo_stop=60e-6 tevo_stop=120e-6
tevo_steps=121 tevo_steps=8
tmix_start=1e-5 tmix_start=1e-5
tmix_stop=1e1 tmix_stop=1e1
tmix_steps=61 tmix_steps=31
tau=0.01
tau=0.01
tau=0.01

13
test.py
View File

@ -17,6 +17,8 @@ def run_sims(taus, ste: bool = True, spectrum: bool = False, exec_file: str = '.
arguments += ['BimodalAngle'] arguments += ['BimodalAngle']
# arguments += ['-TAU', '1']
with pathlib.Path(config_file).open('a') as f: with pathlib.Path(config_file).open('a') as f:
f.write(f'tau={tau}\n') f.write(f'tau={tau}\n')
@ -69,7 +71,7 @@ def post_process_spectrum(taus, apod, tpulse):
def post_process_ste(taus): def post_process_ste(taus):
tevo = np.linspace(1e-6, 120e-6, num=121) tevo = np.linspace(1e-6, 120e-6, num=8)
for i, tau in enumerate(taus): for i, tau in enumerate(taus):
try: try:
@ -83,7 +85,7 @@ def post_process_ste(taus):
fig_cc_raw, ax_cc_raw = plt.subplots() fig_cc_raw, ax_cc_raw = plt.subplots()
fig_ss_raw, ax_ss_raw = plt.subplots() fig_ss_raw, ax_ss_raw = plt.subplots()
ax_cc_raw.semilogx(t_mix, raw_data_cc[:, 1:], '.') # ax_cc_raw.semilogx(t_mix, raw_data_cc[:, 1:], '.')
ax_ss_raw.semilogx(t_mix, raw_data_ss[:, 1:], '.') ax_ss_raw.semilogx(t_mix, raw_data_ss[:, 1:], '.')
scaled_cc = (raw_data_cc[:, 1:]-raw_data_cc[-1, 1:])/(raw_data_cc[0, 1:]-raw_data_cc[-1, 1:]) scaled_cc = (raw_data_cc[:, 1:]-raw_data_cc[-1, 1:])/(raw_data_cc[0, 1:]-raw_data_cc[-1, 1:])
@ -113,9 +115,11 @@ def post_process_ste(taus):
0.1 0.1
] ]
res = curve_fit(ste, t_mix, raw_data_cc[:, j+1], p0, bounds=[(0, 0, 0, 0), (np.inf, np.inf, 1, 1)]) res = curve_fit(ste, t_mix, raw_data_cc[:, j+1], p0, bounds=[(0, 0, 0., 0), (np.inf, np.inf, 1, 1)])
m0, tauc, beta, finfty = res[0] m0, tauc, beta, finfty = res[0]
# print(f'Cos-Cos-Fit for {tevo[j]}: tau_c = {tauc:.6e}, beta={beta:.4e}, amplitude = {m0: .4e}, f_infty={finfty:.4e}') # print(f'Cos-Cos-Fit for {tevo[j]}: tau_c = {tauc:.6e}, beta={beta:.4e}, amplitude = {m0: .4e}, f_infty={finfty:.4e}')
l = ax_cc_raw.semilogx(t_mix, raw_data_cc[:, j+1], 'x', label=f'{tevo[j]}')
ax_cc_raw.semilogx(t_mix, ste(t_mix, *res[0]), linestyle='--', color = l[0].get_color())
tau_cc_fit.append(res[0][1]) tau_cc_fit.append(res[0][1])
beta_cc_fit.append(res[0][2]) beta_cc_fit.append(res[0][2])
@ -139,7 +143,7 @@ def post_process_ste(taus):
p0 = [ p0 = [
raw_data_cc[0, 1], raw_data_cc[0, 1],
t_mix[np.argmin(np.abs(scaled_ss[:, j]-np.exp(-1)))], t_mix[np.argmin(np.abs(scaled_ss[:, j]-np.exp(-1)))],
1, 0.5,
0.1 0.1
] ]
@ -165,6 +169,7 @@ def post_process_ste(taus):
ax_beta.plot(tevo[1:], beta_plus_fit, 'C2-') ax_beta.plot(tevo[1:], beta_plus_fit, 'C2-')
ax_finfty.plot(tevo[1:], finfty_plus_fit, 'C2-') ax_finfty.plot(tevo[1:], finfty_plus_fit, 'C2-')
ax_cc_raw.legend()
plt.show() plt.show()
# np.savetxt('cc_tauc.dat', list(zip(tevo[1:], tau_cc_fit))) # np.savetxt('cc_tauc.dat', list(zip(tevo[1:], tau_cc_fit)))