[ec392464] | 1 | .. sas_calculator_help.rst |
---|
| 2 | |
---|
| 3 | .. This is a port of the original SasView html help file to ReSTructured text |
---|
| 4 | .. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. |
---|
| 5 | |
---|
[da456fb] | 6 | .. _SANS_Calculator_Tool: |
---|
| 7 | |
---|
[a9dc4eb] | 8 | Generic SANS Calculator Tool |
---|
| 9 | ============================ |
---|
[ec392464] | 10 | |
---|
[a9dc4eb] | 11 | Description |
---|
| 12 | ----------- |
---|
[ec392464] | 13 | |
---|
[a9dc4eb] | 14 | This tool attempts to simulate the SANS expected from a specified |
---|
| 15 | shape/structure or scattering length density profile. The tool can |
---|
| 16 | handle both nuclear and magnetic contributions to the scattering. |
---|
[850c753] | 17 | |
---|
[a9dc4eb] | 18 | Theory |
---|
| 19 | ------ |
---|
[ec392464] | 20 | |
---|
[5ed76f8] | 21 | In general, a particle with a volume $V$ can be described by an ensemble |
---|
| 22 | containing $N$ 3-dimensional rectangular pixels where each pixel is much |
---|
| 23 | smaller than $V$. |
---|
[ec392464] | 24 | |
---|
[5ed76f8] | 25 | Assuming that all the pixel sizes are the same, the elastic scattering |
---|
[850c753] | 26 | intensity from the particle is |
---|
[ec392464] | 27 | |
---|
[2f7ea43] | 28 | .. math:: |
---|
| 29 | |
---|
| 30 | I(\vec Q) = \frac{1}{V}\left| |
---|
| 31 | \sum_j^N v_j \beta_j \exp(i\vec Q \cdot \vec r_j)\right|^2 |
---|
[ec392464] | 32 | |
---|
[850c753] | 33 | Equation 1. |
---|
| 34 | |
---|
[5ed76f8] | 35 | where $\beta_j$ and $r_j$ are the scattering length density and |
---|
| 36 | the position of the $j^\text{th}$ pixel respectively. |
---|
[850c753] | 37 | |
---|
[5ed76f8] | 38 | The total volume $V$ |
---|
[ec392464] | 39 | |
---|
[5ed76f8] | 40 | .. math:: |
---|
[ec392464] | 41 | |
---|
[5ed76f8] | 42 | V = \sum_j^N v_j |
---|
| 43 | |
---|
| 44 | for $\beta_j \ne 0$ where $v_j$ is the volume of the $j^\text{th}$ |
---|
| 45 | pixel (or the $j^\text{th}$ natural atomic volume (= atomic mass / (natural molar |
---|
[850c753] | 46 | density * Avogadro number) for the atomic structures). |
---|
| 47 | |
---|
[5ed76f8] | 48 | $V$ can be corrected by users. This correction is useful especially for an |
---|
| 49 | atomic structure (such as taken from a PDB file) to get the right normalization. |
---|
[850c753] | 50 | |
---|
[2f7ea43] | 51 | *NOTE!* $\beta_j$ *displayed in the GUI may be incorrect but this will not |
---|
[850c753] | 52 | affect the scattering computation if the correction of the total volume V is made.* |
---|
| 53 | |
---|
[5ed76f8] | 54 | The scattering length density (SLD) of each pixel, where the SLD is uniform, is |
---|
| 55 | a combination of the nuclear and magnetic SLDs and depends on the spin states |
---|
[850c753] | 56 | of the neutrons as follows. |
---|
| 57 | |
---|
[a9dc4eb] | 58 | Magnetic Scattering |
---|
| 59 | ^^^^^^^^^^^^^^^^^^^ |
---|
[850c753] | 60 | |
---|
[2f7ea43] | 61 | For magnetic scattering, only the magnetization component, $\mathbf{M}_\perp$, |
---|
| 62 | perpendicular to the scattering vector $\vec Q$ contributes to the magnetic |
---|
[850c753] | 63 | scattering length. |
---|
[ec392464] | 64 | |
---|
[6aad2e8] | 65 | .. image:: mag_vector.png |
---|
[ec392464] | 66 | |
---|
| 67 | The magnetic scattering length density is then |
---|
| 68 | |
---|
[2f7ea43] | 69 | .. math:: |
---|
| 70 | |
---|
| 71 | \beta_M = \frac{\gamma r_0}{2 \mu_B}\sigma \cdot \mathbf{M}_\perp |
---|
| 72 | = D_M\sigma \cdot \mathbf{M}_\perp |
---|
[ec392464] | 73 | |
---|
[5ed76f8] | 74 | where the gyromagnetic ratio is $\gamma = -1.913$, $\mu_B$ is the Bohr |
---|
| 75 | magneton, $r_0$ is the classical radius of electron, and $\sigma$ is the |
---|
[850c753] | 76 | Pauli spin. |
---|
[ec392464] | 77 | |
---|
[850c753] | 78 | For a polarized neutron, the magnetic scattering is depending on the spin states. |
---|
[ec392464] | 79 | |
---|
[5ed76f8] | 80 | Let us consider that the incident neutrons are polarised both parallel (+) and |
---|
| 81 | anti-parallel (-) to the x' axis (see below). The possible states after |
---|
| 82 | scattering from the sample are then |
---|
[ec392464] | 83 | |
---|
[850c753] | 84 | * Non-spin flips: (+ +) and (- -) |
---|
| 85 | * Spin flips: (+ -) and (- +) |
---|
[ec392464] | 86 | |
---|
[6aad2e8] | 87 | .. image:: gen_mag_pic.png |
---|
[ec392464] | 88 | |
---|
[6ccc55f] | 89 | Now let us assume that the angles of the $\vec Q$ vector and the spin-axis ($x'$) |
---|
[2f7ea43] | 90 | to the $x$-axis are $\phi$ and $\theta_\text{up}$ respectively (see above). Then, |
---|
[5ed76f8] | 91 | depending upon the polarization (spin) state of neutrons, the scattering |
---|
| 92 | length densities, including the nuclear scattering length density ($\beta_N$) |
---|
[850c753] | 93 | are given as |
---|
[ec392464] | 94 | |
---|
[850c753] | 95 | * for non-spin-flips |
---|
[ec392464] | 96 | |
---|
[2f7ea43] | 97 | .. math:: |
---|
| 98 | \beta_{\pm\pm} = \beta_N \mp D_M M_{\perp x'} |
---|
[ec392464] | 99 | |
---|
[850c753] | 100 | * for spin-flips |
---|
| 101 | |
---|
[2f7ea43] | 102 | .. math:: |
---|
| 103 | \beta_{\pm\mp} = - D_M(M_{\perp y'} \pm i M_{\perp z'}) |
---|
[ec392464] | 104 | |
---|
| 105 | where |
---|
| 106 | |
---|
[2f7ea43] | 107 | .. math:: |
---|
[ec392464] | 108 | |
---|
[2f7ea43] | 109 | M_{\perp x'} &= M_{0q_x}\cos\theta_\text{up} + M_{0q_y}\sin\theta_\text{up} \\ |
---|
| 110 | M_{\perp y'} &= M_{0q_y}\cos\theta_\text{up} + M_{0q_x}\sin\theta_\text{up} \\ |
---|
| 111 | M_{\perp z'} &= M_{0z} \\ |
---|
| 112 | M_{0q_x} &= (M_{0x}\cos\phi - M_{0y}\sin\phi)\cos\phi \\ |
---|
| 113 | M_{0q_y} &= (M_{0y}\sin\phi - M_{0y}\cos\phi)\sin\phi |
---|
[ec392464] | 114 | |
---|
[2f7ea43] | 115 | Here the $M_{0x}$, $M_{0y}$ and $M_{0z}$ are |
---|
| 116 | the $x$, $y$ and $z$ components of the magnetisation vector in the |
---|
| 117 | laboratory $x$-$y$-$z$ frame. |
---|
[ec392464] | 118 | |
---|
| 119 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 120 | |
---|
[a9dc4eb] | 121 | Using the tool |
---|
| 122 | -------------- |
---|
[ec392464] | 123 | |
---|
[6aad2e8] | 124 | .. image:: gen_gui_help.png |
---|
[ec392464] | 125 | |
---|
[5ed76f8] | 126 | After computation the result will appear in the *Theory* box in the SasView |
---|
[850c753] | 127 | *Data Explorer* panel. |
---|
| 128 | |
---|
[5ed76f8] | 129 | *Up_frac_in* and *Up_frac_out* are the ratio |
---|
[ec392464] | 130 | |
---|
[850c753] | 131 | (spin up) / (spin up + spin down) |
---|
[5ed76f8] | 132 | |
---|
[850c753] | 133 | of neutrons before the sample and at the analyzer, respectively. |
---|
[ec392464] | 134 | |
---|
[5ed76f8] | 135 | *NOTE 1. The values of* Up_frac_in *and* Up_frac_out *must be in the range |
---|
[850c753] | 136 | 0.0 to 1.0. Both values are 0.5 for unpolarized neutrons.* |
---|
[ec392464] | 137 | |
---|
[5ed76f8] | 138 | *NOTE 2. This computation is totally based on the pixel (or atomic) data fixed |
---|
[850c753] | 139 | in xyz coordinates. No angular orientational averaging is considered.* |
---|
| 140 | |
---|
[5ed76f8] | 141 | *NOTE 3. For the nuclear scattering length density, only the real component |
---|
[ec392464] | 142 | is taken account.* |
---|
| 143 | |
---|
| 144 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 145 | |
---|
[a9dc4eb] | 146 | Using PDB/OMF or SLD files |
---|
| 147 | -------------------------- |
---|
[ec392464] | 148 | |
---|
[a9dc4eb] | 149 | The SANS Calculator tool can read some PDB, OMF or SLD files but ignores |
---|
[5ed76f8] | 150 | polarized/magnetic scattering when doing so, thus related parameters such as |
---|
[850c753] | 151 | *Up_frac_in*, etc, will be ignored. |
---|
[ec392464] | 152 | |
---|
[5ed76f8] | 153 | The calculation for fixed orientation uses Equation 1 above resulting in a 2D |
---|
| 154 | output, whereas the scattering calculation averaged over all the orientations |
---|
[850c753] | 155 | uses the Debye equation below providing a 1D output |
---|
[ec392464] | 156 | |
---|
[2f7ea43] | 157 | .. math:: |
---|
| 158 | |
---|
| 159 | I(|\vec Q|) = \frac{1}{V}\sum_j^N v_j\beta_j \sum_k^N v_k \beta_k |
---|
| 160 | \frac{\sin(|\vec Q||\vec r_j - \vec r_k|)}{|\vec Q||\vec r_j - \vec r_k|} |
---|
[ec392464] | 161 | |
---|
[5ed76f8] | 162 | where $v_j \beta_j \equiv b_j$ is the scattering |
---|
| 163 | length of the $j^\text{th}$ atom. The calculation output is passed to the *Data Explorer* |
---|
[850c753] | 164 | for further use. |
---|
[ec392464] | 165 | |
---|
| 166 | .. image:: pdb_combo.jpg |
---|
[850c753] | 167 | |
---|
| 168 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 169 | |
---|
[a9dc4eb] | 170 | .. note:: This help document was last changed by Steve King, 01May2015 |
---|