SANS@Tools
SANS@ToDo
SANS@MLZ
Useful Links
SVD stands for Singular Value Decomposition. It is a mathematical technique used in linear algebra and numerical analysis. Singular Value Decomposition decomposes a matrix into three other matrices, which can be useful in various applications such as data analysis, signal processing, and solving linear systems of equations.
the SVD interface is likely referring to a tool or software interface that utilizes Singular Value Decomposition for data analysis, specifically in the context of Small-Angle Neutron Scattering (SANS) experiments. The SVD process can be used for deconvolution, determining individual scattering functions, and calculating initial data from experimental measurements.
… to be filled …
\begin{align*} &\vec{I}\ =\ A\cdot \vec{X} \tag{ 1a} \\ \end{align*}
\begin{align*} &\vec{I}\ =\ \left( \begin{array}{@{}ccccc@{}} \frac{d\Sigma}{d\Omega}\rvert_{1}(Q) \\ \frac{d\Sigma}{d\Omega}\rvert_{2}(Q) \\ \frac{d\Sigma}{d\Omega}\rvert_{3}(Q) \\ \frac{d\Sigma}{d\Omega}\rvert_{4}(Q) \\ \frac{d\Sigma}{d\Omega}\rvert_{5}(Q) \\ ... \\ \frac{d\Sigma}{d\Omega}\rvert_{M}(Q) \tag{1b} \\ \end{array} \right),\ M:\ number\ of\ contrasts\ [\phi_1...\phi_N] \\ \end{align*}
\begin{align*} A\ =\ A|_{N} = \left( \begin{array}{@{}ccccc@{}} \Delta_{11}(\phi_1) & 2\cdot\Delta_{12}(\phi_1) & . & \Delta_{NN}(\phi_1) \\ \Delta_{11}(\phi_2) & 2\cdot\Delta_{12}(\phi_2) & . & \Delta_{NN}(\phi_2) \tag{1c} \\ \Delta_{11}(\phi_3) & 2\cdot\Delta_{12}(\phi_3) & . & \Delta_{NN}(\phi_3) \\ . & . & . & . \\ \Delta_{11}(\phi_M) & 2\cdot\Delta_{12}(\phi_M) & . & \Delta_{NN}(\phi_M) \end{array} \right),\ N:\ number\ of\ components \end{align*}
\begin{align*} &\vec{X}\ =\ \left( \begin{array}{@{}ccccc@{}} S_{11}(Q) \\ S_{12}(Q) \\ ... \\ S_{NN}(Q) \tag{1d} \\ \end{array} \right) \\ \end{align*}
\begin{align*} A = U S V^T \tag{1e} \\ \end{align*}
A general rectangular M-by-N matrix A has a singular value decomposition (SVD) into the product of an M-by-N orthogonal matrix U, an N-by-N diagonal matrix of singular values S and the transpose of an N-by-N orthogonal square matrix V, The singular values $\sigma_i = S_{ii}$ are all non-negative and are generally chosen to form a non-increasing sequence $\sigma_1 >= \sigma_2 >= ... >= \sigma_N >= 0$
// A-matrix SVD-on gsl_matrix *A = gsl_matrix_calloc(M, N); // Contrast-matrix A gsl_matrix *U = gsl_matrix_calloc(M, N); // U: A = USV^T gsl_matrix *V = gsl_matrix_calloc(N, N); // V: A = USV^T gsl_vector *S = gsl_vector_calloc(N); // S: A = USV^T (Diagonal matrix) gsl_vector *work = gsl_vector_calloc(N); // temporal working matrix ... ... // copy matrix A to U: U = A gsl_matrix_memcpy(U, A); // SVD of A to U, V and S int status = gsl_linalg_SV_decomp(U, V, S, work); // initialisation of input intensity vector and result scattering functions ... gsl_vector *b = gsl_vector_calloc(M); // b [I_1(Qi)..I_M(Qi)], gsl_vector *x = gsl_vector_calloc(N); // x [S_11, S_12, ... S_NN] ... //+++ Q = [Q_1 .. Q_K] for (int k = 0; k < K; k++) { ... //+++ x: S-matrix status = gsl_linalg_SV_solve(U, V, S, b, x); ... //+++ x double S11, S12, S22, S13, S23, S33; ... //+++ re-constraction of initial data }
Table M (Solutions)
M: Number of measured contrasts. By inputting the value of M, the table below will be adjusted accordingly. The number of rows is equal to M, and the number of columns is set to 3:
Table N (components)
N: number of components “dissolved” in the H/D solvent. Volume fraction of all N-components in all M solutions is identical. If a component has exchangeable H-bonds, the SLD will be different in H- and D-solvent. For example, in the case of proteins H-SLD and D-SLD are different.
Degree of Freedom $N_{DF}$
By SVD, we solve the set of linear equations for every Q-point. SVD is used in cases where the number of equations is larger than the number of variables. Applying SVD to SANS allows us to extract individual scattering functions and cross-terms. The SVD interface allows to select number of components N above 2. Degree of freedom $N_{DF}$ defines number of independent variables in case of N-components:
\begin{align*} N_{DF}=\frac{N\cdot(N+1)}{2} \tag{1} \end{align*}
Number of the calculated components $N_{CC}$:
\begin{align*} N_{CC}=N+1 \tag{2} \end{align*}
Strategy for selecting the number of components and their corresponding H/D volume fractions
Number of N should be larger than $N_{DF}+2$. Selection of D-compositions (φ) at the matching points should be avoided; the presence of matching points predefines the individual scattering of a matched component..
As an example, the selection of the solutions of h-protein/h-DNA complexes in water is shown below. The matching point for h-protein is around 42% of D2O, and for h-DNA, it is 64%. For SVD, we should exclude the matching concentrations: 42% and 64%. Below, the table of three SVD configurations is shown: minimal, normal, and perfect.
0 | 20 | 30 | 37 | 42 | 47 | 53 | 59 | 64 | 70 | 80 | 100 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
<fc #008000>0</fc> | — | <fc #008000>30</fc> | — | <fc #ff0000>x</fc> | — | <fc #008000>53</fc> | — | <fc #ff0000>x</fc> | <fc #008000>70</fc> | — | <fc #008000>100</fc> | minimal |
<fc #008000>0</fc> | — | <fc #008000>30</fc> | <fc #008000>37</fc> | <fc #ff0000>x</fc> | <fc #008000>47</fc> | — | <fc #008000>59</fc> | <fc #ff0000>x</fc> | <fc #008000>70</fc> | — | <fc #008000>100</fc> | normal |
<fc #008000>0</fc> | <fc #008000>20</fc> | <fc #008000>30</fc> | <fc #008000>37</fc> | <fc #ff0000>x</fc> | <fc #008000>47</fc> | <fc #008000>53</fc> | <fc #008000>59</fc> | <fc #ff0000>x</fc> | <fc #008000>70</fc> | <fc #008000>80</fc> | <fc #008000>100</fc> | perfect |
Figure 0: U, V, and S matrixes in the final table
Figure 1: Example of the SVD interface. M=5, N=2, K=99, Table names: 0, 34, 46, 80, 100.
Figure 2: Example of the SANS data: Table name “0”
N | $N_{DF}$ | Independent Terms | $N_{CC}$ | Calculated Terms |
2 | 3 | $S_{11}$, $S_{22}$, $S_{12}$ $S_{12}=S_{21}$ | 3 | $S_{33}$, $S_{13}$, $S_{23}$ $S_{13}=S_{31}$, $S_{23}=S_{32}$ |
3 | 6 | $S_{11}$, $S_{22}$, $S_{33}$, $S_{12}$, $S_{13}$, $S_{23}$ $S_{12}=S_{21}$, $S_{13}=S_{31}$, $S_{23}=S_{32}$ | 4 | $S_{44}$, $S_{14}$, $S_{24}$, $S_{34}$ $S_{14}=S_{41}$, $S_{24}=S_{42}$, $S_{34}=S_{43}$ |
4 | 10 | … | 5 | … |
Table 1: Degree of Freedom $N_{DF}$
\begin{align*} \Delta_{11}(\phi)=[\rho_1(\phi)-\rho_s(\phi)]\cdot[\rho_1(\phi)-\rho_s(\phi)] \\ \Delta_{12}(\phi)=[\rho_1(\phi)-\rho_s(\phi)]\cdot[\rho_2(\phi)-\rho_s(\phi)] \\ \Delta_{22}(\phi)=[\rho_2(\phi)-\rho_s(\phi)]\cdot[\rho_2(\phi)-\rho_s(\phi)] \\ \Delta_{13}(\phi)=[\rho_1(\phi)-\rho_s(\phi)]\cdot[\rho_3(\phi)-\rho_s(\phi)] \\ \Delta_{23}(\phi)=[\rho_2(\phi)-\rho_s(\phi)]\cdot[\rho_3(\phi)-\rho_s(\phi)] \\ \Delta_{33}(\phi)=[\rho_3(\phi)-\rho_s(\phi)]\cdot[\rho_3(\phi)-\rho_s(\phi)] \\ \Delta_{14}(\phi)=[\rho_1(\phi)-\rho_s(\phi)]\cdot[\rho_4(\phi)-\rho_s(\phi)] \\ \Delta_{24}(\phi)=[\rho_2(\phi)-\rho_s(\phi)]\cdot[\rho_4(\phi)-\rho_s(\phi)] \\ \Delta_{34}(\phi)=[\rho_3(\phi)-\rho_s(\phi)]\cdot[\rho_4(\phi)-\rho_s(\phi)] \\ \Delta_{44}(\phi)=[\rho_4(\phi)-\rho_s(\phi)]\cdot[\rho_4(\phi)-\rho_s(\phi)] \\ \ ... \\ \Delta_{NN}(\phi)=[\rho_N(\phi)-\rho_s(\phi)]\cdot[\rho_N(\phi)-\rho_s(\phi)] \\ \tag{3} \end{align*}
Equation 3
Composition ($\phi$) dependent contrast factors $\Delta$ between component $\rho_i$ and solvent $\rho_s$
\begin{align*} & \ A|_{N} = A(N_{ND}\times M) = & \left( \begin{array}{@{}ccccc@{}} \Delta_{11}(\phi_1) & 2\cdot\Delta_{12}(\phi_1) & . & \Delta_{NN}(\phi_1) \\ \Delta_{11}(\phi_2) & 2\cdot\Delta_{12}(\phi_2) & . & \Delta_{NN}(\phi_2) \tag{4} \\ \Delta_{11}(\phi_3) & 2\cdot\Delta_{12}(\phi_3) & . & \Delta_{NN}(\phi_3) \\ . & . & . & . \\ \Delta_{11}(\phi_M) & 2\cdot\Delta_{12}(\phi_M) & . & \Delta_{NN}(\phi_M) \end{array} \right) \\ & \ A|_{N=2} = & \left( \begin{array}{@{}ccccc@{}} \Delta_{11}(\phi_1) & 2\cdot\Delta_{12}(\phi_1) & \Delta_{22}(\phi_1) \\ \Delta_{11}(\phi_2) & 2\cdot\Delta_{12}(\phi_2) & \Delta_{22}(\phi_2) \tag{4a} \\ \Delta_{11}(\phi_3) & 2\cdot\Delta_{12}(\phi_3) & \Delta_{22}(\phi_3) \\ \Delta_{11}(\phi_4) & 2\cdot\Delta_{12}(\phi_4) & \Delta_{22}(\phi_4) \\ \Delta_{11}(\phi_5) & 2\cdot\Delta_{12}(\phi_5) & \Delta_{22}(\phi_5) \\ . & . & . \\ \Delta_{11}(\phi_M) & 2\cdot\Delta_{12}(\phi_M) & \Delta_{22}(\phi_M) \end{array} \right) \\ \end{align*}
Equation 4: A is a matrix consisting of scattering length densities. The dimension of the matrix $N_{DF} \times M$
Equation 4a: A is a matrix consisting of scattering length densities: $N = 2 (N_{DF} = 3)$
\begin{align*} & \frac{d\Sigma}{d\Omega}(Q) = \sum^{N+1}_{i=1}\rho_i^2 S_{ii}(Q) + 2 \sum^{N+1}_{i<j}\rho_i \rho_j S_{ij}(Q) \tag{5a} \\ & \\ & S_{kk}(Q) = \sum^{N+1}_{i\neq k}S_{ii}(Q) + 2 \sum^{N+1}_{i,j\neq k,i<j}S_{ij}(Q) \tag{5b} \\ \end{align*}
Equation 5:
(a) Assuming a system comprising multiple components with $N+1$ distinct species, the scattering intensity $\frac{d\Sigma}{d\Omega}(Q)$ can be decomposed into individual partial scattering functions, denoted as $S_{ij}$. This decomposition, in accordance with H. Endo et all 1), expressed in Eq.1…
(b): This equation is equivalent to the Babinet principle In accordance with H. Endo et all 2), expressed in Eq.7…
\begin{align*} & \frac{d\Sigma}{d\Omega}(Q) = \rho_1^2 S_{11}(Q) + \rho_2^2 S_{22}(Q) + 2\rho_1 \rho_2 S_{12}(Q) \tag{6a} \\ & \\ & S_{22}(Q) = \ \ S_{11}(Q) \tag{6b} \\ & S_{12}(Q) = - S_{11}(Q) \\ & \\ & \frac{d\Sigma}{d\Omega}(Q) = (\rho_1-\rho_2)^2S_{11}(Q) \tag{6c} \\ & \\ & S_{11}(Q) = S_{22}(Q) = -S_{12}(Q) = \frac{1}{(\rho_1-\rho_2)^2}\frac{d\Sigma}{d\Omega}(Q) \tag{6d} \\ & \\ & \rho_2 \equiv \rho_s \\ & \left( \begin{array}{@{}ccccc@{}} \frac{d\Sigma}{d\Omega}\rvert_{1}(Q) \\ \frac{d\Sigma}{d\Omega}\rvert_{2}(Q) \\ \frac{d\Sigma}{d\Omega}\rvert_{3}(Q) \\ \frac{d\Sigma}{d\Omega}\rvert_{4}(Q) \\ \frac{d\Sigma}{d\Omega}\rvert_{5}(Q) \\ ... \\ \frac{d\Sigma}{d\Omega}\rvert_{M}(Q) \end{array} \right) = \left( \begin{array}{@{}ccccc@{}} \Delta_{11}(\phi_1) \\ \Delta_{11}(\phi_2) \\ \Delta_{11}(\phi_3) \\ \Delta_{11}(\phi_4) \\ \Delta_{11}(\phi_5) \\ . \\ \Delta_{11}(\phi_M) \end{array} \right) \cdot \left( \begin{array}{@{}ccccc@{}} S_{11}(Q) \\ \end{array} \right), \ \ Q=Q_1...Q_K \\ & \\ & \vec{I}=A\vec{S}\\ & \\ & \vec{S}= A^{-1}\vec{I}\\ \end{align*}
Equation 6: In case of $N=1$, Eq.6 could be rewritten like above.
\begin{align*} & \frac{d\Sigma}{d\Omega}(Q) = \rho_1^2 S_{11}(Q) + \rho_2^2 S_{22}(Q) + \rho_3^2 S_{33}(Q) + 2\rho_1 \rho_2 S_{12}(Q) + 2\rho_1 \rho_3 S_{13}(Q) + 2\rho_2 \rho_3 S_{23}(Q) \tag{7a} \\ & \\ & 2S_{12}(Q)= - S_{11}(Q) - S_{22}(Q) + S_{33}(Q) \\ & 2S_{23}(Q)= \ \ \ S_{11}(Q) - S_{22}(Q) - S_{33}(Q) \tag{7b} \\ & 2S_{13}(Q)= - S_{11}(Q) + S_{22}(Q) - S_{33}(Q) \\ & \\ & \frac{d\Sigma}{d\Omega}(Q) = (\rho_1-\rho_2)(\rho_1-\rho_3)S_{11}(Q) + (\rho_2-\rho_1)(\rho_2-\rho_3)S_{22}(Q) + (\rho_3-\rho_1)(\rho_3-\rho_2)S_{33}(Q) \tag{7c} \\ & \\ & S_{33}(Q) = S_{11}(Q) + S_{22}(Q) + 2S_{12}(Q) \tag{7d} \\ & \\ & \\ & \frac{d\Sigma}{d\Omega}(Q) = (\rho_1-\rho_3)^2S_{11}(Q) + 2(\rho_1-\rho_3)(\rho_2-\rho_3)S_{12}(Q) + (\rho_2-\rho_3)^2S_{22}(Q) \tag{7e} \\ & \\ & \rho_3 \equiv \rho_s \\ & \\ & \frac{d\Sigma}{d\Omega}(Q) = \Delta_{11}S_{11}(Q) + 2\Delta_{12}S_{12}(Q) + \Delta_{22}S_{22}(Q) \tag{7f} \\ & \left( \begin{array}{@{}ccccc@{}} \frac{d\Sigma}{d\Omega}\rvert_{1}(Q) \\ \frac{d\Sigma}{d\Omega}\rvert_{2}(Q) \\ \frac{d\Sigma}{d\Omega}\rvert_{3}(Q) \\ \frac{d\Sigma}{d\Omega}\rvert_{4}(Q) \\ \frac{d\Sigma}{d\Omega}\rvert_{5}(Q) \\ ... \\ \frac{d\Sigma}{d\Omega}\rvert_{M}(Q) \end{array} \right) = \left( \begin{array}{@{}ccccc@{}} \Delta_{11}(\phi_1) & 2\Delta_{12}(\phi_1) & \Delta_{22}(\phi_1) \\ \Delta_{11}(\phi_2) & 2\Delta_{12}(\phi_2) & \Delta_{22}(\phi_2) \\ \Delta_{11}(\phi_3) & 2\Delta_{12}(\phi_3) & \Delta_{22}(\phi_3) \\ \Delta_{11}(\phi_4) & 2\Delta_{12}(\phi_4) & \Delta_{22}(\phi_4) \\ \Delta_{11}(\phi_5) & 2\Delta_{12}(\phi_5) & \Delta_{22}(\phi_5) \\ . & . & . \\ \Delta_{11}(\phi_M) & 2\Delta_{12}(\phi_M) & \Delta_{22}(\phi_M) \end{array} \right) \cdot \left( \begin{array}{@{}ccccc@{}} S_{11}(Q) \\ S_{12}(Q) \\ S_{22}(Q) \\ \end{array} \right), \ \ Q=Q_1...Q_K \\ \end{align*}
Equation 7: In case of $N=2$, Eq.5 could be like above.
\begin{align*} & \frac{d\Sigma}{d\Omega}(Q) = \rho_1^2 S_{11}(Q) + \rho_2^2 S_{22}(Q) + \rho_3^2 S_{33}(Q) + \rho_4^2 S_{44}(Q) + 2\rho_1 \rho_2 S_{12}(Q) + 2\rho_1 \rho_3 S_{13}(Q) + \rho_1 \rho_4 S_{14}(Q) + 2\rho_2 \rho_3 S_{23}(Q) + 2\rho_2 \rho_4 S_{24}(Q) + 2\rho_3 \rho_4 S_{34}(Q) \tag{8a} \\ & \\ & 2S_{12}(Q) + 2S_{14}(Q) + 2S_{24}(Q) = - S_{11}(Q) - S_{22}(Q) + S_{33}(Q) - S_{44}(Q) \\ & 2S_{23}(Q) + 2S_{24}(Q) +2 S_{34}(Q)= \ \ \ S_{11}(Q) - S_{22}(Q) - S_{33}(Q) - S_{44}(Q) \tag{8b} \\ & 2S_{13}(Q) + 2S_{14}(Q) + 2S_{34}(Q)= - S_{11}(Q) + S_{22}(Q) - S_{33}(Q) - S_{44}(Q) \\ & 2S_{12}(Q) + 2S_{13}(Q) + 2S_{23}(Q)= - S_{11}(Q) - S_{22}(Q) - S_{33}(Q) + S_{44}(Q) \\ & \\ & S_{44}(Q) = S_{11}(Q) + S_{22}(Q) + S_{33}(Q) + 2S_{12}(Q) + 2S_{13}(Q) + 2S_{23}(Q) \\ & S_{14}(Q) = - S_{11}(Q) - S_{12}(Q) - S_{13}(Q) \tag{8c} \\ & S_{24}(Q) = - S_{22}(Q) - S_{12}(Q) - S_{23}(Q) \\ & S_{34}(Q)= - S_{33}(Q) - S_{13}(Q) - S_{23}(Q) \\ & \\ & \frac{d\Sigma}{d\Omega}(Q) = (\rho_1-\rho_4)^2S_{11}(Q) + 2(\rho_1-\rho_4)(\rho_2-\rho_4)S_{12}(Q) + (\rho_2-\rho_4)^2S_{22}(Q) + 2(\rho_1-\rho_4)(\rho_3-\rho_4)S_{13}(Q) + 2(\rho_2-\rho_4)(\rho_3-\rho_4)S_{23}(Q) + (\rho_3-\rho_4)^2S_{33}(Q) \tag{8d} \\ & \\ & \rho_4 \equiv \rho_s \\ & \\ & \frac{d\Sigma}{d\Omega}(Q) = \Delta_{11}S_{11}(Q) + 2\Delta_{12}S_{12}(Q) + \Delta_{22}S_{22}(Q) + 2\Delta_{13}S_{13}(Q) + 2\Delta_{23}S_{23}(Q) + \Delta_{33}S_{33}(Q) \tag{8e} \\ & \left( \begin{array}{@{}ccccc@{}} \frac{d\Sigma}{d\Omega}\rvert_{1}(Q) \\ \frac{d\Sigma}{d\Omega}\rvert_{2}(Q) \\ \frac{d\Sigma}{d\Omega}\rvert_{3}(Q) \\ \frac{d\Sigma}{d\Omega}\rvert_{4}(Q) \\ \frac{d\Sigma}{d\Omega}\rvert_{5}(Q) \\ ... \\ \frac{d\Sigma}{d\Omega}\rvert_{M}(Q) \end{array} \right) = \left( \begin{array}{@{}ccccc@{}} \Delta_{11}(\phi_1) & 2\Delta_{12}(\phi_1) & \Delta_{22}(\phi_1) & 2\Delta_{13}(\phi_1) & 2\Delta_{23}(\phi_1) & \Delta_{33}(\phi_1) \\ \Delta_{11}(\phi_2) & 2\Delta_{12}(\phi_2) & \Delta_{22}(\phi_2) & 2\Delta_{13}(\phi_2) & 2\Delta_{23}(\phi_2) & \Delta_{33}(\phi_2) \\ \Delta_{11}(\phi_3) & 2\Delta_{12}(\phi_3) & \Delta_{22}(\phi_3) & 2\Delta_{13}(\phi_3) & 2\Delta_{23}(\phi_3) & \Delta_{33}(\phi_3) \\ \Delta_{11}(\phi_4) & 2\Delta_{12}(\phi_4) & \Delta_{22}(\phi_4) & 2\Delta_{13}(\phi_4) & 2\Delta_{23}(\phi_4) & \Delta_{33}(\phi_4) \\ \Delta_{11}(\phi_5) & 2\Delta_{12}(\phi_5) & \Delta_{22}(\phi_5) & 2\Delta_{13}(\phi_5) & 2\Delta_{23}(\phi_5) & \Delta_{33}(\phi_5) \\ . & . & . & . & . & . \\ \Delta_{11}(\phi_M) & 2\Delta_{12}(\phi_M) & \Delta_{22}(\phi_M) & 2\Delta_{13}(\phi_M) & 2\Delta_{23}(\phi_M) & \Delta_{33}(\phi_M) \\ \end{array} \right) \cdot \left( \begin{array}{@{}ccccc@{}} S_{11}(Q) \\ S_{12}(Q) \\ S_{22}(Q) \\ S_{13}(Q) \\ S_{23}(Q) \\ S_{33}(Q) \\ \end{array} \right), \ \ Q=Q_1...Q_K \end{align*}
Equation 8: In case of $N=3$, Eq.8 could be like above.
… to be continued …