Skip to content
Permalink
Browse files

first attempt to implement some selected form factor including multip…

…le scattering effects
  • Loading branch information...
Kohlbrecher committed Apr 2, 2019
1 parent d9f0a42 commit 63b8332646301572a6b40b42bc14d217cdad3c4d
Showing with 139,623 additions and 134,357 deletions.
  1. BIN CHANGES.txt
  2. +4 −2 Readme.txt
  3. +3 −1 Readme_source.txt
  4. BIN doc/images/form_factor/SESANS/G_Sphere.png
  5. BIN doc/images/form_factor/SESANS/G_gDAB.png
  6. BIN doc/images/form_factor/SESANS/G_gGc.png
  7. BIN doc/images/form_factor/SESANS/SESANS_G(delta).opju
  8. +1 −0 doc/manual/SASfit_plugins.tex
  9. +5 −4 doc/manual/SASfit_pluginsFF_nonparticular.tex
  10. +105 −20 doc/manual/SASfit_plugins_SESANS.tex
  11. +0 −13 doc/manual/basics.tex
  12. +289 −286 doc/manual/sasfit.aux
  13. +593 −549 doc/manual/sasfit.log
  14. +82 −83 doc/manual/sasfit.out
  15. BIN doc/manual/sasfit.pdf
  16. +135,212 −132,824 doc/manual/sasfit.synctex
  17. +82 −83 doc/manual/sasfit.toc
  18. +3 −3 doc/manual/sasfit_OZsolver.tex
  19. +1 −1 sasfit.vfs/lib/app-sasfit/tcl/sasfit_analytical.tcl
  20. +35 −0 src/plugins/msans/CMakeLists.txt
  21. +835 −0 src/plugins/msans/MSANS.nb
  22. +65 −0 src/plugins/msans/include/private.h
  23. +261 −0 src/plugins/msans/include/sasfit_msans.h
  24. +34 −0 src/plugins/msans/interface.c
  25. +73 −0 src/plugins/msans/sasfit_ff_msas_gdab.c
  26. +73 −0 src/plugins/msans/sasfit_ff_msas_ggc.c
  27. +130 −0 src/plugins/msans/sasfit_ff_msas_polydisp_spheres.c
  28. +73 −0 src/plugins/msans/sasfit_ff_msas_spheres.c
  29. +1 −1 src/plugins/non_particulate/sasfit_ff_g_dab.c
  30. +1,618 −453 src/plugins/sesans/SESANS_SPHERE.nb
  31. +12 −12 src/plugins/sesans/include/sasfit_sesans.h
  32. +1 −1 src/plugins/sesans/sasfit_ff_gz_dab.c
  33. +26 −16 src/plugins/sesans/sasfit_ff_gz_generalized_dab.c
  34. +4 −4 src/plugins/sesans/sasfit_ff_gz_ggc.c
  35. +2 −1 src/plugins/sesans/sasfit_ff_gz_sphere.c
BIN +644 Bytes (100%) CHANGES.txt
Binary file not shown.
@@ -17,7 +17,7 @@ Author Information:
Joachim Kohlbrecher (joachim.kohlbrecher@psi.ch)
Ingo Bressler (ingo.bressler@bam.de)

Laboratory for Neutron Scattering
Laboratory for Neutron Scattering and Imaging
Paul Scherrer Institut
CH-5232 Villigen PSI
Switzerland
@@ -33,4 +33,6 @@ For license information see COPYING.txt.

A paper about SASfit has been published in
J. Appl. Cryst. (2015). 48, 1587-1598
doi:10.1107/S1600576715016544
doi:10.1107/S1600576715016544
J. Appl. Cryst. (2017). 50,
doi:10.1107/S1600576717011979
@@ -25,7 +25,7 @@ Author Information:
Joachim Kohlbrecher (joachim.kohlbrecher@psi.ch)
Ingo Bressler (ingo.bressler@bam.de)

Laboratory for Neutron Scattering
Laboratory for Neutron Scattering and Imaging
Paul Scherrer Institut
CH-5232 Villigen PSI
Switzerland
@@ -45,6 +45,8 @@ Documentation
A paper about SASfit has been published in
J. Appl. Cryst. (2015). 48, 1587-1598
doi:10.1107/S1600576715016544
J. Appl. Cryst. (2017). 50,
doi:10.1107/S1600576717011979

Documentation is provided in HTML format in the directory
<your-sasfit-source-directory>/doc/html/
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -14,6 +14,7 @@ \chapter{Plugin functions for form factors}
\input{SASfit_pluginsFF_cluster.tex}
\input{SASfit_pluginsFF_azimuthal.tex}
\input{SASfit_plugins_SESANS.tex}
\input{SASfit_plugins_multipleSAS.tex}

