Changeset 6271222 in sasview for src/sas


Ignore:
Timestamp:
Feb 19, 2015 9:16:39 AM (10 years ago)
Author:
smk78
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.
Message:

Merge branch 'master' of https://github.com/SasView/sasview.git

Location:
src/sas
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/sas/guiframe/documentation_window.py

    r573e7034 r78bcf3c3  
    2626            docs_path = os.path.join(PATH_APP, "doc") 
    2727 
     28        file_path = "file:///" + docs_path + "/" + path 
     29 
    2830        if not os.path.exists(docs_path): 
    2931            logging.error("Could not find Sphinx documentation at %s \ 
    3032            -- has it been built?", docs_path) 
    31  
    3233        elif wx_supports_html2: 
    3334            # Complete HTML/CSS support! 
    3435            self.view = html.WebView.New(self) 
    35             self.view.LoadURL("file://" + docs_path + '\\' + path) 
     36            self.view.LoadURL(file_path) 
    3637            self.Show() 
    3738        else:  
     
    4041            #Red hat used at SNS for which Wx 3.0 is not available.  This 
    4142            #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) 
    4544 
    4645  
  • src/sas/guiframe/gui_manager.py

    rf53cd30 r064723b  
    13531353        if config._do_acknowledge: 
    13541354            self._help_menu.AppendSeparator() 
     1355            id = wx.NewId() 
    13551356            self._help_menu.Append(id, '&Acknowledge', 'Acknowledging SasView') 
    13561357            wx.EVT_MENU(self, id, self._onAcknowledge) 
  • src/sas/perspectives/calculator/media/resolution_calculator_help.rst

    rbc9a0e1 r850c753  
    2323------ 
    2424 
    25 1) Select *SAS Resolution Esimator* from the *Tool* menu on the SasView toolbar. 
     251) Select *SAS Resolution Estimator* from the *Tool* menu on the SasView toolbar. 
    2626 
    27272) Select the source (Neutron or Photon) and source type (Monochromatic or TOF). 
     
    3333   careful to note that distances are specified in cm! 
    3434 
    35 4) Enter values for the source wavelength(s) and its spread (= FWHM / wavelength). 
     354) Enter values for the source wavelength(s), |lambda|\ , and its spread (= FWHM/|lambda|\ ). 
    3636    
    3737   For monochromatic sources, the inputs are just one value. For TOF sources,  
     
    6262   region near the beam block/stop  
    6363 
    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]  
    6565 
    6666   the variance is slightly under estimated. 
  • src/sas/perspectives/calculator/media/sas_calculator_help.rst

    rec392464 r850c753  
    1717================================== 
    1818 
    19 Polarization and Magnetic Scattering 
     19Nuclear_Scattering_ 
    2020 
    21 Theory_  
    22 GUI_  
    23 PDB_Data_  
     21Magnetic_Scattering_Polarisation_ 
     22 
     23Using_the_SAS_Calculator_GUI_ 
     24 
     25Using_PDB_Data_ 
    2426 
    2527.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    2628 
    27 .. _Theory: 
     29.. _Nuclear_Scattering: 
    2830 
    29 Theory 
    30 ------ 
     31Nuclear Scattering 
     32------------------ 
    3133 
    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 
     34In general, a particle with a volume *V* can be described by an ensemble  
     35containing *N* 3-dimensional rectangular pixels where each pixel is much  
     36smaller than *V*. 
     37 
     38Assuming that all the pixel sizes are the same, the elastic scattering  
     39intensity from the particle is 
    3640 
    3741.. image:: gen_i.gif 
    3842 
    39 where /beta/jand rj are the scattering length density and the position of the  
    40 j'th pixel respectively. And the total volume 
     43Equation 1. 
     44 
     45where |beta|\ :sub:`j` and *r*\ :sub:`j` are the scattering length density and  
     46the position of the j'th pixel respectively. 
     47 
     48The total volume *V* 
    4149 
    4250.. image:: v_j.gif 
    4351 
    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). 
     52for |beta|\ :sub:`j` |noteql|\0 where *v*\ :sub:`j` is the volume of the j'th  
     53pixel (or the j'th natural atomic volume (= atomic mass / (natural molar  
     54density * Avogadro number) for the atomic structures). 
     55 
     56*V* can be corrected by users. This correction is useful especially for an  
     57atomic 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  
     60affect the scattering computation if the correction of the total volume V is made.* 
     61 
     62The scattering length density (SLD) of each pixel, where the SLD is uniform, is  
     63a combination of the nuclear and magnetic SLDs and depends on the spin states  
     64of the neutrons as follows. 
     65 
     66.. _Magnetic_Scattering_Polarisation: 
     67 
     68Magnetic Scattering & Polarisation 
     69---------------------------------- 
     70 
     71For magnetic scattering, only the magnetization component, *M*\ :sub:`perp`\ ,  
     72perpendicular to the scattering vector *Q* contributes to the magnetic  
     73scattering length. 
    5574 
    5675.. image:: mag_vector.bmp 
     
    6079.. image:: dm_eq.gif 
    6180 
    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. 
     81where the gyromagnetic ratio |gamma| = -1.913, |mu|\ :sub:`B` is the Bohr  
     82magneton, *r*\ :sub:`0` is the classical radius of electron, and |sigma| is the  
     83Pauli spin. 
    6484 
    65 For polarized neutron, the magnetic scattering is depending on the spin states. 
     85For a polarized neutron, the magnetic scattering is depending on the spin states. 
    6686 
    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  
     87Let us consider that the incident neutrons are polarised both parallel (+) and  
     88anti-parallel (-) to the x' axis (see below). The possible states after  
     89scattering from the sample are then  
    7090 
    71 - Non-spin flips: (+ +) and (- -) 
    72 - Spin flips:     (+ -) and (- +) 
     91* Non-spin flips: (+ +) and (- -) 
     92* Spin flips:     (+ -) and (- +) 
    7393 
    7494.. image:: gen_mag_pic.bmp 
    7595 
    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,  
     96Now let us assume that the angles of the *Q* vector and the spin-axis (x')  
     97to the x-axis are |phi| and |theta|\ :sub:`up` respectively (see above). Then,  
    7898depending 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 
     99length densities, including the nuclear scattering length density (|beta|\ :sub:`N`\ )  
     100are given as 
    81101 
    82 .. image:: sld1.gif 
     102*  for non-spin-flips 
    83103 
    84 and for spin-flips 
     104   .. image:: sld1.gif 
    85105 
    86 .. image:: sld2.gif 
     106*  for spin-flips 
     107 
     108   .. image:: sld2.gif 
    87109 
    88110where 
     
    98120.. image:: mqy.gif 
    99121 
    100 Here, the M0x, M0yand M0zare the x, y and z components of the magnetisation  
    101 vector given in the xyz lab frame.  
     122Here the *M0*\ :sub:`x`\ , *M0*\ :sub:`y` and *M0*\ :sub:`z` are the x, y and z  
     123components of the magnetisation vector in the laboratory xyz frame.  
    102124 
    103125.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    104126 
    105 .. _GUI: 
     127.. _Using_the_SAS_Calculator_GUI: 
    106128 
    107 GUI 
    108 --- 
     129Using the SAS Calculator GUI 
     130---------------------------- 
    109131 
    110132.. image:: gen_gui_help.bmp 
    111133 
    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. 
     134After computation the result will appear in the *Theory* box in the SasView   
     135*Data Explorer* panel. 
    116136 
    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  
    119138 
    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.* 
     139   (spin up) / (spin up + spin down) 
     140   
     141of neutrons before the sample and at the analyzer, respectively. 
    123142 
    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  
     1440.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  
     147in xyz coordinates. No angular orientational averaging is considered.* 
     148 
     149*NOTE 3. For the nuclear scattering length density, only the real component  
    125150is taken account.* 
    126151 
    127152.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    128153 
    129 .. _PDB_Data: 
     154.. _Using_PDB_Data: 
    130155 
    131 PDB Data 
    132 -------- 
     156Using PDB Data 
     157-------------- 
    133158 
    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 
     159The SAS Calculator tool can read some PDB, OMF or SLD files but ignores  
     160polarized/magnetic scattering when doing so, thus related parameters such as  
     161*Up_frac_in*, etc, will be ignored. 
     162 
     163The calculation for fixed orientation uses Equation 1 above resulting in a 2D  
     164output, whereas the scattering calculation averaged over all the orientations  
     165uses the Debye equation below providing a 1D output 
    140166 
    141167.. image:: gen_debye_eq.gif 
    142168 
    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. 
     169where *v*\ :sub:`j` |beta|\ :sub:`j` |equiv| *b*\ :sub:`j` is the scattering  
     170length of the j'th atom. The calculation output is passed to the *Data Explorer*  
     171for further use. 
    145172 
    146173.. 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  
    1414The neutron scattering length density is defined as 
    1515 
    16 SLD = (b_c1 + b_c2 + ... + b_cn) / Vm 
     16  SLD = (b_c1 + b_c2 + ... + b_cn) / Vm 
    1717 
    1818where  
     
    3131Entering a wavelength value is optional (a default value of 6.0 |Ang| will  
    3232be used). 
     33 
     34TIPS! 
    3335 
    3436*  Formula strings consist of atoms and the number of them, such as "CaCO3+6H2O". 
     
    5254*  Type "C[13]6 H[2]12 O[18]6" for C(13)6H(2)12O(18)6 (6 Carbon-13 atoms, 12  
    5355   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.