tried stuff
This commit is contained in:
parent
5c95b31053
commit
3e1325f3ca
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"simulation": {
|
"simulation": {
|
||||||
"num_walker": 20,
|
"num_walker": 20000,
|
||||||
"seed": null
|
"seed": null
|
||||||
},
|
},
|
||||||
"molecule": {
|
"molecule": {
|
||||||
@ -10,7 +10,10 @@
|
|||||||
"correlation_times": {
|
"correlation_times": {
|
||||||
"distribution": "DeltaDistribution",
|
"distribution": "DeltaDistribution",
|
||||||
"tau": {
|
"tau": {
|
||||||
"list": [1e2, 1e0]
|
"start": 1e-3,
|
||||||
|
"stop": 1e0,
|
||||||
|
"steps": 1,
|
||||||
|
"is_log": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"motion": {
|
"motion": {
|
||||||
@ -34,7 +37,7 @@
|
|||||||
},
|
},
|
||||||
"stimulated_echo": {
|
"stimulated_echo": {
|
||||||
"t_evo": {
|
"t_evo": {
|
||||||
"start": 2e-6,
|
"start": 10e-6,
|
||||||
"stop": 100e-6,
|
"stop": 100e-6,
|
||||||
"steps": 98
|
"steps": 98
|
||||||
},
|
},
|
||||||
|
@ -68,16 +68,18 @@ def run_ste_sim(config_file: str):
|
|||||||
ax5.semilogx(t_mix, ss/ss[0, :], '.-')
|
ax5.semilogx(t_mix, ss/ss[0, :], '.-')
|
||||||
|
|
||||||
for k in range(num_variables):
|
for k in range(num_variables):
|
||||||
p0 = [0.5, 0, p.dist.variables.get('tau', 1), 1]
|
p0 = [0.5, 0, dist_values.get('tau', 1), 1]
|
||||||
|
|
||||||
p_final = []
|
p_final = []
|
||||||
p_final1 = []
|
p_final1 = []
|
||||||
for k, t_evo_k in enumerate(p.ste.t_evo):
|
for k, t_evo_k in enumerate(p.ste.t_evo):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
res = curve_fit(ste, t_mix, cc[:, k], p0=p0, bounds=([0, 0, 0, 0], [np.inf, 1, np.inf, 1]))
|
res = curve_fit(ste, t_mix, cc[:, k], p0=p0, bounds=([0, 0, 0, 0], [np.inf, 1, np.inf, 1]))
|
||||||
p_final.append(res[0].tolist())
|
p_final.append(res[0].tolist())
|
||||||
except RuntimeError:
|
except RuntimeError:
|
||||||
p_final.append([np.nan, np.nan, np.nan, np.nan])
|
p_final.append([np.nan, np.nan, np.nan, np.nan])
|
||||||
|
|
||||||
try:
|
try:
|
||||||
res2 = curve_fit(ste, t_mix, ss[:, k], p0=p0, bounds=([0, 0, 0, 0], [np.inf, 1, np.inf, 1]))
|
res2 = curve_fit(ste, t_mix, ss[:, k], p0=p0, bounds=([0, 0, 0, 0], [np.inf, 1, np.inf, 1]))
|
||||||
p_final1.append(res2[0].tolist())
|
p_final1.append(res2[0].tolist())
|
||||||
|
Loading…
Reference in New Issue
Block a user