diffusion-integration #309

Merged
dominik merged 3 commits from diffusion-integration into master 2025-05-02 11:35:01 +00:00
4 changed files with 52 additions and 7 deletions
Showing only changes of commit e5a74f3af2 - Show all commits

View File

@@ -111,7 +111,8 @@ class AnisotropicDiffusion(object):
t = 2 * tp / 3 + tm
# Callaghan eq (6.89)
if HAS_C_FUNCS:
diffusion_decay = AnisotropicDiffusion._integrate_c(q, t, d_perp, d_par)
# divide by 2 to normalize by integral sin(x), x=0..pi
diffusion_decay = AnisotropicDiffusion._integrate_c(q, t, d_perp, d_par) / 2
else:
z = np.sqrt(q**2 * (d_par - d_perp) * t)
diffusion_decay = np.exp(-q**2 * t * d_perp) * special.erf(z) / z