\chapter{Plugin functions for size distributions}
\label{ch:pluginsSD}
@@ -395,14 +395,15 @@ \subsection{Generalization of the Debye-Anderson-Brumberger model (gDAB)}
\label{sect:gDAB}~\\
The Debye-Anderson-Brumberger(DAB) model from the previous section \ref{sect:DAB} can be considered as a special case from a more general correlation function describing self-affine random density distributions \cite{Klimes2002,Hunter2006,Andersson2008}
\begin{align}
\gamma(r) &=
\frac{2}{\Gamma(H)}\left(\frac{r}{2a}\right)^H K_H\left(\frac{r}{a}\right)
\gamma_0(r) &=
\frac{2}{\Gamma(H)}\left(\frac{r}{2\xi}\right)^H K_H\left(\frac{r}{\xi}\right) \\
\tilde{\gamma}(r) &= \gamma_0(r) \Delta\eta^2 \int_0^\infty \gamma_0(r) 4\pi r^2 \mathrm{d}r = \frac{8\xi^3\pi^{3/2}\Gamma(3/2+H)\Delta\eta^2}{\Gamma(H)}\gamma_0(r)
\end{align}
where $K_n(x)$ is the modified Bessel function of the second kind
and $\Gamma$ is the Gamma function. $H$ is the so-called Hurst
exponent with typical valuse around $\frac12$. For $H=\frac12$ the gDAB-model results into the DAB model describes in section \ref{sect:DAB}. The scattering intensity is implemented as
exponent with typical value around $\frac12$. For $H=\frac12$ the gDAB-model results into the DAB model describes in section \ref{sect:DAB}. The scattering intensity is implemented as
\begin{align}
I(q) = \frac{\left(\Delta\eta 4\pi(1+2H)\xi^3\right)^2}{\left[1+(q\xi)^2\right]^{\frac32+H}}
I(q) = \frac{\pi^3\left(\left(2\xi\right)^3\Gamma(3/2+H)\Delta\eta\right)^2}{\Gamma^2(H)\left[1+(q\xi)^2\right]^{\frac32+H}}
\end{align}


@@ -117,7 +117,7 @@ \section{Plugin functions for SESANS}
\end{figure}


\subsection{$G(z)$ of a sphere}
\subsection{$G(\delta)$ of a sphere} ~\\
\label{sec:Gz_sphere}
The scattering intensity for a single sphere is given by
\begin{align}
@@ -133,44 +133,104 @@ \subsection{$G(z)$ of a sphere}
\end{align}
and the unnormalized SESANS correlation function
\begin{align}
\tilde{G}_\mathrm{sphere}(z)&= \Delta\eta^2 \pi R^4 \left(\sqrt{1-\xi^2}(2+\xi^2)-\xi^2(\xi^2-4)\ln\left(\frac{\xi}{1+\sqrt{1-\xi^2}}\right)\right)
\begin{split}
\tilde{G}_\mathrm{sph}(\delta)&= \Delta\eta^2 \pi R^4 \\
&\times \left(\sqrt{1-\xi^2}(2+\xi^2)-\xi^2(\xi^2-4)\ln\left(\frac{\xi}{1+\sqrt{1-\xi^2}}\right)\right)
\end{split}
\end{align}
with $\xi=\frac{z}{2R}$.
with $\xi=\frac{\delta}{2R}$.


\hspace{1pt}\\
\underline{Input Parameters for model \texttt{G\_Sphere(delta)}:}\\
\begin{description}
\item[\texttt{R}] radius of sphere $R$
\item[\texttt{dummy}] not used
\item[\texttt{dummy}] not used
\item[\texttt{eta}] scattering length density contrast $\Delta\eta$
\end{description}

\hspace{1pt}\\
\underline{Note:}
\begin{itemize}
\item the function \texttt{G\_Sphere(delta)} can be combined with a size distribution but should not be combined with a structure factor.
\end{itemize}

\begin{figure}[htb]
\begin{center}
\includegraphics[width=0.7\textwidth]{../images/form_factor/SESANS/G_Sphere.png}
\end{center}
\caption{Projected correlation functions of monodisperse spheres and polydisperse Spheres, both with a $R_g=24.5$nm}
\label{fig:G_Sphere}
\end{figure}

\subsection{$G(\delta)$ of a randomly distributed, two-phase system (DAB) and its generalisation (gDAB)}~\\
\label{sec:Gz_DAB_gDAB}

