I think there is a bug in the calculations of the individual pathways. (1-np.sum(lams)) is applied twice to Vinter, once in line 75 and again in line 77. This changes the final amplitudes.
|
Vinter = results.P_scale*(1-np.sum(lams))*np.prod([dl.bg_hom3d(t-reftime,results.conc,lam) for lam,reftime in zip(lams,reftimes)],axis=0) |
|
for (lam,reftime,color,label) in zip(lams,reftimes,colors,labels): |
|
Vpath = (1-np.sum(lams) + lam*dl.dipolarkernel(t-reftime,r)@Pfit)*Vinter |
|
plt.plot(t,Vpath,linewidth=3,label=f'Pathway #{label}',color=color) |
This can be fixed by change line 75, removing(1-np.sum(lams)):
Vinter = results.P_scale*np.prod([dl.bg_hom3d(t-reftime,results.conc,lam) for lam,reftime in zip(lams,reftimes)],axis=0)
With this change you can now visually overlay the pathways with the experimental data and full fit.
Before
After

I think there is a bug in the calculations of the individual pathways.
(1-np.sum(lams))is applied twice to Vinter, once in line 75 and again in line 77. This changes the final amplitudes.DeerLab/examples/intermediate/ex_fitting_5pdeer_pathways.py
Lines 75 to 78 in e485810
This can be fixed by change line 75, removing
(1-np.sum(lams)):With this change you can now visually overlay the pathways with the experimental data and full fit.
Before
After