Index: .gitignore
===================================================================
--- .gitignore (revision df332d87dd5b8641d097f3a752984517749eda21)
+++ .gitignore (revision bf75f78ef5244210cd304a0daa9ba144b258bd48)
@@ -45,4 +45,6 @@
/docs/sphinx-docs/source/user/models
/docs/sphinx-docs/source/user/perspectives
+/docs/sphinx-docs/source/user/sasgui
+
# test outputs
Index: cs/sphinx-docs/source/test/testdata_help.rst
===================================================================
--- docs/sphinx-docs/source/test/testdata_help.rst (revision a32aa3e14373298a264100bc214787fdafb3773f)
+++ (revision )
@@ -1,100 +1,0 @@
-.. testdata_help.rst
-
-Test Data
-=========
-
-Test data sets are included as a convenience to our users. Look in the \test
-sub-folder in your SasView installation folder.
-
-The data sets are organized based on their data structure; 1D data, 2D data,
-SASVIEW saved states, and data in formats that are not yet implemented but
-which are in the works for future versions.
-
-1D data sets have at least two columns of data with Intensity (assumed
-absolute units) on the Y-axis and Q on the X-axis.
-
-2D data sets are data sets that give the deduced intensity for each detector
-pixel. Depending on the file extension, uncertainty and meta data may also be
-available.
-
-Saved states are projects and analyses saved by the SasView program. A single
-analysis file contains the data and parameters for a single fit (.fit), p(r)
-inversion (.pr), or invariant calculation (.inv). A project file (.svs) contains
-the results for every active analysis.
-
-Some of the available test data is described below.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-1D Test Data
-^^^^^^^^^^^^
-
-AOT_Microemulsion
- - Aerosol-OT surfactant stabilised oil-in-water microemulsion data at three
- contrasts: core (oil core), drop (oil core + surfactant layer), and shell
- (surfactant layer).
- - Suitable for testing simultaneous fitting.
-
-hSDS_D2O
- - h25-sodium dodecyl sulphate solutions at two concentrations: 0.5wt% (just
- above the cmc), 2wt% (well above the cmc), and 2wt% but with 0.2mM NaCl
- electrolyte.
- - Suitable for testing charged S(Q) models.
-
-P123_D2O
- - Lyotropic liquid crystalline solutions of non-ionic ABA block copolymer
- Pluronic P123 in water at three concentrations: 10wt%, 30wt%, and 40wt%.
- - Suitable for testing paracrystal models.
-
-ISIS_Polymer_Blend_TK49
- - Monodisperse (Mw/Mn~1.02) 49wt% d8-polystyrene : 51wt% h8-polystyrene
- polymer blend.
- - Suitable for testing Poly_GaussCoil and RPA10 models.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-2D Test Data
-^^^^^^^^^^^^
-
-P123_D2O
- - Lyotropic liquid crystalline solutions of non-ionic ABA block copolymer
- Pluronic P123 in water at three concentrations: 10wt%, 30wt%, and 40wt%.
- - Suitable for testing paracrystal models.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Saved State Test Data
-^^^^^^^^^^^^^^^^^^^^^
-
-_phi_weights.txt
-
-_radius_dist.txt
-
-_THETA_weights.txt
-
-fitstate.fitv
-
-newone.svs
-
-prstate.prv
-
-sld_file.sld
-
-test.inv
-
-test002.inv
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Other Test Data
-^^^^^^^^^^^^^^^
-
-1000A_sphere_sm.xml
-
-diamond.pdb
-
-dna.pdb
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. note:: This help document was last changed by Steve King, 26Jun2015
Index: cs/sphinx-docs/source/user/gpu_computations.rst
===================================================================
--- docs/sphinx-docs/source/user/gpu_computations.rst (revision 6e0c7b2ea537e60b8568342795a7bdb68be60ac2)
+++ (revision )
@@ -1,56 +1,0 @@
-.. _models-complitation:
-
-****************
-GPU Computations
-****************
-SasView model evaluations can run on your graphics card (GPU) or they can run
-on the processor (CPU).
-
-To run on the GPU, your computer must have OpenCL drivers installed.
-For information about OpenCL installation see the
-:ref:`opencl-installation` documentation
-
-Where the model is evaluated is a little bit complicated.
-If the model has the line *single=False* then it requires double precision.
-If the GPU is single precision only, then it will try running via OpenCL
-on the CPU. If the OpenCL driver is not available for the CPU then
-it will run as a normal program on the CPU.
-For models with a large number of parameters or with a lot of code,
-the GPU may be too small to run the program effectively.
-In this case, you should try simplifying the model, maybe breaking it
-into several different models so that you don't need if statements in your code.
-If it is still too big, you can set *opencl=False* in the model file and
-the model will only run as a normal program on the CPU.
-This will not usually be necessary.
-
-If you have multiple GPU devices you can tell SasView which device to use.
-By default, SasView looks for one GPU and one CPU device
-from available OpenCL platforms.
-
-It prefers AMD or NVIDIA drivers for GPU, and prefers Intel or
-Apple drivers for CPU.
-Both GPU and CPU are included on the assumption that CPU is always available
-and supports double precision.
-
-The device order is important: GPU is checked before CPU on the assumption that
-it will be faster. By examining ~/sasview.log you can see which device SasView
-chose to run the model.
-If you don't want to use OpenCL, you can set *SAS_OPENCL=None*
-in the environment, and it will only use normal programs.
-If you want to use one of the other devices, you can run the following
-from the python console in SasView::
-
- import pyopencl as cl
- cl.create_some_context()
-
-This will provide a menu of different OpenCL drivers available.
-When one is selected, it will say "set PYOPENCL_CTX=..."
-Use that value as the value of *SAS_OPENCL*.
-
-For models run as normal programs, you may need to specify a compiler.
-This is done using the SAS_COMPILER environment variable.
-Set it to *tinycc* for the tinycc compiler, *msvc* for the
-Microsoft Visual C compiler, or *mingw* for the MinGW compiler.
-TinyCC is provided with SasView so that is the default.
-If you want one of the other compilers, be sure to have it available
-on the path so SasView can find it.
Index: cs/sphinx-docs/source/user/opencl_installation.rst
===================================================================
--- docs/sphinx-docs/source/user/opencl_installation.rst (revision 6673d2f5c2a167cfee20ecd93f1cb5b9ceed6ef2)
+++ (revision )
@@ -1,51 +1,0 @@
-.. _opencl-installation:
-
-*******************
-OpenCL Installation
-*******************
-
-1. Check if you have OpenCL already installed
-=============================================
-
-Windows
-=========
- The following instructions are based on
- http://web.engr.oregonstate.edu/~mjb/cs475/DoIHaveOpenCL.pdf
-
- * Go to: Start -> Control Panel -> Administrative Tools
- * Double Click on Computer Management
- * Click on Device Manager
- * Click open Display Adapters
- * Right-click on available adapter and select Properties
- * Click on Driver
- * Go to Driver Details
- * Scroll down and see if OpenCL is installed (look for OpenCL*.dll files)
-
-Mac OSX
-=========
- For OSXs higher than 10.6 OpenCL is shipped along with the system.
-
-
-2. Installation
-===============
-
-Windows
-=========
- Depending on the graphic card on your system, drivers
- can be obtained from different sources:
-
- * Nvidia: https://developer.nvidia.com/opencl
- * AMD: http://developer.amd.com/tools-and-sdks/opencl-zone/
-
-Mac OSX
-=========
- N/A
-
-
-.. note::
- Note that Intel provides an OpenCL drivers for Intel processors:
- https://software.intel.com/en-us/articles/opencl-drivers
- This can sometimes make use of special vector instructions across multiple
- processors, so it is worth installing if the GPU does not support double
- precision. You can install this driver alongside the GPU driver for NVIDIA
- or AMD.
Index: cs/sphinx-docs/source/user/sasgui/guiframe/data_explorer_help.rst
===================================================================
--- docs/sphinx-docs/source/user/sasgui/guiframe/data_explorer_help.rst (revision 49148bbc34832e06f4f05e8e4c4c32c0da92d133)
+++ (revision )
@@ -1,129 +1,0 @@
-.. data_explorer_help.rst
-
-.. This is a port of the original SasView html help file to ReSTructured text
-.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015.
-
-.. _Loading_data:
-
-Loading Data
-============
-
-The data explorer
------------------
-
-*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 within the application.
-
-Under *View* in the menu bar, *Data Explorer* can be toggled between Show and
-Hide by clicking *Show/Hide Data Explorer*.
-
-*NOTE! When* Data Explorer *is hidden, all data loaded will be sent directly
-to the current active analysis perspective, if possible. When* Data Explorer *is
-shown, data go first to the* Data Explorer.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Loading data
-------------
-
-To load data, do one of the following:
-
-Select File -> Load Data File(s), and navigate to your data;
-
-Select File -> Load Data Folder, which will attempt to load all the data in the
-specified folder;
-
-Or, in the *Data Explorer* click the button *Load Data*, then select one or more
-(by holding down the Ctrl key) files to load into SasView.
-
-The name of each loaded file will be listed in the *Data Explorer*. Clicking the
-*+* symbol alongside will display any available metadata read from the file.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-The handy menu
---------------
-
-Right-clicking on a loaded dataset (or model calculation, what SasView calls a
-'theory') brings up a *Handy Menu* from which it is possible to access *Data Info*,
-*Save* the data/theory, or *Plot* the data/theory.
-
-.. image:: hand_menu.png
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Activating data
----------------
-
-To interact with data it must be activated. This is accomplished by checking
-the box next to the file name in the *Data Explorer*. A green tick will appear.
-
-Unchecking/unticking a box deactivates that data set.
-
-There is also a combo box labeled *Selection Options* from which you can
-activate or deactivate multiple data sets in one go.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Removing data
--------------
-
-*WARNING!* Remove Data *will stop any data operations currently using the
-selected data sets.*
-
-*Remove Data* removes all references to selected data from SasView.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Creating a new plot
--------------------
-
-Click on the *New Plot* button to create a new plot panel where the currently
-selected data will be plotted.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Appending plots to a graph
---------------------------
-
-This operation can currently only be performed on 1D data and plot panels
-containing 1D data.
-
-Click on the button *Append Plot To* to add selected data to a plot panel. Next
-to the button is a combo box containing the names of available plot panels.
-Selecting a name from this combo box will move that plot into focus.
-
-If a plot panel is not available, the combo box and button will be
-disabled.
-
-2D Data cannot be appended to any plot panels.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Freezing the theory
--------------------
-
-The *Freeze Theory* button generates data from the selected theory.
-
-*NOTE! This operation can only be performed when theory labels are selected in*
-*the Data panel.*
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Sending data to applications
-----------------------------
-
-Click on the *Send To* button to send the currently selected data to one of the
-perspectives (for *Fitting*, *P(r) Inversion*, or *Invariant* calculation).
-
-The *Single*/*Batch* mode radio buttons only apply to the *Fitting* perspective.
-
-*Batch mode* provides serial (batch) fitting with one model function, that is,
-fitting one data set followed by another. If several data sets need to be
-fitted at the same time, use *Simultaneous* fitting under the *Fitting*
-option on the menu bar.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. note:: This help document was last changed by Steve King, 01May2015
Index: cs/sphinx-docs/source/user/sasgui/guiframe/data_formats_help.rst
===================================================================
--- docs/sphinx-docs/source/user/sasgui/guiframe/data_formats_help.rst (revision 756f28841d840526d0f4c0fb0e04aa304386cdec)
+++ (revision )
@@ -1,83 +1,0 @@
-.. data_formats.rst
-
-.. This is a port of the original SasView html help file to ReSTructured text
-.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015.
-.. WG Bouwman, DUT, added during CodeCamp-V in Oct 2016 the SESANS data format
-
-.. _Formats:
-
-Data Formats
-============
-
-SasView reads several different 1D (I(Q) vs Q), 2D SANS(I(Qx,Qy) vs (Qx,Qy))
-and SESANS (P(z) vs z)
-data files. But please note that SasView does not at present load data where
-the Q and I(Q) data are in separate files.
-
-1D Formats SANS
----------------
-
-SasView will read files with 2 to 4 columns of numbers in the following order:
-
- Q, I(Q), (dI(Q), dQ(Q))
-
-where dQ(Q) is the instrumental resolution in Q and assumed to have originated
-from pinhole geometry.
-
-Numbers can be separated by spaces or commas.
-
-SasView recognises the following file extensions:
-
-* .TXT
-* .ASC
-* .DAT
-* .XML (in canSAS format v1.0 and 1.1)
-
-If using CSV output from, for example, a spreadsheet, ensure that it is not
-using commas as delimiters for thousands.
-
-For a description of the CanSAS/SASXML format see:
-http://www.cansas.org/formats/canSAS1d/1.1/doc/
-
-For a description of the NIST 1D format see:
-http://danse.chem.utk.edu/trac/wiki/NCNROutput1D_IQ
-
-For a description of the ISIS 1D format see:
-http://www.isis.stfc.ac.uk/instruments/loq/software/colette-ascii-file-format-descriptions9808.pdf
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-2D Formats SANS
----------------
-
-SasView will only read files in the NIST 2D format with the extensions
-.ASC or .DAT
-
-Most of the header lines can be removed except the last line, and only the
-first three columns (Qx, Qy, and I(Qx,Qy)) are actually required.
-
-For a description of the NIST 2D format see:
-http://danse.chem.utk.edu/trac/wiki/NCNROutput1D_2DQxQy
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Format SESANS
----------------
-
-The current file extension is .ses or .sesans (not case sensitive).
-
-The file format is to have a list of name-value pairs as a header at the top of the file, detailing general experimental parameters necessary for fitting and analyzing data. This list should contain all information necessary for the file to be 'portable' between users.
-
-Following that is a 6 column list of instrument experimental variables:
-
-- Spin echo length (z, in Angstroms)
-- Spin echo length error (:math:`\Delta` z, in Angstroms) (experimental resolution)
-- neutron wavelength (:math:`\lambda`, in Angstroms) (essential for ToF instruments)
-- neutron wavelength error (:math:`\Delta \lambda`, in Angstroms)
-- Normalized polarization (:math:`P/P_0`, unitless)
-- Normalized polarization error (:math:`\Delta(P/P_0)`, unitless) (measurement error)
-
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. note:: This help document was last changed by Wim Bouwman, 05Oct2016
Index: cs/sphinx-docs/source/user/sasgui/guiframe/graph_help.rst
===================================================================
--- docs/sphinx-docs/source/user/sasgui/guiframe/graph_help.rst (revision 49148bbc34832e06f4f05e8e4c4c32c0da92d133)
+++ (revision )
@@ -1,361 +1,0 @@
-.. graph_help.rst
-
-.. This is a port of the original SasView html help file to ReSTructured text
-.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015.
-
-
-Plotting Data/Models
-====================
-
-SasView generates three different types of graph window: one that displays *1D data*
-(ie, I(Q) vs Q), one that displays *1D residuals* (ie, the difference between the
-experimental data and the theory at the same Q values), and *2D color maps*.
-
-Graph window options
---------------------
-
-.. _Invoking_the_graph_menu:
-
-Invoking the graph menu
-^^^^^^^^^^^^^^^^^^^^^^^
-
-To invoke the *Graph Menu* simply right-click on a data/theory plot, or click
-the *Graph Menu* (bullet list) icon in the toolbar at the bottom of the plot.
-Then select a menu item.
-
-How to Hide-Show-Delete a graph
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-To expand a plot window, click the *Maximise* (square) icon in the top-right
-corner.
-
-To shrink a plot window, click the *Restore down* (square-on-square) icon in
-the top-right corner.
-
-To hide a plot, click the *Minimise* (-) icon in the top-right corner of the
-plot window.
-
-To show a hidden plot, select the *Restore up* (square-on-square) icon on the
-minimised window.
-
-To delete a plot, click the *Close* (x) icon in the top-right corner of the
-plot window.
-
-*NOTE! If a residuals graph (when fitting data) is hidden, it will not show up
-after computation.*
-
-Dragging a plot
-^^^^^^^^^^^^^^^
-
-Select the *Pan* (crossed arrows) icon in the toolbar at the bottom of the plot
-to activate this option. Move the mouse pointer to the plot. It will change to
-a hand. Then left-click and drag the plot around. The axis values will adjust
-accordingly.
-
-To disable dragging mode, unselect the *crossed arrows* icon on the toolbar.
-
-Zooming In-Out on a plot
-^^^^^^^^^^^^^^^^^^^^^^^^
-
-Select the *Zoom* (magnifying glass) button in the toolbar at the bottom of
-the plot to activate this option. Move the mouse pointer to the plot. It will
-change to a cross-hair. Then left-click and drag the pointer around to generate
-a region of interest. Release the mouse button to generate the new view.
-
-To disable zoom mode, unselect the *Zoom* button on the toolbar.
-
-After zooming in on a a region, the *left arrow* or *right arrow* buttons on
-the toolbar will switch between recent views.
-
-*NOTE! If a wheel mouse is available scrolling the wheel will zoom in/out
-on the current plot (changing both axes). Alternatively, point at the numbers
-on one axis and scroll the wheel to zoom in/out on just that axis.*
-
-To return to the original view of the data, click the the *Reset* (home) icon
-in the toolbar at the bottom of the plot (see Resetting_the_graph_ for further details).
-
-Saving a plot image
-^^^^^^^^^^^^^^^^^^^
-
-To save the current plot as an image file, right click on the plot to bring up
-the *Graph Menu* (see Invoking_the_graph_menu_) and select *Save Image*.
-Alternatively, click on the *Save* (floppy disk) icon in the toolbar at the
-bottom of the plot.
-
-A dialog window will open. Select a folder, enter a filename, choose an output
-image type, and click *Save*.
-
-The currently supported image types are:
-
-* EPS (encapsulated postscript)
-* EMF (enhanced metafile)
-* JPG/JPEG (joint photographics experts group)
-* PDF (portable documant format)
-* PNG (portable network graphics)
-* PS (postscript)
-* RAW/RGBA (bitmap)
-* SVG/SVGA (scalable vector graphics)
-* TIF/TIFF (tagged iamge file)
-
-Printing a plot
-^^^^^^^^^^^^^^^
-
-To send the current plot to a printer, click on the *Print* (printer) icon in
-the toolbar at the bottom of the plot.
-
-.. _Resetting_the_graph:
-
-Resetting the graph
-^^^^^^^^^^^^^^^^^^^
-
-To reset the axis range of a graph to its initial values select *Reset Graph
-Range* on the *Graph Menu* (see Invoking_the_graph_menu_). Alternatively, use
-the *Reset* (home) icon in the toolbar at the bottom of the plot.
-
-Modifying the graph
-^^^^^^^^^^^^^^^^^^^
-
-From the *Graph Menu* (see Invoking_the_graph_menu_) it is also possible to
-make some custom modifications to plots, including:
-
-* changing the plot window title
-* changing the axis legend locations
-* changing the axis legend label text
-* changing the axis legend label units
-* changing the axis legend label font & font colour
-* adding/removing a text string
-* adding a grid overlay
-
-Changing scales
-^^^^^^^^^^^^^^^
-
-This menu option is only available with 1D data.
-
-From the *Graph Menu* (see Invoking_the_graph_menu_) select *Change Scale*. A
-dialog window will appear in which it is possible to choose different
-transformations of the x (usually Q) or y (usually I(Q)) axes, including:
-
-* x, x^2, x^4, ln(x), log10(x), log10(x^4)
-* y, 1/y, ln(y), y^2, y.(x^4), 1/sqrt(y),
-* log10(y), ln(y.x), ln(y.x^2), ln(y.x^4), log10(y.x^4)
-
-A *View* option includes short-cuts to common SAS transformations, such as:
-
-* linear
-* Guinier
-* X-sectional Guinier
-* Porod
-* Kratky
-
-For properly corrected and scaled data, these SAS transformations can be used
-to estimate, for example, Rg, rod diameter, or SANS incoherent background
-levels, via a linear fit (see Making_a_linear_fit_).
-
-Toggling scales
-^^^^^^^^^^^^^^^
-
-This menu option is only available with 2D data.
-
-From the *Graph Menu* (see Invoking_the_graph_menu_) select *Toggle Linear/Log
-Scale* to switch between a linear to log intensity scale. The type of scale
-selected is written alongside the colour scale.
-
-2D color maps
-^^^^^^^^^^^^^
-
-This menu option is only available with 2D data.
-
-From the *Graph Menu* (see Invoking_the_graph_menu_) select *2D Color Map* to
-choose a different color scale for the image and/or change the maximum or
-minimum limits of the scale.
-
-Getting data coordinates
-^^^^^^^^^^^^^^^^^^^^^^^^
-
-Clicking anywhere in the plot window will cause the current coordinates to be
-displayed in the status bar at the very bottom-left of the SasView window.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Dataset menu options
---------------------
-
-.. _Invoking_the_dataset_menu:
-
-Invoking the dataset menu
-^^^^^^^^^^^^^^^^^^^^^^^^^
-
-From the *Graph Menu* (see Invoking_the_graph_menu_) highlight a plotted
-dataset.
-
-Getting data info
-^^^^^^^^^^^^^^^^^
-
-In the *Dataset Menu* (see Invoking_the_dataset_menu_), highlight a data set
-and select *DataInfo* to bring up a data information dialog panel for that
-data set.
-
-Saving data
-^^^^^^^^^^^
-
-In the *Dataset Menu* (see Invoking_the_dataset_menu_), select *Save Points as
-a File* (if 1D data) or *Save as a file(DAT)* (if 2D data). A save dialog will
-appear.
-
-1D data can be saved in either ASCII text (.TXT) or CanSAS/SASXML (.XML)
-formats (see :ref:`Formats`).
-
-2D data can only be saved in the NIST 2D format (.DAT) (see :ref:`Formats`).
-
-.. _Making_a_linear_fit:
-
-Making a linear fit
-^^^^^^^^^^^^^^^^^^^
-
-Linear fit performs a simple ( y(x)=ax+b ) linear fit within the plot window.
-
-In the *Dataset Menu* (see Invoking_the_dataset_menu_), select *Linear Fit*. A
-fitting dialog will appear. Set some initial parameters and data limits and
-click *Fit*. The fitted parameter values are displayed and the resulting line
-calculated from them is added to the plot.
-
-This option is most useful for performing simple Guinier, XS Guinier, and
-Porod type analyses, for example, to estimate Rg, a rod diameter, or incoherent
-background level, respectively.
-
-The following figure shows an example of a Guinier analysis using this option
-
-.. image:: guinier_fit.png
-
-Removing data from the plot
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-In the *Dataset Menu* (see Invoking_the_dataset_menu_), select *Remove*. The
-selected data will be removed from the plot.
-
-*NOTE! This action cannot be undone.*
-
-Show-Hide error bars
-^^^^^^^^^^^^^^^^^^^^
-
-In the *Dataset Menu* (see Invoking_the_dataset_menu_), select *Show Error Bar*
-or *Hide Error Bar* to switch between showing/hiding the errors associated
-with the chosen dataset.
-
-Modify plot properties
-^^^^^^^^^^^^^^^^^^^^^^
-
-In the *Dataset Menu* (see Invoking_the_dataset_menu_), select *Modify Plot
-Property* to change the size, color, or shape of the displayed marker for the
-chosen dataset, or to change the dataset label that appears on the plot.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-2D data averaging
------------------
-
-Purpose
-^^^^^^^
-
-This feature is only available with 2D data.
-
-2D data averaging allows you to perform different types of averages on your
-data. The region to be averaged is displayed in the plot window and its limits
-can be modified by dragging the boundaries around.
-
-How to average
-^^^^^^^^^^^^^^
-
-In the *Dataset Menu* (see Invoking_the_dataset_menu_), select one of the
-following averages
-
-* Perform Circular Average
-* Sector [Q view]
-* Annulus [Phi view]
-* Box sum
-* Box averaging in Qx
-* Box averaging on Qy
-
-A 'slicer' will appear (except for *Perform Circular Average*) in the plot that
-you can drag by clicking on a slicer's handle. When the handle is highlighted
-in red, it means that the slicer can move/change size.
-
-*NOTE! The slicer size will reset if you try to select a region greater than
-the size of the data.*
-
-Alternatively, once a 'slicer' is active you can also select the region to
-average by bringing back the *Dataset Menu* and selecting *Edit Slicer
-Parameters*. A dialog window will appear in which you can enter values to
-define a region or select the number of points to plot (*nbins*).
-
-A separate plot window will also have appeared, displaying the requested
-average.
-
-*NOTE! The displayed average only updates when input focus is moved back to
-that window; ie, when the mouse pointer is moved onto that plot.*
-
-Selecting *Box Sum* automatically brings up the 'Slicer Parameters' dialog in
-order to display the average numerically, rather than graphically.
-
-To remove a 'slicer', bring back the *Dataset menu* and select *Clear Slicer*.
-
-Unmasked circular average
-^^^^^^^^^^^^^^^^^^^^^^^^^
-
-This operation will perform an average in constant Q-rings around the (x,y)
-pixel location of the beam center.
-
-Masked circular average
-^^^^^^^^^^^^^^^^^^^^^^^
-
-This operation is the same as 'Unmasked Circular Average' except that any
-masked region is excluded.
-
-Sector average [Q View]
-^^^^^^^^^^^^^^^^^^^^^^^
-
-This operation averages in constant Q-arcs.
-
-The width of the sector is specified in degrees (+/- |delta|\|phi|\) each side
-of the central angle (|phi|\).
-
-Annular average [|phi| View]
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-This operation performs an average between two Q-values centered on (0,0),
-and averaged over a specified number of pixels.
-
-The data is returned as a function of angle (|phi|\) in degrees with zero
-degrees at the 3 O'clock position.
-
-Box sum
-^^^^^^^
-
-This operation performs a sum of counts in a 2D region of interest.
-
-When editing the slicer parameters, the user can enter the length and the width
-the rectangular slicer and the coordinates of the center of the rectangle.
-
-Box Averaging in Qx
-^^^^^^^^^^^^^^^^^^^
-
-This operation computes an average I(Qx) for the region of interest.
-
-When editing the slicer parameters, the user can control the length and the
-width the rectangular slicer. The averaged output is calculated from constant
-bins with rectangular shape. The resultant Q values are nominal values, that
-is, the central value of each bin on the x-axis.
-
-Box Averaging in Qy
-^^^^^^^^^^^^^^^^^^^
-
-This operation computes an average I(Qy) for the region of interest.
-
-When editing the slicer parameters, the user can control the length and the
-width the rectangular slicer. The averaged output is calculated from constant
-bins with rectangular shape. The resultant Q values are nominal values, that
-is, the central value of each bin on the x-axis.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. note:: This help document was last changed by Steve King, 01May2015
Index: cs/sphinx-docs/source/user/sasgui/perspectives/calculator/data_operator_help.rst
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/calculator/data_operator_help.rst (revision 49148bbc34832e06f4f05e8e4c4c32c0da92d133)
+++ (revision )
@@ -1,55 +1,0 @@
-.. data_operator_help.rst
-
-.. This is a port of the original SasView html help file to ReSTructured text
-.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015.
-
-Data Operations Tool
-====================
-
-Description
------------
-
-This tool permits arithmetic operations between two data sets. Alternatively,
-the last data set can be a number.
-
-*NOTE! When* Data1 *and* Data2 *are both data, their Q (or Qx and Qy for 2D)
-value(s) must match with each other UNLESS using the 'append' operator.*
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Using the tool
---------------
-
-1) Ensure you have loaded data into the *Data Explorer* (see :ref:`Loading_data`).
-
-2) Select *Data Operation* from the *Tool* menu on the SasView toolbar.
-
-3) Select a dataset/theory in the drop-down menu *Data1*. A mini-plot of the
- data will appear underneath.
-
-4) Select a dataset/theory in the drop-down menu *Data2* or select *Number*
- and enter a number in the box that appears alongside.
-
-5) Select an arithmetic operator symbol from the *Operator* drop-down. The
- available operators are:
-
-* \+ (for addition)
-* \- (for subtraction)
-* \* (for multiplication)
-* \/ (for division)
-* \| (for combination of two data sets)
-
- If two data sets do not match, the operation will fail and the background
- color of the combo box items will turn to red (WIN only).
-
-6) If the operation is successful, hit the Apply button to make the new dataset.
- The new dataset will appear in the *Data Explorer*.
-
-*NOTE! Any errors and warnings will be displayed at the bottom of the SasView
-window.*
-
-.. image:: data_oper_pic.png
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. note:: This help document was last changed by Steve King, 01May2015
Index: cs/sphinx-docs/source/user/sasgui/perspectives/calculator/density_calculator_help.rst
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/calculator/density_calculator_help.rst (revision 49148bbc34832e06f4f05e8e4c4c32c0da92d133)
+++ (revision )
@@ -1,35 +1,0 @@
-.. density_calculator_help.rst
-
-.. This is a port of the original SasView html help file to ReSTructured text
-.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015.
-
-Density/Volume Calculator Tool
-==============================
-
-Description
------------
-
-This tool calculates the mass density from the molar volume or vice
-versa. To calculate the mass density, the chemical formula and molar volume
-should be provided.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Using the tool
---------------
-
-1) Select *Density/Volume Calculator* from the *Tool* menu on the SasView toolbar.
-
-2) Enter the empirical formula of a molecule. For mixtures, the ratio of each
- of the molecules should be used, for example, (H2O)0.5(D2O)0.5.
-
-3) Use the input combo box to choose between molar volume or mass density and
- then type in an input value.
-
-4) Click the 'Calculate' button to perform the calculation.
-
-.. image:: density_tutor.gif
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. note:: This help document was last changed by Steve King, 01May2015
Index: cs/sphinx-docs/source/user/sasgui/perspectives/calculator/gen_gui_help.bmp
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/calculator/gen_gui_help.bmp (revision a8787f980df2e3bfd3935ed2068c2a794216858e)
+++ (revision )
@@ -1,1 +1,0 @@
-Unexpected error. File contents could not be restored from local history during undo/redo.
Index: cs/sphinx-docs/source/user/sasgui/perspectives/calculator/gen_sas_help.html
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/calculator/gen_sas_help.html (revision 49148bbc34832e06f4f05e8e4c4c32c0da92d133)
+++ (revision )
@@ -1,147 +1,0 @@
-
-Generic Scattering Calculator:
-Polarization and Magnetic Scattering
-
-
-
-
-
-1. Theory
-
-In general, a particle with a volume V can be described by an ensemble containing N
-3-dimensional rectangular pixels where each pixels are much smaller than V.
-Assuming that
-all the pixel sizes are same, the elastic scattering intensity
-by the particle
-
-
-
-
-where βj and rj are the scattering
-length density and the position
-of the j'th pixel respectively. And the total volume
-
-
-
-
-for βj ≠ 0 where vj is the volume of the j'th pixel
-(or the j'th natural atomic volume (= atomic mass/natural molar density/Avogadro number)
- for the atomic structures). The total volume V can be corrected by users.
-This correction is useful especially for an atomic structure (taken from a pdb file) to get the right
-normalization. Note that the βj displayed in GUI may be incorrect but will not
-affect the scattering computation if the correction of the total volume is made.
-
-The scattering length density (SLD) of each pixel where the SLD is uniform, is a combination of the nuclear and magnetic SLDs
-and depends on the spin states of the neutrons as follows:
-
-
-For magnetic scattering, only the magnetization component, Mperp,
-perpendicular to the scattering vector Q contributes to the the magnetic
-scattering length. (Figure below).
-
-
-
-
-The magnetic scattering length density is then
-
-
-
-
-where γ = -1.913 the gyromagnetic ratio, μB is the Bohr magneton,
-r0 is the classical radius of electron,
-and σ is the Pauli spin.
-
-For polarized neutron, the magnetic scattering is depending on the spin states.
-Let's consider that the incident neutrons are polarized parallel (+)/anti-parallel
-(–) to the x' axis (See both Figures above).
-The possible out-coming states then are + and - states for both incident states.
-
- - Non-spin-flips: (+ +) and (- -)
-
- - Spin-flips: (+ -) and (- +)
-
-
-
-
-
-
-Now, let's assume that the angles of the Q vector and the spin-axis (x') from x-axis
-are φ and θup, respectively (See Figure above).
-Then, depending upon the polarization (spin) state of neutrons, the scattering length
-densities , including the nuclear scattering length density (β N) are given as, for non-spin-flips,
-
-
-
-
-
-for spin-flips,
-
-
-
-
-
-where
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Here, the M0x, M0y and M0z are the x, y and z
-components of the magnetization vector given in the xyz lab frame.
-
-
-2. GUI
-
-
-
-
-
-
-After the computation, the result will be listed in the 'Theory' box
-in the data explorer panel on the main window.
-
-The 'Up_frac_in' and 'Up_frac_out' are the ratio, (spin up) /(spin up + spin down) neutrons
-before the sample and at the analyzer, respectively.
-
-
-*Note I: The values of 'Up_frac_in' and 'Up_frac_out' must be in the range between 0 and 1.
-For example, both values are 0.5 for unpolarized neutrons.
-
-*Note II: This computation is totally based on the pixel (or atomic) data fixed
-in the xyz coordinates. Thus no angular orientational averaging is considered.
-
-*Note III: For the nuclear scattering length density, only the real component is taken account.
-
-
-3. PDB Data
-
-This Generic scattering calculator also supports some pdb files without considering polarized/magnetic scattering
- so that the related parameters such as Up_*** will be ignored (see the Picture below). The calculation for fixed orientation uses (the first) Equation above resulting
-in a 2D output, whileas the scattering calculation averaged over all the orientations uses the Debye equation providing a 1D output:
-
-
-
-
-where vjβj ≡ bj is the scattering length of the j'th atom.
-The resultant outputs will be displayed in the DataExporer for further uses.
-
-
-
-
-
Index: cs/sphinx-docs/source/user/sasgui/perspectives/calculator/image_viewer_help.rst
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/calculator/image_viewer_help.rst (revision 49148bbc34832e06f4f05e8e4c4c32c0da92d133)
+++ (revision )
@@ -1,55 +1,0 @@
-.. image_viewer_help.rst
-
-.. This is a port of the original SasView html help file to ReSTructured text
-.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015.
-
-Image Viewer Tool
-=================
-
-Description
------------
-
-This tool loads image files and displays them as 2D (x-y coordinate against
-counts per pixel). The plot can then can be saved, printed, and copied. The
-plot can also be resized by dragging the corner of the panel.
-
-The supported input image formats are:
-
-* BMP (bitmap format)
-* GIF (graphical interchange format)
-* JPG (joint photographic experts group format)
-* PNG (portable network graphics format)
-* TIF (tagged image format)
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Using the tool
---------------
-
-1) Select *Image Viewer* from the *Tool* menu on the SasView toolbar.
-
-2) Select a file and then click *Open*. If the loading is successful the image
- will be displayed.
-
-.. image:: load_image.bmp
-
-3) To save, print, or copy the image, or to apply a grid overlay, right-click
- anywhere in the plot.
-
-.. image:: pic_plot.bmp
-
-4. If the image is taken from a 2D detector, SasView can attempt to convert
- the colour/grey scale into pseudo-intensity 2D data using
-
- z = (0.299 x R) + (0.587 x G) + (0.114 x B)
-
- unless the image is formatted as 8-bit grey-scale TIF.
-
-5. In the *Convert to Data* dialog, set the parameters relevant to the data and
- then click the OK.
-
-.. image:: pic_convert.bmp
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. note:: This help document was last changed by Steve King, 01May2015
Index: cs/sphinx-docs/source/user/sasgui/perspectives/calculator/kiessig_calculator_help.rst
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/calculator/kiessig_calculator_help.rst (revision 49148bbc34832e06f4f05e8e4c4c32c0da92d133)
+++ (revision )
@@ -1,29 +1,0 @@
-.. kiessig_calculator_help.rst
-
-.. This is a port of the original SasView html help file to ReSTructured text
-.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015.
-
-Kiessig Thickness Calculator Tool
-=================================
-
-Description
------------
-
-This tool is approximately estimates the thickness of a layer or the diameter
-of particles from the position of the Kiessig fringe/Bragg peak in NR/SAS data
-using the relation
-
-(thickness *or* size) = 2 * |pi| / (fringe_width *or* peak position)
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Using the tool
---------------
-
-To get a rough thickness or particle size, simply type the fringe or peak
-position (in units of 1/|Ang|\) and click on the *Compute* button.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. note:: This help document was last changed by Steve King, 01May2015
-
Index: cs/sphinx-docs/source/user/sasgui/perspectives/calculator/mag_vector.bmp
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/calculator/mag_vector.bmp (revision a8787f980df2e3bfd3935ed2068c2a794216858e)
+++ (revision )
@@ -1,1 +1,0 @@
-Unexpected error. File contents could not be restored from local history during undo/redo.
Index: cs/sphinx-docs/source/user/sasgui/perspectives/calculator/python_shell_help.rst
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/calculator/python_shell_help.rst (revision 49148bbc34832e06f4f05e8e4c4c32c0da92d133)
+++ (revision )
@@ -1,38 +1,0 @@
-.. python_shell_help.rst
-
-.. This is a port of the original SasView html help file to ReSTructured text
-.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015.
-
-Python Shell Tool
-=================
-
-Description
------------
-
-This is a Python shell/editor (PyCrust) provided with WxPython. An editing
-notebook will show up when a Python file is created/loaded with the *New* or
-*Open* options on the menu.
-
-*Run* enables the editor to compile and run the Python code.
-
-For the details about the Python, visit the website http://docs.python.org/tutorial/
-
-The NumPy, SciPy, and Matplotlib, etc, libraries are shipped with SasView.
-However, some functionality may not work.
-
-PyCrust has its own Help.
-
-*NOTE! The Help() and Credits() calls do not work on Macs.*
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Example
--------
-
-An example calling the Matplotlib plotting gallery:
-
-.. image:: pycrust_example.png
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. note:: This help document was last changed by Steve King, 19Feb2015
Index: cs/sphinx-docs/source/user/sasgui/perspectives/calculator/resolution_calculator_help.rst
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/calculator/resolution_calculator_help.rst (revision 49148bbc34832e06f4f05e8e4c4c32c0da92d133)
+++ (revision )
@@ -1,103 +1,0 @@
-.. resolution_calculator_help.rst
-
-.. This is a port of the original SasView html help file to ReSTructured text
-.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015.
-
-Q Resolution Estimator Tool
-===========================
-
-Description
------------
-
-This tool is approximately estimates the resolution of Q from SAS instrumental
-parameter values assuming that the detector is flat and normal to the
-incident beam.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Using the tool
---------------
-
-1) Select *SAS Resolution Estimator* from the *Tool* menu on the SasView toolbar.
-
-2) Select the source (Neutron or Photon) and source type (Monochromatic or TOF).
-
- *NOTE! The computational difference between the sources is only the
- gravitational contribution due to the mass of the particles.*
-
-3) Change the default values of the instrumental parameters as required. Be
- careful to note that distances are specified in cm!
-
-4) Enter values for the source wavelength(s), |lambda|\ , and its spread (= FWHM/|lambda|\ ).
-
- For monochromatic sources, the inputs are just one value. For TOF sources,
- the minimum and maximum values should be separated by a '-' to specify a
- range.
-
- Optionally, the wavelength (BUT NOT of the wavelength spread) can be extended
- by adding '; nn' where the 'nn' specifies the number of the bins for the
- numerical integration. The default value is nn = 10. The same number of bins
- will be used for the corresponding wavelength spread.
-
-5) For TOF, the default wavelength spectrum is flat. A custom spectral
- distribution file (2-column text: wavelength (|Ang|\) vs Intensity) can also
- be loaded by selecting *Add new* in the combo box.
-
-6) When ready, click the *Compute* button. Depending on the computation the
- calculation time will vary.
-
-7) 1D and 2D dQ values will be displayed at the bottom of the panel, and a 2D
- resolution weight distribution (a 2D elliptical Gaussian function) will also
- be displayed in the plot panel even if the Q inputs are outside of the
- detector limit (the red lines indicate the limits of the detector).
-
- TOF only: green lines indicate the limits of the maximum Q range accessible
- for the longest wavelength due to the size of the detector.
-
- Note that the effect from the beam block/stop is ignored, so in the small Q
- region near the beam block/stop
-
- [ie., Q < 2. |pi|\ .(beam block diameter) / (sample-to-detector distance) / |lambda|\_min]
-
- the variance is slightly under estimated.
-
-8) A summary of the calculation is written to the SasView *Console* at the
- bottom of the main SasView window.
-
-.. image:: resolution_tutor.gif
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Theory
-------
-
-The scattering wave transfer vector is by definition
-
-.. image:: q.gif
-
-In the small-angle limit, the variance of Q is to a first-order
-approximation
-
-.. image:: sigma_q.gif
-
-The geometric and gravitational contributions can then be summarised as
-
-.. image:: sigma_table.gif
-
-Finally, a Gaussian function is used to describe the 2D weighting distribution
-of the uncertainty in Q.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-References
-----------
-
-D.F.R. Mildner and J.M. Carpenter
-*J. Appl. Cryst.* 17 (1984) 249-256
-
-D.F.R. Mildner, J.M. Carpenter and D.L. Worcester
-*J. Appl. Cryst.* 19 (1986) 311-319
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. note:: This help document was last changed by Steve King, 01May2015
Index: cs/sphinx-docs/source/user/sasgui/perspectives/calculator/sas_calculator_help.rst
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/calculator/sas_calculator_help.rst (revision 49148bbc34832e06f4f05e8e4c4c32c0da92d133)
+++ (revision )
@@ -1,156 +1,0 @@
-.. sas_calculator_help.rst
-
-.. This is a port of the original SasView html help file to ReSTructured text
-.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015.
-
-Generic SANS Calculator Tool
-============================
-
-Description
------------
-
-This tool attempts to simulate the SANS expected from a specified
-shape/structure or scattering length density profile. The tool can
-handle both nuclear and magnetic contributions to the scattering.
-
-Theory
-------
-
-In general, a particle with a volume *V* can be described by an ensemble
-containing *N* 3-dimensional rectangular pixels where each pixel is much
-smaller than *V*.
-
-Assuming that all the pixel sizes are the same, the elastic scattering
-intensity from the particle is
-
-.. image:: gen_i.gif
-
-Equation 1.
-
-where |beta|\ :sub:`j` and *r*\ :sub:`j` are the scattering length density and
-the position of the j'th pixel respectively.
-
-The total volume *V*
-
-.. image:: v_j.gif
-
-for |beta|\ :sub:`j` |noteql|\0 where *v*\ :sub:`j` is the volume of the j'th
-pixel (or the j'th natural atomic volume (= atomic mass / (natural molar
-density * Avogadro number) for the atomic structures).
-
-*V* can be corrected by users. This correction is useful especially for an
-atomic structure (such as taken from a PDB file) to get the right normalization.
-
-*NOTE!* |beta|\ :sub:`j` *displayed in the GUI may be incorrect but this will not
-affect the scattering computation if the correction of the total volume V is made.*
-
-The scattering length density (SLD) of each pixel, where the SLD is uniform, is
-a combination of the nuclear and magnetic SLDs and depends on the spin states
-of the neutrons as follows.
-
-Magnetic Scattering
-^^^^^^^^^^^^^^^^^^^
-
-For magnetic scattering, only the magnetization component, *M*\ :sub:`perp`\ ,
-perpendicular to the scattering vector *Q* contributes to the magnetic
-scattering length.
-
-.. image:: mag_vector.bmp
-
-The magnetic scattering length density is then
-
-.. image:: dm_eq.gif
-
-where the gyromagnetic ratio |gamma| = -1.913, |mu|\ :sub:`B` is the Bohr
-magneton, *r*\ :sub:`0` is the classical radius of electron, and |sigma| is the
-Pauli spin.
-
-For a polarized neutron, the magnetic scattering is depending on the spin states.
-
-Let us consider that the incident neutrons are polarised both parallel (+) and
-anti-parallel (-) to the x' axis (see below). The possible states after
-scattering from the sample are then
-
-* Non-spin flips: (+ +) and (- -)
-* Spin flips: (+ -) and (- +)
-
-.. image:: gen_mag_pic.bmp
-
-Now let us assume that the angles of the *Q* vector and the spin-axis (x')
-to the x-axis are |phi| and |theta|\ :sub:`up` respectively (see above). Then,
-depending upon the polarization (spin) state of neutrons, the scattering
-length densities, including the nuclear scattering length density (|beta|\ :sub:`N`\ )
-are given as
-
-* for non-spin-flips
-
- .. image:: sld1.gif
-
-* for spin-flips
-
- .. image:: sld2.gif
-
-where
-
-.. image:: mxp.gif
-
-.. image:: myp.gif
-
-.. image:: mzp.gif
-
-.. image:: mqx.gif
-
-.. image:: mqy.gif
-
-Here the *M0*\ :sub:`x`\ , *M0*\ :sub:`y` and *M0*\ :sub:`z` are the x, y and z
-components of the magnetisation vector in the laboratory xyz frame.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Using the tool
---------------
-
-.. image:: gen_gui_help.bmp
-
-After computation the result will appear in the *Theory* box in the SasView
-*Data Explorer* panel.
-
-*Up_frac_in* and *Up_frac_out* are the ratio
-
- (spin up) / (spin up + spin down)
-
-of neutrons before the sample and at the analyzer, respectively.
-
-*NOTE 1. The values of* Up_frac_in *and* Up_frac_out *must be in the range
-0.0 to 1.0. Both values are 0.5 for unpolarized neutrons.*
-
-*NOTE 2. This computation is totally based on the pixel (or atomic) data fixed
-in xyz coordinates. No angular orientational averaging is considered.*
-
-*NOTE 3. For the nuclear scattering length density, only the real component
-is taken account.*
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Using PDB/OMF or SLD files
---------------------------
-
-The SANS Calculator tool can read some PDB, OMF or SLD files but ignores
-polarized/magnetic scattering when doing so, thus related parameters such as
-*Up_frac_in*, etc, will be ignored.
-
-The calculation for fixed orientation uses Equation 1 above resulting in a 2D
-output, whereas the scattering calculation averaged over all the orientations
-uses the Debye equation below providing a 1D output
-
-.. image:: gen_debye_eq.gif
-
-where *v*\ :sub:`j` |beta|\ :sub:`j` |equiv| *b*\ :sub:`j` is the scattering
-length of the j'th atom. The calculation output is passed to the *Data Explorer*
-for further use.
-
-.. image:: pdb_combo.jpg
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. note:: This help document was last changed by Steve King, 01May2015
Index: cs/sphinx-docs/source/user/sasgui/perspectives/calculator/sld_calculator_help.rst
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/calculator/sld_calculator_help.rst (revision 49148bbc34832e06f4f05e8e4c4c32c0da92d133)
+++ (revision )
@@ -1,56 +1,0 @@
-.. sld_calculator_help.rst
-
-.. This is a port of the original SasView html help file to ReSTructured text
-.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015.
-
-SLD Calculator Tool
-===================
-
-Description
------------
-
-The neutron scattering length density (SLD) is defined as
-
- SLD = (b_c1 + b_c2 + ... + b_cn) / Vm
-
-where b_ci is the bound coherent scattering length of ith of n atoms in a molecule
-with the molecular volume Vm
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Specifying the Compound Name
-----------------------------
-
-To calculate scattering length densities enter the empirical formula of a
-compound and its mass density and click "Calculate".
-
-Entering a wavelength value is optional (a default value of 6.0 |Ang| will
-be used).
-
-TIPS!
-
-* Formula strings consist of atoms and the number of them, such as "CaCO3+6H2O".
-
-* Groups can be separated by *'+'* or *space*, so "CaCO3 6H2O" works as well.
-
-* Groups can be defined using parentheses, such as "CaCO3(H2O)6".
-
-* Parentheses can be nested, such as "(CaCO3(H2O)6)1".
-
-* Isotopes are represented by their atomic number in *square brackets*, such
- as "CaCO[18]3+6H2O", H[1], or H[2].
-
-* Numbers of atoms can be integer or decimal, such as "CaCO3+(3HO0.5)2".
-
-* The SLD of mixtures can be calculated as well. For example, for a 70-30
- mixture of H2O/D2O write "H14O7+D6O3" or more simply "H7D3O5" (i.e. this says
- 7 hydrogens, 3 deuteriums, and 5 oxygens) and enter a mass density calculated
- on the percentages of H2O and D2O.
-
-* Type "C[13]6 H[2]12 O[18]6" for C(13)6H(2)12O(18)6 (6 Carbon-13 atoms, 12
- deuterium atoms, and 6 Oxygen-18 atoms).
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. note:: This help document was last changed by Steve King, 01May2015
-
Index: cs/sphinx-docs/source/user/sasgui/perspectives/calculator/slit_calculator_help.rst
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/calculator/slit_calculator_help.rst (revision 49148bbc34832e06f4f05e8e4c4c32c0da92d133)
+++ (revision )
@@ -1,41 +1,0 @@
-.. slit_calculator_help.rst
-
-.. This is a port of the original SasView html help file to ReSTructured text
-.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015.
-
-
-Slit Size Calculator Tool
-=========================
-
-Description
------------
-
-This tool enables X-ray users to calculate the slit size (FWHM/2) for smearing
-based on their half beam profile data.
-
-*NOTE! Whilst it may have some more generic applicability, the calculator has
-only been tested with beam profile data from Anton-Paar SAXSess*\ |TM|\
-*software.*
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Using the tool
---------------
-
-1) Select *Slit Size Calculator* from the *Tool* menu on the SasView toolbar.
-
-2) Load a beam profile file in the *Data* field using the *Browse* button.
-
- *NOTE! To see an example of the beam profile file format, visit the file
- beam profile.DAT in your {installation_directory}/SasView/test folder.*
-
-3) Once a data is loaded, the slit size is automatically computed and displayed
- in the tool window.
-
-*NOTE! The beam profile file does not carry any information about the units of
-the Q data. This calculator assumes the data has units of 1/\ |Ang|\ . If the
-data is not in these units it must be manually converted beforehand.*
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. note:: This help document was last changed by Steve King, 01May2015
Index: cs/sphinx-docs/source/user/sasgui/perspectives/corfunc/corfunc_help.rst
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/corfunc/corfunc_help.rst (revision 815f7b81b7d6f6f2663e7ce8b764f7cda36d00d3)
+++ (revision )
@@ -1,174 +1,0 @@
-.. corfunc_help.rst
-
-Correlation Function Perspective
-================================
-
-Description
------------
-
-This perspective performs a correlation function analysis of one-dimensional
-SANS data, or generates a model-independent volume fraction profile from a
-one-dimensional SANS pattern of an adsorbed layer.
-
-The correlation function analysis is performed in 3 stages:
-
-* Extrapolation of the scattering curve to :math:`Q = 0` and
- :math:`Q = \infty`
-* Fourier/Hilbert Transform of the extrapolated data to give the correlation
- function/volume fraction profile
-* Interpretation of the 1D correlation function based on an ideal lamellar
- morphology
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Extrapolation
--------------
-
-To :math:`Q = 0`
-^^^^^^^^^^^^^^^^
-
-The data are extrapolated to Q = 0 by fitting a Guinier model to the data
-points in the lower Q range.
-The equation used is:
-
-.. math::
- I(Q) = Ae^{Bq^2}
-
-The Guinier model assumes that the small angle scattering arises from particles
-and that parameter :math:`B` is related to the radius of gyration of those
-particles. This has dubious applicability to polymer systems. However, the
-correlation function is affected by the Guinier back-extrapolation to the
-greatest extent at large values of R and so the back-extrapolation only has a
-small effect on the analysis.
-
-To :math:`Q = \infty`
-^^^^^^^^^^^^^^^^^^^^^
-
-The data are extrapolated to Q = :math:`\infty` by fitting a Porod model to
-the data points in the upper Q range.
-
-The equation used is:
-
-.. math::
- I(Q) = B + KQ^{-4}e^{-Q^2\sigma^2}
-
-Where :math:`B` is the Bonart thermal background, :math:`K` is the Porod
-constant, and :math:`\sigma` describes the electron (or neutron scattering
-length) density profile at the interface between crystalline and amorphous
-regions (see figure 1).
-
-.. figure:: fig1.gif
- :align: center
-
- **Figure 1** The value of :math:`\sigma` is a measure of the electron
- density profile at the interface between crystalline and amorphous regions.
-
-Smoothing
-^^^^^^^^^
-
-The extrapolated data set consists of the Guinier back-extrapolation up to the
-highest Q value of the lower Q range, the original scattering data up to the
-highest value in the upper Q range, and the Porod tail-fit beyond this. The
-joins between the original data and the Guinier/Porod fits are smoothed using
-the algorithm below, to avoid the formation of ripples in the transformed data.
-
-Functions :math:`f(x_i)` and :math:`g(x_i)` where :math:`x_i \in \left\{
-{x_1, x_2, ..., x_n} \right\}`, are smoothed over the range :math:`[a, b]`
-to produce :math:`y(x_i)`, by the following equations:
-
-.. math::
- y(x_i) = h_ig(x_i) + (1-h_i)f(x_i)
-
-where:
-
-.. math::
- h_i = \frac{1}{1 + \frac{(x_i-b)^2}{(x_i-a)^2}}
-
-Transform
----------
-
-Fourier
-^^^^^^^
-
-If Fourier is selected for the transform type, the perspective will perform a
-discrete cosine transform on the extrapolated data in order to calculate the
-correlation function. The following algorithm is applied:
-
-.. math::
- \Gamma(x_k) = 2 \sum_{n=0}^{N-1} x_n \cos{\left[ \frac{\pi}{N}
- \left(n + \frac{1}{2} \right) k \right] } \text{ for } k = 0, 1, \ldots,
- N-1, N
-
-Hilbert
-^^^^^^^
-If Hilbert is selected for the transform type, the perspective will perform a
-Hilbert transform on the extrapolated data in order to calculate the Volume
-Fraction Profile.
-
-Interpretation
---------------
-Once the correlation function has been calculated by transforming the
-extrapolated data, it may be interpreted by clicking the "Compute Parameters"
-button. The correlation function is interpreted in terms of an ideal lamellar
-morphology, and structural parameters are obtained as shown in Figure 2 below.
-It should be noted that a small beam size is assumed; no de-smearing is
-performed.
-
-.. figure:: fig2.gif
- :align: center
-
- **Figure 2** Interpretation of the correlation function.
-
-The structural parameters obtained are:
-
-* Long Period :math:`= L_p`
-* Average Hard Block Thickness :math:`= L_c`
-* Average Core Thickness :math:`= D_0`
-* Average Interface Thickness :math:`\text{} = D_{tr}`
-* Polydispersity :math:`= \Gamma_{\text{min}}/\Gamma_{\text{max}}`
-* Local Crystallinity :math:`= L_c/L_p`
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Usage
------
-Upon sending data to the correlation function perspective, it will plot the data
-, as well as a red bar indicating the lower Q range (used for
-back-extrapolation), and 2 purple bars indicating the upper qrange (used for
-forwards-extrapolation) [figure 3]. These bars may be moved my clicking and
-dragging, or by entering the appropriate value in the Q range input boxes.
-
-.. figure:: tutorial1.png
- :align: center
-
- **Figure 3** A plot of some data showing the Q range bars
-
-Once the Q ranges have been set, click the "Calculate" button next to the
-background input field to calculate the Bonart thermal background level.
-Alternatively, enter your own value into the field. Click the "Extrapolate"
-button to extrapolate the data and plot the extrapolation in the same figure
-as the original data. [figure 4]
-
-.. figure:: tutorial2.png
- :align: center
-
- **Figure 4** A plot showing the extrapolated data and the original data
-
-Then, select which type of transform you would like to perform, using the radio
-buttons:
-
-* **Fourier** Perform a Fourier Transform to calculate the correlation
- function of the extrapolated data
-* **Hilbert** Perform a Hilbert Transform to calculate the volume fraction
- profile of the extrapolated data
-
-Clicking the transform button will then perform the selected transform and plot
-it in a new figure. If a Fourier Transform was performed, the "Compute
-Parameters" button can also be clicked to calculate values for the output
-parameters [figure 5]
-
- .. figure:: tutorial3.png
- :align: center
-
- **Figure 5** The Fourier Transform (correlation function) of the
- extrapolated data, and the parameters extracted from it.
Index: cs/sphinx-docs/source/user/sasgui/perspectives/file_converter/file_converter_help.rst
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/file_converter/file_converter_help.rst (revision eb8da5f6d46ff9952df4b0fa31b3cf63ba4e1be8)
+++ (revision )
@@ -1,37 +1,0 @@
-.. file_converter_help.rst
-
-File Converter Tool
-===================
-
-Description
------------
-
-This tool converts file formats with the Q data and intensity data in separate
-files, into a single CanSAS XML file.
-
-The input files can be:
-
-* Single column ASCII data, with lines that end with a digit, comma or
- semi-colon.
-* `BSL/OTOKO formatted
- `_ data files.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Using the Tool
---------------
-
-1) Select the files containing your Q-Axis and Intensity-Axis data
-2) Chose whether the files are in ASCII or BSL format
-3) Chose where you would like to save the converted XML file
-4) Optionally, input some metadata such as sample size, detector name, etc
-5) Click *Convert* to save the converted file to disk
-
-**Note**: If a BSL/OTOKO file with multiple frames is selected for the
-intensity-axis file, a dialog will appear asking which frames you would like
-converted. You may enter a start frame, end frame & increment, and all frames
-in that subset will be converted. For example: entering 0, 50 and 10 for the
-first frame, last frame, and increment respectively will convert frames 0, 10,
-20, 30, 40 & 50. To convert a single frame, enter the same value for first
-frame & last frame, and 1 as the increment.
Index: cs/sphinx-docs/source/user/sasgui/perspectives/fitting/fitting.rst
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/fitting/fitting.rst (revision 5f5c5965f23ac2cbcb5f353269eb3c3db1c065a0)
+++ (revision )
@@ -1,20 +1,0 @@
-.. _Fitting_Documentation:
-
-Fitting Documentation
-=====================
-
-.. toctree::
- :maxdepth: 1
-
- Fitting Data
-
- Assessing Fit Quality
-
- Polydispersity Distributions
-
- Smearing Functions
-
- Polarisation/Magnetic Scattering
-
- Information on the SasView Optimisers
-
Index: cs/sphinx-docs/source/user/sasgui/perspectives/fitting/fitting_help.rst
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/fitting/fitting_help.rst (revision 6e941732283682979bb4efbfb70c003b2b50e14e)
+++ (revision )
@@ -1,619 +1,0 @@
-.. fitting_help.rst
-
-.. This is a port of the original SasView html help file to ReSTructured text
-.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015.
-
-.. |inlineimage004| image:: sm_image004.gif
-.. |inlineimage005| image:: sm_image005.gif
-.. |inlineimage008| image:: sm_image008.gif
-.. |inlineimage009| image:: sm_image009.gif
-.. |inlineimage010| image:: sm_image010.gif
-.. |inlineimage011| image:: sm_image011.gif
-.. |inlineimage012| image:: sm_image012.gif
-.. |inlineimage018| image:: sm_image018.gif
-.. |inlineimage019| image:: sm_image019.gif
-
-
-Fitting Perspective
-===================
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Preparing to fit data
----------------------
-
-To fit some data you must first load some data, activate one or more data sets,
-send those data sets to the fitting perspective, and select a model to fit to
-each data set.
-
-Instructions on how to load and activate data are in the section :ref:`Loading_data`.
-
-SasView can fit data in one of three ways:
-
-* in *Single* fit mode - individual data sets are fitted independently one-by-one
-
-* in *Simultaneous* fit mode - multiple data sets are fitted simultaneously to the *same* model with/without constrained parameters (this might be useful, for example, if you have measured the same sample at different contrasts)
-
-* in *Batch* fit mode - multiple data sets are fitted sequentially to the *same* model (this might be useful, for example, if you have performed a kinetic or time-resolved experiment and have *lots* of data sets!)
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Selecting a model
------------------
-
-By default, the models in SasView are grouped into five categories
-
-* *Shapes* - models describing 'objects' (spheres, cylinders, etc)
-* *Shape-Independent* - models describing structure in terms of density correlation functions, fractals, peaks, power laws, etc
-* *Customized Models* - SasView- or User-created (non-library) Python models
-* *Uncategorised* - other models (for reflectivity, etc)
-* *Structure Factor* - S(Q) models
-
-Use the *Category* drop-down menu to chose a category of model, then select
-a model from the drop-down menu beneath. A graph of the chosen model, calculated
-using default parameter values, will appear. The graph will update dynamically
-as the parameter values are changed.
-
-You can decide your own model categorizations using the :ref:`Category_Manager`.
-
-Once you have selected a model you can read its help documentation by clicking
-on the *Description* button to the right.
-
-Show 1D/2D
-^^^^^^^^^^
-
-Models are normally fitted to 1D (ie, I(Q) vs Q) data sets, but some models in
-SasView can also be fitted to 2D (ie, I(Qx,Qy) vs Qx vs Qy) data sets.
-
-*NB: Magnetic scattering can only be fitted in SasView in 2D.*
-
-To activate 2D fitting mode, click the *Show 2D* button on the *Fit Page*. To
-return to 1D fitting model, click the same button (which will now say *Show 1D*).
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. _Category_Manager:
-
-Category Manager
-----------------
-
-To change the model categorizations, either choose *Category Manager* from the
-*View* option on the menubar, or click on the *Modify* button on the *Fit Page*.
-
-.. image:: cat_fig0.bmp
-
-The categorization of all models except the customized models can be reassigned,
-added to, and removed using *Category Manager*. Models can also be hidden from view
-in the drop-down menus.
-
-.. image:: cat_fig1.bmp
-
-Changing category
-^^^^^^^^^^^^^^^^^
-
-To change category, highlight a model in the list by left-clicking on its entry and
-then click the *Modify* button. Use the *Change Category* panel that appears to make
-the required changes.
-
-.. image:: cat_fig2.bmp
-
-To create a category for the selected model, click the *Add* button. In order
-to delete a category, select the category name and click the *Remove Selected*
-button. Then click *Done*.
-
-Showing/hiding models
-^^^^^^^^^^^^^^^^^^^^^
-
-Use the *Enable All / Disable All* buttons and the check boxes beside each model to
-select the models to show/hide. To apply the selection, click *Ok*. Otherwise click
-*Cancel*.
-
-*NB: It may be necessary to change to a different category and then back again*
-*before any changes take effect.*
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Model Functions
----------------
-
-For a complete list of all the library models available in SasView, see the Model Documentation.
-
-It is also possible to add your own models.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. _Adding_your_own_models:
-
-Adding your own models
-----------------------
-
-There are currently two ways to add your own models to SasView:
-
-* Using the :ref:`Custom_Model_Editor`
-* By :ref:`Writing_a_Plugin`
-
-*NB: Because of the way these options are implemented, it is not possible for them*
-*to use the polydispersity algorithms in SasView. Only models in the model library*
-*can do this. At the time of writing (Release 3.1.0) work is in hand to make it*
-*easier to add new models to the model library.*
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. _Custom_Model_Editor:
-
-Custom Model Editor
--------------------
-
-From the *Fitting* option in the menu bar, select *Edit Custom Model*.
-
-.. image:: edit_model_menu.bmp
-
-and then one of the options
-
-* *New* - to create a new custom model template
-* *Sum|Multi(p1,p2)* - to create a new model by summing/multiplying existing models in the model library
-* *Advanced* - to edit a new custom model
-* *Delete* - to delete a custom model
-
-New
-^^^^
-
-.. image:: new_model.bmp
-
-A model template generated by this option can be viewed and further modified using
-the :ref:`Advanced` option.
-
-Sum|Multi(p1,p2)
-^^^^^^^^^^^^^^^^
-
-.. image:: sum_model.bmp
-
-This option creates a custom model of the form
-
-Custom Model = scale_factor \* (model1 +/\* model2)
-
-In the *Easy Sum/Multi Editor* give the new custom model a function name and brief
-description (to appear under the *Details* button on the *Fit Page*). Then select
-two existing models, as p1 and p2, and the required operator, '+' or '*' between
-them. Finally, click the *Apply* button to generate the model and then click *Close*.
-
-*NB: Any changes to a custom model generated in this way only become effective after*
-*it is re-selected from the model drop-down menu on the Fit Page.*
-
-.. _Advanced:
-
-Advanced
-^^^^^^^^
-
-Selecting this option shows all the custom models in the plugin model folder
-
- *C:\\Users\\[username]\\.sasview\\plugin_models* - (on Windows)
-
-You can edit, modify, and save the Python code in any of these models using the
-*Advanced Custom Model Editor*.
-
-*NB: Unless you are confident about what you are doing, it is recommended that you*
-*only modify lines denoted with the ## <----- comments!*
-
-When editing is complete, select *Run -> Compile* from the *Model Editor* menu bar. An
-*Info* box will appear with the results of the compilation and model unit tests. The
-model will only be usable if the tests 'pass'.
-
-To use the model, go to the relevant *Fit Page*, select the *Customized Models*
-category and then select the model from the drop-down menu.
-
-*NB: Any changes to a custom model generated in this way only become effective after*
-*it is re-selected from the model drop-down menu on the Fit Page.*
-
-Delete
-^^^^^^
-
-Simply highlight the custom model to be removed. This operation is final!
-
-*NB: Custom models shipped with SasView cannot be removed in this way.*
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. _Writing_a_Plugin:
-
-Writing a Plugin
-----------------
-
-Advanced users can write their own model in Python and save it to the the SasView
-*plugin_models* folder
-
- *C:\\Users\\[username]\\.sasview\\plugin_models* - (on Windows)
-
-in .py format. The next time SasView is started it will compile the plugin and add
-it to the list of *Customized Models*.
-
-It is recommended that existing plugin models be used as templates.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. _Fitting_Options:
-
-Fitting Options
----------------
-
-It is possible to specify which optimiser SasView should use to fit the data, and
-to modify some of the configurational parameters for each optimiser.
-
-From *Fitting* in the menu bar select *Fit Options*, then select one of the following
-optimisers:
-
-* DREAM
-* Levenberg-Marquardt
-* Quasi-Newton BFGS
-* Differential Evolution
-* Nelder-Mead Simplex
-
-The DREAM optimiser is the most sophisticated, but may not necessarily be the best
-option for fitting simple models. If uncertain, try the Levenberg-Marquardt optimiser
-initially.
-
-These optimisers form the *Bumps* package written by P Kienzle. For more information
-on each optimiser, see the :ref:`Fitting_Documentation`.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Fitting Limits
---------------
-
-By default, *SasView* will attempt to model fit the full range of the data; ie,
-across all *Q* values. If necessary, however, it is possible to specify only a
-sub-region of the data for fitting.
-
-In a *FitPage* or *BatchPage* change the *Q* values in the *Min* and/or *Max*
-text boxes. Vertical coloured bars will appear on the graph with the data and
-'theory' indicating the current *Q* limits (red = *Qmin*, purple = *Qmax*).
-
-To return to including all data in the fit, click the *Reset* button.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-
-Shortcuts
----------
-
-Copy/Paste Parameters
-^^^^^^^^^^^^^^^^^^^^^
-
-It is possible to copy the parameters from one *Fit Page* and to paste them into
-another *Fit Page* using the same model.
-
-To *copy* parameters, either:
-
-* Select *Edit -> Copy Params* from the menu bar, or
-* Use Ctrl(Cmd on Mac) + Left Mouse Click on the *Fit Page*.
-
-To *paste* parameters, either:
-
-* Select *Edit -> Paste Params* from the menu bar, or
-* Use Ctrl(Cmd on Mac) + Shift + Left-click on the *Fit Page*.
-
-If either operation is successful a message will appear in the info line at the
-bottom of the SasView window.
-
-Bookmark
-^^^^^^^^
-
-To *Bookmark* a *Fit Page* either:
-
-* Select a *Fit Page* and then click on *Bookmark* in the tool bar, or
-* Right-click and select the *Bookmark* in the popup menu.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. _Status_bar:
-
-Status Bar & Console
---------------------
-
-The status bar is located at the bottom of the SasView window and displays
-messages, hints, warnings and errors.
-
-At the right-hand side of the status bar is a button marked *Console*. The *Console*
-displays available message history and some run-time traceback information.
-
-During a long task the *Console* can also be used to monitor the progress.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. _Single_Fit_Mode:
-
-Single Fit Mode
----------------
-
-*NB: Before proceeding, ensure that the Single Mode radio button at the bottom of*
-*the Data Explorer is checked (see the section* :ref:`Loading_data` *).*
-
-This mode fits one data set.
-
-When data is sent to the fitting perspective it is plotted in a graph window as
-markers.
-
-If a graph does not appear, or a graph window appears but is empty, then the data
-has not loaded correctly. Check to see if there is a message in the :ref:`Status_Bar`
-or in the *Console* window.
-
-Assuming the data has loaded correctly, when a model is selected a green model
-calculation (or what SasView calls a 'Theory') line will appear in the earlier graph
-window, and a second graph window will appear displaying the residuals (the
-difference between the experimental data and the theory) at the same X-data values.
-See :ref:`Assessing_Fit_Quality`.
-
-The objective of model-fitting is to find a *physically-plausible* model, and set
-of model parameters, that generate a theory that reproduces the experimental data
-and gives residual values as close to zero as possible.
-
-Change the default values of the model parameters by hand until the theory line
-starts to represent the experimental data. Then uncheck the tick boxes alongside
-all parameters *except* the 'background' and the 'scale'. Click the *Fit* button.
-SasView will optimise the values of the 'background' and 'scale' and also display
-the corresponding uncertainties on the optimised values.
-
-*NB: If no uncertainty is shown it generally means that the model is not very*
-*dependent on the corresponding parameter (or that one or more parameters are*
-*'correlated').*
-
-In the bottom left corner of the *Fit Page* is a box displaying the normalised value
-of the statistical |chi|\ :sup:`2` parameter returned by the optimiser.
-
-Now check the box for another model parameter and click *Fit* again. Repeat this
-process until most or all parameters are checked and have been optimised. As the
-fit of the theory to the experimental data improves the value of 'chi2/Npts' will
-decrease. A good model fit should easily produce values of 'chi2/Npts' that are
-close to zero, and certainly <100. See :ref:`Assessing_Fit_Quality`.
-
-SasView has a number of different optimisers (see the section :ref:`Fitting_Options`).
-The DREAM optimiser is the most sophisticated, but may not necessarily be the best
-option for fitting simple models. If uncertain, try the Levenberg-Marquardt optimiser
-initially.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Simultaneous Fit Mode
----------------------
-
-*NB: Before proceeding, ensure that the Single Mode radio button at the bottom of*
-*the Data Explorer is checked (see the section* :ref:`Loading_data` *).*
-
-This mode is an extension of the :ref:`Single_Fit_Mode` that fits two or more data
-sets *to the same model* simultaneously. If necessary it is possible to constrain
-fit parameters between data sets (eg, to fix a background level, or radius, etc).
-
-If the data to be fit are in multiple files, load each file, then select each file
-in the *Data Explorer*, and *Send To Fitting*. If multiple data sets are in one file,
-load that file, *Unselect All Data*, select just those data sets to be fitted, and
-*Send To Fitting*. Either way, the result should be that for *n* data sets you have
-2\ *n* graphs (*n* of the data and model fit, and *n* of the resulting residuals). But
-it may be helpful to minimise the residuals plots for clarity. Also see
-:ref:`Assessing_Fit_Quality`.
-
-*NB: If you need to use a customized model, you must ensure that model is available*
-*first (see* :ref:`Adding_your_own_models` *).*
-
-Method
-^^^^^^
-
-Now go to each *FitPage* in turn and:
-
- Select the required category and model;
-
- Unselect all the model parameters;
-
- Enter some starting guesses for the parameters;
-
- Enter any parameter limits (recommended);
-
- Select which parameters will refine (selecting all is generally a bad idea...);
-
-When done, select *Constrained or Simultaneous Fit* under *Fitting* in the menu bar.
-
-In the *Const & Simul Fit* page that appears, select which data sets are to be
-simultaneously fitted (this will probably be all of them or you would not have loaded
-them in the first place!).
-
-To tie parameters between the data sets with constraints, check the 'yes' radio button
-next to *Add Constraint?* in the *Fit Constraints* box.
-
-*NB: You can only constrain parameters that are set to refine.*
-
-When ready, click the *Fit* button on the *Const & Simul Fit* page, NOT the *Fit*
-button on the individual *FitPage*'s.
-
-Simultaneous Fits without Constraints
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The results of the model-fitting will be returned to each of the individual
-*FitPage*'s.
-
-Note that the chi2/Npts value returned is the SUM of the chi2/Npts of each fit. To
-see the chi2/Npts value for a specific *FitPage*, click the *Compute* button at the
-bottom of that *FitPage* to recalculate. Also see :ref:`Assessing_Fit_Quality`.
-
-Simultaneous Fits with Constraints
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Use the *Easy Setup* drop-down buttons in the *Const & Simul Fit* page to set
-up constraints between *FitPage*'s.
-
-Constraints will generally be of the form
-
- Mi Parameter1 = Mj.Parameter1
-
-however the text box after the '=' sign can be used to adjust this
-relationship; for example
-
- Mi Parameter1 = scalar \* Mj.Parameter1
-
-A 'free-form' constraint box is also provided.
-
-Many constraints can be entered for a single fit.
-
-The results of the model-fitting will be returned to each of the individual
-*FitPage*'s.
-
-Note that the chi2/Npts value returned is the SUM of the chi2/Npts of each fit. To
-see the chi2/Npts value for a specific *FitPage*, click the *Compute* button at the
-bottom of that *FitPage* to recalculate. Also see :ref:`Assessing_Fit_Quality`.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Batch Fit Mode
---------------
-
-*NB: Before proceeding, ensure that the Single Mode radio button at the bottom of*
-*the Data Explorer is checked (see the section* :ref:`Loading_data` *). The Batch*
-*Mode button will be used later on!*
-
-This mode *sequentially* fits two or more data sets *to the same model*. Unlike in
-simultaneous fitting, in batch fitting it is not possible to constrain fit parameters
-between data sets.
-
-If the data to be fit are in multiple files, load each file in the *Data Explorer*.
-If multiple data sets are in one file, load just that file. *Unselect All Data*, then
-select a single initial data set to be fitted. Fit that selected data set as described
-above under :ref:`Single_Fit_Mode` .
-
-*NB: If you need to use a customized model, you must ensure that model is available*
-*first (see* :ref:`Adding_your_own_models` *).*
-
-Method
-^^^^^^
-
-Now *Select All Data* in the *Data Explorer*, check the *Batch Mode* radio button
-at the bottom of that panel and *Send To Fitting*. A *BatchPage* will be created.
-
-.. image:: batch_button_area.bmp
-
-*NB: The Batch Page can also be created by checking the Batch Mode radio button*
-*and selecting New Fit Page under Fitting in the menu bar.*
-
-Using the drop-down menus in the *BatchPage*, now set up the *same* data set
-with the *same* model that you just fitted in single fit mode. A quick way to
-set the model parameter values is to just copy them from the earlier Single
-Fit. To do this, go back to the Single Fit *FitPage*, select *Copy Params*
-under *Edit* in the menu bar, then go back to the *BatchPage* and *Paste Params*.
-
-When ready, use the *Fit* button on the *BatchPage* to perform the fitting, NOT
-the *Fit* button on the individual *FitPage*'s.
-
-Unlike in single fit mode, the results of batch fits are not returned to
-the *BatchPage*. Instead, a spreadsheet-like :ref:`Grid_Window` will appear.
-
-If you want to visually check a graph of a particular fit, click on the name of
-a *Data set* in the *Grid Window* and then click the *View Fits* button. The
-data and the model fit will be displayed. If you select mutliple data sets they
-will all appear on one graph.
-
-.. image:: view_button.bmp
-
-*NB: In theory, returning to the BatchPage and changing the name of the I(Q)*
-*data source should also work, but at the moment whilst this does change the*
-*data set displayed it always superimposes the 'theory' corresponding to the*
-*starting parameters.*
-
-If you select a 'Chi2' value and click the *View Fits* button a graph of the
-residuals for that data set is displayed. Again, if you select multiple 'Chi2'
-values then all the residuals data will appear on one graph. Also see
-:ref:`Assessing_Fit_Quality`.
-
-Chain Fitting
-^^^^^^^^^^^^^
-
-By default, the *same* parameter values copied from the initial single fit into
-the *BatchPage* will be used as the starting parameters for all batch fits. It
-is, however, possible to get *SasView* to use the results of a fit to a preceding
-data set as the starting parameters for the next fit in the sequence. This
-variation of batch fitting is called *Chain Fitting*, and will considerably speed
-up model-fitting if you have lots of very similar data sets where a few parameters
-are gradually changing. Do not use chain fitting on disparate data sets.
-
-To use chain fitting, select *Chain Fitting* under *Fitting* in the menu bar. It
-toggles on/off, so selecting it again will switch back to normal batch fitting.
-
-.. _Grid_Window:
-
-Grid Window
-^^^^^^^^^^^
-
-The *Grid Window* provides an easy way to view the results from batch fitting.
-It will be displayed automatically when a batch fit completes, but may be
-opened at any time by selecting *Show Grid Window* under *View* in the menu
-bar.
-
-.. image:: restore_batch_window.bmp
-
-Once a batch fit is completed, all model parameters are displayed but *not*
-their uncertainties. To view the uncertainties, click on a given column then
-go to *Edit* in the menu bar, select *Insert Column Before* and choose the
-required data from the list. An empty column can be inserted in the same way.
-
-To remove a column from the grid, click on the column header and choose
-*Remove Column* under *Edit* in the menu bar. The same functionality also
-allows you to re-order columns.
-
-*NB: You cannot insert/remove/re-order the rows in the Grid Window.*
-
-All of the above functions are also available by right-clicking on a column
-label.
-
-.. image:: edit_menu.bmp
-
-*NB: If there is an existing Grid Window and another batch fit is performed,*
-*an additional 'Table' tab will be added to the Grid Window.*
-
-The parameter values in the *currently selected* table of the *Grid Window*
-can be output to a CSV file by choosing *Save As* under *File* in the (*Grid*
-*Window*) menu bar. The default filename includes the date and time that the
-batch fit was performed.
-
-Saved CSV files can be reloaded by choosing *Open* under *File* in the *Grid*
-*Window* menu bar. The loaded parameters will appear in a new table tab.
-
-.. image:: file_menu.bmp
-
-*NB: Saving the Grid Window does not save any experimental data, residuals*
-*or actual model fits. Consequently if you reload a saved CSV file the*
-*ability to View Fits will be lost.*
-
-Parameter Plots
-^^^^^^^^^^^^^^^
-
-Any column of *numeric* parameter values can be plotted against another using
-the *Grid Window*. Simply select one column at the time and click the *Add*
-button next to the required *X/Y-axis Selection Range* text box. When both
-the X and Y axis boxes have been completed, click the *Plot* button.
-
-When the *Add* button is clicked, *SasView* also automatically completes the
-*X/Y-axis Label* text box with the heading from Row 1 of the selected table,
-but different labels and units can be entered manually.
-
-.. image:: plot_button.bmp
-
-The *X/Y-axis Selection Range* can be edited manually. The text control box
-recognises the operators +, -, \*, /, or 'pow', and allows the following
-types of expression :
-
- 1) if an axis label range is a function of 1 or more *columns*, write
- this type of expression
-
- constant1 * column_name1 [minimum row index : maximum row index]
- operator constant2 * column_name2 [minimum row index : maximum row index]
-
- Example: radius [2 : 5] -3 * scale [2 : 5]
-
- 2) if only some *values* of a given column are needed but the range between
- the first row and the last row used is not continuous, write this type of
- expression
-
- column_name1 [minimum row index1 : maximum row index1] , column_name1
- [minimum row index2 : maximum row index2]
-
- Example: radius [2 : 5] , radius [10 : 25]
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. note:: This help document was last changed by Steve King, 04Jun2015
Index: cs/sphinx-docs/source/user/sasgui/perspectives/fitting/mag_help.rst
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/fitting/mag_help.rst (revision 49148bbc34832e06f4f05e8e4c4c32c0da92d133)
+++ (revision )
@@ -1,107 +1,0 @@
-.. mag_help.rst
-
-.. This is a port of text from the original SasView html help file to ReSTructured text
-.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015.
-
-.. |inlineimage004| image:: sm_image004.gif
-.. |inlineimage005| image:: sm_image005.gif
-.. |inlineimage008| image:: sm_image008.gif
-.. |inlineimage009| image:: sm_image009.gif
-.. |inlineimage010| image:: sm_image010.gif
-.. |inlineimage011| image:: sm_image011.gif
-.. |inlineimage012| image:: sm_image012.gif
-.. |inlineimage018| image:: sm_image018.gif
-.. |inlineimage019| image:: sm_image019.gif
-
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Polarisation/Magnetic Scattering
---------------------------------
-
-Magnetic scattering is implemented in five (2D) models
-
-* *SphereModel*
-* *CoreShellModel*
-* *CoreMultiShellModel*
-* *CylinderModel*
-* *ParallelepipedModel*
-
-In general, the scattering length density (SLD, = |beta|) in each region where the
-SLD is uniform, is a combination of the nuclear and magnetic SLDs and, for polarised
-neutrons, also depends on the spin states of the neutrons.
-
-For magnetic scattering, only the magnetization component, *M*\ :sub:`perp`,
-perpendicular to the scattering vector *Q* contributes to the the magnetic
-scattering length.
-
-.. image:: mag_vector.bmp
-
-The magnetic scattering length density is then
-
-.. image:: dm_eq.gif
-
-where |gamma| = -1.913 is the gyromagnetic ratio, |mu|\ :sub:`B` is the
-Bohr magneton, *r*\ :sub:`0` is the classical radius of electron, and |sigma|
-is the Pauli spin.
-
-Assuming that incident neutrons are polarized parallel (+) and anti-parallel (-)
-to the *x'* axis, the possible spin states after the sample are then
-
-No spin-flips (+ +) and (- -)
-
-Spin-flips (+ -) and (- +)
-
-.. image:: M_angles_pic.bmp
-
-If the angles of the *Q* vector and the spin-axis (*x'*) to the *x*-axis are |phi|
-and |theta|\ :sub:`up`, respectively, then, depending on the spin state of the
-neutrons, the scattering length densities, including the nuclear scattering
-length density (|beta|\ :sub:`N`) are
-
-.. image:: sld1.gif
-
-when there are no spin-flips, and
-
-.. image:: sld2.gif
-
-when there are, and
-
-.. image:: mxp.gif
-
-.. image:: myp.gif
-
-.. image:: mzp.gif
-
-.. image:: mqx.gif
-
-.. image:: mqy.gif
-
-Here, *M*\ :sub:`0x`, *M*\ :sub:`0y` and *M*\ :sub:`0z` are the x, y and z components
-of the magnetization vector given in the laboratory xyz frame given by
-
-.. image:: m0x_eq.gif
-
-.. image:: m0y_eq.gif
-
-.. image:: m0z_eq.gif
-
-and the magnetization angles |theta|\ :sub:`M` and |phi|\ :sub:`M` are defined in
-the figure above.
-
-The user input parameters are:
-
-=========== ================================================================
- M0_sld = *D*\ :sub:`M` *M*\ :sub:`0`
- Up_theta = |theta|\ :sub:`up`
- M_theta = |theta|\ :sub:`M`
- M_phi = |phi|\ :sub:`M`
- Up_frac_i = (spin up)/(spin up + spin down) neutrons *before* the sample
- Up_frac_f = (spin up)/(spin up + spin down) neutrons *after* the sample
-=========== ================================================================
-
-*Note:* The values of the 'Up_frac_i' and 'Up_frac_f' must be in the range 0 to 1.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. note:: This help document was last changed by Steve King, 02May2015
Index: cs/sphinx-docs/source/user/sasgui/perspectives/fitting/new_model.bmp
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/fitting/new_model.bmp (revision a8787f980df2e3bfd3935ed2068c2a794216858e)
+++ (revision )
@@ -1,1 +1,0 @@
-Unexpected error. File contents could not be restored from local history during undo/redo.
Index: cs/sphinx-docs/source/user/sasgui/perspectives/fitting/optimizer.rst
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/fitting/optimizer.rst (revision e81f6dd2af94c55ce5859c21a6236d505e4b0d8f)
+++ (revision )
@@ -1,769 +1,0 @@
-.. _optimizer-guide:
-
-*******************
-Optimizer Selection
-*******************
-
-Bumps has a number of different optimizers available, each with its own
-control parameters:
-
-* :ref:`fit-lm`
-* :ref:`fit-amoeba`
-* :ref:`fit-dream`
-* :ref:`fit-de`
-* :ref:`fit-newton`
-* :ref:`fit-rl` [experimental]
-* :ref:`fit-ps` [experimental]
-* :ref:`fit-pt` [experimental]
-
-In general there is a trade-off between convergence
-rate and robustness, with the fastest algorithms most likely to find a
-local minimum rather than a global minimum. The gradient descent algorithms
-(:ref:`fit-lm`, :ref:`fit-newton`) tend to be fast but they will find local
-minima only, while the population algorithms (:ref:`fit-dream`, :ref:`fit-de`)
-are more robust and likely slower. :ref:`fit-amoeba` is somewhere between,
-with a small population keeping the search local but more robust than the
-gradient descent algorithms.
-
-Each algorithm has its own set of control parameters for adjusting the
-search process and the stopping conditions. The same option may mean
-slightly different things to different optimizers. The bumps package
-provides a dialog box for selecting the optimizer and its options
-when running the fit wx application. This only includes the common options
-for the most useful optimizers. For full control, the fit will need to
-be run from the command line interface or through a python script.
-
-For parameter uncertainty, most algorithms use the covariance matrix at
-the optimum to estimate an uncertainty ellipse. This is okay for a
-preliminary analysis, but only works reliably for weakly correlated parameters.
-For full uncertainty analysis, :ref:`fit-dream` uses a random walk to explore
-the parameter space near the minimum, showing pair-wise correlations
-amongst the parameter values. In order for :ref:`fit-dream` to return the
-correct uncertainy, the function to be optimized should be a conditional
-probability density, with *nllf* as the negative log likelihood function
-of seeing point $x$ in the parameter space. Other functions
-can be fitted, but uncertainty estimates will be meaningless.
-
-Most algorithms have been adapted to run in parallel at least to some degree.
-The implementation is not heavily tuned, either in terms of minimizing the
-overhead per function evaluation or for distributing the problem across
-multiple processors. If the theory function is implemented in parallel,
-then the optimizer should be run in serial. Mixed mode is also possible
-when running on a cluster with a multi-threaded theory function. In this
-case, only one theory function will be evaluated on each cluster node, but
-the optimizer will distribute the parameters values to the cluster nodes
-in parallel. Do not run serial algorithms (:ref:`fit-lm`, :ref:`fit-newton`) on
-a cluster.
-
-We have included a number of optimizers in Bumps that did not perform
-particularly well on our problem sets. However, they may be perfect
-for your problem, so we have left them in the package for you to explore.
-They are not available in the GUI selection.
-
-.. _fit-lm:
-
-Levenberg-Marquardt
-===================
-
-.. image:: fit-lm.png
- :alt: Levenberg-Marquardt option screen.
- :align: left
-
-The Levenberg-Marquardt algorithm has been
-the standard method for non-linear data fitting. As a gradient descent
-trust region method, it starts at the initial value of the function and
-steps in the direction of the derivative until it reaches the minimum.
-Set up as an explicit minimization of the sum of square differences between
-theory and model, it uses a numerical approximation of the Jacobian matrix
-to set the step direction and an adaptive algorithm to set the size of
-the trust region.
-
-When to use
------------
-
-Use this method when you have a reasonable fit near the minimum, and
-you want to get the best possible value. This can then be used as the starting
-point for uncertainty analysis using :ref:`fit-dream`. This method requires
-that the problem definition includes a *residuals* method, but this should
-always be true when fitting data.
-
-When modeling the results of an experiment, the best fit value is an
-accident of the measurement. Redo the same measurement, and the slightly
-different values you measure will lead to a different best fit. The
-important quantity to report is the credible interval covering
-68% (1-\ $\sigma$) or 95% (2-\ $\sigma$\ ) of the range of
-parameter values that are somewhat consistent with the data.
-
-This method uses *lmfit* from *scipy*, and does not run in parallel.
-
-Options
--------
-
-*Steps* is the number of gradient steps to take. Each step requires
-a calculation of the Jacobian matrix to determine the direction. This
-needs $2 m n$ function evaluations, where $n$ is the number of parameters and
-each function is evaluated and $m$ data points (assuming center point
-formula for finite difference estimate of the derivative). The resulting
-linear equation is then solved, but for small $n$ and expensive function
-evaluation this overhead can be ignored. Use ``--steps=n`` from
-the command line.
-
-*f(x) tolerance* and *x tolerance* are used to determine when
-the fit has reached the point where no significant improvement is expected.
-If the function value does not improve significantly within the step, or
-the step is too short, then the fit will terminate. Use ``--ftol=v`` and
-``--xtol=v`` from the command line.
-
-From the command line, ``--starts=n`` will automatically restart the algorithm
-after it has converged so that a slightly better value can be found. If
-``--keep_best`` is included then restart will use a value near the minimum,
-otherwise it will restart the fit from a random point in the parameter space.
-
-Use ``--fit=lm`` to select the Levenberg-Marquardt fitter from the command line.
-
-References
-----------
-
-.. [Levenberg1944]
- Levenberg, K.
- *Quarterly Journal of Applied Mathmatics*
- 1944, II (2), 164â168.
-
-.. [Marquardt1963]
- Marquardt, D. W.
- *Journal of the Society for Industrial and Applied Mathematics*
- 1963, 11 (2), 431â441.
- DOI: `10.1137/0111030 `_
-
-.. _fit-amoeba:
-
-Nelder-Mead Simplex
-===================
-
-.. image:: fit-amoeba.png
- :alt: Nelder-Mead Simplex option screen.
- :align: left
-
-The Nelder-Mead downhill simplex algorithm is a robust optimizer which
-does not require the function to be continuous or differentiable.
-It uses the relative values of the function at the corners of a
-simplex (an n-dimensional triangle) to decide which points of the simplex
-to update. It will take the worst value and try moving it inward or
-outward, or reflect it through the centroid of the remaining values
-stopping if it finds a better value. If none of these values are
-better, then it will shrink the simplex and start again. The name
-amoeba comes from the book *Numerical Recipes* [Press1992]_ wherein they
-describe the search as acting like an amoeba, squeezing through narrow valleys
-as it makes its way down to the minimum.
-
-When to use
------------
-
-Use this method as a first fit to your model. If your fitting function
-is well behaved with few local minima this will give a quick estimate of
-the model, and help you decide if the model needs to be refined. If your
-function is poorly behaved, you will need to select a good initial value
-before fitting, or use a more robust method such
-as :ref:`fit-de` or :ref:`fit-dream`.
-
-The uncertainty reported comes from a numerical derivative estimate at the
-minimum.
-
-This method requires a series of function updates, and does not benefit
-much from running in parallel.
-
-Options
--------
-
-*Steps* is the simplex update iterations to perform. Most updates
-require one or two function evaluations, but shrinking the simplex evaluates
-every value in the simplex. Use ``--steps=n`` from the command line.
-
-*Starts* tells the optimizer to restart a given number of times.
-Each time it restarts it uses a random starting point. Use
-``--starts=n`` from the command line.
-
-*Simplex radius* is the initial size of the simplex, as a portion of
-the bounds defining the parameter space. If a parameter is unbounded, then
-the radius will be treated as a portion of the parameter value. Use
-``--radius=n`` from the command line.
-
-*x tolerance* and *f(x) tolerance* are used to determine when the
-fit has reached the point where no significant improvement is expected.
-If the simplex is tiny (that is, the corners are close to each other) and
-flat (that is, the values at the corners are close to each other),
-then the fit will terminate. Use ``--xtol=v`` and ``--ftol=v`` from
-the command line.
-
-From the command line, use ``--keep_best`` so that restarts are centered on a
-value near the minimum rather than restarting from a random point within the
-parameter bounds.
-
-Use ``--fit=amoeba`` to select the Nelder-Mead simplex fitter from the
-command line.
-
-References
-----------
-
-.. [Nelder1965]
- Nelder, J. A.; Mead, R.
- *The Computer Journal*
- 1965, 7 (4), 308â313.
- DOI: `10.1093/comjnl/7.4.308 `_
-
-.. [Press1992]
- Press, W. H.; Flannery, B. P.; Teukolsky, S. A.; Vetterling, W. T.
- In *Numerical Recipes in C: The Art of Scientific Computing, Second Edition*;
- Cambridge University Press: Cambridge; New York, 1992; pp 408â412.
-
-
-.. _fit-newton:
-
-Quasi-Newton BFGS
-=================
-
-.. image:: fit-newton.png
- :alt: Quasi-Newton BFGS option screen.
- :align: left
-
-Broyden-Fletcher-Goldfarb-Shanno is a gradient descent method which uses the
-gradient to determine the step direction and an approximation of the Hessian
-matrix to estimate the curvature and guess a step size. The step is further
-refined with a one-dimensional search in the direction of the gradient.
-
-When to use
------------
-
-Like :ref:`fit-lm`, this method converges quickly to the minimum. It does
-not assume that the problem is in the form of a sum of squares and does not
-require a *residuals* method.
-
-The $n$ partial derivatives are computed in parallel.
-
-Options
--------
-
-*Steps* is the number of gradient steps to take. Each step requires
-a calculation of the Jacobian matrix to determine the direction. This
-needs $2 m n$ function evaluations, where $n$ is the number of parameters and
-each function is evaluated and $m$ data points (assuming center point
-formula for finite difference estimate of the derivative). The resulting
-linear equation is then solved, but for small $n$ and expensive function
-evaluation this overhead can be ignored.
-Use ``--steps=n`` from the command line.
-
-*Starts* tells the optimizer to restart a given number of times.
-Each time it restarts it uses a random starting point.
-Use ``--starts=n`` from the command line.
-
-*f(x) tolerance* and *x tolerance* are used to determine when
-the fit has reached the point where no significant improvement is expected.
-If the function is small or the step is too short then the fit
-will terminate. Use ``--ftol=v`` and ``--xtol=v`` from the command line.
-
-From the command line, ``--keep_best`` uses a value near the previous minimum
-when restarting instead of using a random value within the parameter bounds.
-
-Use ``--fit=newton`` to select BFGS from the commandline.
-
-References
-----------
-
-.. [Dennis1987]
- Dennis, J. E.; Schnabel, R. B.
- *Numerical Methods for Unconstrained Optimization and Nonlinear Equations*;
- Society for Industrial and Applied Mathematics: Philadelphia, 1987.
-
-
-.. _fit-de:
-
-Differential Evolution
-======================
-
-.. image:: fit-de.png
- :alt: Differential Evolution option screen.
- :align: left
-
-Differential evolution is a population based algorithm which uses differences
-between points as a guide to selecting new points. For each member of the
-population a pair of points is chosen at random, and a difference vector is
-computed. This vector is scaled, and a random subset of its components are
-added to the current point based on crossover ratio. This new point is
-evaluated, and if its value is lower than the current point, it replaces
-it in the population. There are many variations available within DE that
-have not been exposed in Bumps. Interested users can modify
-:class:`bumps.fitters.DEFit` and experiment with different crossover and
-mutation algorithms, and perhaps add them as command line options.
-
-Differential evolution is a robust directed search strategy. Early in the
-search, when the population is disperse, the difference vectors are large
-and the search remains broad. As the search progresses, more of the
-population goes into the valleys and eventually all the points end up in
-local minima. Now the differences between random pairs will often be small
-and the search will become more localized.
-
-The population is initialized according to the prior probability distribution
-for each each parameter. That is, if the parameter is bounded, it will use
-a uniform random number generate within the bounds. If it is unbounded, it
-will use a uniform value in [0,1]. If the parameter corresponds to the result
-of a previous measurement with mean $\mu$ and standard deviation $\sigma$,
-then the initial values will be pulled from a gaussian random number generator.
-
-When to use
------------
-
-Convergence with differential evolution will be slower, but more robust.
-
-Each update will evaluate $k$ points in parallel, where $k$ is the size
-of the population.
-
-Options
--------
-
-*Steps* is the number of iterations. Each step updates each member
-of the population. The population size scales with the number of fitted
-parameters. Use ``--steps=n`` from the command line.
-
-*Population* determines the size of the population. The number of
-individuals, $k$, is equal to the number of fitted parameters times the
-population scale factor. Use ``--pop=k`` from the command line.
-
-*Crossover ratio* determines what proportion of the dimensions to update
-at each step. Smaller values will likely lead to slower convergence, but
-more robust results. Values must be between 0 and 1. Use ``--CR=v`` from
-the command line.
-
-*Scale* determines how much to scale each difference vector before adding
-it to the candidate point. The selected mutation algorithm chooses a scale
-factor uniformly in $[0,F]$. Use ``--F=v`` from the command line.
-
-*f(x) tolerance* and *x tolerance* are used to determine when the
-fit has reached the point where no significant improvement is expected.
-If the population is flat (that is, the minimum and maximum values are
-within tolerance) and tiny (that is, all the points are close to each
-other) then the fit will terminate. Use ``ftol=v`` and ``xtol=v`` from the
-command line.
-
-Use ``--fit=de`` to select diffrential evolution from the commandline.
-
-References
-----------
-
-.. [Storn1997]
- Storn, R.; Price, K.
- *Journal of Global Optimization*
- 1997, 11 (4), 341â359.
- DOI: `10.1023/A:1008202821328 `_
-
-
-
-.. _fit-dream:
-
-DREAM
-=====
-
-.. image:: fit-dream.png
- :alt: DREAM option screen.
- :align: left
-
-DREAM is a population based algorithm like differential evolution, but
-instead of only keeping individuals which improve each generation, it
-will sometimes keep individuals which get worse. Although it is not
-fast and does not give the very best value for the function, we have
-found it to be a robust fitting engine which will give a good value given
-enough time.
-
-The progress of each individual in the population from generation to
-generation can considered a Markov chain, whose transition probability
-is equal to the probability of taking the step times the probability
-that it keeps the step based on the difference in value between the points.
-By including a purely random stepper with some probability, the detailed
-balance condition is preserved, and the Markov chain converges onto
-the underlying equilibrium distribution. If the theory function represents
-the conditional probability of selecting each point in the parameter
-space, then the resulting chain is a random draw from the posterior
-distribution.
-
-This means that the DREAM algorithm can be used to determine the parameter
-uncertainties. Unlike the hessian estimate at the minimum that is
-used to report uncertainties from the other fitters, the resulting
-uncertainty need not gaussian. Indeed, the resulting distribution can
-even be multi-modal. Fits to measured data using theory functions that
-have symmetric solutions have shown all equivalent solutions with approximately
-equal probability.
-
-When to use
------------
-
-Use DREAM when you need a robust fitting algorithm. It takes longer but
-it does an excellent job of exploring different minima and getting close
-to the global optimum.
-
-Use DREAM when you want a detailed analysis of the parameter uncertainty.
-
-Like differential evolution, DREAM will evaluate $k$ points in parallel,
-where $k$ is the size of the population.
-
-.. _option-burn:
-
-Options
--------
-
-*Samples* is the number of points to be drawn from the Markov chain.
-To estimate the 68% interval to two digits of precision, at least
-1e5 (or 100,000) samples are needed. For the 95% interval, 1e6
-(or 1,000,000) samples are needed. The default 1e4 samples
-gives a rough approximation of the uncertainty relatively quickly.
-Use ``--samples=n`` from the command line.
-
-*Burn-in Steps* is the number of iterations to required for the Markov
-chain to converge to the equilibrium distribution. If the fit ends
-early, the tail of the burn will be saved to the start of the steps.
-Use ``--burn=n`` from the command line.
-
-*Population* determines the size of the population. The number of
-individuals, $k$, is equal to the number of fitted parameters times the
-population scale factor. Use ``--pop=k`` from the command line.
-
-*Initializer* determines how the population will be initialized.
-The options are as follows:
-
- *eps* (epsilon ball), in which the entire initial population is chosen
- at random from within a tiny hypersphere centered about the initial point
-
- *lhs* (latin hypersquare), which chops the bounds within each dimension
- in $k$ equal sized chunks where $k$ is the size of the population and
- makes sure that each parameter has at least one value within each chunk
- across the population.
-
- *cov* (covariance matrix), in which the uncertainty is estimated using
- the covariance matrix at the initial point, and points are selected
- at random from the corresponding gaussian ellipsoid
-
- *random* (uniform random), in which the points are selected at random
- within the bounds of the parameters
-
-Use ``--init=type`` from the command line.
-
-
-*Thinning* is the amount of thinning to use when collecting the
-population. If the fit is somewhat stuck, with most steps not improving
-the fit, then you will need to thin the population to get proper
-statistics. Use ``--thin=k`` from the command line.
-
-*Calculate entropy*, if true, computes the entropy for the fit. This is
-an estimate of the amount of information in the data. Use ``--entropy``
-from the command line.
-
-*Steps*, if not zero, determines the number of iterations to use for
-drawing samples after burn in. Each iteration updates the full population,
-which is (population x number of fitted parameters) points. This option
-is available for compatibility; it is more useful to set the number of
-samples directly. Use ``--steps=n`` from the command line.
-
-Use ``--fit=dream`` to select DREAM from the commandline.
-
-Output
-------
-
-DREAM produces a number of different outputs, and there are a number of
-things to check before using its reported uncertainty values. The main
-goal of selecting ``--burn=n`` is to wait long enough to reach the
-equilibrium distribution.
-
-.. figure:: dream-incomplete.png
- :alt: example of incomplete fit
-
- This DREAM fit is incomplete, as can be seen on all four plots. The
- *Convergence* plot is still decreasing, *Parameter Trace* plot does not
- show random mixing of Markov chain values, the *Correlations* plots are
- fuzzy and mostly empty, the *Uncertainty* plot shows black histograms
- (indicating that there are a few stray values far away from the best) and
- green maximum likelihood spikes not matching the histogram (indicating
- that the region around the best value has not been adequately explored).
-
-.. figure:: dream-complete.png
- :alt: example of a completed fit
-
- This DREAM fit completed successfully. The *Convergence* plot is flat,
- the *Parameter Trace* plot is flat and messy, the *Correlateions* plots
- show nice blobs (and a bit of correlation between the *M1.radius* parameter
- and the *M1.radius.width* parameter), and the uncertainty plots show
- a narrow range of -log(P) values in the mostly brown histograms and
- a good match to the green constrained maximum likelihood line.
-
-For each parameter in the fit, DREAM finds the mean, median and best value,
-as well as the 68% and 95% credible intervals. The mean value is
-defined as $\int x P(x) dx$, which is just the expected value of the
-probability distribution for the parameter. The median value is the 50%
-point in the probability distribution, and the best value is the maximum
-likelihood value seen in the random walk. The credible intervals are the
-central intervals which capture 68% and 95% of the parameter values
-respectively. You need approximately 100,000 samples to get two digits of
-precision on the 68% interval, and 1,000,000 samples for the 95% interval.
-
-.. table:: Example fit output
-
- = =============== ============ ======== ======== ================= =================
- # Parameter mean median best [ 68% interval] [ 95% interval]
- = =============== ============ ======== ======== ================= =================
- 1 M1.background 0.059925(41) 0.059924 0.059922 [0.05988 0.05997] [0.05985 0.06000]
- 2 M1.radius 2345.3(15) 2345.234 2345.174 [2343.83 2346.74] [2342.36 2348.29]
- 3 M1.radius.width 0.00775(41) 0.00774 0.00777 [ 0.0074 0.0081] [ 0.0070 0.0086]
- 4 M1.scale 0.21722(20) 0.217218 0.217244 [0.21702 0.21743] [0.21681 0.21761]
- = =============== ============ ======== ======== ================= =================
-
-The *Convergence* plot shows the range of $\chi^2$ values in the population
-for each iteration. The band shows the 68% of values around the median, and
-the solid line shows the minimum value. If the distribution has reached
-equilibrium, then convergence graph should be roughly flat, with little
-change in the minimum value throughout the graph. If there is no convergence,
-then the remaining plots don't mean much.
-
-The *Correlations* plot shows cross correlation between each pair of
-parameters. If the parameters are completely uncorrelated then the boxes
-should contain circles. Diagonals indicate strong correlation. Square
-blocks indicate that the fit is not sensitive to one of the parameters.
-The range plotted on the correlation plot is determined by the 95% interval
-of the data. The individual correlation plots are too small to show the
-range of values for the parameters. These can instead be read from the
-*Uncertainty* plot for each parameter, which covers the same range of values
-and indicates 68% and 95% intervals. If there are some chains that are
-wandering around away from the minimum, then the plot will look fuzzy, and
-not have a nice blob in the center. If a correlation plot has multiple blobs,
-then there are multiple minima in your problem space, usually because there
-are symmetries in the problem definition. For example, a model fitting
-$x + a^2$ will have identical solutions for $\pm\,a$.
-
-The *Uncertainty* plot shows histograms for each fitted parameter generated
-from the values for that parameter across all chains. Within each histogram
-bar the values are sorted and displayed as a gradient from black to copper,
-with black values having the lowest $\chi^2$ and copper values having the
-highest. The resulting histogram should be dark brown, with a black hump
-in the center and light brown tips. If there are large lumps of light brown,
-or excessive black then its likely that the optimizer did not converge. The
-green line over the histogram shows the best value seen within each
-histogram bin (the maximum likelihood given $p_k == x$).
-With enough samples and proper convergence, it should roughly follow the
-outline of the histogram. The yellow band in the center of the plot
-represents the 68% interval for the data. The histogram cuts off at 95%.
-These values along with the median are shown as labels along the x axis.
-The green asterisk represents the best value, the green *E* the mean value
-and the vertical green line the median value. If the fit is not sensitive
-to a parameter, or if two parameters are strongly correlated, the parameter
-histogram will show a box rather than a hump. Spiky shapes (either in the
-histogram or the maximum likelihood line) indicate lack of convergence or
-maybe not enough steps. A chopped histograms indicates that the range for
-that parameter is too small.
-
-The *Parameter Trace* plot is diagnostic for models which have poor mixing.
-In this cases no matter how the parameter values are changing, they are
-landing on much worse values for the $\chi^2$. This can happen if the
-problem is highly constrained with many tight and twisty values.
-
-The *Data and Theory* plot should show theory and data lining up pretty well,
-with the theory overlaying about 2/3 of the error bars on the data
-(1-\ $\sigma$ = 68%). The *Residuals* plot shows the difference between
-theory and data divided by uncertainty. The residuals should be 2/3 within
-[-1, 1], They should not show any structure, such as humps where the theory
-misses the data for long stretches. This indicates some feature missing
-from the model, or a lack of convergence to the best model.
-
-If entropy is requested, then bumps will show the total number of bits of
-information in the fit. This derives from the entropy term:
-
-.. math:
-
- S = \int_\Theta p(\Theta) \log p(\Theta) d\Theta
-
-Using entropy and simulation we hope to be able to make experiment
-planning decisions in a way that maximizes information, by estimating
-whether it is better to measure more precisely or to measure different
-but related values and fit them with shared parameters.
-
-
-References
-----------
-
-.. [Vrugt2009]
- Vrugt, J. A.; Ter Braak, C. J. F.; Diks, C. G. H.; Robinson, B. A.;
- Hyman, J. M.; Higdon, D.
- *International Journal of Nonlinear Sciences and Numerical Simulation*
- 2009, 10 (3), 273â290.
- DOI: `10.1515/IJNSNS.2009.10.3.273 `_
-
-.. [Kramer2010]
- Kramer, A.; Hasenauer, J.; Allgower, F.; Radde, N.
- *In 2010 IEEE International Conference on Control Applications (CCA)*
- 2010; pp 493â498.
- DOI: `10.1109/CCA.2010.5611198 `_
-
-.. [JCGM2008]
- JCGM.
- *Evaluation of measurement data â Supplement 1 to the âGuide to the
- expression of uncertainty in measurementâ â Propagation of distributions
- using a Monte Carlo method*; Joint Committee for Guides in Metrology,
- JCGM 101:2008; Geneva, Switzerland, 2008; p 90.
- ``_
-
-
-
-.. _fit-ps:
-
-Particle Swarm
-==============
-
-Inspired by bird flocking behaviour, the particle swarm algorithm is a
-population-based method which updates an individual according to its
-momentum and a force toward the current best fit parameter values. We
-did not explore variations of this algorithm in any detail.
-
-When to use
------------
-
-Particle swarm performed well enough in our low dimensional test problems,
-but made little progress when more fit parameters were added.
-
-The population updates can run in parallel, but the tiny population size
-limits the amount of parallelism.
-
-Options
--------
-
-``--steps=n`` is the number of iterations. Each step updates each member
-of the population. The population size scales with the number of fitted
-parameters.
-
-``--pop=k`` determines the size of the population. The number of
-individuals, $k$, is equal to the number of fitted parameters times the
-population scale factor. The default scale factor is 1.
-
-Use ``--fit=ps`` to select particle swarm from the commandline.
-
-Add a few more lines
-
-References
-----------
-
-.. [Kennedy1995]
- Kennedy, J.; Eberhart, R.
- Particle Swarm Optimization
- *Proceedings of IEEE International Conference on Neural Networks. IV.*
- 1995; pp 1942â1948.
- DOI: `10.1109/ICNN.1995.48896 `_
-
-
-.. _fit-rl:
-
-Random Lines
-============
-
-Most of the population based algorithms ignore the value of the function
-when choosing the points in the next iteration. Random lines is a new
-style of algorithm which fits a quadratic model to a selection from the
-population, and uses that model to propose a new point in the next
-generation of the population. The hope is that the method will inherit
-the robustness of the population based algorithms as well as the rapid
-convergence of the newton descent algorithms.
-
-When to use
------------
-
-Random lines works very well for some of our test problems, showing
-rapid convergence to the optimum, but on other problems it makes
-very little progress.
-
-The population updates can run in parallel.
-
-Options
--------
-
-``--steps=n`` is the number of iterations. Each step updates each member
-of the population. The population size scales with the number of fitted
-parameters.
-
-``--pop=k`` determines the size of the population. The number of
-individuals, $k$, is equal to the number of fitted parameters times the
-population scale factor. The default scale factor is 0.5.
-
-``--CR=v`` is the crossover ratio, determining what proportion of the
-dimensions to update at each step. Values must be between 0 and 1.
-
-``--starts=n`` tells the optimizer to restart a given number of times.
-Each time it restarts it uses a random starting point.
-
-``--keep_best`` uses a value near the previous minimum when restarting
-instead of using a random value within the parameter bounds. This option is
-not available in the options dialog.
-
-Use ``--fit=rl`` to select random lines from the commandline.
-
-References
-----------
-
-.. [Sahin2013]
-
- Sahin, I.
- *An International Journal of Optimization and Control: Theories & Applications (IJOCTA)*
- 2013, 3 (2), 111â119.
-
-
-
-.. _fit-pt:
-
-Parallel Tempering
-==================
-
-Parallel tempering is an MCMC algorithm for uncertainty analysis. This
-version runs at multiple temperatures simultaneously, with chains at high
-temperature able to more easily jump between minima and chains at low
-temperature to fully explore the minima. Like :ref:`fit-dream` it has a
-differential evolution stepper, but this version uses the chain history
-as the population rather than maintaining a population at each temperature.
-
-This is an experimental algorithm which does not yet perform well.
-
-When to use
------------
-
-When complete, parallel tempering should be used for problems with widely
-spaced local minima which dream cannot fit.
-
-Options
--------
-
-``--steps=n`` is the number of iterations to include in the Markov
-chain. Each iteration updates the full population. The population size
-scales with the number of fitted parameters.
-
-``--burn=n`` is the number of iterations to required for the Markov
-chain to converge to the equilibrium distribution. If the fit ends
-early, the tail of the burn will be saved to the start of the steps.
-
-``--CR=v`` is the differential evolution crossover ratio to use when
-computing step size and direction. Use a small value to step through the
-dimensions one at a time, or a large value to step through all at once.
-
-``-nT=k``, ``-Tmin=v`` and ``--Tmax=v`` specify a log-spaced initial
-distribution of temperatures. The default is 25 points between
-0.1 and 10. :ref:`fit-dream` runs at a fixed temperature of 1.0.
-
-Use ``--fit=pt`` to select parallel tempering from the commandline.
-
-References
-----------
-
-.. [Swendsen1986]
- Swendsen, R. H.; Wang J. S.
- Replica Monte Carlo simulation of spin glasses
- *Physical Review Letters*
- 1986, 57, 2607-2609
-
-
-..
- SNOBFIT (fit=snobfit) attempts to construct a locally quadratic model of
- the entire search space. While promising because it can begin to offer
- some guarantees that the search is complete given reasonable assumptions
- about the fitting surface, initial trials did not perform well and the
- algorithm has not yet been tuned to our problems.
-
Index: cs/sphinx-docs/source/user/sasgui/perspectives/fitting/pd_help.rst
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/fitting/pd_help.rst (revision 49148bbc34832e06f4f05e8e4c4c32c0da92d133)
+++ (revision )
@@ -1,194 +1,0 @@
-.. pd_help.rst
-
-.. This is a port of the original SasView html help file to ReSTructured text
-.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015.
-
-.. |inlineimage004| image:: sm_image004.gif
-.. |inlineimage005| image:: sm_image005.gif
-.. |inlineimage008| image:: sm_image008.gif
-.. |inlineimage009| image:: sm_image009.gif
-.. |inlineimage010| image:: sm_image010.gif
-.. |inlineimage011| image:: sm_image011.gif
-.. |inlineimage012| image:: sm_image012.gif
-.. |inlineimage018| image:: sm_image018.gif
-.. |inlineimage019| image:: sm_image019.gif
-
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Polydispersity Distributions
-----------------------------
-
-With some models SasView can calculate the average form factor for a population
-of particles that exhibit size and/or orientational polydispersity. The resultant
-form factor is normalized by the average particle volume such that
-
-*P(q) = scale* * \ / *V + bkg*
-
-where F is the scattering amplitude and the \<\> denote an average over the size
-distribution.
-
-Users should note that this computation is very intensive. Applying polydispersion
-to multiple parameters at the same time, or increasing the number of *Npts* values
-in the fit, will require patience! However, the calculations are generally more
-robust with more data points or more angles.
-
-SasView uses the term *PD* for a size distribution (and not to be confused with a
-molecular weight distributions in polymer science) and the term *Sigma* for an
-angular distribution.
-
-The following five distribution functions are provided:
-
-* *Rectangular Distribution*
-* *Gaussian Distribution*
-* *Lognormal Distribution*
-* *Schulz Distribution*
-* *Array Distribution*
-
-These are all implemented in SasView as *number-average* distributions.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Rectangular Distribution
-^^^^^^^^^^^^^^^^^^^^^^^^
-
-The Rectangular Distribution is defined as
-
-.. image:: pd_image001.png
-
-where *xmean* is the mean of the distribution, *w* is the half-width, and *Norm* is a
-normalization factor which is determined during the numerical calculation.
-
-Note that the standard deviation and the half width *w* are different!
-
-The standard deviation is
-
-.. image:: pd_image002.png
-
-whilst the polydispersity is
-
-.. image:: pd_image003.png
-
-.. image:: pd_image004.jpg
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Gaussian Distribution
-^^^^^^^^^^^^^^^^^^^^^
-
-The Gaussian Distribution is defined as
-
-.. image:: pd_image005.png
-
-where *xmean* is the mean of the distribution and *Norm* is a normalization factor
-which is determined during the numerical calculation.
-
-The polydispersity is
-
-.. image:: pd_image003.png
-
-
-.. image:: pd_image006.jpg
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Lognormal Distribution
-^^^^^^^^^^^^^^^^^^^^^^
-
-The Lognormal Distribution is defined as
-
-.. image:: pd_image007.png
-
-where |mu|\ =ln(*xmed*), *xmed* is the median value of the distribution, and
-*Norm* is a normalization factor which will be determined during the numerical
-calculation.
-
-The median value for the distribution will be the value given for the respective
-size parameter in the *Fitting Perspective*, for example, radius = 60.
-
-The polydispersity is given by |sigma|
-
-.. image:: pd_image008.png
-
-For the angular distribution
-
-.. image:: pd_image009.png
-
-The mean value is given by *xmean*\ =exp(|mu|\ +p\ :sup:`2`\ /2). The peak value
-is given by *xpeak*\ =exp(|mu|-p\ :sup:`2`\ ).
-
-.. image:: pd_image010.jpg
-
-This distribution function spreads more, and the peak shifts to the left, as *p*
-increases, requiring higher values of Nsigmas and Npts.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Schulz Distribution
-^^^^^^^^^^^^^^^^^^^
-
-The Schulz distribution is defined as
-
-.. image:: pd_image011.png
-
-where *xmean* is the mean of the distribution and *Norm* is a normalization factor
-which is determined during the numerical calculation, and *z* is a measure of the
-width of the distribution such that
-
-z = (1-p\ :sup:`2`\ ) / p\ :sup:`2`
-
-The polydispersity is
-
-.. image:: pd_image012.png
-
-Note that larger values of PD might need larger values of Npts and Nsigmas.
-For example, at PD=0.7 and radius=60 |Ang|, Npts>=160 and Nsigmas>=15 at least.
-
-.. image:: pd_image013.jpg
-
-For further information on the Schulz distribution see:
-M Kotlarchyk & S-H Chen, *J Chem Phys*, (1983), 79, 2461.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Array Distribution
-^^^^^^^^^^^^^^^^^^
-
-This user-definable distribution should be given as as a simple ASCII text file
-where the array is defined by two columns of numbers: *x* and *f(x)*. The *f(x)*
-will be normalized by SasView during the computation.
-
-Example of what an array distribution file should look like:
-
-==== =====
- 30 0.1
- 32 0.3
- 35 0.4
- 36 0.5
- 37 0.6
- 39 0.7
- 41 0.9
-==== =====
-
-SasView only uses these array values during the computation, therefore any mean
-value of the parameter represented by *x* present in the *Fitting Perspective*
-will be ignored.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Note about DLS polydispersity
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Many commercial Dynamic Light Scattering (DLS) instruments produce a size
-polydispersity parameter, sometimes even given the symbol *p*! This parameter is
-defined as the relative standard deviation coefficient of variation of the size
-distribution and is NOT the same as the polydispersity parameters in the Lognormal
-and Schulz distributions above (though they all related) except when the DLS
-polydispersity parameter is <0.13.
-
-For more information see:
-S King, C Washington & R Heenan, *Phys Chem Chem Phys*, (2005), 7, 143
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. note:: This help document was last changed by Steve King, 01May2015
Index: cs/sphinx-docs/source/user/sasgui/perspectives/fitting/plot_button.bmp
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/fitting/plot_button.bmp (revision a8787f980df2e3bfd3935ed2068c2a794216858e)
+++ (revision )
@@ -1,1 +1,0 @@
-Unexpected error. File contents could not be restored from local history during undo/redo.
Index: cs/sphinx-docs/source/user/sasgui/perspectives/fitting/residuals_help.rst
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/fitting/residuals_help.rst (revision 49148bbc34832e06f4f05e8e4c4c32c0da92d133)
+++ (revision )
@@ -1,64 +1,0 @@
-.. residuals_help.rst
-
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. _Assessing_Fit_Quality:
-
-Assessing Fit Quality
----------------------
-
-When performing model-fits to some experimental data it is helpful to be able to
-gauge how good an individual fit is, how it compares to a fit of the *same model*
-*to another set of data*, or how it compares to a fit of a *different model to the*
-*same data*.
-
-One way is obviously to just inspect the graph of the experimental data and to
-see how closely (or not!) the 'theory' calculation matches it. But *SasView*
-also provides two other measures of the quality of a fit:
-
-* |chi|\ :sup:`2` (or 'Chi2'; pronounced 'chi-squared')
-* *Residuals*
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Chi2
-^^^^
-
-Chi2 is a statistical parameter that quantifies the differences between an observed
-data set and an expected dataset (or 'theory').
-
-*SasView* actually returns this parameter normalized to the number of data points,
-*Npts* such that
-
- *Chi2/Npts* = { SUM[(*Y_i* - *Y_theory_i*)^2 / (*Y_error_i*)^2] } / *Npts*
-
-This differs slightly from what is sometimes called the 'reduced chi-squared'
-because it does not take into account the number of fitting parameters (to
-calculate the number of 'degrees of freedom'), but the 'normalized chi-squared'
-and the 'reduced chi-squared' are very close to each other when *Npts* >> number of
-parameters.
-
-For a good fit, *Chi2/Npts* tends to 0.
-
-*Chi2/Npts* is sometimes referred to as the 'goodness-of-fit' parameter.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Residuals
-^^^^^^^^^
-
-A residual is the difference between an observed value and an estimate of that
-value, such as a 'theory' calculation (whereas the difference between an observed
-value and its *true* value is its error).
-
-*SasView* calculates 'normalized residuals', *R_i*, for each data point in the
-fit:
-
- *R_i* = (*Y_i* - *Y_theory_i*) / (*Y_err_i*)
-
-For a good fit, *R_i* ~ 0.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. note:: This help document was last changed by Steve King, 08Jun2015
Index: cs/sphinx-docs/source/user/sasgui/perspectives/fitting/sm_help.rst
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/fitting/sm_help.rst (revision 49148bbc34832e06f4f05e8e4c4c32c0da92d133)
+++ (revision )
@@ -1,220 +1,0 @@
-.. sm_help.rst
-
-.. This is a port of the original SasView html help file to ReSTructured text
-.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015.
-
-.. |inlineimage004| image:: sm_image004.gif
-.. |inlineimage005| image:: sm_image005.gif
-.. |inlineimage008| image:: sm_image008.gif
-.. |inlineimage009| image:: sm_image009.gif
-.. |inlineimage010| image:: sm_image010.gif
-.. |inlineimage011| image:: sm_image011.gif
-.. |inlineimage012| image:: sm_image012.gif
-.. |inlineimage018| image:: sm_image018.gif
-.. |inlineimage019| image:: sm_image019.gif
-
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Smearing Functions
-==================
-
-Sometimes it will be necessary to correct reduced experimental data for the
-physical effects of the instrumental geometry in use. This process is called
-*desmearing*. However, calculated/simulated data - which by definition will be
-perfect/exact - can be *smeared* to make it more representative of what might
-actually be measured experimentally.
-
-SasView provides the following three smearing algorithms:
-
-* *Slit Smearing*
-* *Pinhole Smearing*
-* *2D Smearing*
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Slit Smearing
--------------
-
-**This type of smearing is normally only encountered with data from X-ray Kratky**
-**cameras or X-ray/neutron Bonse-Hart USAXS/USANS instruments.**
-
-The slit-smeared scattering intensity is defined by
-
-.. image:: sm_image002.gif
-
-where *Norm* is given by
-
-.. image:: sm_image003.gif
-
-**[Equation 1]**
-
-The functions |inlineimage004| and |inlineimage005|
-refer to the slit width weighting function and the slit height weighting
-determined at the given *q* point, respectively. It is assumed that the weighting
-function is described by a rectangular function, such that
-
-.. image:: sm_image006.gif
-
-**[Equation 2]**
-
-and
-
-.. image:: sm_image007.gif
-
-**[Equation 3]**
-
-so that |inlineimage008| |inlineimage009| for |inlineimage010| and *u*\ .
-
-Here |inlineimage011| and |inlineimage012| stand for
-the slit height (FWHM/2) and the slit width (FWHM/2) in *q* space.
-
-This simplifies the integral in Equation 1 to
-
-.. image:: sm_image013.gif
-
-**[Equation 4]**
-
-which may be solved numerically, depending on the nature of |inlineimage011| and |inlineimage012| .
-
-Solution 1
-^^^^^^^^^^
-
-**For** |inlineimage012| **= 0 and** |inlineimage011| **= constant.**
-
-.. image:: sm_image016.gif
-
-For discrete *q* values, at the *q* values of the data points and at the *q*
-values extended up to *q*\ :sub:`N`\ = *q*\ :sub:`i` + |inlineimage011| the smeared
-intensity can be approximately calculated as
-
-.. image:: sm_image017.gif
-
-**[Equation 5]**
-
-where |inlineimage018| = 0 for *I*\ :sub:`s` when *j* < *i* or *j* > *N-1*.
-
-Solution 2
-^^^^^^^^^^
-
-**For** |inlineimage012| **= constant and** |inlineimage011| **= 0.**
-
-Similar to Case 1
-
-|inlineimage019| for *q*\ :sub:`p` = *q*\ :sub:`i` - |inlineimage012| and *q*\ :sub:`N` = *q*\ :sub:`i` + |inlineimage012|
-
-**[Equation 6]**
-
-where |inlineimage018| = 0 for *I*\ :sub:`s` when *j* < *p* or *j* > *N-1*.
-
-Solution 3
-^^^^^^^^^^
-
-**For** |inlineimage011| **= constant and** |inlineimage011| **= constant.**
-
-In this case, the best way is to perform the integration of Equation 1
-numerically for both slit height and slit width. However, the numerical
-integration is imperfect unless a large number of iterations, say, at
-least 10000 by 10000 for each element of the matrix *W*, is performed.
-This is usually too slow for routine use.
-
-An alternative approach is used in SasView which assumes
-slit width << slit height. This method combines Solution 1 with the
-numerical integration for the slit width. Then
-
-.. image:: sm_image020.gif
-
-**[Equation 7]**
-
-for *q*\ :sub:`p` = *q*\ :sub:`i` - |inlineimage012| and *q*\ :sub:`N` = *q*\ :sub:`i` + |inlineimage012|
-
-where |inlineimage018| = 0 for *I*\ :sub:`s` when *j* < *p* or *j* > *N-1*.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Pinhole Smearing
-----------------
-
-**This is the type of smearing normally encountered with data from synchrotron**
-**SAXS cameras and SANS instruments.**
-
-The pinhole smearing computation is performed in a similar fashion to the slit-
-smeared case above except that the weight function used is a Gaussian. Thus
-Equation 6 becomes
-
-.. image:: sm_image021.gif
-
-**[Equation 8]**
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-2D Smearing
------------
-
-The 2D smearing computation is performed in a similar fashion to the 1D pinhole
-smearing above except that the weight function used is a 2D elliptical Gaussian.
-Thus
-
-.. image:: sm_image022.gif
-
-**[Equation 9]**
-
-In Equation 9, *x*\ :sub:`0` = *q* cos(|theta|), *y*\ :sub:`0` = *q* sin(|theta|), and
-the primed axes, are all in the coordinate rotated by an angle |theta| about
-the z-axis (see the figure below) so that *x'*\ :sub:`0` = *x*\ :sub:`0` cos(|theta|) +
-*y*\ :sub:`0` sin(|theta|) and *y'*\ :sub:`0` = -*x*\ :sub:`0` sin(|theta|) +
-*y*\ :sub:`0` cos(|theta|). Note that the rotation angle is zero for a x-y symmetric
-elliptical Gaussian distribution. The *A* is a normalization factor.
-
-.. image:: sm_image023.gif
-
-Now we consider a numerical integration where each of the bins in |theta| and *R* are
-*evenly* (this is to simplify the equation below) distributed by |bigdelta|\ |theta|
-and |bigdelta|\ R, respectively, and it is further assumed that *I(x',y')* is constant
-within the bins. Then
-
-.. image:: sm_image024.gif
-
-**[Equation 10]**
-
-Since the weighting factor on each of the bins is known, it is convenient to
-transform *x'-y'* back to *x-y* coordinates (by rotating it by -|theta| around the
-*z* axis).
-
-Then, for a polar symmetric smear
-
-.. image:: sm_image025.gif
-
-**[Equation 11]**
-
-where
-
-.. image:: sm_image026.gif
-
-while for a *x-y* symmetric smear
-
-.. image:: sm_image027.gif
-
-**[Equation 12]**
-
-where
-
-.. image:: sm_image028.gif
-
-The current version of the SasView uses Equation 11 for 2D smearing, assuming
-that all the Gaussian weighting functions are aligned in the polar coordinate.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Weighting & Normalization
--------------------------
-
-In all the cases above, the weighting matrix *W* is calculated on the first call
-to a smearing function, and includes ~60 *q* values (finely and evenly binned)
-below (>0) and above the *q* range of data in order to smear all data points for
-a given model and slit/pinhole size. The *Norm* factor is found numerically with the
-weighting matrix and applied on the computation of *I*\ :sub:`s`.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. note:: This help document was last changed by Steve King, 01May2015
Index: cs/sphinx-docs/source/user/sasgui/perspectives/fitting/view_button.bmp
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/fitting/view_button.bmp (revision a8787f980df2e3bfd3935ed2068c2a794216858e)
+++ (revision )
@@ -1,1 +1,0 @@
-Unexpected error. File contents could not be restored from local history during undo/redo.
Index: cs/sphinx-docs/source/user/sasgui/perspectives/invariant/invariant_help.rst
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/invariant/invariant_help.rst (revision 9bbc0746d460d36edd233363e4474810ed181b3a)
+++ (revision )
@@ -1,122 +1,0 @@
-.. invariant_help.rst
-
-.. This is a port of the original SasView html help file to ReSTructured text
-.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015.
-
-Invariant Calculation
-=====================
-
-Description
------------
-
-The scattering, or Porod, invariant (Q*\) is a model-independent quantity that
-can be easily calculated from scattering data.
-
-For two phase systems, the scattering invariant is defined as the integral of
-the square of the wave transfer (Q) multiplied by the scattering cross section
-over the full range of Q from zero to infinity, that is
-
-.. image:: image001.gif
-
-where *g = q* for pinhole geometry (SAS) and *g = q*\ :sub:`v` (the slit height) for
-slit geometry (USAS).
-
-The worth of Q*\ is that it can be used to determine the volume fraction and
-the specific area of a sample. Whilst these quantities are useful in their own
-right they can also be used in further analysis.
-
-The difficulty with using Q*\ arises from the fact that experimental data is
-never measured over the range 0 =< *Q* =< infinity. At best, combining USAS and
-WAS data might cover the range 1e-5 =< *Q* =< 10 1/\ |Ang| . Thus it is usually
-necessary to extrapolate the experimental data to low and high *Q*. For this
-
-High-*Q* region (>= *Qmax* in data)
-
-* The power law function *C*/*Q*\ :sup:`4` is used where the constant
- *C* (= 2.\ |pi|\ .(\ |bigdelta|\ |rho|\ ).\ *Sv*\ ) is to be found by fitting part of data
- within the range *Q*\ :sub:`N-m` to *Q*\ :sub:`N` (where m < N).
-
-Low-*Q* region (<= *Qmin* in data)
-
-* The Guinier function *I0.exp(-Rg*\ :sup:`2`\ *Q*\ :sup:`2`\ */3)* where *I0*
- and *Rg* are obtained by fitting as for the high-*Q* region above.
- Alternatively a power law can be used.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Using invariant analysis
-------------------------
-
-1) Select *Invariant* from the *Analysis* menu on the SasView toolbar.
-
-2) Load some data with the *Data Explorer*.
-
-3) Select a dataset and use the *Send To* button on the *Data Explorer* to load
- the dataset into the *Invariant* panel.
-
-4) Use the *Customised Input* boxes on the *Invariant* panel to subtract
- any background, specify the contrast (i.e. difference in SLDs - this must be
- specified for the eventual value of Q*\ to be on an absolute scale), or to
- rescale the data.
-
-5) Adjust the extrapolation range as necessary. In most cases the default
- values will suffice.
-
-6) Click the *Compute* button.
-
-7) To include a lower and/or higher Q range, check the relevant *Enable
- Extrapolate* check boxes.
-
- If power law extrapolations are chosen, the exponent can be either held
- fixed or fitted. The number of points, Npts, to be used for the basis of the
- extrapolation can also be specified.
-
-8) If the value of Q*\ calculated with the extrapolated regions is invalid, a
- red warning will appear at the top of the *Invariant* panel.
-
- The details of the calculation are available by clicking the *Details*
- button in the middle of the panel.
-
-.. image:: image005.gif
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Parameters
-----------
-
-Volume Fraction
-^^^^^^^^^^^^^^^
-
-The volume fraction |phi| is related to Q*\ by
-
-.. image:: image002.gif
-
-where |bigdelta|\ |rho| is the SLD contrast.
-
-.. image:: image003.gif
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Specific Surface Area
-^^^^^^^^^^^^^^^^^^^^^
-
-The specific surface area *Sv* is related to Q*\ by
-
-.. image:: image004.gif
-
-where *Cp* is the Porod constant.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Reference
----------
-
-O. Glatter and O. Kratky
-Chapter 2 in *Small Angle X-Ray Scattering*
-Academic Press, New York, 1982
-
-http://physchem.kfunigraz.ac.at/sm/
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. note:: This help document was last changed by Steve King, 01May2015
Index: cs/sphinx-docs/source/user/sasgui/perspectives/invariant/report_template.html
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/invariant/report_template.html (revision 49148bbc34832e06f4f05e8e4c4c32c0da92d133)
+++ (revision )
@@ -1,201 +1,0 @@
-
-
-
-
-
-
-
-
-%s
-%s
-
-
- Input
-parameters
-
-
-
- Parameter
- |
-
- Value
- |
-
- Unit
- |
-
-
-
- scale
- |
-
- %s
- |
-
- |
-
-
-
- porod constant
- |
-
- %s
- |
-
- |
-
-
-
- background
- |
-
- %s
- |
- cm-1
- |
-
-
-
- contrast
- |
-
- %s
- |
-
- A-2
- |
-
-
- Extrapolation
-
-
-
- %s
- |
-
- %s
- |
-
-
-
- npts low = %s
- |
- npts high = %s
- |
-
-
-
- %s
- |
-
- %s
- |
-
-
- Outputs
-
-
-
- Parameter
- |
-
-
- |
-
- Value
- |
-
- Unit
- |
-
-
-
- invariant (Q*)
- |
-
- low Q extrapolation
- |
-
- %s
- |
-
- (cmA)-1
- |
-
-
-
- data
- |
-
- %s
- |
-
- (cmA)-1
- |
-
-
-
- high Q extrapolation
- |
-
- %s
- |
-
- (cmA)-1
- |
-
-
-
- total
- |
-
- %s
- |
-
- (cmA)-1
- |
-
-
-
- volume fraction
- |
-
-
- |
-
- %s
- |
-
-
- |
-
-
-
- specific surface
- |
-
-
- |
-
- %s
- |
-
-
- |
-
-
-
-
-
-
Plot
-
-
Invariant Computation
-
Data: "%s"
-
-
-
-
-
-
-
-
Index: cs/sphinx-docs/source/user/sasgui/perspectives/pr/pr_help.rst
===================================================================
--- docs/sphinx-docs/source/user/sasgui/perspectives/pr/pr_help.rst (revision 5f5c5965f23ac2cbcb5f353269eb3c3db1c065a0)
+++ (revision )
@@ -1,57 +1,0 @@
-.. pr_help.rst
-
-.. This is a port of the original SasView html help file to ReSTructured text
-.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015.
-
-P(r) Inversion Perspective
-==========================
-
-Description
------------
-
-This tool calculates a real-space distance distribution function, *P(r)*, using
-the inversion approach (Moore, 1908).
-
-*P(r)* is set to be equal to an expansion of base functions of the type
-
- |bigphi|\_n(r) = 2.r.sin(|pi|\ .n.r/D_max)
-
-The coefficient of each base function in the expansion is found by performing
-a least square fit with the following fit function
-
- |chi|\ :sup:`2` = |bigsigma|\ :sub:`i` [ I\ :sub:`meas`\ (Q\ :sub:`i`\ ) - I\ :sub:`th`\ (Q\ :sub:`i`\ ) ] :sup:`2` / (Error) :sup:`2` + Reg_term
-
-where I\ :sub:`meas`\ (Q) is the measured scattering intensity and
-I\ :sub:`th`\ (Q) is the prediction from the Fourier transform of the *P(r)*
-expansion.
-
-The *Reg_term* term is a regularization term set to the second derivative
-d\ :sup:`2`\ *P(r)* / dr\ :sup:`2` integrated over *r*. It is used to produce a
-smooth *P(r)* output.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Using the perspective
----------------------
-
-The user must enter
-
-* *Number of terms*: the number of base functions in the P(r) expansion.
-
-* *Regularization constant*: a multiplicative constant to set the size of
- the regularization term.
-
-* *Maximum distance*: the maximum distance between any two points in the
- system.
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-Reference
----------
-
-P.B. Moore
-*J. Appl. Cryst.*, 13 (1980) 168-175
-
-.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
-
-.. note:: This help document was last changed by Steve King, 01May2015