2 STARLORD (SeT of Algorithms foR mOdified stRucture function computation)
3 Set of functions for structure function computation
7 from scipy.special
import jv
12 Fonction de structure de phase "haute frequence"
13 A renormalise en fonction du r0
16 x0 : distance interactionneur [m]
17 tabx, taby : integrale tabulee obtenue avec la fonction tabulateIj0
20 (5. / 3.)) * (1.1183343328701949 -
Ij0t83(r * (np.pi / x0), tabx, taby)) * (
21 2 * (2 * np.pi)**(8 / 3.) * 0.0228956)
26 Fonction de structure de phase "basse frequence"
27 A renormalise en fonction du r0
30 x0 : distance interactionneur [m]
31 tabx, taby : integrale tabulee obtenue avec la fonction tabulateIj0
38 Calcul de l'integrale tabulee
40 $ t^(-8/3) (1-bessel_j(0,t)) dt
43 Pres de 0, le resultat s'approxime par (3/4.)*x^(1./3)*(1-x^2/112.+...)
46 ismall = np.where(res < np.exp(-3.0))
47 ilarge = np.where(res >= np.exp(-3.0))
48 if (ismall[0].size > 0):
49 res[ismall] = 0.75 * x[ismall]**(1. / 3) * (1 - x[ismall]**2 / 112.)
50 if (ilarge[0].size > 0):
51 res[ilarge] = np.interp(x[ilarge], tabx, taby)
58 Tabulation de l'intesgrale
59 Necessaire avant utilisation des fonction dphi_lowpass et dphi_highpass
62 t = np.linspace(-4, 10, n)
63 dt = (t[-1] - t[0]) / (n - 1)
65 A = 0.75 * smallx**(1. / 3) * (1 - smallx**2 / 112.)
67 Y = np.exp(-t * (5. / 3.)) * (1 - jv(0, X))
68 Y[1:] = np.cumsum(Y[:-1] + np.diff(Y) / 2.)
76 k2 = 1.00563491799858928388289314170833
77 k3 = 1.25331413731550012081
78 a1 = 0.22222222222222222222
79 a2 = -0.08641975308641974829
80 a3 = 0.08001828989483310284
83 res = k2 - k3 * np.exp(-x) * x**(1. / 3.) * (1.0 + x_1 * (a1 + x_1 *
95 0, 12.067619015983075, 5.17183672113560444, 0.795667187867016068,
96 0.0628158306210802181, 0.00301515986981185091, 9.72632216068338833e-05,
97 2.25320204494595251e-06, 3.93000356676612095e-08, 5.34694362825451923e-10,
98 5.83302941264329804e-12
102 -3.74878707653729304, -2.04479295083852408, -0.360845814853857083,
103 -0.0313778969438136685, -0.001622994669507603, -5.56455315259749673e-05,
104 -1.35720808599938951e-06, -2.47515152461894642e-08, -3.50257291219662472e-10,
105 -3.95770950530691961e-12, -3.65327031259100284e-14
115 for n
in np.arange(10) + 1:
117 s += (Gma[n] * x2a + Ga[n]) * x2n
125 Fonction de structure de phase avec prise en compte de l'echelle externe
126 A renormalise en fonction du r0
129 k1 = 0.1716613621245709486
130 dprf0 = (2 * np.pi / L0) * r
131 ilarge = np.where(dprf0 > 4.71239)
132 ismall = np.where(dprf0 <= 4.71239)
133 if (ilarge[0].size > 0):
135 if (ismall[0].size > 0):
136 res[ismall] = -
macdo(dprf0[ismall])
138 res *= k1 * L0**(5. / 3.)