Changeset 78f02c3 in sasview for src/sas/calculator
- Timestamp:
- Feb 14, 2015 10:12:40 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:
- 898a8b9
- Parents:
- 3e2ebbb
- Location:
- src/sas/calculator/media
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/calculator/media/density_calculator_help.rst
r37bbd5f r78f02c3 1 1 ..density_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. 2 5 3 6 Density/Volume Calculator Tool 4 7 ============================== 5 8 6 Placeholder for density calculator help 9 Description 10 ----------- 11 12 This tool is to calculate the mass density from the molar volume or vice 13 versa. To calculate the mass density, the chemical formula and molar volume 14 should be provided. 15 16 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 17 18 How To 19 ------ 20 21 1. Molecular Formula: The chemical formula of ONE molecule or ONE atom. For 22 mixtures, the ratio of the each molecules should be used; for example, 23 (H2O)0.5(D2O)0.5. 24 25 2. Select input (molar volume or mass density) from combobox. Then type in the 26 input value. 27 28 3. Click the 'Calculate' button to perform the calculation. 29 30 4. Outputs also include the molar mass (weight) that depends only on the 31 chemical formula 32 33 .. image:: density_tutor.gif -
src/sas/calculator/media/kiessig_calculator_help.rst
r37bbd5f r78f02c3 1 1 ..kiessig_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. 2 5 3 6 Kiessig Thickness Calculator Tool 4 7 ================================= 5 8 6 Placeholder for Kiessig calculator help 9 Description 10 ----------- 11 12 This tool is to approximately estimate the thickness of a layer or the 13 diameter of particles from the Kiessig fringe in SAS/NR data, and using the 14 Kiessig relation 15 16 thickness = 2*Pi/fringe_width. 17 18 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 19 20 21 How To 22 ------ 23 24 To get a rough thickness or particle size, just type the Kiessig fringe width 25 (in units of 1/Angstrom) and click on the 'Compute' button. Then the output 26 value will be show up in the 'Thickness' text box. -
src/sas/calculator/media/resolution_calculator_help.rst
r37bbd5f r78f02c3 1 1 ..resolution_calculator_help.rst 2 2 3 Resolution Calculator 4 ===================== 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 5 6 Placeholder for resolution calculator help 6 Q Resolution Estimator 7 ====================== 8 9 Description 10 ----------- 11 12 This tool is to approximately estimate the resolution of Q based on the SAS 13 instrumental parameter values assuming that the detector is flat and vertical 14 to the incident beam direction. 15 16 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 17 18 How To 19 ------ 20 21 1. Select the source and source type (Monochromatic or TOF). Note that the 22 computational difference between the sources is only the gravitational 23 contribution due to the mass. 24 25 2. Change the default values of the instrumental parameters as desired. 26 27 3. The input formats of wavelength and its spread (=FWHM/wavelength) depend on 28 the source type.For monochromatic wave, the inputs are just one values as shown 29 with the defaults.For TOF, the min and max values should be separated by "-" 30 to describe the wavelength band range. Optionally, the input of the wavelength 31 (NOT of the wavelength spread) could be extended by adding "; --" where the -- 32 is the number of the bins for the numerical integration. Otherwise, the 33 default value "10" bins will be used. The same number of bins will be used 34 for the corresponding wavelength spread in either cases. 35 36 4. For TOF, the default wavelength spectrum is flat. The custom spectrum file 37 (with 2 column text: wavelength(A) vs. intensity) can also be loaded by 38 selecting "Add new" in the combobox. 39 40 5. Once set all the input values, click the compute button. Depending on 41 computation loads the calculation time will vary. 42 43 6. 1D and 2D dQ will be displayed in the text-box at the bottom of the panel. 44 Two dimensional resolution weight distribution (2D elliptical Gaussian 45 function) will also be displayed in the plot panel even if the Q inputs are 46 outside of the detector limit. The red lines indicate the limits of the 47 detector (if a green lines appear (for TOF), it indicates the limits of the 48 maximum q range for the largest wavelength due to the size of the detector). 49 Note that the effect from the beam block is ignored, so in the small q region 50 near the beam block 51 52 [ie., q<2*pi*(beam block diameter) / (sample to detector distance) / lamda_min] 53 54 the variance is slightly under estimated. 55 56 7. The summary can be accessed by clicking the 'light-bulb' icon at the bottom 57 of the SasView main window. 58 59 .. image:: resolution_tutor.gif 60 61 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 62 63 Theory 64 ------ 65 66 The scattering wave transfer vector is by definition 67 68 .. image:: q.gif 69 70 In the limit of the small angle, the variance of q in the first order 71 approximation is 72 73 .. image:: sigma_q.gif 74 75 In summary, the geometric and gravitational contributions depending on the 76 shape of each factors can be expressed as shown the table. 77 78 .. image:: sigma_table.gif 79 80 Finally, we use a Gaussian function to describe the 2D weighting distribution 81 of the uncertainty in q. 82 83 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 84 85 References 86 ---------- 87 D.F.R. Mildner and J.M. Carpenter, J. Appl. Cryst. 17, 249-256 (1984) 88 89 D.F.R. Mildner, J.M. Carpenter and D.L. Worcester, J. Appl. Cryst. 19, 311-319 90 (1986) -
src/sas/calculator/media/sas_calculator_help.rst
r37bbd5f r78f02c3 1 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 6 .. |beta| unicode:: U+03B2 7 .. |gamma| unicode:: U+03B3 8 .. |theta| unicode:: U+03B8 9 .. |mu| unicode:: U+03BC 10 .. |sigma| unicode:: U+03C3 11 .. |phi| unicode:: U+03C6 12 13 .. |equiv| unicode:: U+2261 14 .. |noteql| unicode:: U+2260 2 15 3 16 Generic Scattering Calculator Tool 4 17 ================================== 5 18 6 Placeholder for generic SAS calculator help 19 Polarization and Magnetic Scattering 20 21 Theory_ 22 GUI_ 23 PDB_Data_ 24 25 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 26 27 .. _Theory: 28 29 Theory 30 ------ 31 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 36 37 .. image:: gen_i.gif 38 39 where /beta/jand rj are the scattering length density and the position of the 40 j'th pixel respectively. And the total volume 41 42 .. image:: v_j.gif 43 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). 55 56 .. image:: mag_vector.bmp 57 58 The magnetic scattering length density is then 59 60 .. image:: dm_eq.gif 61 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. 64 65 For polarized neutron, the magnetic scattering is depending on the spin states. 66 67 Let's consider that the incident neutrons are polarised parallel (+)/ 68 anti-parallel (-) to the x' axis (See both Figures above). The possible 69 out-coming states then are + and - states for both incident states, where 70 71 - Non-spin flips: (+ +) and (- -) 72 - Spin flips: (+ -) and (- +) 73 74 .. image:: gen_mag_pic.bmp 75 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, 78 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-flips 81 82 .. image:: sld1.gif 83 84 and for spin-flips 85 86 .. image:: sld2.gif 87 88 where 89 90 .. image:: mxp.gif 91 92 .. image:: myp.gif 93 94 .. image:: mzp.gif 95 96 .. image:: mqx.gif 97 98 .. image:: mqy.gif 99 100 Here, the M0x, M0yand M0zare the x, y and z components of the magnetisation 101 vector given in the xyz lab frame. 102 103 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 104 105 .. _GUI: 106 107 GUI 108 --- 109 110 .. image:: gen_gui_help.bmp 111 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. 116 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.* 119 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 is 122 considered.* 123 124 *Note III: For the nuclear scattering length density, only the real component 125 is taken account.* 126 127 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 128 129 .. _PDB_Data: 130 131 PDB Data 132 -------- 133 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 140 141 .. image:: gen_debye_eq.gif 142 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. 145 146 .. image:: pdb_combo.jpg -
src/sas/calculator/media/sld_calculator_help.rst
r2dee849 r78f02c3 1 1 ..sld_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. 2 5 3 6 SLD Calculator Tool 4 7 =================== 5 8 6 Placeholder for SLD calculator help 9 Description 10 ----------- 11 12 The neutron scattering length density is defined as 13 14 SLD = (b_c1 +b_c2+...+b_cn )/Vm 15 16 where 17 18 b_ci is the bound coherent scattering length of ith of n atoms in a molecule 19 with the molecular volume Vm 20 21 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 22 23 How to Format the Compound Name 24 ------------------------------- 25 26 To calculate scattering length densities enter a compound and a mass density 27 and click "Calculate". Entering a wavelength value is optional (a default 28 value of 6.0 Angstroms will be used). 29 30 * Formula strings consist of counts and atoms such as "CaCO3+6H2O". 31 32 * Groups can be separated by *'+'* or *space*, so "CaCO3 6H2O" works as well. 33 34 * Groups and be defined using parentheses, such as "CaCO3(H2O)6". 35 36 * Parentheses can be nested, such as "(CaCO3(H2O)6)1". 37 38 * Isotopes are represented by their index, e.g., "CaCO[18]3+6H2O", H[1], or 39 H[2]. 40 41 * Counts can be integer or decimal, e.g. "CaCO3+(3HO0.5)2". 42 43 * Other compositions can be calculated as well, for example, for a 70-30 44 mixture of H2O/D2O write *H14O7+ D6O3* or more simply *H7D3O5* (i.e. this says 45 7 hydrogens, 3 deuteriums, and 5 oxygens) and the mass density calculated 46 based on the percentages of H and D. 47 48 * Type *C[13]6 H[2]12 O[18]6* for C(13)6H(2)12O(18)6 (6 Carbon-13 atoms, 12 49 deuterium atoms, and 6 Oxygen-18 atoms) -
src/sas/calculator/media/slit_calculator_help.rst
r37bbd5f r78f02c3 1 1 ..slit_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. 2 5 3 6 Slit Size Calculator Tool 4 7 ========================= 5 8 6 Placeholder for slit calculator help 9 Description 10 ----------- 11 This tool is for X-ray users to calculate the slit size (FWHM/2) for smearing 12 based on their half beam profile data (SAXSess). 13 14 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 15 16 How To 17 ------- 18 To calculate the slit size (FWHM/2), just load the beam profile data using the 19 browse button. 20 21 Once a data is loaded, the slit size will be computed and show up in the text 22 box. 23 24 Because the unit is not specified in the data file, we do not convert it into 25 1/Angstrom so users are responsible for converting the units of their data. 26 27 Note: This slit size calculator only works for beam profile data produced by 28 'SAXSess'. 29 30 To see the file format, check the file, 'beam profile.DAT', in the 'test' 31 folder of SasView.
Note: See TracChangeset
for help on using the changeset viewer.