\subsection{$G(z)$ of a randomly distributed, two-phase system (DAB) }~\\
\label{sec:Gz_DAB}
The scattering intensity for a randomly distributed, two-phase system (DAB) is given by
\cite{DebyeBueche1949,DAB1957,Andersson2008}
\begin{align}
I(Q) &= \frac{\left(8 \pi \xi^3 \Delta\eta\right)^2}{ \left(1+Q^2\xi^2\right)^2}
\end{align}
The unnormalized autocorrelation function for this sphere is given by
The unnormalized autocorrelation function for the two-phase system reads as
\begin{align}
\tilde{\gamma}(r) &=
\Delta\eta^2 8\pi\xi^3 \exp\left( -r/\xi\right)
\end{align}
and the unnormalized SESANS correlation function
and the unnormalized SESANS correlation function as
\begin{align}
\tilde{G}_\mathrm{DAB}(z)&= 8\pi\xi^4 2\frac{z}{\xi}K_1\left(\frac{z}{\xi}\right)
\tilde{G}_\mathrm{DAB}(\delta)&= 8\pi\xi^4 2\frac{z}{\xi}K_1\left(\frac{\delta}{\xi}\right)
\end{align}

\subsection{$G(z)$ of a self-affine random density distribution (gDAB) }~\\
\label{sec:Gz_gDAB}
The scattering intensity for a randomly distributed, two-phase system (DAB) is given by \cite{Klimes2002,Hunter2006,Andersson2008}
The scattering intensity for a randomly distributed, self-affine two-phase system (gDAB) is given by \cite{Klimes2002,Hunter2006,Andersson2008}
\begin{align}
I(Q) &= \frac{\left(4 \pi \xi^3 (1+2H) \Delta\eta\right)^2}{ \left(1+Q^2\xi^2\right)^{3/2+H}}
I(Q) &= \frac{\pi^3\left(\left(2\xi\right)^3\Gamma(3/2+H)\Delta\eta\right)^2}{\Gamma^2(H)\left[1+(q\xi)^2\right]^{\frac32+H}}
\end{align}
The unnormalized autocorrelation function for this system is given by
\begin{align}
\tilde{\gamma}(r) &=
\Delta\eta^2 8a^3\pi\sqrt{\pi}\frac{\Gamma\left(\frac{3}{2}+H\right)}{\Gamma\left(H\right)}\frac{2}{\Gamma(H)}\left(\frac{r}{2a}\right)^H K_H\left(\frac{r}{a}\right)
\Delta\eta^2 8\xi^3\pi\sqrt{\pi}\frac{\Gamma\left(\frac{3}{2}+H\right)}{\Gamma\left(H\right)}\frac{2}{\Gamma(H)}\left(\frac{r}{2\xi}\right)^H K_H\left(\frac{r}{\xi}\right)
\end{align}
and the unnormalized SESANS correlation function
and the unnormalised SESANS correlation function
\begin{align}
\tilde{G}_\mathrm{gDAB}(z)&= 8a^3\pi\frac{\Gamma\left(\frac{3}{2}+H\right)}{\Gamma^2\left(H\right)} 2\sqrt{az}\left(\frac{z}{2a}\right)^{H+\frac12}K_{\frac12+H}\left(\frac{z}{a}\right)
\tilde{G}_\mathrm{gDAB}(\delta)&= \Delta\eta^2 8\xi^3\pi\sqrt{\pi}\frac{\Gamma\left(\frac{3}{2}+H\right)}{\Gamma^2\left(H\right)} 2\sqrt{\xi\delta}\left(\frac{\delta}{2\xi}\right)^{H+\frac12}K_{\frac12+H}\left(\frac{\delta}{\xi}\right)
\end{align}

\subsection{$G(z)$ for a generalized Gaussian coil (gGc) }~\\
\hspace{1pt}\\
\underline{Input Parameters for model \texttt{G\_DAB(delta)}}:}\\
\begin{description}
\item[\texttt{xi}] correlation length $\xi$
\item[\texttt{dummy}] not used
\item[\texttt{dummy}] not used
\item[\texttt{eta}] scattering length density contrast $\Delta\eta$
\end{description}

\hspace{1pt}\\
\underline{Input Parameters for model \texttt{G\_gDAB(delta)}:}\\
\begin{description}
\item[\texttt{xi}] correlation length $\xi$
\item[\texttt{H}] Hurst exponent
\item[\texttt{dummy}] not used
\item[\texttt{eta}] scattering length density contrast $\Delta\eta$
\end{description}

\hspace{1pt}\\
\underline{Note:}
\begin{itemize}
\item the Hurst exponent needs to be in the interval $H \in (0,1]$. Values of $H>1$ will be accepted but might not have an established interpretation.
\item the functions \texttt{G\_DAB(delta)} and \texttt{G\_gDAB(delta)}can be combined with a size distribution but should not be combined with a structure factor.
\end{itemize}

\begin{figure}[htb]
\begin{center}
\includegraphics[width=0.7\textwidth]{../images/form_factor/SESANS/G_gDAB.png}
\end{center}
\caption{Projected correlation functions of the Debye-Andersson-Brumberger model and its generalisation with an Hurst exponent of $H=1$ but both with a $R_g=24.5nm$}
\label{fig:G_gDAB}
\end{figure}


