Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SESANS q min and q max shouldn't depend on the density of correlation points #564

Open
pkienzle opened this issue Mar 30, 2023 · 1 comment
Assignees

Comments

@pkienzle
Copy link
Contributor

Looking at the calculation of sesans $G(ξ) = \frac{1}{2\pi} \int I(q) J_0(qξ) q dq$, the value of G is going to be driven primarily by the rapid decrease in I(q), with higher q values contributing minimally to the integral.

The proposed qmin, qmax range for single point ξ in #563 will not work. Instead q min should be based on the optional parameter Rmax, which defaults to ξ max if it is not provided. q max can be set to a number of decades above q min, assuming scattering intensity follows a power law, or perhaps from an additional parameter Rmin whose default value comes from ξ min, with a minimal number of decades in q max/q min.

In principle the calculation should be independent of the particular ξ points, with a single point calculation giving the same result as that point in a vector of ξ values. That is, we should only use Rmin and Rmax to determine q, not the ξ density.

Regarding structure factors, there will be correlations beyond maximum particle dimension but these show up as structure factor peaks scaling the I(q) values. Again, since high q values contribute minimally to the integral, we may not need to increase Rmax to capture the correlation structure in ξ above Rmax. This is another reason the Rmax parameter should not be ignored.

@pkienzle
Copy link
Contributor Author

To evaluate the Hankel transform we are using $$G(ξ) = \int_0^\infty I(q) J_0(qξ)q dq = \int_0^{q_{min}} I(q) J_0(qξ)q dq + \int_{q_{min}}^{q_{max}} I(q) J_0(qξ)q dq + \int_{q_{max}}^\infty I(q) J_0(qξ)q dq = ε_{min} + ε_{mid} + ε_{max}$$ where we approximate
$$ε_{mid} ≈ \sum I(q_k) J_0(q_k ξ) q_k$$

The goal is to find $q_{min}$ and $q_{max}$ so that we achieve a desired relative error $ε_{max}/G(ξ) < Δ$ for some small constant $Δ$. What follows are some musings on the topic.

Consider a power law $I(q) \propto q^{-4}$ as the limiting case for $I(q)$. Since $ε_{min}$ diverges, we need to introduce a correlation length cutoff $R_{max}$ where $I(q) = q_{min}^{-4}$ is constant for $q < q_{min}$. The cutoff will be determined by the coherence length of the neutron, and may be above the largest correlation length probed in the measurement. Analytically this gives $$ε_{min}(ξ) = I(q_{min}) J_1(q_{min} ξ)q_{min}/ξ $$

For the $ε_{max}$ term we can use the approximation $$J_0(z) ≈ \sqrt\frac{2}{πz}\cos(z-π/4)$$ for $z = qξ > 1$. Ignoring the oscillation in the cosine we can get a weak upper bound $$ε_{max} < \int_{q_{max}}^\infty I(q)\sqrt\frac{2}{πqξ} q dq = \sqrt\frac{2}{πξ} \frac{q_{max}^{-2.5}}{2.5}$$
For $q_{max} = 10$ / nm and $ξ_{min} = 1$ nm this gives $ε_{max} ≈ 0.0010$, whereas the value from the Hankel integral ≈-0.00012.

Even if we had a good bound for $ε_{max}$ we can't use it to estimate error since we don't have a bound on $ε_{mid}$. Let's assume that oscillations in $I(q)$ are small relative to $I(q)$ and we might be able to get away with using the envelope function for $J_0$, which gives $$ε_{mid}+ε_{max} \sim \int_{q_{min}}^\infty I(q)\sqrt\frac{2}{πqξ} q dq = \sqrt\frac{2}{πξ} \frac{q_{min}^{-2.5}}{2.5}$$
The hope is that the overestimate in this term will cancel the overestimate in the $ε_{max}$ term. Then we can set $ε_{max} / (ε_{mid} + ε_{max}) < Δ$. Solving this gives $$q_{max} = q_{min} Δ^{-1/2.5}$$ For $Δ=10^{-5}$ this gives $q_{max} = 100 q_{min}$. Testing for a variety $q_{min}$ and $ξ$ in the SANS/USANS range using the Hankel integral rather than the approximation the relative error is sometimes 10x too high.

This scheme only works when $q_{min}$ is at the start of the power law region. For the sphere model this is at $q_{min} = 1/R$. Given an $R_{max}$ parameter, then, we would need $q_{min} = 0.1 / R_{max}$ and $q_{max} = 100 / R_{max}$ for better than 0.1% accuracy. Checking $\int_0^y J_0(ξ q) (3 j_1(q R)/(q R))^2 q dq$ for $y = 10^n/R$ the range from $n=-1$ to $n=2$ gives good accuracy. I don't expect structure factor will have a big influence: the $J_0$ is oscillating so rapidly that the integral will be dominated by the $J_0$ envelope, especially at high $ξ$. Lower values of $ξ$ require a larger $q$ range to achieve the same accuracy.

Our $q_k$ are sampled far to sparsely to hit every oscillation in $J_0$. We should compute a Hankel integrals to high precision for a few select (model, ξ) sets to verify that our sampling is high enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants