[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 |
---|
[2f539b2] | 26 | intensity from the particle is defined as |
---|
[ec392464] | 27 | |
---|
[6aad2e8] | 28 | .. image:: gen_i.png |
---|
[ec392464] | 29 | |
---|
[850c753] | 30 | Equation 1. |
---|
| 31 | |
---|
[5ed76f8] | 32 | where $\beta_j$ and $r_j$ are the scattering length density and |
---|
| 33 | the position of the $j^\text{th}$ pixel respectively. |
---|
[850c753] | 34 | |
---|
[2f539b2] | 35 | The total volume $V$ is equal to |
---|
[ec392464] | 36 | |
---|
[5ed76f8] | 37 | .. math:: |
---|
[ec392464] | 38 | |
---|
[5ed76f8] | 39 | V = \sum_j^N v_j |
---|
| 40 | |
---|
| 41 | for $\beta_j \ne 0$ where $v_j$ is the volume of the $j^\text{th}$ |
---|
| 42 | pixel (or the $j^\text{th}$ natural atomic volume (= atomic mass / (natural molar |
---|
[850c753] | 43 | density * Avogadro number) for the atomic structures). |
---|
| 44 | |
---|
[2f539b2] | 45 | $V$ can be corrected by users (input parameter `Total volume`). This correction |
---|
| 46 | is useful especially for an atomic structure (such as taken from a PDB file) |
---|
| 47 | to get the right normalization. |
---|
[850c753] | 48 | |
---|
[2f539b2] | 49 | *NOTE! $\beta_j$ displayed in the GUI may be incorrect (input parameter |
---|
| 50 | `solvent_SLD`) but this will not affect the scattering computation if the |
---|
| 51 | correction of the total volume V is made.* |
---|
[850c753] | 52 | |
---|
[5ed76f8] | 53 | The scattering length density (SLD) of each pixel, where the SLD is uniform, is |
---|
| 54 | a combination of the nuclear and magnetic SLDs and depends on the spin states |
---|
[850c753] | 55 | of the neutrons as follows. |
---|
| 56 | |
---|
[a9dc4eb] | 57 | Magnetic Scattering |
---|
| 58 | ^^^^^^^^^^^^^^^^^^^ |
---|
[850c753] | 59 | |
---|
[5ed76f8] | 60 | For magnetic scattering, only the magnetization component, $M_\perp$, |
---|
| 61 | perpendicular to the scattering vector $Q$ contributes to the magnetic |
---|
[850c753] | 62 | scattering length. |
---|
[ec392464] | 63 | |
---|
[6aad2e8] | 64 | .. image:: mag_vector.png |
---|
[ec392464] | 65 | |
---|
| 66 | The magnetic scattering length density is then |
---|
| 67 | |
---|
[6aad2e8] | 68 | .. image:: dm_eq.png |
---|
[ec392464] | 69 | |
---|
[5ed76f8] | 70 | where the gyromagnetic ratio is $\gamma = -1.913$, $\mu_B$ is the Bohr |
---|
| 71 | magneton, $r_0$ is the classical radius of electron, and $\sigma$ is the |
---|
[850c753] | 72 | Pauli spin. |
---|
[ec392464] | 73 | |
---|
[850c753] | 74 | For a polarized neutron, the magnetic scattering is depending on the spin states. |
---|
[ec392464] | 75 | |
---|
[5ed76f8] | 76 | Let us consider that the incident neutrons are polarised both parallel (+) and |
---|
| 77 | anti-parallel (-) to the x' axis (see below). The possible states after |
---|
| 78 | scattering from the sample are then |
---|
[ec392464] | 79 | |
---|
[850c753] | 80 | * Non-spin flips: (+ +) and (- -) |
---|
| 81 | * Spin flips: (+ -) and (- +) |
---|
[ec392464] | 82 | |
---|
[6aad2e8] | 83 | .. image:: gen_mag_pic.png |
---|
[ec392464] | 84 | |
---|
[5ed76f8] | 85 | Now let us assume that the angles of the *Q* vector and the spin-axis (x') |
---|
| 86 | to the x-axis are $\phi$ and $\theta_\text{up}$ respectively (see above). Then, |
---|
| 87 | depending upon the polarization (spin) state of neutrons, the scattering |
---|
| 88 | length densities, including the nuclear scattering length density ($\beta_N$) |
---|
[850c753] | 89 | are given as |
---|
[ec392464] | 90 | |
---|
[850c753] | 91 | * for non-spin-flips |
---|
[ec392464] | 92 | |
---|
[6aad2e8] | 93 | .. image:: sld1.png |
---|
[ec392464] | 94 | |
---|
[850c753] | 95 | * for spin-flips |
---|
| 96 | |
---|
[6aad2e8] | 97 | .. image:: sld2.png |
---|
[ec392464] | 98 | |
---|
| 99 | where |
---|
| 100 | |
---|
[6aad2e8] | 101 | .. image:: mxp.png |
---|
[ec392464] | 102 | |
---|
[2f539b2] | 103 | |
---|
| 104 | |
---|
[6aad2e8] | 105 | .. image:: myp.png |
---|
[ec392464] | 106 | |
---|
[2f539b2] | 107 | |
---|
| 108 | |
---|
[6aad2e8] | 109 | .. image:: mzp.png |
---|
[ec392464] | 110 | |
---|
[2f539b2] | 111 | |
---|
| 112 | |
---|
[6aad2e8] | 113 | .. image:: mqx.png |
---|
[ec392464] | 114 | |
---|
[2f539b2] | 115 | |
---|
| 116 | |
---|
[6aad2e8] | 117 | .. image:: mqy.png |
---|
[ec392464] | 118 | |
---|
[2f539b2] | 119 | Here the $M_{0x}$, $M_{0y}$ and $M_{0z}$ are the $x$, $y$ and $z$ |
---|
[5ed76f8] | 120 | components of the magnetisation vector in the laboratory $xyz$ frame. |
---|
[ec392464] | 121 | |
---|
[2f539b2] | 122 | |
---|
| 123 | .. .. image:: Mxyzp.png |
---|
| 124 | |
---|
| 125 | |
---|
[ec392464] | 126 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 127 | |
---|
[a9dc4eb] | 128 | Using the tool |
---|
| 129 | -------------- |
---|
[ec392464] | 130 | |
---|
[2f539b2] | 131 | .. figure:: gen_gui_help.png |
---|
| 132 | |
---|
| 133 | .. |
---|
| 134 | |
---|
| 135 | 1) Load .sld, .txt, or .omf datafile |
---|
| 136 | 2) Select default shape of sample |
---|
| 137 | 3) Draw magnetization with arrows (not recommended for a large number of |
---|
| 138 | pixels). |
---|
| 139 | 4) Ratio of (+/total) neutrons after analyser |
---|
| 140 | 5) Ratio of (+/total) neutrons before sample |
---|
| 141 | 6) Polarization angle in degrees |
---|
| 142 | 7) Default volume calculated from the pixel info |
---|
| 143 | (or natural density of pdf file) |
---|
| 144 | 8) Compute the scattering pattern |
---|
| 145 | 9) Reset GUI to initial state |
---|
| 146 | 10) Display mean values or enter a new value if enabled |
---|
| 147 | 11) Save the sld data as sld format |
---|
| 148 | |
---|
| 149 | .. After computation the result will appear in the *Theory* box in the SasView |
---|
[850c753] | 150 | *Data Explorer* panel. |
---|
| 151 | |
---|
[5ed76f8] | 152 | *Up_frac_in* and *Up_frac_out* are the ratio |
---|
[ec392464] | 153 | |
---|
[850c753] | 154 | (spin up) / (spin up + spin down) |
---|
[5ed76f8] | 155 | |
---|
[850c753] | 156 | of neutrons before the sample and at the analyzer, respectively. |
---|
[ec392464] | 157 | |
---|
[2f539b2] | 158 | *NOTE 1. The values of Up_frac_in and Up_frac_out must be in the range |
---|
[850c753] | 159 | 0.0 to 1.0. Both values are 0.5 for unpolarized neutrons.* |
---|
[ec392464] | 160 | |
---|
[5ed76f8] | 161 | *NOTE 2. This computation is totally based on the pixel (or atomic) data fixed |
---|
[850c753] | 162 | in xyz coordinates. No angular orientational averaging is considered.* |
---|
| 163 | |
---|
[5ed76f8] | 164 | *NOTE 3. For the nuclear scattering length density, only the real component |
---|
[2f539b2] | 165 | is taken into account.* |
---|
[ec392464] | 166 | |
---|
| 167 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 168 | |
---|
[a9dc4eb] | 169 | Using PDB/OMF or SLD files |
---|
| 170 | -------------------------- |
---|
[ec392464] | 171 | |
---|
[a9dc4eb] | 172 | The SANS Calculator tool can read some PDB, OMF or SLD files but ignores |
---|
[5ed76f8] | 173 | polarized/magnetic scattering when doing so, thus related parameters such as |
---|
[850c753] | 174 | *Up_frac_in*, etc, will be ignored. |
---|
[ec392464] | 175 | |
---|
[5ed76f8] | 176 | The calculation for fixed orientation uses Equation 1 above resulting in a 2D |
---|
| 177 | output, whereas the scattering calculation averaged over all the orientations |
---|
[850c753] | 178 | uses the Debye equation below providing a 1D output |
---|
[ec392464] | 179 | |
---|
[6aad2e8] | 180 | .. image:: gen_debye_eq.png |
---|
[ec392464] | 181 | |
---|
[5ed76f8] | 182 | where $v_j \beta_j \equiv b_j$ is the scattering |
---|
[2f539b2] | 183 | length of the $j^\text{th}$ atom. |
---|
| 184 | .. The calculation output is passed to the *Data Explorer* |
---|
[850c753] | 185 | for further use. |
---|
[ec392464] | 186 | |
---|
[2f539b2] | 187 | .. figure:: pdb_combo.png |
---|
| 188 | |
---|
| 189 | .. |
---|
| 190 | |
---|
| 191 | 1) PDB file loaded |
---|
| 192 | 2) disabled input for *Up_frac_in*, *Up_frac_oupt*, *Up_theta* |
---|
| 193 | 3) option to perform the calculations using "Fixed orientations" (2D output) |
---|
| 194 | or "Averaging over all orientations using Debye equation" (1D output). |
---|
| 195 | This choice is only available for PDB files. |
---|
| 196 | |
---|
| 197 | |
---|
[850c753] | 198 | |
---|
| 199 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 200 | |
---|
[a9dc4eb] | 201 | .. note:: This help document was last changed by Steve King, 01May2015 |
---|