\subsection{$G(\delta)$ for a generalized Gaussian coil (gGc) }~\\
\label{sec:Gz_gGc}
The scattering intensity for a a generalized Gaussian coil (gGc) has been given by Hammouda \cite{Hammouda,Hammouda2012,Hammouda1993,Hammouda2016} (see also section \ref{sect:generalized_gaussian_coil}) as
\begin{align}
@@ -199,13 +259,38 @@ \subsection{$G(z)$ for a generalized Gaussian coil (gGc) }~\\
\end{align}
The unnormalized autocorrelation function the order of integration over $x$ and over $q$ for the Hankel transform can be changed and one gets
\begin{align}
\tilde{G}_\mathrm{gGc}(z) &=
\frac{I_0 4\pi}{\nu z^2} \left(
\tilde{G}_\mathrm{gGc}(\delta) &=
\frac{I_0 4\pi}{\nu \delta^2} \left(
w^{\frac{1}{2\nu}} \Gamma \left(1-\frac{1}{2 \nu },w\right) - w^{\frac{1}{\nu }} \Gamma \left(1-\frac{1}{\nu },w\right) \right)\\
w &= \frac34 \frac{z^2}{\left(2 \nu ^2+3 \nu +1\right) R_g^2}
w &= \frac34 \frac{\delta^2}{\left(2 \nu ^2+3 \nu +1\right) R_g^2}
\end{align}
where $\Gamma(a,x) = \int_x^\infty \mathrm{d}t \; t^{a-1} \exp(-t)$ is the upper incomplete Gamma Function.
The limit $\tilde{G}_\mathrm{gGc}(0)$ is only finite for $\nu \in \left(0,\frac12\right)$
\begin{align}
\tilde{G}_\mathrm{gGc}(0) &= I_0 \frac{3 \pi }{\left(4 \nu ^4-5 \nu ^2+1\right) R_g^2} \mbox{~for~} \nu \in \left(0,\frac12\right)
\end{align}
\end{align}

\hspace{1pt}\\
\underline{Input Parameters for model \texttt{G\_gGc(delta)}:}\\
\begin{description}
\item[\texttt{Rg}] radius of gyration $R_g$
\item[\texttt{nu}] Flory exponent
\item[\texttt{dummy}] not used
\item[\texttt{beta\^{}2}] forward scattering or squared excess scattering length $\beta^2$
\end{description}

\hspace{1pt}\\
\underline{Note:}
\begin{itemize}
\item For Flory exponents $\nu\geq \frac12$: $\tilde{G}_{gGc}(0) \rightarrow \infty$.
\item $\nu\in \left(0,\frac12\right)$
\item the function \texttt{G\_gGc(delta)} can be combined with a size distribution but should not be combined with a structure factor.
\end{itemize}

\begin{figure}[htb]
\begin{center}
\includegraphics[width=0.7\textwidth]{../images/form_factor/SESANS/G_gGc.png}
\end{center}
\caption{Projected correlation functions of the generalised Gaussian coil model with $R_g=24.5nm$}
\label{fig:G_gDAB}
\end{figure}
@@ -1076,16 +1076,3 @@ \subsubsection{Porod law and specific surfaces}
\EE
The Porod law can be applied to all systems having sharp interfaces.

\subsection{Multiple Scattering}
\cite{Schelten1980,Jensen2018,Frielinghaus2018}
For isotropic scatterer Schelten \& Schmatz \cite{Schelten1980} gave an expression for multiple scattering based on
Hankel transform. Here the intermediate function is defined as the projected correlation function $\tilde{G}(r)$
known in SESANS/SEMSANS and DF-Imaging with gratings is used
\cite{Kohlbrecher2017} which scales with the one of Schelten \& Schmatz by $\tilde{G}(r)=\exp(\tau)/(2\pi)^2 S(q)$,
where $\tau=\Sigma t$ is the total scattering probability. The multiple scattering intensity $I_m(q)$ then can
be calculated from the single scattering intensity $I_1(q)$ by
\begin{align}
\tilde{G}(r) &= \frac{1}{2\pi} \int_0^\infty I_1(q) J_0(qr) q \, \mathrm{d}q \\
\tilde{G}_m(r) &= \frac{1}{\lambda^2 t}\left\{\exp\left(\lambda^2 t \tilde{G}(r)\right)-1\right\}\\
I_m(q) &= 2\pi \int_0^\infty \tilde{G}_m(r) J_0(qr) r \, \mathrm{d}r
\end{align}
Oops, something went wrong.

0 comments on commit 63b8332

Please sign in to comment.
You can’t perform that action at this time.