- Timestamp:
- Feb 19, 2015 9:16:39 AM (10 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 8a22b5b
- Parents:
- aba7b40 (diff), 064723b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Location:
- src/sas
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/guiframe/documentation_window.py
r573e7034 r78bcf3c3 26 26 docs_path = os.path.join(PATH_APP, "doc") 27 27 28 file_path = "file:///" + docs_path + "/" + path 29 28 30 if not os.path.exists(docs_path): 29 31 logging.error("Could not find Sphinx documentation at %s \ 30 32 -- has it been built?", docs_path) 31 32 33 elif wx_supports_html2: 33 34 # Complete HTML/CSS support! 34 35 self.view = html.WebView.New(self) 35 self.view.LoadURL( "file://" + docs_path + '\\' +path)36 self.view.LoadURL(file_path) 36 37 self.Show() 37 38 else: … … 40 41 #Red hat used at SNS for which Wx 3.0 is not available. This 41 42 #does not deal with issue of math in docs of course. 42 43 webbrowser.open_new_tab("file:///" + docs_path + "/" + path) 44 print ("file:///" + docs_path + "/" + path) 43 webbrowser.open_new_tab(file_path) 45 44 46 45 -
src/sas/guiframe/gui_manager.py
rf53cd30 r064723b 1353 1353 if config._do_acknowledge: 1354 1354 self._help_menu.AppendSeparator() 1355 id = wx.NewId() 1355 1356 self._help_menu.Append(id, '&Acknowledge', 'Acknowledging SasView') 1356 1357 wx.EVT_MENU(self, id, self._onAcknowledge) -
src/sas/perspectives/calculator/media/resolution_calculator_help.rst
rbc9a0e1 r850c753 23 23 ------ 24 24 25 1) Select *SAS Resolution Es imator* from the *Tool* menu on the SasView toolbar.25 1) Select *SAS Resolution Estimator* from the *Tool* menu on the SasView toolbar. 26 26 27 27 2) Select the source (Neutron or Photon) and source type (Monochromatic or TOF). … … 33 33 careful to note that distances are specified in cm! 34 34 35 4) Enter values for the source wavelength(s) and its spread (= FWHM / wavelength).35 4) Enter values for the source wavelength(s), |lambda|\ , and its spread (= FWHM/|lambda|\ ). 36 36 37 37 For monochromatic sources, the inputs are just one value. For TOF sources, … … 62 62 region near the beam block/stop 63 63 64 [ie., Q < 2 *|pi|\*(beam block diameter) / (sample-to-detector distance) / |lambda|\_min]64 [ie., Q < 2. |pi|\ .(beam block diameter) / (sample-to-detector distance) / |lambda|\_min] 65 65 66 66 the variance is slightly under estimated. -
src/sas/perspectives/calculator/media/sas_calculator_help.rst
rec392464 r850c753 17 17 ================================== 18 18 19 Polarization and Magnetic Scattering 19 Nuclear_Scattering_ 20 20 21 Theory_ 22 GUI_ 23 PDB_Data_ 21 Magnetic_Scattering_Polarisation_ 22 23 Using_the_SAS_Calculator_GUI_ 24 25 Using_PDB_Data_ 24 26 25 27 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 26 28 27 .. _ Theory:29 .. _Nuclear_Scattering: 28 30 29 Theory 30 ------ 31 Nuclear Scattering 32 ------------------ 31 33 32 In general, a particle with a volume V can be described by an ensemble 33 containing N 3-dimensional rectangular pixels where each pixels are much 34 smaller than V. Assuming that all the pixel sizes are same, the elastic 35 scattering intensity by the particle 34 In general, a particle with a volume *V* can be described by an ensemble 35 containing *N* 3-dimensional rectangular pixels where each pixel is much 36 smaller than *V*. 37 38 Assuming that all the pixel sizes are the same, the elastic scattering 39 intensity from the particle is 36 40 37 41 .. image:: gen_i.gif 38 42 39 where /beta/jand rj are the scattering length density and the position of the 40 j'th pixel respectively. And the total volume 43 Equation 1. 44 45 where |beta|\ :sub:`j` and *r*\ :sub:`j` are the scattering length density and 46 the position of the j'th pixel respectively. 47 48 The total volume *V* 41 49 42 50 .. image:: v_j.gif 43 51 44 for /beta/j/noteql/0 where vj is the volume of the j'th pixel (or the j'th 45 natural atomic volume (= atomic mass/natural molar density/Avogadro number) for 46 the atomic structures). The total volume V can be corrected by users. This 47 correction is useful especially for an atomic structure (taken from a pdb file) 48 to get the right normalization. Note that the /beta/j displayed in GUI may be 49 incorrect but will not affect the scattering computation if the correction of 50 the total volume is made. The scattering length density (SLD) of each pixel 51 where the SLD is uniform, is a combination of the nuclear and magnetic SLDs and 52 depends on the spin states of the neutrons as follows:For magnetic scattering, 53 only the magnetization component, *M*perp, perpendicular to the scattering 54 vector *Q* contributes to the the magnetic scattering length. (Figure below). 52 for |beta|\ :sub:`j` |noteql|\0 where *v*\ :sub:`j` is the volume of the j'th 53 pixel (or the j'th natural atomic volume (= atomic mass / (natural molar 54 density * Avogadro number) for the atomic structures). 55 56 *V* can be corrected by users. This correction is useful especially for an 57 atomic structure (such as taken from a PDB file) to get the right normalization. 58 59 *NOTE!* |beta|\ :sub:`j` *displayed in the GUI may be incorrect but this will not 60 affect the scattering computation if the correction of the total volume V is made.* 61 62 The scattering length density (SLD) of each pixel, where the SLD is uniform, is 63 a combination of the nuclear and magnetic SLDs and depends on the spin states 64 of the neutrons as follows. 65 66 .. _Magnetic_Scattering_Polarisation: 67 68 Magnetic Scattering & Polarisation 69 ---------------------------------- 70 71 For magnetic scattering, only the magnetization component, *M*\ :sub:`perp`\ , 72 perpendicular to the scattering vector *Q* contributes to the magnetic 73 scattering length. 55 74 56 75 .. image:: mag_vector.bmp … … 60 79 .. image:: dm_eq.gif 61 80 62 where /gamma/= -1.913 the gyromagnetic ratio, /mu/B is the Bohr magneton, r0 is 63 the classical radius of electron, and */sigma/* is the Pauli spin. 81 where the gyromagnetic ratio |gamma| = -1.913, |mu|\ :sub:`B` is the Bohr 82 magneton, *r*\ :sub:`0` is the classical radius of electron, and |sigma| is the 83 Pauli spin. 64 84 65 For polarized neutron, the magnetic scattering is depending on the spin states.85 For a polarized neutron, the magnetic scattering is depending on the spin states. 66 86 67 Let 's consider that the incident neutrons are polarised parallel (+)/68 anti-parallel (-) to the x' axis ( See both Figures above). The possible69 out-coming states then are + and - states for both incident states, where87 Let us consider that the incident neutrons are polarised both parallel (+) and 88 anti-parallel (-) to the x' axis (see below). The possible states after 89 scattering from the sample are then 70 90 71 -Non-spin flips: (+ +) and (- -)72 -Spin flips: (+ -) and (- +)91 * Non-spin flips: (+ +) and (- -) 92 * Spin flips: (+ -) and (- +) 73 93 74 94 .. image:: gen_mag_pic.bmp 75 95 76 Now , let's assume that the angles of the *Q*vector and the spin-axis (x')77 from x-axis are /phi/ and /theta/up respectively (See Figure above). Then,96 Now let us assume that the angles of the *Q* vector and the spin-axis (x') 97 to the x-axis are |phi| and |theta|\ :sub:`up` respectively (see above). Then, 78 98 depending upon the polarization (spin) state of neutrons, the scattering 79 length densities, including the nuclear scattering length density ( /beta/N)80 are given as , for non-spin-flips99 length densities, including the nuclear scattering length density (|beta|\ :sub:`N`\ ) 100 are given as 81 101 82 .. image:: sld1.gif 102 * for non-spin-flips 83 103 84 and for spin-flips 104 .. image:: sld1.gif 85 105 86 .. image:: sld2.gif 106 * for spin-flips 107 108 .. image:: sld2.gif 87 109 88 110 where … … 98 120 .. image:: mqy.gif 99 121 100 Here , the M0x, M0yand M0zare the x, y and z components of the magnetisation101 vector given in the xyz labframe.122 Here the *M0*\ :sub:`x`\ , *M0*\ :sub:`y` and *M0*\ :sub:`z` are the x, y and z 123 components of the magnetisation vector in the laboratory xyz frame. 102 124 103 125 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 104 126 105 .. _ GUI:127 .. _Using_the_SAS_Calculator_GUI: 106 128 107 GUI108 --- 129 Using the SAS Calculator GUI 130 ---------------------------- 109 131 110 132 .. image:: gen_gui_help.bmp 111 133 112 After the computation, the result will be listed in the 'Theory' box in the 113 data explorer panel on the main window.The 'Up_frac_in' and 'Up_frac_out' are 114 the ratio, (spin up) /(spin up + spin down) neutrons before the sample and at 115 the analyzer, respectively. 134 After computation the result will appear in the *Theory* box in the SasView 135 *Data Explorer* panel. 116 136 117 *Note I: The values of 'Up_frac_in' and 'Up_frac_out' must be in the range 118 between 0 and 1. For example, both values are 0.5 for unpolarized neutrons.* 137 *Up_frac_in* and *Up_frac_out* are the ratio 119 138 120 *Note II: This computation is totally based on the pixel (or atomic) data 121 fixed in the xyz coordinates. Thus no angular orientational averaging is122 considered.* 139 (spin up) / (spin up + spin down) 140 141 of neutrons before the sample and at the analyzer, respectively. 123 142 124 *Note III: For the nuclear scattering length density, only the real component 143 *NOTE 1. The values of* Up_frac_in *and* Up_frac_out *must be in the range 144 0.0 to 1.0. Both values are 0.5 for unpolarized neutrons.* 145 146 *NOTE 2. This computation is totally based on the pixel (or atomic) data fixed 147 in xyz coordinates. No angular orientational averaging is considered.* 148 149 *NOTE 3. For the nuclear scattering length density, only the real component 125 150 is taken account.* 126 151 127 152 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 128 153 129 .. _ PDB_Data:154 .. _Using_PDB_Data: 130 155 131 PDB Data132 -------- 156 Using PDB Data 157 -------------- 133 158 134 This Generic scattering calculator also supports some pdb files without 135 considering polarized/magnetic scattering so that the related parameters 136 such as Up_*** will be ignored (see the Picture below). The calculation for 137 fixed orientation uses (the first) Equation above resulting in a 2D output, 138 whileas the scattering calculation averaged over all the orientations uses 139 the Debye equation providing a 1D output 159 The SAS Calculator tool can read some PDB, OMF or SLD files but ignores 160 polarized/magnetic scattering when doing so, thus related parameters such as 161 *Up_frac_in*, etc, will be ignored. 162 163 The calculation for fixed orientation uses Equation 1 above resulting in a 2D 164 output, whereas the scattering calculation averaged over all the orientations 165 uses the Debye equation below providing a 1D output 140 166 141 167 .. image:: gen_debye_eq.gif 142 168 143 where vj /beta/j /equiv/ bj the scattering length of the j'th atom. The resultant outputs 144 will be displayed in the DataExplorer for further uses. 169 where *v*\ :sub:`j` |beta|\ :sub:`j` |equiv| *b*\ :sub:`j` is the scattering 170 length of the j'th atom. The calculation output is passed to the *Data Explorer* 171 for further use. 145 172 146 173 .. image:: pdb_combo.jpg 174 175 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 176 177 .. note:: This help document was last changed by Steve King, 19Feb2015 -
src/sas/perspectives/calculator/media/sld_calculator_help.rst
rec392464 r850c753 14 14 The neutron scattering length density is defined as 15 15 16 SLD = (b_c1 + b_c2 + ... + b_cn) / Vm16 SLD = (b_c1 + b_c2 + ... + b_cn) / Vm 17 17 18 18 where … … 31 31 Entering a wavelength value is optional (a default value of 6.0 |Ang| will 32 32 be used). 33 34 TIPS! 33 35 34 36 * Formula strings consist of atoms and the number of them, such as "CaCO3+6H2O". … … 52 54 * Type "C[13]6 H[2]12 O[18]6" for C(13)6H(2)12O(18)6 (6 Carbon-13 atoms, 12 53 55 deuterium atoms, and 6 Oxygen-18 atoms). 56 57 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 58 59 .. note:: This help document was last changed by Steve King, 19Feb2015 60
Note: See TracChangeset
for help on using the changeset viewer.