Changeset 78f02c3 in sasview


Ignore:
Timestamp:
Feb 14, 2015 12:12:40 PM (9 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:
898a8b9
Parents:
3e2ebbb
Message:

Level 1 sphinx-ready commit of remaining help files

Location:
src/sas
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • src/sas/calculator/media/density_calculator_help.rst

    r37bbd5f r78f02c3  
    11..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. 
    25 
    36Density/Volume Calculator Tool 
    47============================== 
    58 
    6 Placeholder for density calculator help 
     9Description 
     10----------- 
     11 
     12This tool is to calculate the mass density from the molar volume or vice  
     13versa. To calculate the mass density, the chemical formula and molar volume  
     14should be provided. 
     15 
     16.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     17 
     18How To 
     19------ 
     20 
     211. Molecular Formula: The chemical formula of ONE molecule or ONE atom. For  
     22mixtures, the ratio of the each molecules should be used; for example,  
     23(H2O)0.5(D2O)0.5. 
     24 
     252. Select input (molar volume or mass density) from combobox. Then type in the  
     26input value. 
     27 
     283. Click the 'Calculate' button to perform the calculation. 
     29 
     304. Outputs also include the molar mass (weight) that depends only on the  
     31chemical formula 
     32 
     33.. image:: density_tutor.gif 
  • src/sas/calculator/media/kiessig_calculator_help.rst

    r37bbd5f r78f02c3  
    11..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. 
    25 
    36Kiessig Thickness Calculator Tool 
    47================================= 
    58 
    6 Placeholder for Kiessig calculator help 
     9Description 
     10----------- 
     11 
     12This tool is to approximately estimate the thickness of a layer or the  
     13diameter of particles from the Kiessig fringe in SAS/NR data, and using the  
     14Kiessig relation 
     15 
     16thickness = 2*Pi/fringe_width. 
     17   
     18.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     19 
     20 
     21How To 
     22------ 
     23 
     24To 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  
     26value will be show up in the 'Thickness' text box. 
  • src/sas/calculator/media/resolution_calculator_help.rst

    r37bbd5f r78f02c3  
    11..resolution_calculator_help.rst 
    22 
    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. 
    55 
    6 Placeholder for resolution calculator help 
     6Q Resolution Estimator 
     7====================== 
     8 
     9Description 
     10----------- 
     11 
     12This tool is to approximately estimate the resolution of Q based on the SAS  
     13instrumental parameter values assuming that the detector is flat and vertical  
     14to the incident beam direction. 
     15 
     16.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     17 
     18How To 
     19------ 
     20 
     211. Select the source and source type (Monochromatic or TOF). Note that the  
     22computational difference between the sources is only the gravitational  
     23contribution due to the mass. 
     24 
     252. Change the default values of the instrumental parameters as desired. 
     26 
     273. The input formats of wavelength and its spread (=FWHM/wavelength) depend on  
     28the source type.For monochromatic wave, the inputs are just one values as shown  
     29with the defaults.For TOF, the min and max values should be separated by "-"  
     30to describe the wavelength band range. Optionally, the input of the wavelength  
     31(NOT of the wavelength spread) could be extended by adding "; --" where the --  
     32is the number of the bins for the numerical integration. Otherwise, the  
     33default value "10" bins will be used. The same number of bins will be used  
     34for the corresponding wavelength spread in either cases. 
     35 
     364. 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  
     38selecting "Add new" in the combobox. 
     39 
     405. Once set all the input values, click the compute button. Depending on  
     41computation loads the calculation time will vary. 
     42 
     436. 1D and 2D dQ will be displayed in the text-box at the bottom of the panel.  
     44Two dimensional resolution weight distribution (2D elliptical Gaussian  
     45function) will also be displayed in the plot panel even if the Q inputs are  
     46outside of the detector limit. The red lines indicate the limits of the  
     47detector (if a green lines appear (for TOF), it indicates the limits of the  
     48maximum q range for the largest wavelength due to the size of the detector).  
     49Note that the effect from the beam block is ignored, so in the small q region  
     50near the beam block  
     51 
     52[ie., q<2*pi*(beam block diameter) / (sample to detector distance) / lamda_min]  
     53 
     54the variance is slightly under estimated. 
     55 
     567. The summary can be accessed by clicking the 'light-bulb' icon at the bottom  
     57of the SasView main window. 
     58 
     59.. image:: resolution_tutor.gif 
     60 
     61.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     62 
     63Theory 
     64------ 
     65 
     66The scattering wave transfer vector is by definition 
     67 
     68.. image:: q.gif 
     69 
     70In the limit of the small angle, the variance of q in the first order  
     71approximation is 
     72 
     73.. image:: sigma_q.gif 
     74 
     75In summary, the geometric and gravitational contributions depending on the  
     76shape of each factors can be expressed as shown the table. 
     77 
     78.. image:: sigma_table.gif 
     79 
     80Finally, we use a Gaussian function to describe the 2D weighting distribution  
     81of the uncertainty in q. 
     82 
     83.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     84 
     85References 
     86---------- 
     87D.F.R. Mildner and J.M. Carpenter, J. Appl. Cryst. 17, 249-256 (1984) 
     88 
     89D.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  
    11..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 
    215 
    316Generic Scattering Calculator Tool 
    417================================== 
    518 
    6 Placeholder for generic SAS calculator help 
     19Polarization and Magnetic Scattering 
     20 
     21Theory_  
     22GUI_  
     23PDB_Data_  
     24 
     25.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     26 
     27.. _Theory: 
     28 
     29Theory 
     30------ 
     31 
     32In general, a particle with a volume V can be described by an ensemble  
     33containing N 3-dimensional rectangular pixels where each pixels are much  
     34smaller than V. Assuming that all the pixel sizes are same, the elastic  
     35scattering intensity by the particle 
     36 
     37.. image:: gen_i.gif 
     38 
     39where /beta/jand rj are the scattering length density and the position of the  
     40j'th pixel respectively. And the total volume 
     41 
     42.. image:: v_j.gif 
     43 
     44for /beta/j/noteql/0 where vj is the volume of the j'th pixel (or the j'th  
     45natural atomic volume (= atomic mass/natural molar density/Avogadro number) for  
     46the atomic structures). The total volume V can be corrected by users. This  
     47correction is useful especially for an atomic structure (taken from a pdb file)  
     48to get the right normalization. Note that the /beta/j displayed in GUI may be  
     49incorrect but will not affect the scattering computation if the correction of  
     50the total volume is made. The scattering length density (SLD) of each pixel  
     51where the SLD is uniform, is a combination of the nuclear and magnetic SLDs and  
     52depends on the spin states of the neutrons as follows:For magnetic scattering,  
     53only the magnetization component, *M*perp, perpendicular to the scattering  
     54vector *Q* contributes to the the magnetic scattering length. (Figure below). 
     55 
     56.. image:: mag_vector.bmp 
     57 
     58The magnetic scattering length density is then 
     59 
     60.. image:: dm_eq.gif 
     61 
     62where /gamma/= -1.913 the gyromagnetic ratio, /mu/B is the Bohr magneton, r0 is  
     63the classical radius of electron, and */sigma/* is the Pauli spin. 
     64 
     65For polarized neutron, the magnetic scattering is depending on the spin states. 
     66 
     67Let's consider that the incident neutrons are polarised parallel (+)/  
     68anti-parallel (-) to the x' axis (See both Figures above). The possible  
     69out-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 
     76Now, let's assume that the angles of the *Q*  vector and the spin-axis (x')  
     77from x-axis are /phi/ and /theta/up respectively (See Figure above). Then,  
     78depending upon the polarization (spin) state of neutrons, the scattering  
     79length densities, including the nuclear scattering length density (/beta/N)  
     80are given as, for non-spin-flips 
     81 
     82.. image:: sld1.gif 
     83 
     84and for spin-flips 
     85 
     86.. image:: sld2.gif 
     87 
     88where 
     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 
     100Here, the M0x, M0yand M0zare the x, y and z components of the magnetisation  
     101vector given in the xyz lab frame.  
     102 
     103.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     104 
     105.. _GUI: 
     106 
     107GUI 
     108--- 
     109 
     110.. image:: gen_gui_help.bmp 
     111 
     112After the computation, the result will be listed in the 'Theory' box in the  
     113data explorer panel on the main window.The 'Up_frac_in' and 'Up_frac_out' are  
     114the ratio, (spin up) /(spin up + spin down) neutrons before the sample and at  
     115the analyzer, respectively. 
     116 
     117*Note I: The values of 'Up_frac_in' and 'Up_frac_out' must be in the range  
     118between 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  
     121fixed in the xyz coordinates. Thus no angular orientational averaging is  
     122considered.* 
     123 
     124*Note III: For the nuclear scattering length density, only the real component  
     125is taken account.* 
     126 
     127.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     128 
     129.. _PDB_Data: 
     130 
     131PDB Data 
     132-------- 
     133 
     134This Generic scattering calculator also supports some pdb files without  
     135considering polarized/magnetic scattering so that the related parameters  
     136such as Up_*** will be ignored (see the Picture below). The calculation for  
     137fixed orientation uses (the first) Equation above resulting in a 2D output,  
     138whileas the scattering calculation averaged over all the orientations uses  
     139the Debye equation providing a 1D output 
     140 
     141.. image:: gen_debye_eq.gif 
     142 
     143where vj /beta/j /equiv/ bj the scattering length of the j'th atom. The resultant outputs  
     144will be displayed in the DataExplorer for further uses. 
     145 
     146.. image:: pdb_combo.jpg 
  • src/sas/calculator/media/sld_calculator_help.rst

    r2dee849 r78f02c3  
    11..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. 
    25 
    36SLD Calculator Tool 
    47=================== 
    58 
    6 Placeholder for SLD calculator help 
     9Description 
     10----------- 
     11 
     12The neutron scattering length density is defined as 
     13 
     14SLD = (b_c1 +b_c2+...+b_cn )/Vm 
     15 
     16where  
     17 
     18b_ci is the bound coherent scattering length of ith of n atoms in a molecule  
     19with the molecular volume Vm 
     20 
     21.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     22 
     23How to Format the Compound Name 
     24------------------------------- 
     25 
     26To calculate scattering length densities enter a compound and a mass density  
     27and click "Calculate". Entering a wavelength value is optional (a default  
     28value 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  
     39H[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  
     44mixture of H2O/D2O write *H14O7+ D6O3* or more simply *H7D3O5* (i.e. this says  
     457 hydrogens, 3 deuteriums, and 5 oxygens) and the mass density calculated  
     46based 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  
     49deuterium atoms, and 6 Oxygen-18 atoms) 
  • src/sas/calculator/media/slit_calculator_help.rst

    r37bbd5f r78f02c3  
    11..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. 
    25 
    36Slit Size Calculator Tool 
    47========================= 
    58 
    6 Placeholder for slit calculator help 
     9Description 
     10----------- 
     11This tool is for X-ray users to calculate the slit size (FWHM/2) for smearing  
     12based on their half beam profile data (SAXSess). 
     13 
     14.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     15 
     16How To 
     17------- 
     18To calculate the slit size (FWHM/2), just load the beam profile data using the  
     19browse button. 
     20 
     21Once a data is loaded, the slit size will be computed and show up in the text  
     22box. 
     23 
     24Because the unit is not specified in the data file, we do not convert it into  
     251/Angstrom so  users are responsible for converting the units of their data. 
     26 
     27Note: This slit size calculator only works for beam profile data produced by  
     28'SAXSess'. 
     29 
     30To see the file format, check the file, 'beam profile.DAT', in the 'test'  
     31folder of SasView. 
  • src/sas/data_util/media/data_operator_help.rst

    r37bbd5f r78f02c3  
    11..data_operator_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. 
    25 
    36Data Operations Tool 
    47==================== 
    58 
    6 Placeholder for data operator help 
     9Description 
     10----------- 
     11This dialog panel provides arithmetic operations between two data sets (the  
     12last data set could be a number). 
     13 
     14When the data1 and data2 are selected, their x (or qx and qy for 2D) value(s)  
     15must match with each other. 
     16 
     17.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     18 
     19How To 
     20------ 
     211. Type the data name resulted from an operation. 
     22 
     232) Select a data/theory in the drop down menus. When data2 is set to number,  
     24type a number in the text control box. 
     25 
     263) Select an arithmetic operator symbol; + (for addition), - (for subtraction),  
     27* (for multiplication), / (for division), and | (for combination of two data  
     28sets). 
     29 
     30If two data sets do not match, the operation will fail and the background color  
     31of the combo box items will turn to red (WIN only). 
     32 
     334) If the operation is successful, hit the Apply button to make the new data. 
     34Then the data name will be shown up in the data box in the data explorer. 
     35 
     36Note: The errors and warnings will be displayed at the bottom of the SasView  
     37window. 
     38 
     39.. image:: data_oper_pic.png 
     40 
  • src/sas/fit/media/fitting_help.rst

    r37bbd5f r78f02c3  
    11..fitting_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.. |mu| unicode:: U+03BC 
     9.. |sigma| unicode:: U+03C3 
     10.. |phi| unicode:: U+03C6 
     11.. |theta| unicode:: U+03B8 
    212 
    313Fitting Perspective 
    414=================== 
    515 
    6 Placeholder for fitting help 
     16Load_a_File_ 
     17Single_Fit_ 
     18Simultaneous_Fitting_ 
     19Batch_Fitting_ 
     20Model_Selection_ 
     21Model_Category_Manager_ 
     22Model_Functions_ 
     23Custom_Model_Editor_ 
     24Polydispersity_Distributions_ 
     25Smearing_Computation_ 
     26Polarisation/Magnetic_Scattering_ 
     27Key_Combinations_ 
     28Status_Bar_Help_ 
     29 
     30.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     31 
     32..  _Load_a_File: 
     33 
     34Load a File 
     35----------- 
     36 
     37From Menu go to *Data* -> *Load Data File(or Folder)* . Select a file/folder  
     38from the menu bar and click on Open button. Data contained in the file will be  
     39displayed. To cancel the loading click on *cancel* . In case a file can not be  
     40loaded, an error message will be displayed on the statusbar. 
     41 
     42.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     43 
     44.. _Single_Fit: 
     45 
     46Single Fit 
     47---------- 
     48 
     49One of two fit-engines can be chosen from the Fitting menu bar. The Simple Fit- 
     50engine uses Scipy's leasqr and the Complex Fit-Engine is a custom optimizer  
     51that provides a better chance to find the global minimum of the chi2 but that  
     52requires longer computation time. In order to set a data to a control panel  
     53(FitPage), see the "DataLoader Help". Once a data set to the FiPage, select a  
     54model from the combo box. The default parameters of the model will be display.  
     55Set initial parameters if need. Check and uncheck parameters to fit/fix. Click  
     56the *'Fit'*  button. When the fitting is finished, the resultant parameter  
     57values will be displayed with the errors. If a error is missing, it generally  
     58means that the corresponding parameter is not very depending on the model. The  
     59chisq/Npt_fit and the plot associated with the fit operation will be also  
     60updated. 
     61 
     62.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     63 
     64..  _Simultaneous_Fitting: 
     65 
     66Simultaneous Fitting 
     67-------------------- 
     68 
     69This fitting option enables to set a number of the constraints between the  
     70parameters of fitting(s). It requires one or more FitPages with a data and a  
     71model set for the fitting, and performs multiple fittings given by the  
     72FitPage(s). The Complex (ParkMC) FitEngine will be used automatically. 
     73 
     74Simultaneous Fit without Constraint 
     75 
     76Assuming some FitPages are already set up, check the checkboxes of the  
     77model_data rows to fit. And click the 'Fit' button. The results will return to  
     78each FitPages. 
     79 
     80Note that the chi2/Npts returned is the sum of the chi2/Npts of each fits. If one needs the chi2 value only for a page, click the 'Compute' button in the FitPage to recalculate. 
     81 
     82Simultaneous Fit with Constraint 
     83 
     84Enter constraint in the text control next to *constraint fit*  button.  
     85Constraint should be of type model1 parameter name = f(model2 parameter name)  
     86for example, M0.radius=2*M1.radius. Many constraints can be entered for a  
     87single fit. Each of them should be separated by a newline charater or ";"  
     88The easy setup can generate many constraint inputs easily when the selected  
     89two models are the same type. 
     90 
     91Note that the chi2/Npts returned is the sum of the chi2/Npts of each fits.  
     92If one needs the chi2 value only for one fit, click the 'Compute' button in  
     93the FitPage to recalculate. 
     94 
     95.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     96 
     97..  _Batch_Fitting: 
     98 
     99Batch Fitting 
     100------------- 
     101 
     102.. _Batch_Fit_ 
     103.. _Batch_Window_ 
     104.. _Edit_Grid_  
     105.. _Save_Grid_  
     106.. _Open_Batch_Results_  
     107.. _Plot_  
     108.. _View_Column/Cell(s)_  
     109 
     110.. _Batch_Fit: 
     111 
     112Batch Fit 
     113---------  
     114 
     115Create a *Batch Page* by selecting the *Batch* radio button on the DataExplorer 
     116(see figure below) and for a new control page select 'New FitPage' in the  
     117Fitting menubar. 
     118 
     119.. image:: batch_button_area.bmp 
     120 
     121Figure 1: MenuBar:  
     122 
     123Load Data to the DataExplorer if not already loaded. 
     124 
     125Select one or more data sets by checking the check boxes, and then make sure  
     126that "Fitting" is selected in the dropdown menu next to the "Send To" button.  
     127Once ready, click the 'Send To' button to set data to a BatchPage. If already  
     128an empty batch page exists, it will be set there. Otherwise it will create a  
     129new Batch Page. Set up the model and the parameter values as same as a single  
     130fitting (see Single Fit help) <Single_Fit_>. Then use 'Fit' button to  
     131perform the fitting. 
     132 
     133Unlike a single fit, the results of the fittings will not return to the  
     134BatchPage'. Instead, a Grid window will be provided once the fitting is  
     135completed. The Grid window is also accessible from the 'View' menu  
     136(see Figure 2). 
     137 
     138Note that only one model is used for all the data. The initial parameter  
     139values given in the control page will be used all the data fittings. If one  
     140wants the FitEngine to use the initial values from the results of the  
     141previous data fitting (if any), choose the 'Chain Fitting' option in the  
     142Fitting menubar, which will speed up the fitting especially when you have  
     143lots of, and similar, data sets. 
     144 
     145.. _Batch_Window: 
     146 
     147Batch Window 
     148------------ 
     149Batch Window provides an easy way to view the fit results, i.e., plot data,  
     150fits, and residuals. Batch window will be automatically shown after a batch  
     151fit is finished. 
     152 
     153Once closed, it can be opened anytime from the "View" menubar item (see  
     154Figure 2). 
     155 
     156.. image:: restore_batch_window.bmp 
     157 
     158Figure 2: Edit Menu:  
     159 
     160.. _Edit_Grid: 
     161 
     162Edit Grid 
     163--------- 
     164 
     165Once a batch fit is completed, all fitted and fixed model parameters are  
     166displayed to the current sheet of the batch window except the errors of the  
     167parameters. To view the errors, click on a given column then under *Edit*   
     168menubar item, and insert the desired parameter by selecting a menu item with  
     169the appropriated label. Empty column can be inserted in the same way. A  
     170column value can be customized by editing an existing empty column. 
     171 
     172To Remove column from the grid, select it, choose edit menu, and click the  
     173*'remove'*  menu item. Any removed column should reinserted whenever needed. 
     174 
     175All above options are also available when right clicking on a given column  
     176label(see Figure 3). 
     177 
     178*Note:*  A column always needs to be selected in order to remove or insert a  
     179column in the grid. 
     180 
     181.. image:: edit_menu.bmp 
     182 
     183Figure 3: Edit Menu: 
     184 
     185.. _Save_Grid: 
     186 
     187Save Grid 
     188--------- 
     189To save the current page on the batch window, select the *'File'*  menubar  
     190item(see Figure 4), then choose the *'Save as'*  menu item to save it as a  
     191.csv file. 
     192 
     193 *Note:* The grid doesn't save the data array, fits, and the array residuals.  
     194 As a result, the 'View (fit) Results' functionality will be lost when  
     195 reloading the saved file. 
     196 
     197Warning! To ensure accuracy of saved fit results, it is recommended to save  
     198the current grid before modifying it . 
     199 
     200.. _Open_Batch_Results: 
     201 
     202Open Batch Results  
     203------------------ 
     204 
     205Any *csv*  file can be opened in the grid by selecting the *'Open'*  under  
     206the *'File'*  menu in the Grid Window(see Figure 4). All columns in the file  
     207will be displayed but insertion will not available. Insertion will be  
     208available only when at least one column will be removed from the grid. 
     209 
     210.. image:: file_menu.bmp 
     211 
     212Figure 4: MenuBar: 
     213 
     214.. _Plot: 
     215 
     216Plot 
     217---- 
     218 
     219To *plot*  a column versus another, select one column at the time, click the  
     220*'Add'*  button next to the text control of X/Y -axis *Selection Range*  to  
     221plot the value of this column on the X/Y axis. Alternatively, all available  
     222range can be selected by clicking the column letter (eg. B). Repeat the same  
     223procedure the next axis. Finally, click the *'Plot'*  button. When clicking  
     224on *Add*  button, the grid will automatically fill the axis label, but  
     225different labels and units can be entered in the correct controls before  
     226clicking on the plot button. 
     227 
     228 *X/Y -Axis Selection Range* can be edited manually. These text controls  
     229 allow the following types of expression (operation can be + - * /, or pow) 
     230  
     2311) if the current axis label range is a function of 1 or more columns, write  
     232this type of expression 
     233 
     234constant1  * column_name1 [minimum row index :  maximum  row index] operator  
     235constant2 * column_name2 [minimum row index :  maximum  row index]  
     236 
     237Example: radius [2 : 5] -3 * scale [2 : 5]  
     238 
     2392) if only some values of a given column are need but the range between the  
     240first row and the last row used is not continuous, write the following  
     241expression in the text control 
     242 
     243column_name1 [minimum row index1 :  maximum  row index1] , column_name1  
     244[minimum row index2 :  maximum  row index2]  
     245 
     246Example : radius [2 : 5] , radius [10 : 25]  
     247 
     248Note: Both text controls ( X and Y-axis Selection Ranges) need to be filled  
     249with valid entries for plotting to work. The dY-bar is optional (see Figure 5). 
     250 
     251.. image::plot_button.bmp 
     252 
     253Figure 5: Plotting 
     254 
     255.. _View_Column/Cell(s): 
     256 
     257View Column/Cell(s) 
     258------------------- 
     259 
     260Select 1 or more cells from the same column, click the 'View Fits' button to  
     261display available curves.  
     262 
     263For example, select the cells of the  'Chi2'  column, then click the  'View Fits'   
     264button. The plots generates will represent the residuals  plots.  
     265  
     266If you select any cells of the 'Data' column and click the 'View Fits' button.  
     267It generates both  data and fits in the graph (see Figure 6).  
     268 
     269Alternatively, just click the column letter (eg. B) to choose all the  
     270available data sets, then simply click the 'View Fits' button to plot the  
     271data and fits.  
     272 
     273.. image::view_button.bmp 
     274 
     275Figure 6: View Fits 
     276 
     277.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     278 
     279..  _Model_Selection: 
     280 
     281Model_Type_  
     282Change_Model_Parameters_  
     283Write_your_Own_Model_  
     284 
     285.. _Model_Type: 
     286 
     287Model Type 
     288---------- 
     289 
     290Models are grouped into three classes 
     291 
     292*  *Shapes*  
     293*  *Shape-Independent*  
     294*  *Uncategorised* 
     295*  *Customized Models*  
     296*  *Structure Factor* 
     297 
     298.. _Change_Model_Parameters: 
     299 
     300Change Model Parameters 
     301----------------------- 
     302 
     303To visualize model in a different window, from menu click on *Model*. Select  
     304a type of model and then the name of your model.A new window will appear with  
     305the plot of your model with default values. Change model's parameters on  
     306*model view*  tab and view the plotted model with its new parameters. 
     307 
     308.. _Write_your_Own_Model: 
     309 
     310Write your Own Model 
     311-------------------- 
     312 
     313The custom model editors are provided from 'Fitting' menu in the menu bar.  
     314See 'Custom model editor' in the side menu on left. Advanced users can write  
     315your own model and save it (in .py format) into *plugin_models*  directory in  
     316.sasview of your home directory (eg., username\.sasview>\plugin_models). Your  
     317plugin model will be added into "<>Customized Models" on the next model  
     318selection. 
     319 
     320.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     321 
     322..  _Model_Category_Manager: 
     323 
     324Model Category Manager 
     325---------------------- 
     326 
     327Our SAS models are, by default, classified into 5 categories; shapes,  
     328shape-independent, structure factor, and customized models, where these  
     329categories (except the customized models) can be reassigned, added, and  
     330removed using 'Category Manager'. Each models can also be enabled(shown)/ 
     331disabled(hidden) from the category that they belong. The Category Manager  
     332panel is accessible from the model category 'Modify' button in the fitting  
     333panel or the 'View/Category Manager' menu in the menu bar (Fig. 1). 
     334 
     3351) Enable/Disable models: Check/uncheck the check boxes to enable/disable the  
     336models (Fig. 2). 
     337 
     3382) Change category: Highlight a model in the list by left-clicking and click  
     339the 'Modify' button. In the 'Change Category' panel, one can create/use a  
     340category for the model, then click the 'Add' button. In order to delete a  
     341category, select a category name and click the 'Remove Selected' button  
     342(Fig. 3). 
     343 
     3443) To apply the changes made, hit the OK button. Otherwise, click the 'Cancel'  
     345button (Fig. 2). 
     346 
     347.. image:: cat_fig0.bmp 
     348 
     349Fig.1 
     350 
     351.. image:: cat_fig1.bmp 
     352 
     353Fig.2 
     354 
     355.. image:: cat_fig2.bmp 
     356 
     357Fig.3 
     358 
     359.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     360 
     361..  _Model_Functions: 
     362 
     363Model Functions 
     364--------------- 
     365 
     366Model Documentation <models/model_functions> 
     367 
     368.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     369 
     370..  _Custom_Model_Editor: 
     371 
     372Custom Model Editor 
     373------------------- 
     374 
     375Description_  
     376New_  
     377Sum|Multi(p1,p2)_  
     378Advanced_  
     379Delete_  
     380 
     381.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     382 
     383.. _Description: 
     384 
     385Description 
     386----------- 
     387 
     388This menu (Fitting/Edit Custom Model in the menu bar) interface is to provide  
     389you an easy way to write your own custom models. The changes in a model  
     390function are effective after it is re-selected from the combo-box menu. 
     391 
     392.. image:: edit_model_menu.bmp 
     393 
     394.. _New: 
     395 
     396New 
     397--- 
     398 
     399This option is used to make a new model. A model code generated by this option  
     400can be viewed and further modified by the 'Advanced' option below. 
     401 
     402.. image:: new_model.bmp 
     403 
     404.. _Sum|Multi(p1,p2): 
     405 
     406Sum|Multi(p1,p2) 
     407---------------- 
     408 
     409This option create a new sum (or multiplication) model. Fill up the (sum  
     410model function) name and the description. The description will show up on  
     411details button in the application. Then select the p1 or p2 model for the  
     412sum/multi model, select an operator as necessary and click the Apply button  
     413for activation. Hit the 'Close' button when it's done. 
     414 
     415.. image:: sum_model.bmp 
     416 
     417.. _Advanced: 
     418 
     419Advanced 
     420-------- 
     421 
     422The menu option shows all the files in the plugin_models folder. You can edit,  
     423modify, and save it. It is recommended to modify only the lines with arrow  
     424(--`-----). In the end of edit, 'Compile' and 'Run' from the menu bar to  
     425activate or to see the model working properly. 
     426 
     427.. _Delete: 
     428 
     429Delete 
     430------ 
     431 
     432The menu option is to delete the custom models. Just select the file name to  
     433delete. 
     434 
     435.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     436 
     437..  _Polydispersity_Distributions: 
     438 
     439Polydispersity Distributions 
     440---------------------------- 
     441 
     442Calculates the form factor for a polydisperse and/or angular population of  
     443particles with uniform scattering length density. The resultant form factor  
     444is normalized by the average particle volume such that  
     445 
     446P(q) = scale*\<F*F\>/Vol + bkg 
     447 
     448where F is the scattering amplitude and the\<\>denote an average over the size  
     449distribution.  Users should use PD (polydispersity: this definition is  
     450different from the typical definition in polymer science) for a size  
     451distribution and Sigma for an angular distribution (see below). 
     452 
     453Note that this computation is very time intensive thus applying polydispersion/ 
     454angular distrubtion for more than one paramters or increasing Npts values  
     455might need extensive patience to complete the computation. Also note that  
     456even though it is time consuming, it is safer to have larger values of Npts  
     457and Nsigmas. 
     458 
     459The following five distribution functions are provided 
     460 
     461*  *Rectangular_Distribution_* 
     462*  *Array_Distribution_* 
     463*  *Gaussian_Distribution_* 
     464*  *Lognormal_Distribution_* 
     465*  *Schulz_Distribution_* 
     466 
     467.. _Rectangular_Distribution: 
     468 
     469Rectangular Distribution 
     470------------------------ 
     471 
     472.. image:: img/pd_image001.png 
     473 
     474The xmean is the mean of the distribution, w is the half-width, and Norm is a  
     475normalization factor which is determined during the numerical calculation.  
     476Note that the Sigma and the half width *w*  are different. 
     477 
     478The standard deviation is 
     479 
     480.. image:: img/pd_image002.png 
     481 
     482The PD (polydispersity) is 
     483 
     484.. image:: img/pd_image003.png 
     485 
     486.. image:: img/pd_image004.jpg 
     487 
     488.. _Array_Distribution: 
     489 
     490Array Distribution 
     491------------------ 
     492 
     493This distribution is to be given by users as a txt file where the array  
     494should be defined by two columns in the order of x and f(x) values. The f(x)  
     495will be normalized by SasView during the computation. 
     496 
     497Example of an array in the file 
     498 
     49930        0.1 
     50032        0.3 
     50135        0.4 
     50236        0.5 
     50337        0.6 
     50439        0.7 
     50541        0.9 
     506 
     507We use only these array values in the computation, therefore the mean value  
     508given in the control panel, for example ‘radius = 60’, will be ignored. 
     509 
     510.. _Gaussian_Distribution: 
     511 
     512Gaussian Distribution 
     513--------------------- 
     514 
     515.. image:: img/pd_image005.png 
     516 
     517The xmean is the mean of the distribution and Norm is a normalization factor  
     518which is determined during the numerical calculation. 
     519 
     520The PD (polydispersity) is 
     521 
     522.. image:: img/pd_image003.png 
     523 
     524.. image:: img/pd_image006.jpg 
     525 
     526.. _Lognormal_Distribution: 
     527 
     528Lognormal Distribution 
     529---------------------- 
     530 
     531.. image:: img/pd_image007.png 
     532 
     533The /mu/=ln(xmed), xmed is the median value of the distribution, and Norm is a  
     534normalization factor which will be determined during the numerical calculation.  
     535The median value is the value given in the size parameter in the control panel,  
     536for example, “radius = 60”. 
     537 
     538The PD (polydispersity) is given by /sigma/ 
     539 
     540.. image:: img/pd_image008.png 
     541 
     542For the angular distribution 
     543 
     544.. image:: img/pd_image009.png 
     545 
     546The mean value is given by xmean=exp(/mu/+p2/2). The peak value is given by  
     547xpeak=exp(/mu/-p2). 
     548 
     549.. image:: img/pd_image010.jpg 
     550 
     551This distribution function spreads more and the peak shifts to the left as the  
     552p increases, requiring higher values of Nsigmas and Npts. 
     553 
     554.. _Schulz_Distribution: 
     555 
     556Schulz Distribution 
     557------------------- 
     558 
     559.. image:: img/pd_image011.png 
     560 
     561The xmeanis the mean of the distribution and Norm is a normalization factor  
     562which is determined during the numerical calculation. 
     563 
     564The z = 1/p2– 1. 
     565 
     566The PD (polydispersity) is 
     567 
     568.. image:: img/pd_image012.png 
     569 
     570Note that the higher PD (polydispersity) might need higher values of Npts and  
     571Nsigmas. For example, at PD = 0.7 and radisus = 60 A, Npts >= 160, and  
     572Nsigmas >= 15 at least. 
     573 
     574.. image:: img/pd_image013.jpg 
     575 
     576.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     577 
     578.. _Smearing_Computation: 
     579 
     580Smearing Computation 
     581-------------------- 
     582 
     583Slit_Smearing_  
     584Pinhole_Smearing_  
     5852D_Smearing_  
     586 
     587.. _Slit_Smearing: 
     588 
     589Slit Smearing 
     590------------- 
     591 
     592The sit smeared scattering intensity for SAS is defined by 
     593 
     594.. image:: img/sm_image002.gif 
     595 
     596where Norm = 
     597 
     598.. image:: img/sm_image003.gif 
     599 
     600Equation 1 
     601 
     602The functions .. image:: img/sm_image004.gif and .. image:: img/sm_image005.gif 
     603refer to the slit width weighting function and the slit height weighting  
     604determined at the q point, respectively. Here, we assumes that the weighting  
     605function is described by a rectangular function, i.e., 
     606 
     607.. image:: img/sm_image006.gif 
     608 
     609Equation 2 
     610 
     611and 
     612 
     613.. image:: img/sm_image007.gif 
     614 
     615Equation 3 
     616 
     617so that .. image:: img/sm_image008.gif .. image::img/sm_image009.gif for  
     618.. image:: img/sm_image010.gif and u. 
     619 
     620The .. image::img/sm_image011.gif and .. image::img/sm_image012.gif stand for  
     621the slit height (FWHM/2) and the slit width (FWHM/2) in the q space. Now the  
     622integral of Equation 1 is simplified to 
     623 
     624.. image:: img/sm_image013.gif 
     625 
     626Equation 4 
     627 
     628Numerical Implementation of Equation 4 
     629-------------------------------------- 
     630 
     631Case 1 
     632------ 
     633 
     634For .. image:: img/sm_image012.gif = 0 and .. image:: img/sm_image011.gif =  
     635constant. 
     636 
     637.. image:: img/sm_image016.gif 
     638 
     639For discrete q values, at the q values from the data points and at the q  
     640values extended up to qN= qi + .. image:: img/sm_image011.gif the smeared  
     641intensity can be calculated approximately 
     642 
     643.. image:: img/sm_image017.gif 
     644 
     645Equation 5 
     646 
     647.. image:: img/sm_image018.gif = 0 for *Is* in *j* < *i* or *j* > N-1*. 
     648 
     649Case 2 
     650------ 
     651 
     652For .. image:: img/sm_image012.gif = constant and  
     653.. image:: img/sm_image011.gif = 0. 
     654 
     655Similarly to Case 1, we get 
     656 
     657.. image:: img/sm_image019.gif for qp= qi-.. image:: img/sm_image012.gif  
     658and qN= qi+.. image:: img/sm_image012.gif. .. image:: img/sm_image018.gif = 0  
     659for *Is* in *j* < *p* or *j* > *N-1*. 
     660 
     661Case 3 
     662------ 
     663 
     664For .. image:: img/sm_image011.gif = constant and  
     665.. image:: img/sm_image011.gif = constant. 
     666 
     667In this case, the best way is to perform the integration, Equation 1,  
     668numerically for both slit height and width. However, the numerical integration  
     669is not correct enough unless given a large number of iteration, say at least  
     67010000 by 10000 for each element of the matrix, W, which will take minutes and  
     671minutes to finish the calculation for a set of typical SAS data. An  
     672alternative way which is correct for slit width << slit hight, is used in  
     673SasView. This method is a mixed method that combines method 1 with the  
     674numerical integration for the slit width. 
     675 
     676.. image:: img/sm_image020.gif 
     677 
     678Equation 7 
     679 
     680for qp= qi-.. image:: img/sm_image012.gif and  
     681qN= qi+.. image:: img/sm_image012.gif. .. image:: img/sm_image018.gif = 0 for  
     682*Is* in *j* < *p* or *j* > *N-1*. 
     683 
     684.. Pinhole_Smearing: 
     685 
     686Pinhole Smearing 
     687---------------- 
     688 
     689The pinhole smearing computation is done similar to the case above except  
     690that the weight function used is the Gaussian function, so that the Equation 6  
     691for this case becomes 
     692 
     693.. image:: img/sm_image021.gif 
     694 
     695Equation 8 
     696 
     697For all the cases above, the weighting matrix *W* is calculated when the  
     698smearing is called at the first time, and it includes the ~ 60 q values  
     699(finely binned evenly) below (\>0) and above the q range of data in order  
     700to cover all data points of the smearing computation for a given model and  
     701for a given slit size. The *Norm*  factor is found numerically with the  
     702weighting matrix, and considered on *Is* computation. 
     703 
     704.. _2D_Smearing: 
     705 
     7062D Smearing 
     707-----------  
     708 
     709The 2D smearing computation is done similar to the 1D pinhole smearing above  
     710except that the weight function used was the 2D elliptical Gaussian function 
     711 
     712.. image:: img/sm_image022.gif 
     713 
     714Equation 9 
     715 
     716In Equation 9, x0 = qcos/theta/ and y0 = qsin/theta/, and the primed axes  
     717are in the coordinate rotated by an angle /theta/ around the z-axis (below)  
     718so that x’0= x0cos/theta/+y0sin/theta/ and y’0= -x0sin/theta/+y0cos/theta/. 
     719 
     720Note that the rotation angle is zero for x-y symmetric elliptical Gaussian  
     721distribution. The A is a normalization factor. 
     722 
     723.. image:: img/sm_image023.gif 
     724 
     725Now we consider a numerical integration where each bins in /theta/ and R are  
     726*evenly* (this is to simplify the equation below) distributed by /delta//theta/  
     727and /delta/R, respectively, and it is assumed that I(x’, y’) is constant  
     728within the bins which in turn becomes 
     729 
     730.. image:: img/sm_image024.gif 
     731 
     732Equation 10 
     733 
     734Since we have found the weighting factor on each bin points, it is convenient  
     735to transform x’-y’ back to x-y coordinate (rotating it by -/theta/ around z  
     736axis). Then, for the polar symmetric smear 
     737 
     738.. image:: img/sm_image025.gif 
     739 
     740Equation 11 
     741 
     742where 
     743 
     744.. image:: img/sm_image026.gif 
     745 
     746while for the x-y symmetric smear 
     747 
     748.. image:: img/sm_image027.gif 
     749 
     750Equation 12 
     751 
     752where 
     753 
     754.. image:: img/sm_image028.gif 
     755 
     756Here, the current version of the SasView uses Equation 11 for 2D smearing  
     757assuming that all the Gaussian weighting functions are aligned in the polar  
     758coordinate. 
     759 
     760In the control panel, the higher accuracy indicates more and finer binnng  
     761points so that it costs more in time. 
     762 
     763.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     764 
     765.. _Polarisation/Magnetic_Scattering: 
     766 
     767Polarisation/Magnetic Scattering 
     768-------------------------------- 
     769 
     770Magnetic scattering is implemented in five (2D) models  
     771 
     772*  *SphereModel* 
     773*  *CoreShellModel* 
     774*  *CoreMultiShellModel* 
     775*  *CylinderModel* 
     776*  *ParallelepipedModel* 
     777 
     778In general, the scattering length density (SLD) in each regions where the  
     779SLD (=/beta/) is uniform, is a combination of the nuclear and magnetic SLDs and  
     780depends on the spin states of the neutrons as follows. For magnetic scattering,  
     781only the magnetization component, *M*perp, perpendicular to the scattering  
     782vector *Q* contributes to the the magnetic scattering length. 
     783 
     784... image:: img/mag_vector.bmp 
     785 
     786The magnetic scattering length density is then 
     787 
     788.. image:: img/dm_eq.gif 
     789 
     790where /gamma/ = -1.913 the gyromagnetic ratio, /mu/B is the Bohr magneton, r0  
     791is the classical radius of electron, and */sigma/* is the Pauli spin. For  
     792polarised neutron, the magnetic scattering is depending on the spin states.  
     793 
     794Let's consider that the incident neutrons are polarized parallel (+)/ 
     795anti-parallel (-) to the x' axis (See both Figures above). The possible  
     796out-coming states then are + and - states for both incident states 
     797 
     798Non-spin flips: (+ +) and (- -) 
     799Spin flips:     (+ -) and (- +) 
     800 
     801.. image:: img/M_angles_pic.bmp 
     802 
     803Now, let's assume that the angles of the *Q*  vector and the spin-axis (x')  
     804against x-axis are /phi/ and /theta/up, respectively (See Figure above). Then,  
     805depending upon the polarisation (spin) state of neutrons, the scattering length  
     806densities, including the nuclear scattering length density (/beta/N) are given  
     807as, for non-spin-flips 
     808 
     809.. image:: img/sld1.gif 
     810 
     811for spin-flips 
     812 
     813.. image:: img/sld2.gif 
     814 
     815where 
     816 
     817.. image:: img/mxp.gif 
     818 
     819.. image:: img/myp.gif 
     820 
     821.. image:: img/mzp.gif 
     822 
     823.. image:: img/mqx.gif 
     824 
     825.. image:: img/mqy.gif 
     826 
     827Here, the M0x, M0y and M0z are the x, y and z components of the magnetization  
     828vector given in the xyz lab frame. The angles of the magnetization, /theta/M  
     829and /phi/M as defined in the Figure (above) 
     830 
     831.. image:: img/m0x_eq.gif 
     832 
     833.. image:: img/m0y_eq.gif 
     834 
     835.. image:: img/m0z_eq.gif 
     836 
     837The user input parameters are M0_sld = DMM0, Up_theta = /theta/up,  
     838M_theta = /theta/M, and M_phi = /phi/M. The 'Up_frac_i' and 'Up_frac_f' are  
     839the ratio 
     840 
     841(spin up)/(spin up + spin down) 
     842 
     843neutrons before the sample and at the analyzer, respectively. 
     844 
     845*Note: The values of the 'Up_frac_i' and 'Up_frac_f' must be in the range  
     846between 0 and 1. 
     847 
     848.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     849 
     850.. _Key_Combinations: 
     851 
     852Key Combinations 
     853---------------- 
     854 
     855Copy&Paste_ 
     856Bookmark_ 
     857Graph_Context_Menu_ 
     858FTolerance(SciPy)_ 
     859 
     860.. _Copy&Paste: 
     861 
     862Copy & Paste 
     863------------ 
     864 
     865To copy the parameter values in a Fit(Model) panel to the clipboard: 
     866 
     867*Ctrl(Cmd on MAC) + Left(Mouse)Click*  on the panel. 
     868 
     869To paste the parameter values to a Fit(Model)panel from the clipboard: 
     870 
     871*Ctrl(Cmd on MAC) + Shift + Left(Mouse)Click*  on the panel. 
     872 
     873If this operation is successful, it will say so in the info line at the  
     874bottom of the SasView window. 
     875 
     876.. _Bookmark: 
     877 
     878Bookmark 
     879-------- 
     880 
     881Bookmark of a fit-panel or model-panel status: 
     882 
     883*(Mouse)Right-Click*  and select the bookmark in the popup list. 
     884 
     885.. _Graph_Context_Menu: 
     886 
     887Graph Context Menu 
     888------------------ 
     889 
     890To get the graph context menu to print, copy, save data, (2D)average, etc.: 
     891 
     892*Locate the mouse point on the plot to highlight and *(Mouse) Right Click*  
     893to bring up the full menu. 
     894 
     895.. _FTolerance(SciPy):  
     896 
     897FTolerance (SciPy) 
     898------------------ 
     899 
     900To change the ftol value of the Scipy FitEngine (leastsq): 
     901 
     902First, make sure that the Fit panel has data and a model selected. 
     903 
     904*Ctrl(Cmd on MAC) + Shift + Alt + Right(Mouse)Click*  on the panel. 
     905 
     906Then, set up the value in the dialog panel. 
     907 
     908If this operation is successful, the new ftol value will be displayed in the  
     909info line at the bottom of the SV window.Note that increasing the ftol value  
     910may cause for the fitting to terminate with higher chisq. 
     911 
     912.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     913 
     914.. _Status_Bar_Help: 
     915 
     916Status Bar Help 
     917--------------- 
     918 
     919Message/Warning/Hint_  
     920Console_  
     921 
     922.. _Message/Warning/Hint: 
     923 
     924Message/Warning/Hint 
     925-------------------- 
     926 
     927The status bar located at the bottom of the application frame, displays  
     928messages, hints, warnings and errors. 
     929 
     930.. _Console: 
     931 
     932Console 
     933------- 
     934 
     935Select *light bulb/info icon*  button in the status bar at the bottom of the  
     936application window to display available history. During a long task, the  
     937console can also help users to understand the status in progressing. 
  • src/sas/guiframe/media/data_explorer_help.rst

    r3e2ebbb r78f02c3  
    11.. _data_explorer_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. 
    25 
    36Loading Data 
    47============ 
    58 
    6 Introduction_  
    7 Load data_ 
    8 Handy menu_ 
    9 Activate data_ 
    10 Remove data_ 
    11 Append plot to graph_ 
    12 Create new plot_ 
    13 Freeze theory_ 
    14 Send data to applications_ 
     91. Introduction_  
     102. Load Data_ 
     113. Handy Menu_ 
     124. Activate Data_ 
     135. Remove Data_ 
     146. Append Plot to Graph_ 
     157. Create New Plot_ 
     168. Freeze Theory_ 
     179. Send Data to Applications_ 
    1518 
    16 .. _Introduction :  
    17 ------------------ 
    18 *Data Explorer*  is a panel that allows the user more interactions with data. Some functionalities provided by the Data Explorer are also available through the context menu of plot panels or other menus of the applications.Under menu *View*  of the menubar, Data explorer can be toggled between Show and Hide by clicking the menu *Show/Hide Data Explorer* . 
     19.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    1920 
    20 *IMPORTANT!*  When Data explorer is hidden, all the data loaded will be sent directly to the current active application, if possible. When data Explorer is shown data go first to the Data Explorer for the user to handle them later. 
     21.. _Introduction: 
    2122 
    22 .. _Load data :  
    23 --------------- 
    24 To Load data, click the button *Load Data* , then select one or more (holding Ctrl key) files to load into the application. In the list, the *Data*  will be displayed as the name of each selected file. Expending this data by clicking the *+*  symbol will display available information about the data such as data title if exists. 
     23Introduction 
     24------------ 
     25*Data Explorer* is a panel that allows the user more interactions with data.  
     26Some functionalities provided by the Data Explorer are also available through  
     27the context menu of plot panels or other menus of the applications.Under menu  
     28*View*  of the menubar, Data explorer can be toggled between Show and Hide by  
     29clicking the menu *Show/Hide Data Explorer* . 
    2530 
    26 .. _Handy menu :  
    27 ---------------- 
    28 For a quick Data-info/Save/Plot/3d-plot(2d only)/Edit-mask(2d only), high-light the data/theory, right-click, and select a proper item from the context menu. 
     31*IMPORTANT!*  When Data explorer is hidden, all the data loaded will be sent  
     32directly to the current active application, if possible. When data Explorer is  
     33shown data go first to the Data Explorer for the user to handle them later. 
     34 
     35.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     36 
     37.. _Load Data: 
     38 
     39Load Data 
     40--------- 
     41 
     42To Load data, click the button *Load Data* , then select one or more (holding  
     43Ctrl key) files to load into the application. In the list, the *Data*  will be  
     44displayed as the name of each selected file. Expending this data by clicking  
     45the *+*  symbol will display available information about the data such as data  
     46title if exists. 
     47 
     48.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     49 
     50.. _Handy Menu: 
     51 
     52Handy Menu 
     53---------- 
     54 
     55For a quick Data-info/Save/Plot/3d-plot(2d only)/Edit-mask(2d only),  
     56high-light the data/theory, right-click, and select a proper item from the  
     57context menu. 
     58 
    2959.. _ image:: hand_menu.png 
    3060 
     61.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    3162 
    32 .. _Activate data :  
    33 ------------------- 
    34 To interact with data, check a data label and click on a button. Checking Data make them active for the button operation. Unchecking Data labels will deactivate them. 
     63.. _Activate Data: 
    3564 
    36 There is a combo box labeled *Selection Options*  that allows to activate or select multiple data simultaneously. 
     65Activate Data 
     66------------- 
    3767 
    38 .. _Remove data :  
    39 ----------------- 
     68To interact with data, check a data label and click on a button. Checking Data  
     69make them active for the button operation. Unchecking Data labels will  
     70deactivate them. 
     71 
     72There is a combo box labeled *Selection Options*  that allows to activate or  
     73select multiple data simultaneously. 
     74 
     75.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     76 
     77.. _Remove Data: 
     78 
     79Remove Data 
     80----------- 
     81 
    4082Remove data button remove all reference of this data into the application. 
    4183 
    4284*WARNING!* Remove data will stop any jobs currently using the selected data. 
    4385 
    44 .. _Append plot to graph :  
    45 -------------------------- 
    46 Click on the button *Append To*  to append selected Data to a plot panel on focus. Next to this button is a combo box containing available panels names. Selecting a name from this combo box will set the corresponding lot panel on focus. If not plot panel is available, the combo box and button will be disable. 2D Data cannot be appended to any plot panels . This operation can only be performed on 1D data and plot panels currently containing 1D data. 
     86.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    4787 
    48 .. _Create new plot :  
    49 --------------------- 
    50 Click on *New Plot*  button to create a new plot panel where selected data will be plotted. 
     88.. _Append Plot to Graph: 
    5189 
    52 .. _Freeze theory :  
     90Append Plot to Graph 
     91-------------------- 
     92 
     93Click on the button *Append To*  to append selected Data to a plot panel on  
     94focus. Next to this button is a combo box containing available panels names.  
     95Selecting a name from this combo box will set the corresponding lot panel on  
     96focus. If not plot panel is available, the combo box and button will be  
     97disable. 2D Data cannot be appended to any plot panels . This operation can  
     98only be performed on 1D data and plot panels currently containing 1D data. 
     99 
     100.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     101 
     102.. _Create New Plot: 
     103 
     104Create New Plot 
     105--------------- 
     106 
     107Click on *New Plot*  button to create a new plot panel where selected data  
     108will be plotted. 
     109 
     110.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     111 
     112.. _Freeze Theory: 
     113 
     114Freeze Theory 
     115------------- 
     116 
     117*Freeze Theory*  button generate Data from selected theory. This operation can  
     118only be performed when theory labels are selected. 
     119 
     120.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     121 
     122.. _Send to application: 
     123 
     124Send to Application 
    53125------------------- 
    54 *Freeze Theory*  button generate Data from selected theory. This operation can only be performed when theory labels are selected. 
    55126 
    56 .. _Send to application :  
    57 ------------------------- 
    58 Click on the button *Send To*  to send Data to the current active control page. One of the single/batch mode can be selected only for Fitting. The batch mode provides serial (batch) fitting with one model, i.e., fitting one data by another data. Note that only the Fitting allows more that one data to be sent. 
    59  
     127Click on the button *Send To*  to send Data to the current active control  
     128page. One of the single/batch mode can be selected only for Fitting. The batch  
     129mode provides serial (batch) fitting with one model, i.e., fitting one data by  
     130another data. Note that only the Fitting allows more that one data to be sent. 
  • src/sas/guiframe/media/graph_help.rst

    r37bbd5f r78f02c3  
    11..graph_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. 
    25 
    36Plotting Data/Models 
    47==================== 
    58 
    6 Placeholder for graph help 
     91. Graph Menu_ 
     102. 2D Data Averaging_ 
     113. Key Combinations_ 
     12 
     13.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     14 
     15.. _Graph menu: 
     16 
     17Graph Menu 
     18---------- 
     19 
     20Introduction_  
     21Reset Graph_  
     22Hide/Show/Delete Graph_  
     23Data Info_  
     24Save Plot Image_  
     25Save Data_  
     26Drag Plot_  
     27Zoom In/Out_  
     28Remove Data_  
     29Change Scale_  
     30Linear Fit_  
     31Other Graph Modifications_  
     32 
     33.. _Introduction:  
     34 
     35Locating the pointer and right-clicking on a data/theory plot will bring a  
     36context menu. On the menu, select a menu item. 
     37 
     38.. _Reset Graph:  
     39 
     40To reset the graph's axis range, right click on the plot and the context menu  
     41pops-up. Select *Reset Graph*  and the plot will take its initial range. Also  
     42the 'home' icon in tool bar will do the same. 
     43 
     44.. _Hide/Show/Delete Graph:  
     45 
     46To Hide, click the Hide (bar) button in the tool bar.To Show, select the the  
     47'Show' menu item in the 'Graph' menu in the menu bar.To Delete, click the 'x'  
     48button in the title bar. 
     49 
     50Note: If a residuals graph (in Fitting) is hidden, it will not show up after  
     51computation. 
     52 
     53.. _Save Plot Image:  
     54 
     55Right click on plot. Context menu will pop-up select save image [file name]. 
     56A dialog window opens and write a the name of the file to save and click on  
     57*Save Image.* 
     58 
     59.. _Data Info:  
     60 
     61From the context menu, select 'Data Info' to see the data information dialog  
     62panel. 
     63 
     64.. _Save Data:  
     65 
     66From the context menu, select 'Save points as a file' for 1D, or 'Save as a  
     67file(DAT)' for 2D. Note that two formats, txt and xml, are available in 1D  
     68saving. 
     69 
     70.. _Drag Plot:  
     71 
     72Select the *crossed arrows*  button on the plot panel *toolbar*  to drag the  
     73plot. To disable dragging mode, unselect the same button on the toolbar. 
     74 
     75.. _Remove data from plot:  
     76 
     77Highlight the plot and the context menu appears.Select *remove [file name]*.  
     78The plot selected will disappear. 
     79 
     80.. _Zoom In/Out:  
     81 
     82Select the *rectangle*  button on the plot panel *toolbar*  to zoom in a  
     83region of the plot. 
     84 
     85To disable zoom mode, unselect the same button on the toolbar. After zoom in  
     86a region, select *left arrow*  or *right arrow*  button on the toolbar to set  
     87the graph the the previous size. If a mouse wheel button is available,  
     88*zoom in/out*  by scrolling the mouse wheel (see Key combination_ help for  
     89details). 
     90 
     91.. _Change Scale:  
     92 
     93If the loaded data is a 1-D data changing scale or data representation will  
     94work as follows. *Right click* on the plot window. A context menu pops-up and  
     95select *Change Scale* . A dialog window titled *select the scale of the graph*  
     96will pop-up then change the *x* , the *y*  and the *view*  values as wish.  
     97The 'view' option includes the axis scale short-cuts such as Linear, Guinier,  
     98Cross-sectional (XC) Guinier, and Porod plot scale. For a proper data set,  
     99these axis scales can be used to estimate Rg, Rod diameter, or Background of  
     100neutron scattering data respectively (via 'Linear Fit'; see below). For a 2D  
     101image, *Right click*  on the image to pop-up the context menu. Select to  
     102switch from linear to log scale. The scale selected is printed on the status  
     103bar. 
     104 
     105.. _Linear Fit:  
     106 
     107Linear fit is to perform a line model fitting keeping the scale of the plot.  
     108Highlight data to fit. From the context menu select *Linear Fit* . A dialog  
     109window appears. Change model initial parameters, data limits and hit *fit*  
     110button. New parameters values are displayed and the line with the new  
     111parameters is added to the plot. Especially for Guinier, XC Guinier, and  
     112Porod plot scale, this 'Linear Fit' will provides Rg, Rod diameter, and  
     113background, respectively. The following figure shows an example for the  
     114Guinier scale. 
     115 
     116.. _Change scale 
     117 
     118If the loaded data is a 1-D data changing scale or data representation will  
     119work as follows. *Right click* on the plot window. A context menu pops-up and  
     120select *Change Scale* . A dialog window titled *select the scale of the graph*  
     121will pop-up then change the *x* , the *y*  and the *view*  values as wish.  
     122If the loaded data is an image. *Right click*  on the image to pop-up the  
     123context menu. Select to switch from linear to log scale. The scale selected is  
     124printed on the statusbar. 
     125 
     126.. image:: guinier_fit.png 
     127 
     128.. _Other Graph Modifications:  
     129 
     130Some custom modifications of the symbols, text, axis, etc of the graph are  
     131provided 
     132 
     133.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     134 
     135.. _2D data averaging 
     136 
     1372D Data Averaging 
     138----------------- 
     139 
     140Description_  
     141How to Average_  
     142Available Averagings_ 
     143Perform Circular Average_  
     144Masked Circular Average_  
     145Sector [Q view]_  
     146Annulus [Phi view]_  
     147Box Sum_  
     148Box Averaging in Qx_  
     149Box Averaging in Qy_  
     150 
     151.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     152 
     153.. _Description:  
     154 
     155This feature allows you to perform different types of averages on your data,  
     156and allows you to see what regions of the detector will contribute to the  
     157average. The region to be averaged will be drown and can be modified by  
     158dragging the lines around. 
     159 
     160.. _How to Average  
     161 
     162Right click on 2D data for the context menu to appear. Select one type of  
     163averages among *"sector [Q view]", "Annulus [Phi view]", "Box sum", "Box  
     164averaging in Qx ", "box averaging on Qy","Perform circular Average".* 
     165 
     166A slicer will appear except for *"Perform circular Average"*  that you can  
     167drag by clicking on a slicer 's marker. When the marker is highlighted in red,  
     168it means that the slicer can change size.You can also move some of the slicer  
     169by simply drag its side when highlighted in red. the slicer size will be reset  
     170to its previous size if the user try to select a region greater than the size  
     171of the data. 
     172 
     173The user can also select a region to average when a slicer has been selected  
     174already by *right clicking*  on the context menu and selecting *Edit Slicer  
     175Parameters* . The dialog window will appears and the user can enter values to  
     176selected a region or selected numbers of points to plot *nbins* . 
     177 
     178For *Box sum* , when the user selects this option, a new panel is created  
     179containing the result of average of the sum of every pixels contains on that  
     180data.The user can also enter values to select a region. 
     181 
     182.. _Available Averagings: 
     183 
     184??? 
     185 
     186.. _Perform Circular Average:  
     187 
     188It will perform and average in constant q-rings around the (x,y) pixel  
     189location of the beam center. 
     190 
     191.. _Masked Circular Average:  
     192 
     193This operation is same as 'Perform Circular Average' except that the masked  
     194region is excluded if masked. 
     195 
     196.. _Sector [Q view]:  
     197 
     198It averages in constant q-arcs. The width of the sector is specified in  
     199degrees (+/- delta phi) each direction from the central angle (phi). 
     200 
     201.. _Annulus [Phi view]:  
     202 
     203It performs an average between two q-values centered in (0,0), and averaged  
     204over a width of a specified number of pixels. The data is returned as a  
     205function of angle (phi) in degrees. Moving one circle of this slicer to  
     206radius of zero corresponding to a circular averaging on radius qmax , the  
     207outer circle. The angle zero starts from the positive x-axis direction. 
     208 
     209.. _Box Sum:  
     210 
     211Perform the sum of counts in a 2D region of interest.When editing the slicer,  
     212the user can enter the length and the width the rectangle slicer and the  
     213coordinates of the center of this rectangle. 
     214 
     215.. _Box Averaging in Qx:  
     216 
     217Computes average I(Qx) for a region of interest. When editing the slicer, the  
     218user can control the length and the width the rectangle slicer. The averaged  
     219output is calculated from the constant bins with rectangular shape. The  
     220resultant q values are nominal values, i.e., the central values of each bins  
     221on the x-axis. 
     222 
     223.. _Box Averaging in Qy:  
     224 
     225Computes average I(Qy) for a region of interest.When editing the slicer, the  
     226user can control the length and the width the rectangle slicer. The averaged  
     227output is calculated from the constant bins with rectangular shape. The  
     228resultant q values are nominal values, i.e., the central values of each bins  
     229on the y-axis. 
     230 
     231.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     232 
     233.. _Key combination 
     234 
     235Key Combination 
     236--------------- 
     237 
     238Floating Panel_  
     239Graph Context Menu_  
     240Zoom In and Out_  
     241 
     242.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     243 
     244.. _Floating Panel:  
     245 
     246For a graph panel to float on the top of the SV window: 
     247 
     248Press the *Ctrl(Cmd on MAC) key*  on dragging and placing a panel. Or if you  
     249want to make all plot panels float, select 'Float' from Graph/Preperences in  
     250the menu bar. Otherwise choose 'Dock'. 
     251 
     252.. _Graph Context Menu:  
     253 
     254To get the graph context menu to print, copy, save data, (2D)average, etc,  
     255*locate the mouse point on the plot to highlight and *(Mouse) Right Click*  
     256to bring up the full menu. 
     257 
     258.. _Zoom In and Out:  
     259 
     260To Zoom in or out the full plot, *locate the mouse point inside the graph  
     261which will be the center of the zooming, then *rotate MouseWheel*. 
     262 
     263*To Zoom in or out the plot in x or y direction, *locate (and click) the  
     264mouse point near x (or y) axis just outside of the graph and then *rotate  
     265MouseWheel* .* Note that this works only on the 1D plots. 
  • src/sas/invariant/media/invariant_help.rst

    r37bbd5f r78f02c3  
    11..invariant_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. 
    25 
    36Invariant Calculation Perspective 
    47================================= 
    58 
    6 Placeholder for invariant help 
     91. Scattering Invariant_ 
     102. Volume Fraction_ 
     113. Specific Surface Area_ 
     124. Definitions_ 
     135. Reference_ 
     146. How to Use_ 
     15 
     16.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     17 
     18.. _Scattering Invariant: 
     19 
     20Scattering Invariant 
     21-------------------- 
     22 
     23The scattering invariant (Q*) is a model-independent quantity that can be  
     24easily calculated from scattering data. 
     25 
     26For two phase systems, the scattering invariant, Q*, is defined as the  
     27integral of the square of the wave transfer (q) multiplied by the scattering  
     28cross section over the full range of q. 
     29 
     30Q* is given by the following equation 
     31 
     32.. image:: image001.gif 
     33 
     34This model independent quantity (Q*) is calculated from the scattering data  
     35that can be used to determine the volume fraction and the specific area of the  
     36sample under consideration. 
     37 
     38These quantities are useful in their own right and can be used in further  
     39analysis. With this scattering invariant module users will also be able to  
     40determine the consistency of those properties between data. There is no real  
     41data defined from zero to infinity, there usually have limited range. 
     42 
     43Q* is not really computed from zero to infinity. Our maximum q range is  
     441e-5 ~ 10 (1/Angstrom). The lower and/or higher q range than data given can be  
     45extrapolated by fitting some data nearby. 
     46 
     47The scattering invariant is computed as follows 
     48 
     49*I(q)* = *I(q)*  w/o background : If the data includes a background, user sets  
     50the value to subtract the background for the Q* computation. 
     51 
     52Reset *I(q)* = *I(q)* scaling factor* , delta *I(q) =*  delta *I(q)*scaling  
     53factor* : If non-zero scaling factor is given, it will be considered. 
     54 
     55Invariant 
     56 
     57.. image:: image001.gif 
     58 
     59where *g =q*  for the pinhole geometry and *g =qv*  (the slit height) for the  
     60slit geometry which can be given in data or as a value. 
     61 
     62Higher q-region (\>= qmax in data) 
     63 
     64Power law (w/o background term) function = C/q4will be used 
     65 
     66where the constant C(=2pi(delta(rho))Sv) is to be found by fitting part of  
     67data with the range of qN-mto qN(m\<N). 
     68 
     69Lower q-region (\<= qmin in data): 
     70 
     71Guinier function = *I0exp(-Rg2q2/3)*  where I0and Rgare obtained by fitting, 
     72 
     73similarly to the high q region above. 
     74 
     75Power law can also be used. 
     76 
     77.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     78 
     79.. _Volume Fraction: 
     80 
     81Volume Fraction 
     82--------------- 
     83 
     84.. image:: image002.gif 
     85 
     86where delta(rho) is the SLD contrast of which value is given by users. 
     87 
     88.. image:: image003.gif 
     89 
     90Thus 
     91 
     92where 0 =\< *A*  =\<1/4 in order for these values to be physically valid. 
     93 
     94.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     95 
     96.. _Specific Surface Area: 
     97 
     98Specific Surface Area 
     99--------------------- 
     100 
     101.. image:: image004.gif 
     102 
     103where *A*  and *Q**  are obtained from previous sections, and the Porod  
     104constant *Cp*  is given by users. 
     105 
     106.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     107 
     108.. _Definitions 
     109 
     110Definitions 
     111----------- 
     112 
     113Q: the magnitude of neutron (or X-ray) momentum transfer vector. 
     114 
     115I(Q): the scattering intensity as a function of the momentum transfer Q. 
     116 
     117Invariant total is the sum of the invariant calculated from data’s q range and  
     118the invariant resulting from extrapolation at low q range and at high q range  
     119if considered. 
     120 
     121.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     122 
     123.. _Reference: 
     124 
     125References 
     126---------- 
     127 
     128Chapter 2 in O. Glatter and O. Kratky, "Small Angle X-Ray Scattering", Academic  
     129Press, New York, 1982 
     130 
     131http://physchem.kfunigraz.ac.at/sm/ <http://physchem.kfunigraz.ac.at/sm/>_ 
     132 
     133.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     134 
     135.. _How to Use 
     136 
     137How to Use 
     138---------- 
     139 
     1401. Loading data to the panel: Open the data file from File in the menu bar.  
     141Select loaded data from a plot panel by highlighting that it until its color  
     142turns yellow. Then right click on that the data and selects the option Compute  
     143Invariant. The application automatically computes the invariant value if the  
     144data loaded is valid. 
     145 
     1462. To subtract a background or/and to rescale the data, type the values in  
     147Customized Input box. 
     148 
     1493. If you want to calculate the volume fraction and the specific surface  
     150area, type the optional inputs in the customized input box, and then press  
     151‘Compute’ button. 
     152 
     1534. The invariant can also be calculated including the outside of the data Q  
     154range:  To include the lower Q and/or the higher Q range, check in the enable  
     155extrapolation check box in ‘Extrapolation ‘box. If the power low is chosen,  
     156the power (exponent) can be either held or fitted by checking the  
     157corresponding radio button.  The Npts that is being used for the extrapolation  
     158can be specified. 
     159 
     1605. If the invariant calculated from the extrapolated region is too large, it  
     161will be warn in red at the top of the panel, which means that your data is not  
     162proper to calculate the invariant. 
     163 
     1646. The details of the calculation is available by clicking the ‘Details’  
     165button in the middle of the panel. 
     166 
     167.. image:: image005.gif 
  • src/sas/invariant/media/pr_help.rst

    r37bbd5f r78f02c3  
    11..pr_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. 
    25 
    36P(r) Inversion Perspective 
    47========================== 
    58 
    6 Placeholder for P(r) help 
     9The inversion approach is based on Moore, J. Appl. Cryst., (1980) 13, 168-175. 
     10 
     11P(r) is set to be equal to an expansion of base functions  of the type  
     12phi_n(r) = 2*r*sin(pi*n*r/D_max). 
     13 
     14The coefficient of each base function in the expansion is found by performing  
     15a least square fit with the following fit function: 
     16 
     17chi**2 = sum_i[ I_meas(q_i) - I_th(q_i) ]**2/error**2 + Reg_term 
     18 
     19where I_meas(q) is the measured scattering intensity and I_th(q) is the  
     20prediction from the Fourier transform of the P(r) expansion.  
     21 
     22The Reg_term term is a regularization term set to the second derivative  
     23d**2P(r)/dr**2 integrated over r. It is used to produce a smooth P(r) output. 
     24 
     25The following are user inputs: 
     26 
     27   - Number of terms: the number of base functions in the P(r) expansion.  
     28    
     29   - Regularization constant: a multiplicative constant to set the size of  
     30the regularization term. 
     31 
     32   - Maximum distance: the maximum distance between any two points in the  
     33   system. 
  • src/sas/perspectives/calculator/media/image_viewer_help.rst

    r379b87a r78f02c3  
    11..image_viewer_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. 
    25 
    36Image Viewer Tool 
    47================= 
    58 
    6 Placeholder for image viewer help 
     9Description 
     10----------- 
     11 
     12This tool loads image files and displays them as 2D (x-y coordinate against  
     13counts per pixel). The plot can then can be saved, printed, and copied. The  
     14plot can also be resized by dragging the corner of the panel. 
     15 
     16Supported image formats are png, bmp, gif, or jpg. (There is currently a bug in  
     17the tif loader) 
     18 
     19.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     20 
     21How To 
     22------ 
     23 
     241. Select 'Image Viewer' under the 'Tool' menu in the menubar. 
     25 
     262. Select a file type from the drop-box at the bottom of the file dialog panel,  
     27choose a file of interest, and then click the 'Open' button (see the  
     28picture below). 
     29 
     30.. image:: load_image.bmp 
     31 
     323. If the loading is successful, the image will be displayed. The file name  
     33will be shown in the title bar (see the picture below). 
     34 
     354. Some options such as saving, printing, and copying are available from the  
     36menubar, or in the context-menu (by right-clicking anywhere in the plot). 
     37 
     38.. image:: pic_plot.bmp 
     39 
     405. If the image is taken from a 2D detector, it can be converted into 2D data  
     41where the z values are computed as  
     42 
     43z = (0.299 x R) + (0.587 x G) + (0.114 x B) 
     44 
     45unless the picture file is formatted as 8-bit grey-scale tif. 
     46 
     47In the "Convert to Data" dialog, set the parameters relevant to your data and  
     48then click the OK button. 
     49 
     50.. image:: pic_convert.bmp 
  • src/sas/perspectives/calculator/media/python_shell_help.rst

    r379b87a r78f02c3  
    11..python_shell_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. 
    25 
    36Python Shell Tool 
    47================= 
    58 
    6 Placeholder for python shell help 
     9Description  
     10----------- 
     11 
     12This is a Python shell (PyCrust) provided with WxPython. An editing notebook  
     13will show up when a Python file is loaded from the 'New' or 'Open' menu.  
     14 
     15The 'Run' menu is added for the editor to be able to compile and run the Python  
     16code. 
     17 
     18For the details about the Python, visit the website  
     19http://docs.python.org/tutorial/ 
     20 
     21The numpy, scipy, matplotlib, etc, libraries are shipped with SasView. However,  
     22some functionalities of those packages may or may not work. 
     23 
     24PyCrust includes its own Help menu in the shell window. 
     25 
     26Note: Help() and Credits() do not work on Macs. 
     27 
     28.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     29 
     30Example 
     31------- 
     32 
     33An example from the matplotlib gallery: 
     34 
     35.. image:: pycrust_example.bmp 
Note: See TracChangeset for help on using the changeset viewer.