Changeset d7af1c6 in sasmodels
- Timestamp:
- Jun 12, 2018 6:01:29 AM (7 years ago)
- Branches:
- master
- Children:
- ac995be
- Parents:
- 02e3c54
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/guide/sesans/sans_to_sesans.rst
r02e3c54 rd7af1c6 68 68 .. math:: H_{nm} = \frac{2 \pi}{\delta_m} 69 69 (q_n J_1(q_n \delta_m) - q_{n-1} J_1(q_{n-1} \delta_m)) 70 71 Also not that, for the limit as :math:`\delta_m` approaches zero, 72 73 .. math:: G(0) 74 = 75 \sum_{n=0} \pi \frac{d \Sigma}{d \Omega} (q_n) (q_n^2 - q_{n-1}^2) -
sasmodels/sesans.py
r38935ec rd7af1c6 14 14 import numpy as np # type: ignore 15 15 from numpy import pi # type: ignore 16 from scipy.special import j0 16 from scipy.special import j0, j1 17 17 18 18 19 class SesansTransform(object): … … 59 60 SElength = np.asarray(SElength, dtype='float32') 60 61 61 # Rmax = #value in text box somewhere in FitPage?62 # Rmax = #value in text box somewhere in FitPage? 62 63 q_max = 2*pi / (SElength[1] - SElength[0]) 63 64 q_min = 0.1 * 2*pi / (np.size(SElength) * SElength[-1]) 64 q = np.arange(q_min, q_max, q_min, dtype='float32') 65 dq = q_min 65 # q = np.arange(q_min, q_max, q_min, dtype='float32') 66 q = np.exp(np.arange(np.log(q_min), np.log(q_max), np.log(2), 67 dtype=np.float32)) 68 q = np.hstack([0], q) 66 69 67 H0 = np. float32(dq/(2*pi)) * q70 H0 = np.pi * (q[1:]**2 - q[-1]**2) 68 71 69 72 # repq = np.tile(q, (SElength.size, 1)).T 70 73 H = np.outer(q, SElength) 71 j0(H, out=H) 72 H *= np.float32(dq/(2*pi)) 73 H *= q.reshape((-1, 1)) 74 j1(H, out=H) 75 H *= q 76 H = H[1:] - H[:-1] 77 H *= 2 * np.pi / SElength 74 78 75 79 lam = np.asarray(lam, dtype=np.float32)
Note: See TracChangeset
for help on using the changeset viewer.