Changeset 78f02c3 in sasview
- Timestamp:
- Feb 14, 2015 10:12:40 AM (10 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 898a8b9
- Parents:
- 3e2ebbb
- Location:
- src/sas
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/calculator/media/density_calculator_help.rst
r37bbd5f r78f02c3 1 1 ..density_calculator_help.rst 2 3 .. This is a port of the original SasView html help file to ReSTructured text 4 .. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. 2 5 3 6 Density/Volume Calculator Tool 4 7 ============================== 5 8 6 Placeholder for density calculator help 9 Description 10 ----------- 11 12 This tool is to calculate the mass density from the molar volume or vice 13 versa. To calculate the mass density, the chemical formula and molar volume 14 should be provided. 15 16 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 17 18 How To 19 ------ 20 21 1. Molecular Formula: The chemical formula of ONE molecule or ONE atom. For 22 mixtures, the ratio of the each molecules should be used; for example, 23 (H2O)0.5(D2O)0.5. 24 25 2. Select input (molar volume or mass density) from combobox. Then type in the 26 input value. 27 28 3. Click the 'Calculate' button to perform the calculation. 29 30 4. Outputs also include the molar mass (weight) that depends only on the 31 chemical formula 32 33 .. image:: density_tutor.gif -
src/sas/calculator/media/kiessig_calculator_help.rst
r37bbd5f r78f02c3 1 1 ..kiessig_calculator_help.rst 2 3 .. This is a port of the original SasView html help file to ReSTructured text 4 .. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. 2 5 3 6 Kiessig Thickness Calculator Tool 4 7 ================================= 5 8 6 Placeholder for Kiessig calculator help 9 Description 10 ----------- 11 12 This tool is to approximately estimate the thickness of a layer or the 13 diameter of particles from the Kiessig fringe in SAS/NR data, and using the 14 Kiessig relation 15 16 thickness = 2*Pi/fringe_width. 17 18 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 19 20 21 How To 22 ------ 23 24 To get a rough thickness or particle size, just type the Kiessig fringe width 25 (in units of 1/Angstrom) and click on the 'Compute' button. Then the output 26 value will be show up in the 'Thickness' text box. -
src/sas/calculator/media/resolution_calculator_help.rst
r37bbd5f r78f02c3 1 1 ..resolution_calculator_help.rst 2 2 3 Resolution Calculator 4 ===================== 3 .. This is a port of the original SasView html help file to ReSTructured text 4 .. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. 5 5 6 Placeholder for resolution calculator help 6 Q Resolution Estimator 7 ====================== 8 9 Description 10 ----------- 11 12 This tool is to approximately estimate the resolution of Q based on the SAS 13 instrumental parameter values assuming that the detector is flat and vertical 14 to the incident beam direction. 15 16 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 17 18 How To 19 ------ 20 21 1. Select the source and source type (Monochromatic or TOF). Note that the 22 computational difference between the sources is only the gravitational 23 contribution due to the mass. 24 25 2. Change the default values of the instrumental parameters as desired. 26 27 3. The input formats of wavelength and its spread (=FWHM/wavelength) depend on 28 the source type.For monochromatic wave, the inputs are just one values as shown 29 with the defaults.For TOF, the min and max values should be separated by "-" 30 to describe the wavelength band range. Optionally, the input of the wavelength 31 (NOT of the wavelength spread) could be extended by adding "; --" where the -- 32 is the number of the bins for the numerical integration. Otherwise, the 33 default value "10" bins will be used. The same number of bins will be used 34 for the corresponding wavelength spread in either cases. 35 36 4. For TOF, the default wavelength spectrum is flat. The custom spectrum file 37 (with 2 column text: wavelength(A) vs. intensity) can also be loaded by 38 selecting "Add new" in the combobox. 39 40 5. Once set all the input values, click the compute button. Depending on 41 computation loads the calculation time will vary. 42 43 6. 1D and 2D dQ will be displayed in the text-box at the bottom of the panel. 44 Two dimensional resolution weight distribution (2D elliptical Gaussian 45 function) will also be displayed in the plot panel even if the Q inputs are 46 outside of the detector limit. The red lines indicate the limits of the 47 detector (if a green lines appear (for TOF), it indicates the limits of the 48 maximum q range for the largest wavelength due to the size of the detector). 49 Note that the effect from the beam block is ignored, so in the small q region 50 near the beam block 51 52 [ie., q<2*pi*(beam block diameter) / (sample to detector distance) / lamda_min] 53 54 the variance is slightly under estimated. 55 56 7. The summary can be accessed by clicking the 'light-bulb' icon at the bottom 57 of the SasView main window. 58 59 .. image:: resolution_tutor.gif 60 61 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 62 63 Theory 64 ------ 65 66 The scattering wave transfer vector is by definition 67 68 .. image:: q.gif 69 70 In the limit of the small angle, the variance of q in the first order 71 approximation is 72 73 .. image:: sigma_q.gif 74 75 In summary, the geometric and gravitational contributions depending on the 76 shape of each factors can be expressed as shown the table. 77 78 .. image:: sigma_table.gif 79 80 Finally, we use a Gaussian function to describe the 2D weighting distribution 81 of the uncertainty in q. 82 83 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 84 85 References 86 ---------- 87 D.F.R. Mildner and J.M. Carpenter, J. Appl. Cryst. 17, 249-256 (1984) 88 89 D.F.R. Mildner, J.M. Carpenter and D.L. Worcester, J. Appl. Cryst. 19, 311-319 90 (1986) -
src/sas/calculator/media/sas_calculator_help.rst
r37bbd5f r78f02c3 1 1 ..sas_calculator_help.rst 2 3 .. This is a port of the original SasView html help file to ReSTructured text 4 .. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. 5 6 .. |beta| unicode:: U+03B2 7 .. |gamma| unicode:: U+03B3 8 .. |theta| unicode:: U+03B8 9 .. |mu| unicode:: U+03BC 10 .. |sigma| unicode:: U+03C3 11 .. |phi| unicode:: U+03C6 12 13 .. |equiv| unicode:: U+2261 14 .. |noteql| unicode:: U+2260 2 15 3 16 Generic Scattering Calculator Tool 4 17 ================================== 5 18 6 Placeholder for generic SAS calculator help 19 Polarization and Magnetic Scattering 20 21 Theory_ 22 GUI_ 23 PDB_Data_ 24 25 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 26 27 .. _Theory: 28 29 Theory 30 ------ 31 32 In general, a particle with a volume V can be described by an ensemble 33 containing N 3-dimensional rectangular pixels where each pixels are much 34 smaller than V. Assuming that all the pixel sizes are same, the elastic 35 scattering intensity by the particle 36 37 .. image:: gen_i.gif 38 39 where /beta/jand rj are the scattering length density and the position of the 40 j'th pixel respectively. And the total volume 41 42 .. image:: v_j.gif 43 44 for /beta/j/noteql/0 where vj is the volume of the j'th pixel (or the j'th 45 natural atomic volume (= atomic mass/natural molar density/Avogadro number) for 46 the atomic structures). The total volume V can be corrected by users. This 47 correction is useful especially for an atomic structure (taken from a pdb file) 48 to get the right normalization. Note that the /beta/j displayed in GUI may be 49 incorrect but will not affect the scattering computation if the correction of 50 the total volume is made. The scattering length density (SLD) of each pixel 51 where the SLD is uniform, is a combination of the nuclear and magnetic SLDs and 52 depends on the spin states of the neutrons as follows:For magnetic scattering, 53 only the magnetization component, *M*perp, perpendicular to the scattering 54 vector *Q* contributes to the the magnetic scattering length. (Figure below). 55 56 .. image:: mag_vector.bmp 57 58 The magnetic scattering length density is then 59 60 .. image:: dm_eq.gif 61 62 where /gamma/= -1.913 the gyromagnetic ratio, /mu/B is the Bohr magneton, r0 is 63 the classical radius of electron, and */sigma/* is the Pauli spin. 64 65 For polarized neutron, the magnetic scattering is depending on the spin states. 66 67 Let's consider that the incident neutrons are polarised parallel (+)/ 68 anti-parallel (-) to the x' axis (See both Figures above). The possible 69 out-coming states then are + and - states for both incident states, where 70 71 - Non-spin flips: (+ +) and (- -) 72 - Spin flips: (+ -) and (- +) 73 74 .. image:: gen_mag_pic.bmp 75 76 Now, let's assume that the angles of the *Q* vector and the spin-axis (x') 77 from x-axis are /phi/ and /theta/up respectively (See Figure above). Then, 78 depending upon the polarization (spin) state of neutrons, the scattering 79 length densities, including the nuclear scattering length density (/beta/N) 80 are given as, for non-spin-flips 81 82 .. image:: sld1.gif 83 84 and for spin-flips 85 86 .. image:: sld2.gif 87 88 where 89 90 .. image:: mxp.gif 91 92 .. image:: myp.gif 93 94 .. image:: mzp.gif 95 96 .. image:: mqx.gif 97 98 .. image:: mqy.gif 99 100 Here, the M0x, M0yand M0zare the x, y and z components of the magnetisation 101 vector given in the xyz lab frame. 102 103 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 104 105 .. _GUI: 106 107 GUI 108 --- 109 110 .. image:: gen_gui_help.bmp 111 112 After the computation, the result will be listed in the 'Theory' box in the 113 data explorer panel on the main window.The 'Up_frac_in' and 'Up_frac_out' are 114 the ratio, (spin up) /(spin up + spin down) neutrons before the sample and at 115 the analyzer, respectively. 116 117 *Note I: The values of 'Up_frac_in' and 'Up_frac_out' must be in the range 118 between 0 and 1. For example, both values are 0.5 for unpolarized neutrons.* 119 120 *Note II: This computation is totally based on the pixel (or atomic) data 121 fixed in the xyz coordinates. Thus no angular orientational averaging is 122 considered.* 123 124 *Note III: For the nuclear scattering length density, only the real component 125 is taken account.* 126 127 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 128 129 .. _PDB_Data: 130 131 PDB Data 132 -------- 133 134 This Generic scattering calculator also supports some pdb files without 135 considering polarized/magnetic scattering so that the related parameters 136 such as Up_*** will be ignored (see the Picture below). The calculation for 137 fixed orientation uses (the first) Equation above resulting in a 2D output, 138 whileas the scattering calculation averaged over all the orientations uses 139 the Debye equation providing a 1D output 140 141 .. image:: gen_debye_eq.gif 142 143 where vj /beta/j /equiv/ bj the scattering length of the j'th atom. The resultant outputs 144 will be displayed in the DataExplorer for further uses. 145 146 .. image:: pdb_combo.jpg -
src/sas/calculator/media/sld_calculator_help.rst
r2dee849 r78f02c3 1 1 ..sld_calculator_help.rst 2 3 .. This is a port of the original SasView html help file to ReSTructured text 4 .. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. 2 5 3 6 SLD Calculator Tool 4 7 =================== 5 8 6 Placeholder for SLD calculator help 9 Description 10 ----------- 11 12 The neutron scattering length density is defined as 13 14 SLD = (b_c1 +b_c2+...+b_cn )/Vm 15 16 where 17 18 b_ci is the bound coherent scattering length of ith of n atoms in a molecule 19 with the molecular volume Vm 20 21 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 22 23 How to Format the Compound Name 24 ------------------------------- 25 26 To calculate scattering length densities enter a compound and a mass density 27 and click "Calculate". Entering a wavelength value is optional (a default 28 value of 6.0 Angstroms will be used). 29 30 * Formula strings consist of counts and atoms such as "CaCO3+6H2O". 31 32 * Groups can be separated by *'+'* or *space*, so "CaCO3 6H2O" works as well. 33 34 * Groups and be defined using parentheses, such as "CaCO3(H2O)6". 35 36 * Parentheses can be nested, such as "(CaCO3(H2O)6)1". 37 38 * Isotopes are represented by their index, e.g., "CaCO[18]3+6H2O", H[1], or 39 H[2]. 40 41 * Counts can be integer or decimal, e.g. "CaCO3+(3HO0.5)2". 42 43 * Other compositions can be calculated as well, for example, for a 70-30 44 mixture of H2O/D2O write *H14O7+ D6O3* or more simply *H7D3O5* (i.e. this says 45 7 hydrogens, 3 deuteriums, and 5 oxygens) and the mass density calculated 46 based on the percentages of H and D. 47 48 * Type *C[13]6 H[2]12 O[18]6* for C(13)6H(2)12O(18)6 (6 Carbon-13 atoms, 12 49 deuterium atoms, and 6 Oxygen-18 atoms) -
src/sas/calculator/media/slit_calculator_help.rst
r37bbd5f r78f02c3 1 1 ..slit_calculator_help.rst 2 3 .. This is a port of the original SasView html help file to ReSTructured text 4 .. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. 2 5 3 6 Slit Size Calculator Tool 4 7 ========================= 5 8 6 Placeholder for slit calculator help 9 Description 10 ----------- 11 This tool is for X-ray users to calculate the slit size (FWHM/2) for smearing 12 based on their half beam profile data (SAXSess). 13 14 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 15 16 How To 17 ------- 18 To calculate the slit size (FWHM/2), just load the beam profile data using the 19 browse button. 20 21 Once a data is loaded, the slit size will be computed and show up in the text 22 box. 23 24 Because the unit is not specified in the data file, we do not convert it into 25 1/Angstrom so users are responsible for converting the units of their data. 26 27 Note: This slit size calculator only works for beam profile data produced by 28 'SAXSess'. 29 30 To see the file format, check the file, 'beam profile.DAT', in the 'test' 31 folder of SasView. -
src/sas/data_util/media/data_operator_help.rst
r37bbd5f r78f02c3 1 1 ..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. 2 5 3 6 Data Operations Tool 4 7 ==================== 5 8 6 Placeholder for data operator help 9 Description 10 ----------- 11 This dialog panel provides arithmetic operations between two data sets (the 12 last data set could be a number). 13 14 When the data1 and data2 are selected, their x (or qx and qy for 2D) value(s) 15 must match with each other. 16 17 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 18 19 How To 20 ------ 21 1. Type the data name resulted from an operation. 22 23 2) Select a data/theory in the drop down menus. When data2 is set to number, 24 type a number in the text control box. 25 26 3) Select an arithmetic operator symbol; + (for addition), - (for subtraction), 27 * (for multiplication), / (for division), and | (for combination of two data 28 sets). 29 30 If two data sets do not match, the operation will fail and the background color 31 of the combo box items will turn to red (WIN only). 32 33 4) If the operation is successful, hit the Apply button to make the new data. 34 Then the data name will be shown up in the data box in the data explorer. 35 36 Note: The errors and warnings will be displayed at the bottom of the SasView 37 window. 38 39 .. image:: data_oper_pic.png 40 -
src/sas/fit/media/fitting_help.rst
r37bbd5f r78f02c3 1 1 ..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 2 12 3 13 Fitting Perspective 4 14 =================== 5 15 6 Placeholder for fitting help 16 Load_a_File_ 17 Single_Fit_ 18 Simultaneous_Fitting_ 19 Batch_Fitting_ 20 Model_Selection_ 21 Model_Category_Manager_ 22 Model_Functions_ 23 Custom_Model_Editor_ 24 Polydispersity_Distributions_ 25 Smearing_Computation_ 26 Polarisation/Magnetic_Scattering_ 27 Key_Combinations_ 28 Status_Bar_Help_ 29 30 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 31 32 .. _Load_a_File: 33 34 Load a File 35 ----------- 36 37 From Menu go to *Data* -> *Load Data File(or Folder)* . Select a file/folder 38 from the menu bar and click on Open button. Data contained in the file will be 39 displayed. To cancel the loading click on *cancel* . In case a file can not be 40 loaded, an error message will be displayed on the statusbar. 41 42 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 43 44 .. _Single_Fit: 45 46 Single Fit 47 ---------- 48 49 One of two fit-engines can be chosen from the Fitting menu bar. The Simple Fit- 50 engine uses Scipy's leasqr and the Complex Fit-Engine is a custom optimizer 51 that provides a better chance to find the global minimum of the chi2 but that 52 requires 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 54 model from the combo box. The default parameters of the model will be display. 55 Set initial parameters if need. Check and uncheck parameters to fit/fix. Click 56 the *'Fit'* button. When the fitting is finished, the resultant parameter 57 values will be displayed with the errors. If a error is missing, it generally 58 means that the corresponding parameter is not very depending on the model. The 59 chisq/Npt_fit and the plot associated with the fit operation will be also 60 updated. 61 62 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 63 64 .. _Simultaneous_Fitting: 65 66 Simultaneous Fitting 67 -------------------- 68 69 This fitting option enables to set a number of the constraints between the 70 parameters of fitting(s). It requires one or more FitPages with a data and a 71 model set for the fitting, and performs multiple fittings given by the 72 FitPage(s). The Complex (ParkMC) FitEngine will be used automatically. 73 74 Simultaneous Fit without Constraint 75 76 Assuming some FitPages are already set up, check the checkboxes of the 77 model_data rows to fit. And click the 'Fit' button. The results will return to 78 each FitPages. 79 80 Note 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 82 Simultaneous Fit with Constraint 83 84 Enter constraint in the text control next to *constraint fit* button. 85 Constraint should be of type model1 parameter name = f(model2 parameter name) 86 for example, M0.radius=2*M1.radius. Many constraints can be entered for a 87 single fit. Each of them should be separated by a newline charater or ";" 88 The easy setup can generate many constraint inputs easily when the selected 89 two models are the same type. 90 91 Note that the chi2/Npts returned is the sum of the chi2/Npts of each fits. 92 If one needs the chi2 value only for one fit, click the 'Compute' button in 93 the FitPage to recalculate. 94 95 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 96 97 .. _Batch_Fitting: 98 99 Batch 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 112 Batch Fit 113 --------- 114 115 Create 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 117 Fitting menubar. 118 119 .. image:: batch_button_area.bmp 120 121 Figure 1: MenuBar: 122 123 Load Data to the DataExplorer if not already loaded. 124 125 Select one or more data sets by checking the check boxes, and then make sure 126 that "Fitting" is selected in the dropdown menu next to the "Send To" button. 127 Once ready, click the 'Send To' button to set data to a BatchPage. If already 128 an empty batch page exists, it will be set there. Otherwise it will create a 129 new Batch Page. Set up the model and the parameter values as same as a single 130 fitting (see Single Fit help) <Single_Fit_>. Then use 'Fit' button to 131 perform the fitting. 132 133 Unlike a single fit, the results of the fittings will not return to the 134 BatchPage'. Instead, a Grid window will be provided once the fitting is 135 completed. The Grid window is also accessible from the 'View' menu 136 (see Figure 2). 137 138 Note that only one model is used for all the data. The initial parameter 139 values given in the control page will be used all the data fittings. If one 140 wants the FitEngine to use the initial values from the results of the 141 previous data fitting (if any), choose the 'Chain Fitting' option in the 142 Fitting menubar, which will speed up the fitting especially when you have 143 lots of, and similar, data sets. 144 145 .. _Batch_Window: 146 147 Batch Window 148 ------------ 149 Batch Window provides an easy way to view the fit results, i.e., plot data, 150 fits, and residuals. Batch window will be automatically shown after a batch 151 fit is finished. 152 153 Once closed, it can be opened anytime from the "View" menubar item (see 154 Figure 2). 155 156 .. image:: restore_batch_window.bmp 157 158 Figure 2: Edit Menu: 159 160 .. _Edit_Grid: 161 162 Edit Grid 163 --------- 164 165 Once a batch fit is completed, all fitted and fixed model parameters are 166 displayed to the current sheet of the batch window except the errors of the 167 parameters. To view the errors, click on a given column then under *Edit* 168 menubar item, and insert the desired parameter by selecting a menu item with 169 the appropriated label. Empty column can be inserted in the same way. A 170 column value can be customized by editing an existing empty column. 171 172 To 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 175 All above options are also available when right clicking on a given column 176 label(see Figure 3). 177 178 *Note:* A column always needs to be selected in order to remove or insert a 179 column in the grid. 180 181 .. image:: edit_menu.bmp 182 183 Figure 3: Edit Menu: 184 185 .. _Save_Grid: 186 187 Save Grid 188 --------- 189 To save the current page on the batch window, select the *'File'* menubar 190 item(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 197 Warning! To ensure accuracy of saved fit results, it is recommended to save 198 the current grid before modifying it . 199 200 .. _Open_Batch_Results: 201 202 Open Batch Results 203 ------------------ 204 205 Any *csv* file can be opened in the grid by selecting the *'Open'* under 206 the *'File'* menu in the Grid Window(see Figure 4). All columns in the file 207 will be displayed but insertion will not available. Insertion will be 208 available only when at least one column will be removed from the grid. 209 210 .. image:: file_menu.bmp 211 212 Figure 4: MenuBar: 213 214 .. _Plot: 215 216 Plot 217 ---- 218 219 To *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 221 plot the value of this column on the X/Y axis. Alternatively, all available 222 range can be selected by clicking the column letter (eg. B). Repeat the same 223 procedure the next axis. Finally, click the *'Plot'* button. When clicking 224 on *Add* button, the grid will automatically fill the axis label, but 225 different labels and units can be entered in the correct controls before 226 clicking 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 231 1) if the current axis label range is a function of 1 or more columns, write 232 this type of expression 233 234 constant1 * column_name1 [minimum row index : maximum row index] operator 235 constant2 * column_name2 [minimum row index : maximum row index] 236 237 Example: radius [2 : 5] -3 * scale [2 : 5] 238 239 2) if only some values of a given column are need but the range between the 240 first row and the last row used is not continuous, write the following 241 expression in the text control 242 243 column_name1 [minimum row index1 : maximum row index1] , column_name1 244 [minimum row index2 : maximum row index2] 245 246 Example : radius [2 : 5] , radius [10 : 25] 247 248 Note: Both text controls ( X and Y-axis Selection Ranges) need to be filled 249 with valid entries for plotting to work. The dY-bar is optional (see Figure 5). 250 251 .. image::plot_button.bmp 252 253 Figure 5: Plotting 254 255 .. _View_Column/Cell(s): 256 257 View Column/Cell(s) 258 ------------------- 259 260 Select 1 or more cells from the same column, click the 'View Fits' button to 261 display available curves. 262 263 For example, select the cells of the 'Chi2' column, then click the 'View Fits' 264 button. The plots generates will represent the residuals plots. 265 266 If you select any cells of the 'Data' column and click the 'View Fits' button. 267 It generates both data and fits in the graph (see Figure 6). 268 269 Alternatively, just click the column letter (eg. B) to choose all the 270 available data sets, then simply click the 'View Fits' button to plot the 271 data and fits. 272 273 .. image::view_button.bmp 274 275 Figure 6: View Fits 276 277 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 278 279 .. _Model_Selection: 280 281 Model_Type_ 282 Change_Model_Parameters_ 283 Write_your_Own_Model_ 284 285 .. _Model_Type: 286 287 Model Type 288 ---------- 289 290 Models 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 300 Change Model Parameters 301 ----------------------- 302 303 To visualize model in a different window, from menu click on *Model*. Select 304 a type of model and then the name of your model.A new window will appear with 305 the 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 310 Write your Own Model 311 -------------------- 312 313 The custom model editors are provided from 'Fitting' menu in the menu bar. 314 See 'Custom model editor' in the side menu on left. Advanced users can write 315 your 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 317 plugin model will be added into "<>Customized Models" on the next model 318 selection. 319 320 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 321 322 .. _Model_Category_Manager: 323 324 Model Category Manager 325 ---------------------- 326 327 Our SAS models are, by default, classified into 5 categories; shapes, 328 shape-independent, structure factor, and customized models, where these 329 categories (except the customized models) can be reassigned, added, and 330 removed using 'Category Manager'. Each models can also be enabled(shown)/ 331 disabled(hidden) from the category that they belong. The Category Manager 332 panel is accessible from the model category 'Modify' button in the fitting 333 panel or the 'View/Category Manager' menu in the menu bar (Fig. 1). 334 335 1) Enable/Disable models: Check/uncheck the check boxes to enable/disable the 336 models (Fig. 2). 337 338 2) Change category: Highlight a model in the list by left-clicking and click 339 the 'Modify' button. In the 'Change Category' panel, one can create/use a 340 category for the model, then click the 'Add' button. In order to delete a 341 category, select a category name and click the 'Remove Selected' button 342 (Fig. 3). 343 344 3) To apply the changes made, hit the OK button. Otherwise, click the 'Cancel' 345 button (Fig. 2). 346 347 .. image:: cat_fig0.bmp 348 349 Fig.1 350 351 .. image:: cat_fig1.bmp 352 353 Fig.2 354 355 .. image:: cat_fig2.bmp 356 357 Fig.3 358 359 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 360 361 .. _Model_Functions: 362 363 Model Functions 364 --------------- 365 366 Model Documentation <models/model_functions> 367 368 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 369 370 .. _Custom_Model_Editor: 371 372 Custom Model Editor 373 ------------------- 374 375 Description_ 376 New_ 377 Sum|Multi(p1,p2)_ 378 Advanced_ 379 Delete_ 380 381 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 382 383 .. _Description: 384 385 Description 386 ----------- 387 388 This menu (Fitting/Edit Custom Model in the menu bar) interface is to provide 389 you an easy way to write your own custom models. The changes in a model 390 function are effective after it is re-selected from the combo-box menu. 391 392 .. image:: edit_model_menu.bmp 393 394 .. _New: 395 396 New 397 --- 398 399 This option is used to make a new model. A model code generated by this option 400 can be viewed and further modified by the 'Advanced' option below. 401 402 .. image:: new_model.bmp 403 404 .. _Sum|Multi(p1,p2): 405 406 Sum|Multi(p1,p2) 407 ---------------- 408 409 This option create a new sum (or multiplication) model. Fill up the (sum 410 model function) name and the description. The description will show up on 411 details button in the application. Then select the p1 or p2 model for the 412 sum/multi model, select an operator as necessary and click the Apply button 413 for activation. Hit the 'Close' button when it's done. 414 415 .. image:: sum_model.bmp 416 417 .. _Advanced: 418 419 Advanced 420 -------- 421 422 The menu option shows all the files in the plugin_models folder. You can edit, 423 modify, 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 425 activate or to see the model working properly. 426 427 .. _Delete: 428 429 Delete 430 ------ 431 432 The menu option is to delete the custom models. Just select the file name to 433 delete. 434 435 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 436 437 .. _Polydispersity_Distributions: 438 439 Polydispersity Distributions 440 ---------------------------- 441 442 Calculates the form factor for a polydisperse and/or angular population of 443 particles with uniform scattering length density. The resultant form factor 444 is normalized by the average particle volume such that 445 446 P(q) = scale*\<F*F\>/Vol + bkg 447 448 where F is the scattering amplitude and the\<\>denote an average over the size 449 distribution. Users should use PD (polydispersity: this definition is 450 different from the typical definition in polymer science) for a size 451 distribution and Sigma for an angular distribution (see below). 452 453 Note that this computation is very time intensive thus applying polydispersion/ 454 angular distrubtion for more than one paramters or increasing Npts values 455 might need extensive patience to complete the computation. Also note that 456 even though it is time consuming, it is safer to have larger values of Npts 457 and Nsigmas. 458 459 The 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 469 Rectangular Distribution 470 ------------------------ 471 472 .. image:: img/pd_image001.png 473 474 The xmean is the mean of the distribution, w is the half-width, and Norm is a 475 normalization factor which is determined during the numerical calculation. 476 Note that the Sigma and the half width *w* are different. 477 478 The standard deviation is 479 480 .. image:: img/pd_image002.png 481 482 The PD (polydispersity) is 483 484 .. image:: img/pd_image003.png 485 486 .. image:: img/pd_image004.jpg 487 488 .. _Array_Distribution: 489 490 Array Distribution 491 ------------------ 492 493 This distribution is to be given by users as a txt file where the array 494 should be defined by two columns in the order of x and f(x) values. The f(x) 495 will be normalized by SasView during the computation. 496 497 Example of an array in the file 498 499 30 0.1 500 32 0.3 501 35 0.4 502 36 0.5 503 37 0.6 504 39 0.7 505 41 0.9 506 507 We use only these array values in the computation, therefore the mean value 508 given in the control panel, for example âradius = 60â, will be ignored. 509 510 .. _Gaussian_Distribution: 511 512 Gaussian Distribution 513 --------------------- 514 515 .. image:: img/pd_image005.png 516 517 The xmean is the mean of the distribution and Norm is a normalization factor 518 which is determined during the numerical calculation. 519 520 The PD (polydispersity) is 521 522 .. image:: img/pd_image003.png 523 524 .. image:: img/pd_image006.jpg 525 526 .. _Lognormal_Distribution: 527 528 Lognormal Distribution 529 ---------------------- 530 531 .. image:: img/pd_image007.png 532 533 The /mu/=ln(xmed), xmed is the median value of the distribution, and Norm is a 534 normalization factor which will be determined during the numerical calculation. 535 The median value is the value given in the size parameter in the control panel, 536 for example, âradius = 60â. 537 538 The PD (polydispersity) is given by /sigma/ 539 540 .. image:: img/pd_image008.png 541 542 For the angular distribution 543 544 .. image:: img/pd_image009.png 545 546 The mean value is given by xmean=exp(/mu/+p2/2). The peak value is given by 547 xpeak=exp(/mu/-p2). 548 549 .. image:: img/pd_image010.jpg 550 551 This distribution function spreads more and the peak shifts to the left as the 552 p increases, requiring higher values of Nsigmas and Npts. 553 554 .. _Schulz_Distribution: 555 556 Schulz Distribution 557 ------------------- 558 559 .. image:: img/pd_image011.png 560 561 The xmeanis the mean of the distribution and Norm is a normalization factor 562 which is determined during the numerical calculation. 563 564 The z = 1/p2â 1. 565 566 The PD (polydispersity) is 567 568 .. image:: img/pd_image012.png 569 570 Note that the higher PD (polydispersity) might need higher values of Npts and 571 Nsigmas. For example, at PD = 0.7 and radisus = 60 A, Npts >= 160, and 572 Nsigmas >= 15 at least. 573 574 .. image:: img/pd_image013.jpg 575 576 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 577 578 .. _Smearing_Computation: 579 580 Smearing Computation 581 -------------------- 582 583 Slit_Smearing_ 584 Pinhole_Smearing_ 585 2D_Smearing_ 586 587 .. _Slit_Smearing: 588 589 Slit Smearing 590 ------------- 591 592 The sit smeared scattering intensity for SAS is defined by 593 594 .. image:: img/sm_image002.gif 595 596 where Norm = 597 598 .. image:: img/sm_image003.gif 599 600 Equation 1 601 602 The functions .. image:: img/sm_image004.gif and .. image:: img/sm_image005.gif 603 refer to the slit width weighting function and the slit height weighting 604 determined at the q point, respectively. Here, we assumes that the weighting 605 function is described by a rectangular function, i.e., 606 607 .. image:: img/sm_image006.gif 608 609 Equation 2 610 611 and 612 613 .. image:: img/sm_image007.gif 614 615 Equation 3 616 617 so that .. image:: img/sm_image008.gif .. image::img/sm_image009.gif for 618 .. image:: img/sm_image010.gif and u. 619 620 The .. image::img/sm_image011.gif and .. image::img/sm_image012.gif stand for 621 the slit height (FWHM/2) and the slit width (FWHM/2) in the q space. Now the 622 integral of Equation 1 is simplified to 623 624 .. image:: img/sm_image013.gif 625 626 Equation 4 627 628 Numerical Implementation of Equation 4 629 -------------------------------------- 630 631 Case 1 632 ------ 633 634 For .. image:: img/sm_image012.gif = 0 and .. image:: img/sm_image011.gif = 635 constant. 636 637 .. image:: img/sm_image016.gif 638 639 For discrete q values, at the q values from the data points and at the q 640 values extended up to qN= qi + .. image:: img/sm_image011.gif the smeared 641 intensity can be calculated approximately 642 643 .. image:: img/sm_image017.gif 644 645 Equation 5 646 647 .. image:: img/sm_image018.gif = 0 for *Is* in *j* < *i* or *j* > N-1*. 648 649 Case 2 650 ------ 651 652 For .. image:: img/sm_image012.gif = constant and 653 .. image:: img/sm_image011.gif = 0. 654 655 Similarly to Case 1, we get 656 657 .. image:: img/sm_image019.gif for qp= qi-.. image:: img/sm_image012.gif 658 and qN= qi+.. image:: img/sm_image012.gif. .. image:: img/sm_image018.gif = 0 659 for *Is* in *j* < *p* or *j* > *N-1*. 660 661 Case 3 662 ------ 663 664 For .. image:: img/sm_image011.gif = constant and 665 .. image:: img/sm_image011.gif = constant. 666 667 In this case, the best way is to perform the integration, Equation 1, 668 numerically for both slit height and width. However, the numerical integration 669 is not correct enough unless given a large number of iteration, say at least 670 10000 by 10000 for each element of the matrix, W, which will take minutes and 671 minutes to finish the calculation for a set of typical SAS data. An 672 alternative way which is correct for slit width << slit hight, is used in 673 SasView. This method is a mixed method that combines method 1 with the 674 numerical integration for the slit width. 675 676 .. image:: img/sm_image020.gif 677 678 Equation 7 679 680 for qp= qi-.. image:: img/sm_image012.gif and 681 qN= 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 686 Pinhole Smearing 687 ---------------- 688 689 The pinhole smearing computation is done similar to the case above except 690 that the weight function used is the Gaussian function, so that the Equation 6 691 for this case becomes 692 693 .. image:: img/sm_image021.gif 694 695 Equation 8 696 697 For all the cases above, the weighting matrix *W* is calculated when the 698 smearing 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 700 to cover all data points of the smearing computation for a given model and 701 for a given slit size. The *Norm* factor is found numerically with the 702 weighting matrix, and considered on *Is* computation. 703 704 .. _2D_Smearing: 705 706 2D Smearing 707 ----------- 708 709 The 2D smearing computation is done similar to the 1D pinhole smearing above 710 except that the weight function used was the 2D elliptical Gaussian function 711 712 .. image:: img/sm_image022.gif 713 714 Equation 9 715 716 In Equation 9, x0 = qcos/theta/ and y0 = qsin/theta/, and the primed axes 717 are in the coordinate rotated by an angle /theta/ around the z-axis (below) 718 so that xâ0= x0cos/theta/+y0sin/theta/ and yâ0= -x0sin/theta/+y0cos/theta/. 719 720 Note that the rotation angle is zero for x-y symmetric elliptical Gaussian 721 distribution. The A is a normalization factor. 722 723 .. image:: img/sm_image023.gif 724 725 Now 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/ 727 and /delta/R, respectively, and it is assumed that I(xâ, yâ) is constant 728 within the bins which in turn becomes 729 730 .. image:: img/sm_image024.gif 731 732 Equation 10 733 734 Since we have found the weighting factor on each bin points, it is convenient 735 to transform xâ-yâ back to x-y coordinate (rotating it by -/theta/ around z 736 axis). Then, for the polar symmetric smear 737 738 .. image:: img/sm_image025.gif 739 740 Equation 11 741 742 where 743 744 .. image:: img/sm_image026.gif 745 746 while for the x-y symmetric smear 747 748 .. image:: img/sm_image027.gif 749 750 Equation 12 751 752 where 753 754 .. image:: img/sm_image028.gif 755 756 Here, the current version of the SasView uses Equation 11 for 2D smearing 757 assuming that all the Gaussian weighting functions are aligned in the polar 758 coordinate. 759 760 In the control panel, the higher accuracy indicates more and finer binnng 761 points so that it costs more in time. 762 763 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 764 765 .. _Polarisation/Magnetic_Scattering: 766 767 Polarisation/Magnetic Scattering 768 -------------------------------- 769 770 Magnetic scattering is implemented in five (2D) models 771 772 * *SphereModel* 773 * *CoreShellModel* 774 * *CoreMultiShellModel* 775 * *CylinderModel* 776 * *ParallelepipedModel* 777 778 In general, the scattering length density (SLD) in each regions where the 779 SLD (=/beta/) is uniform, is a combination of the nuclear and magnetic SLDs and 780 depends on the spin states of the neutrons as follows. For magnetic scattering, 781 only the magnetization component, *M*perp, perpendicular to the scattering 782 vector *Q* contributes to the the magnetic scattering length. 783 784 ... image:: img/mag_vector.bmp 785 786 The magnetic scattering length density is then 787 788 .. image:: img/dm_eq.gif 789 790 where /gamma/ = -1.913 the gyromagnetic ratio, /mu/B is the Bohr magneton, r0 791 is the classical radius of electron, and */sigma/* is the Pauli spin. For 792 polarised neutron, the magnetic scattering is depending on the spin states. 793 794 Let's consider that the incident neutrons are polarized parallel (+)/ 795 anti-parallel (-) to the x' axis (See both Figures above). The possible 796 out-coming states then are + and - states for both incident states 797 798 Non-spin flips: (+ +) and (- -) 799 Spin flips: (+ -) and (- +) 800 801 .. image:: img/M_angles_pic.bmp 802 803 Now, let's assume that the angles of the *Q* vector and the spin-axis (x') 804 against x-axis are /phi/ and /theta/up, respectively (See Figure above). Then, 805 depending upon the polarisation (spin) state of neutrons, the scattering length 806 densities, including the nuclear scattering length density (/beta/N) are given 807 as, for non-spin-flips 808 809 .. image:: img/sld1.gif 810 811 for spin-flips 812 813 .. image:: img/sld2.gif 814 815 where 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 827 Here, the M0x, M0y and M0z are the x, y and z components of the magnetization 828 vector given in the xyz lab frame. The angles of the magnetization, /theta/M 829 and /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 837 The user input parameters are M0_sld = DMM0, Up_theta = /theta/up, 838 M_theta = /theta/M, and M_phi = /phi/M. The 'Up_frac_i' and 'Up_frac_f' are 839 the ratio 840 841 (spin up)/(spin up + spin down) 842 843 neutrons 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 846 between 0 and 1. 847 848 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 849 850 .. _Key_Combinations: 851 852 Key Combinations 853 ---------------- 854 855 Copy&Paste_ 856 Bookmark_ 857 Graph_Context_Menu_ 858 FTolerance(SciPy)_ 859 860 .. _Copy&Paste: 861 862 Copy & Paste 863 ------------ 864 865 To 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 869 To 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 873 If this operation is successful, it will say so in the info line at the 874 bottom of the SasView window. 875 876 .. _Bookmark: 877 878 Bookmark 879 -------- 880 881 Bookmark 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 887 Graph Context Menu 888 ------------------ 889 890 To 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* 893 to bring up the full menu. 894 895 .. _FTolerance(SciPy): 896 897 FTolerance (SciPy) 898 ------------------ 899 900 To change the ftol value of the Scipy FitEngine (leastsq): 901 902 First, 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 906 Then, set up the value in the dialog panel. 907 908 If this operation is successful, the new ftol value will be displayed in the 909 info line at the bottom of the SV window.Note that increasing the ftol value 910 may cause for the fitting to terminate with higher chisq. 911 912 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 913 914 .. _Status_Bar_Help: 915 916 Status Bar Help 917 --------------- 918 919 Message/Warning/Hint_ 920 Console_ 921 922 .. _Message/Warning/Hint: 923 924 Message/Warning/Hint 925 -------------------- 926 927 The status bar located at the bottom of the application frame, displays 928 messages, hints, warnings and errors. 929 930 .. _Console: 931 932 Console 933 ------- 934 935 Select *light bulb/info icon* button in the status bar at the bottom of the 936 application window to display available history. During a long task, the 937 console can also help users to understand the status in progressing. -
src/sas/guiframe/media/data_explorer_help.rst
r3e2ebbb r78f02c3 1 1 .. _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. 2 5 3 6 Loading Data 4 7 ============ 5 8 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_9 1. Introduction_ 10 2. Load Data_ 11 3. Handy Menu_ 12 4. Activate Data_ 13 5. Remove Data_ 14 6. Append Plot to Graph_ 15 7. Create New Plot_ 16 8. Freeze Theory_ 17 9. Send Data to Applications_ 15 18 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 19 20 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: 21 22 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. 23 Introduction 24 ------------ 25 *Data Explorer* is a panel that allows the user more interactions with data. 26 Some functionalities provided by the Data Explorer are also available through 27 the 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 29 clicking the menu *Show/Hide Data Explorer* . 25 30 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 32 directly to the current active application, if possible. When data Explorer is 33 shown data go first to the Data Explorer for the user to handle them later. 34 35 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 36 37 .. _Load Data: 38 39 Load Data 40 --------- 41 42 To Load data, click the button *Load Data* , then select one or more (holding 43 Ctrl key) files to load into the application. In the list, the *Data* will be 44 displayed as the name of each selected file. Expending this data by clicking 45 the *+* symbol will display available information about the data such as data 46 title if exists. 47 48 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 49 50 .. _Handy Menu: 51 52 Handy Menu 53 ---------- 54 55 For a quick Data-info/Save/Plot/3d-plot(2d only)/Edit-mask(2d only), 56 high-light the data/theory, right-click, and select a proper item from the 57 context menu. 58 29 59 .. _ image:: hand_menu.png 30 60 61 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 31 62 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: 35 64 36 There is a combo box labeled *Selection Options* that allows to activate or select multiple data simultaneously. 65 Activate Data 66 ------------- 37 67 38 .. _Remove data : 39 ----------------- 68 To interact with data, check a data label and click on a button. Checking Data 69 make them active for the button operation. Unchecking Data labels will 70 deactivate them. 71 72 There is a combo box labeled *Selection Options* that allows to activate or 73 select multiple data simultaneously. 74 75 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 76 77 .. _Remove Data: 78 79 Remove Data 80 ----------- 81 40 82 Remove data button remove all reference of this data into the application. 41 83 42 84 *WARNING!* Remove data will stop any jobs currently using the selected data. 43 85 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 47 87 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: 51 89 52 .. _Freeze theory : 90 Append Plot to Graph 91 -------------------- 92 93 Click on the button *Append To* to append selected Data to a plot panel on 94 focus. Next to this button is a combo box containing available panels names. 95 Selecting a name from this combo box will set the corresponding lot panel on 96 focus. If not plot panel is available, the combo box and button will be 97 disable. 2D Data cannot be appended to any plot panels . This operation can 98 only be performed on 1D data and plot panels currently containing 1D data. 99 100 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 101 102 .. _Create New Plot: 103 104 Create New Plot 105 --------------- 106 107 Click on *New Plot* button to create a new plot panel where selected data 108 will be plotted. 109 110 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 111 112 .. _Freeze Theory: 113 114 Freeze Theory 115 ------------- 116 117 *Freeze Theory* button generate Data from selected theory. This operation can 118 only be performed when theory labels are selected. 119 120 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 121 122 .. _Send to application: 123 124 Send to Application 53 125 ------------------- 54 *Freeze Theory* button generate Data from selected theory. This operation can only be performed when theory labels are selected.55 126 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 127 Click on the button *Send To* to send Data to the current active control 128 page. One of the single/batch mode can be selected only for Fitting. The batch 129 mode provides serial (batch) fitting with one model, i.e., fitting one data by 130 another data. Note that only the Fitting allows more that one data to be sent. -
src/sas/guiframe/media/graph_help.rst
r37bbd5f r78f02c3 1 1 ..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. 2 5 3 6 Plotting Data/Models 4 7 ==================== 5 8 6 Placeholder for graph help 9 1. Graph Menu_ 10 2. 2D Data Averaging_ 11 3. Key Combinations_ 12 13 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 14 15 .. _Graph menu: 16 17 Graph Menu 18 ---------- 19 20 Introduction_ 21 Reset Graph_ 22 Hide/Show/Delete Graph_ 23 Data Info_ 24 Save Plot Image_ 25 Save Data_ 26 Drag Plot_ 27 Zoom In/Out_ 28 Remove Data_ 29 Change Scale_ 30 Linear Fit_ 31 Other Graph Modifications_ 32 33 .. _Introduction: 34 35 Locating the pointer and right-clicking on a data/theory plot will bring a 36 context menu. On the menu, select a menu item. 37 38 .. _Reset Graph: 39 40 To reset the graph's axis range, right click on the plot and the context menu 41 pops-up. Select *Reset Graph* and the plot will take its initial range. Also 42 the 'home' icon in tool bar will do the same. 43 44 .. _Hide/Show/Delete Graph: 45 46 To 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' 48 button in the title bar. 49 50 Note: If a residuals graph (in Fitting) is hidden, it will not show up after 51 computation. 52 53 .. _Save Plot Image: 54 55 Right click on plot. Context menu will pop-up select save image [file name]. 56 A dialog window opens and write a the name of the file to save and click on 57 *Save Image.* 58 59 .. _Data Info: 60 61 From the context menu, select 'Data Info' to see the data information dialog 62 panel. 63 64 .. _Save Data: 65 66 From the context menu, select 'Save points as a file' for 1D, or 'Save as a 67 file(DAT)' for 2D. Note that two formats, txt and xml, are available in 1D 68 saving. 69 70 .. _Drag Plot: 71 72 Select the *crossed arrows* button on the plot panel *toolbar* to drag the 73 plot. To disable dragging mode, unselect the same button on the toolbar. 74 75 .. _Remove data from plot: 76 77 Highlight the plot and the context menu appears.Select *remove [file name]*. 78 The plot selected will disappear. 79 80 .. _Zoom In/Out: 81 82 Select the *rectangle* button on the plot panel *toolbar* to zoom in a 83 region of the plot. 84 85 To disable zoom mode, unselect the same button on the toolbar. After zoom in 86 a region, select *left arrow* or *right arrow* button on the toolbar to set 87 the 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 89 details). 90 91 .. _Change Scale: 92 93 If the loaded data is a 1-D data changing scale or data representation will 94 work as follows. *Right click* on the plot window. A context menu pops-up and 95 select *Change Scale* . A dialog window titled *select the scale of the graph* 96 will pop-up then change the *x* , the *y* and the *view* values as wish. 97 The 'view' option includes the axis scale short-cuts such as Linear, Guinier, 98 Cross-sectional (XC) Guinier, and Porod plot scale. For a proper data set, 99 these axis scales can be used to estimate Rg, Rod diameter, or Background of 100 neutron scattering data respectively (via 'Linear Fit'; see below). For a 2D 101 image, *Right click* on the image to pop-up the context menu. Select to 102 switch from linear to log scale. The scale selected is printed on the status 103 bar. 104 105 .. _Linear Fit: 106 107 Linear fit is to perform a line model fitting keeping the scale of the plot. 108 Highlight data to fit. From the context menu select *Linear Fit* . A dialog 109 window appears. Change model initial parameters, data limits and hit *fit* 110 button. New parameters values are displayed and the line with the new 111 parameters is added to the plot. Especially for Guinier, XC Guinier, and 112 Porod plot scale, this 'Linear Fit' will provides Rg, Rod diameter, and 113 background, respectively. The following figure shows an example for the 114 Guinier scale. 115 116 .. _Change scale 117 118 If the loaded data is a 1-D data changing scale or data representation will 119 work as follows. *Right click* on the plot window. A context menu pops-up and 120 select *Change Scale* . A dialog window titled *select the scale of the graph* 121 will pop-up then change the *x* , the *y* and the *view* values as wish. 122 If the loaded data is an image. *Right click* on the image to pop-up the 123 context menu. Select to switch from linear to log scale. The scale selected is 124 printed on the statusbar. 125 126 .. image:: guinier_fit.png 127 128 .. _Other Graph Modifications: 129 130 Some custom modifications of the symbols, text, axis, etc of the graph are 131 provided 132 133 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 134 135 .. _2D data averaging 136 137 2D Data Averaging 138 ----------------- 139 140 Description_ 141 How to Average_ 142 Available Averagings_ 143 Perform Circular Average_ 144 Masked Circular Average_ 145 Sector [Q view]_ 146 Annulus [Phi view]_ 147 Box Sum_ 148 Box Averaging in Qx_ 149 Box Averaging in Qy_ 150 151 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 152 153 .. _Description: 154 155 This feature allows you to perform different types of averages on your data, 156 and allows you to see what regions of the detector will contribute to the 157 average. The region to be averaged will be drown and can be modified by 158 dragging the lines around. 159 160 .. _How to Average 161 162 Right click on 2D data for the context menu to appear. Select one type of 163 averages among *"sector [Q view]", "Annulus [Phi view]", "Box sum", "Box 164 averaging in Qx ", "box averaging on Qy","Perform circular Average".* 165 166 A slicer will appear except for *"Perform circular Average"* that you can 167 drag by clicking on a slicer 's marker. When the marker is highlighted in red, 168 it means that the slicer can change size.You can also move some of the slicer 169 by simply drag its side when highlighted in red. the slicer size will be reset 170 to its previous size if the user try to select a region greater than the size 171 of the data. 172 173 The user can also select a region to average when a slicer has been selected 174 already by *right clicking* on the context menu and selecting *Edit Slicer 175 Parameters* . The dialog window will appears and the user can enter values to 176 selected a region or selected numbers of points to plot *nbins* . 177 178 For *Box sum* , when the user selects this option, a new panel is created 179 containing the result of average of the sum of every pixels contains on that 180 data.The user can also enter values to select a region. 181 182 .. _Available Averagings: 183 184 ??? 185 186 .. _Perform Circular Average: 187 188 It will perform and average in constant q-rings around the (x,y) pixel 189 location of the beam center. 190 191 .. _Masked Circular Average: 192 193 This operation is same as 'Perform Circular Average' except that the masked 194 region is excluded if masked. 195 196 .. _Sector [Q view]: 197 198 It averages in constant q-arcs. The width of the sector is specified in 199 degrees (+/- delta phi) each direction from the central angle (phi). 200 201 .. _Annulus [Phi view]: 202 203 It performs an average between two q-values centered in (0,0), and averaged 204 over a width of a specified number of pixels. The data is returned as a 205 function of angle (phi) in degrees. Moving one circle of this slicer to 206 radius of zero corresponding to a circular averaging on radius qmax , the 207 outer circle. The angle zero starts from the positive x-axis direction. 208 209 .. _Box Sum: 210 211 Perform the sum of counts in a 2D region of interest.When editing the slicer, 212 the user can enter the length and the width the rectangle slicer and the 213 coordinates of the center of this rectangle. 214 215 .. _Box Averaging in Qx: 216 217 Computes average I(Qx) for a region of interest. When editing the slicer, the 218 user can control the length and the width the rectangle slicer. The averaged 219 output is calculated from the constant bins with rectangular shape. The 220 resultant q values are nominal values, i.e., the central values of each bins 221 on the x-axis. 222 223 .. _Box Averaging in Qy: 224 225 Computes average I(Qy) for a region of interest.When editing the slicer, the 226 user can control the length and the width the rectangle slicer. The averaged 227 output is calculated from the constant bins with rectangular shape. The 228 resultant q values are nominal values, i.e., the central values of each bins 229 on the y-axis. 230 231 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 232 233 .. _Key combination 234 235 Key Combination 236 --------------- 237 238 Floating Panel_ 239 Graph Context Menu_ 240 Zoom In and Out_ 241 242 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 243 244 .. _Floating Panel: 245 246 For a graph panel to float on the top of the SV window: 247 248 Press the *Ctrl(Cmd on MAC) key* on dragging and placing a panel. Or if you 249 want to make all plot panels float, select 'Float' from Graph/Preperences in 250 the menu bar. Otherwise choose 'Dock'. 251 252 .. _Graph Context Menu: 253 254 To 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* 256 to bring up the full menu. 257 258 .. _Zoom In and Out: 259 260 To Zoom in or out the full plot, *locate the mouse point inside the graph 261 which 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 264 mouse point near x (or y) axis just outside of the graph and then *rotate 265 MouseWheel* .* Note that this works only on the 1D plots. -
src/sas/invariant/media/invariant_help.rst
r37bbd5f r78f02c3 1 1 ..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. 2 5 3 6 Invariant Calculation Perspective 4 7 ================================= 5 8 6 Placeholder for invariant help 9 1. Scattering Invariant_ 10 2. Volume Fraction_ 11 3. Specific Surface Area_ 12 4. Definitions_ 13 5. Reference_ 14 6. How to Use_ 15 16 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 17 18 .. _Scattering Invariant: 19 20 Scattering Invariant 21 -------------------- 22 23 The scattering invariant (Q*) is a model-independent quantity that can be 24 easily calculated from scattering data. 25 26 For two phase systems, the scattering invariant, Q*, is defined as the 27 integral of the square of the wave transfer (q) multiplied by the scattering 28 cross section over the full range of q. 29 30 Q* is given by the following equation 31 32 .. image:: image001.gif 33 34 This model independent quantity (Q*) is calculated from the scattering data 35 that can be used to determine the volume fraction and the specific area of the 36 sample under consideration. 37 38 These quantities are useful in their own right and can be used in further 39 analysis. With this scattering invariant module users will also be able to 40 determine the consistency of those properties between data. There is no real 41 data defined from zero to infinity, there usually have limited range. 42 43 Q* is not really computed from zero to infinity. Our maximum q range is 44 1e-5 ~ 10 (1/Angstrom). The lower and/or higher q range than data given can be 45 extrapolated by fitting some data nearby. 46 47 The scattering invariant is computed as follows 48 49 *I(q)* = *I(q)* w/o background : If the data includes a background, user sets 50 the value to subtract the background for the Q* computation. 51 52 Reset *I(q)* = *I(q)* scaling factor* , delta *I(q) =* delta *I(q)*scaling 53 factor* : If non-zero scaling factor is given, it will be considered. 54 55 Invariant 56 57 .. image:: image001.gif 58 59 where *g =q* for the pinhole geometry and *g =qv* (the slit height) for the 60 slit geometry which can be given in data or as a value. 61 62 Higher q-region (\>= qmax in data) 63 64 Power law (w/o background term) function = C/q4will be used 65 66 where the constant C(=2pi(delta(rho))Sv) is to be found by fitting part of 67 data with the range of qN-mto qN(m\<N). 68 69 Lower q-region (\<= qmin in data): 70 71 Guinier function = *I0exp(-Rg2q2/3)* where I0and Rgare obtained by fitting, 72 73 similarly to the high q region above. 74 75 Power law can also be used. 76 77 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 78 79 .. _Volume Fraction: 80 81 Volume Fraction 82 --------------- 83 84 .. image:: image002.gif 85 86 where delta(rho) is the SLD contrast of which value is given by users. 87 88 .. image:: image003.gif 89 90 Thus 91 92 where 0 =\< *A* =\<1/4 in order for these values to be physically valid. 93 94 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 95 96 .. _Specific Surface Area: 97 98 Specific Surface Area 99 --------------------- 100 101 .. image:: image004.gif 102 103 where *A* and *Q** are obtained from previous sections, and the Porod 104 constant *Cp* is given by users. 105 106 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 107 108 .. _Definitions 109 110 Definitions 111 ----------- 112 113 Q: the magnitude of neutron (or X-ray) momentum transfer vector. 114 115 I(Q): the scattering intensity as a function of the momentum transfer Q. 116 117 Invariant total is the sum of the invariant calculated from datas q range and 118 the invariant resulting from extrapolation at low q range and at high q range 119 if considered. 120 121 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 122 123 .. _Reference: 124 125 References 126 ---------- 127 128 Chapter 2 in O. Glatter and O. Kratky, "Small Angle X-Ray Scattering", Academic 129 Press, New York, 1982 130 131 http://physchem.kfunigraz.ac.at/sm/ <http://physchem.kfunigraz.ac.at/sm/>_ 132 133 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 134 135 .. _How to Use 136 137 How to Use 138 ---------- 139 140 1. Loading data to the panel: Open the data file from File in the menu bar. 141 Select loaded data from a plot panel by highlighting that it until its color 142 turns yellow. Then right click on that the data and selects the option Compute 143 Invariant. The application automatically computes the invariant value if the 144 data loaded is valid. 145 146 2. To subtract a background or/and to rescale the data, type the values in 147 Customized Input box. 148 149 3. If you want to calculate the volume fraction and the specific surface 150 area, type the optional inputs in the customized input box, and then press 151 Compute button. 152 153 4. The invariant can also be calculated including the outside of the data Q 154 range: To include the lower Q and/or the higher Q range, check in the enable 155 extrapolation check box in Extrapolation box. If the power low is chosen, 156 the power (exponent) can be either held or fitted by checking the 157 corresponding radio button. The Npts that is being used for the extrapolation 158 can be specified. 159 160 5. If the invariant calculated from the extrapolated region is too large, it 161 will be warn in red at the top of the panel, which means that your data is not 162 proper to calculate the invariant. 163 164 6. The details of the calculation is available by clicking the Details 165 button in the middle of the panel. 166 167 .. image:: image005.gif -
src/sas/invariant/media/pr_help.rst
r37bbd5f r78f02c3 1 1 ..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. 2 5 3 6 P(r) Inversion Perspective 4 7 ========================== 5 8 6 Placeholder for P(r) help 9 The inversion approach is based on Moore, J. Appl. Cryst., (1980) 13, 168-175. 10 11 P(r) is set to be equal to an expansion of base functions of the type 12 phi_n(r) = 2*r*sin(pi*n*r/D_max). 13 14 The coefficient of each base function in the expansion is found by performing 15 a least square fit with the following fit function: 16 17 chi**2 = sum_i[ I_meas(q_i) - I_th(q_i) ]**2/error**2 + Reg_term 18 19 where I_meas(q) is the measured scattering intensity and I_th(q) is the 20 prediction from the Fourier transform of the P(r) expansion. 21 22 The Reg_term term is a regularization term set to the second derivative 23 d**2P(r)/dr**2 integrated over r. It is used to produce a smooth P(r) output. 24 25 The 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 30 the 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 1 1 ..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. 2 5 3 6 Image Viewer Tool 4 7 ================= 5 8 6 Placeholder for image viewer help 9 Description 10 ----------- 11 12 This tool loads image files and displays them as 2D (x-y coordinate against 13 counts per pixel). The plot can then can be saved, printed, and copied. The 14 plot can also be resized by dragging the corner of the panel. 15 16 Supported image formats are png, bmp, gif, or jpg. (There is currently a bug in 17 the tif loader) 18 19 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 20 21 How To 22 ------ 23 24 1. Select 'Image Viewer' under the 'Tool' menu in the menubar. 25 26 2. Select a file type from the drop-box at the bottom of the file dialog panel, 27 choose a file of interest, and then click the 'Open' button (see the 28 picture below). 29 30 .. image:: load_image.bmp 31 32 3. If the loading is successful, the image will be displayed. The file name 33 will be shown in the title bar (see the picture below). 34 35 4. Some options such as saving, printing, and copying are available from the 36 menubar, or in the context-menu (by right-clicking anywhere in the plot). 37 38 .. image:: pic_plot.bmp 39 40 5. If the image is taken from a 2D detector, it can be converted into 2D data 41 where the z values are computed as 42 43 z = (0.299 x R) + (0.587 x G) + (0.114 x B) 44 45 unless the picture file is formatted as 8-bit grey-scale tif. 46 47 In the "Convert to Data" dialog, set the parameters relevant to your data and 48 then click the OK button. 49 50 .. image:: pic_convert.bmp -
src/sas/perspectives/calculator/media/python_shell_help.rst
r379b87a r78f02c3 1 1 ..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. 2 5 3 6 Python Shell Tool 4 7 ================= 5 8 6 Placeholder for python shell help 9 Description 10 ----------- 11 12 This is a Python shell (PyCrust) provided with WxPython. An editing notebook 13 will show up when a Python file is loaded from the 'New' or 'Open' menu. 14 15 The 'Run' menu is added for the editor to be able to compile and run the Python 16 code. 17 18 For the details about the Python, visit the website 19 http://docs.python.org/tutorial/ 20 21 The numpy, scipy, matplotlib, etc, libraries are shipped with SasView. However, 22 some functionalities of those packages may or may not work. 23 24 PyCrust includes its own Help menu in the shell window. 25 26 Note: Help() and Credits() do not work on Macs. 27 28 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 29 30 Example 31 ------- 32 33 An example from the matplotlib gallery: 34 35 .. image:: pycrust_example.bmp
Note: See TracChangeset
for help on using the changeset viewer.