source: sasview/src/sas/sasgui/perspectives/calculator/media/sas_calculator_help.rst @ da456fb

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since da456fb was da456fb, checked in by smk78, 8 years ago

Major updating of the test data documentation. Closes #710

  • Property mode set to 100644
File size: 4.8 KB
RevLine 
[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]8Generic SANS Calculator Tool
9============================
[ec392464]10
[a9dc4eb]11Description
12-----------
[ec392464]13
[a9dc4eb]14This tool attempts to simulate the SANS expected from a specified
15shape/structure or scattering length density profile. The tool can
16handle both nuclear and magnetic contributions to the scattering.
[850c753]17
[a9dc4eb]18Theory
19------
[ec392464]20
[850c753]21In general, a particle with a volume *V* can be described by an ensemble
22containing *N* 3-dimensional rectangular pixels where each pixel is much
23smaller than *V*.
[ec392464]24
[850c753]25Assuming that all the pixel sizes are the same, the elastic scattering
26intensity from the particle is
[ec392464]27
28.. image:: gen_i.gif
29
[850c753]30Equation 1.
31
32where |beta|\ :sub:`j` and *r*\ :sub:`j` are the scattering length density and
33the position of the j'th pixel respectively.
34
35The total volume *V*
[ec392464]36
37.. image:: v_j.gif
38
[850c753]39for |beta|\ :sub:`j` |noteql|\0 where *v*\ :sub:`j` is the volume of the j'th
40pixel (or the j'th natural atomic volume (= atomic mass / (natural molar
41density * Avogadro number) for the atomic structures).
42
43*V* can be corrected by users. This correction is useful especially for an
44atomic structure (such as taken from a PDB file) to get the right normalization.
45
46*NOTE!* |beta|\ :sub:`j` *displayed in the GUI may be incorrect but this will not
47affect the scattering computation if the correction of the total volume V is made.*
48
49The scattering length density (SLD) of each pixel, where the SLD is uniform, is
50a combination of the nuclear and magnetic SLDs and depends on the spin states
51of the neutrons as follows.
52
[a9dc4eb]53Magnetic Scattering
54^^^^^^^^^^^^^^^^^^^
[850c753]55
56For magnetic scattering, only the magnetization component, *M*\ :sub:`perp`\ ,
57perpendicular to the scattering vector *Q* contributes to the magnetic
58scattering length.
[ec392464]59
60.. image:: mag_vector.bmp
61
62The magnetic scattering length density is then
63
64.. image:: dm_eq.gif
65
[850c753]66where the gyromagnetic ratio |gamma| = -1.913, |mu|\ :sub:`B` is the Bohr
67magneton, *r*\ :sub:`0` is the classical radius of electron, and |sigma| is the
68Pauli spin.
[ec392464]69
[850c753]70For a polarized neutron, the magnetic scattering is depending on the spin states.
[ec392464]71
[850c753]72Let us consider that the incident neutrons are polarised both parallel (+) and 
73anti-parallel (-) to the x' axis (see below). The possible states after
74scattering from the sample are then
[ec392464]75
[850c753]76*  Non-spin flips: (+ +) and (- -)
77*  Spin flips:     (+ -) and (- +)
[ec392464]78
79.. image:: gen_mag_pic.bmp
80
[850c753]81Now let us assume that the angles of the *Q* vector and the spin-axis (x')
82to the x-axis are |phi| and |theta|\ :sub:`up` respectively (see above). Then,
[ec392464]83depending upon the polarization (spin) state of neutrons, the scattering
[850c753]84length densities, including the nuclear scattering length density (|beta|\ :sub:`N`\ )
85are given as
[ec392464]86
[850c753]87*  for non-spin-flips
[ec392464]88
[850c753]89   .. image:: sld1.gif
[ec392464]90
[850c753]91*  for spin-flips
92
93   .. image:: sld2.gif
[ec392464]94
95where
96
97.. image:: mxp.gif
98
99.. image:: myp.gif
100
101.. image:: mzp.gif
102
103.. image:: mqx.gif
104
105.. image:: mqy.gif
106
[850c753]107Here the *M0*\ :sub:`x`\ , *M0*\ :sub:`y` and *M0*\ :sub:`z` are the x, y and z
108components of the magnetisation vector in the laboratory xyz frame.
[ec392464]109
110.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
111
[a9dc4eb]112Using the tool
113--------------
[ec392464]114
115.. image:: gen_gui_help.bmp
116
[850c753]117After computation the result will appear in the *Theory* box in the SasView 
118*Data Explorer* panel.
119
120*Up_frac_in* and *Up_frac_out* are the ratio
[ec392464]121
[850c753]122   (spin up) / (spin up + spin down)
123   
124of neutrons before the sample and at the analyzer, respectively.
[ec392464]125
[850c753]126*NOTE 1. The values of* Up_frac_in *and* Up_frac_out *must be in the range
1270.0 to 1.0. Both values are 0.5 for unpolarized neutrons.*
[ec392464]128
[850c753]129*NOTE 2. This computation is totally based on the pixel (or atomic) data fixed
130in xyz coordinates. No angular orientational averaging is considered.*
131
132*NOTE 3. For the nuclear scattering length density, only the real component
[ec392464]133is taken account.*
134
135.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
136
[a9dc4eb]137Using PDB/OMF or SLD files
138--------------------------
[ec392464]139
[a9dc4eb]140The SANS Calculator tool can read some PDB, OMF or SLD files but ignores
[850c753]141polarized/magnetic scattering when doing so, thus related parameters such as
142*Up_frac_in*, etc, will be ignored.
[ec392464]143
[850c753]144The calculation for fixed orientation uses Equation 1 above resulting in a 2D
145output, whereas the scattering calculation averaged over all the orientations
146uses the Debye equation below providing a 1D output
[ec392464]147
148.. image:: gen_debye_eq.gif
149
[850c753]150where *v*\ :sub:`j` |beta|\ :sub:`j` |equiv| *b*\ :sub:`j` is the scattering
151length of the j'th atom. The calculation output is passed to the *Data Explorer* 
152for further use.
[ec392464]153
154.. image:: pdb_combo.jpg
[850c753]155
156.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
157
[a9dc4eb]158.. note::  This help document was last changed by Steve King, 01May2015
Note: See TracBrowser for help on using the repository browser.