Index: src/sas/sasgui/perspectives/invariant/media/invariant_help.rst
===================================================================
--- src/sas/sasgui/perspectives/invariant/media/invariant_help.rst	(revision d85c194ea2f78cb2b9b3de9c969e1b8ebea6b6d2)
+++ src/sas/sasgui/perspectives/invariant/media/invariant_help.rst	(revision d85c194ea2f78cb2b9b3de9c969e1b8ebea6b6d2)
@@ -0,0 +1,128 @@
+.. 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.
+
+.. |Ang| unicode:: U+212B
+.. |pi| unicode:: U+03C0
+.. |bigdelta| unicode:: U+0394
+.. |rho| unicode:: U+03C1
+.. |phi| unicode:: U+03C6
+
+Invariant Calculation Perspective
+=================================
+
+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 = Qv* (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 the perspective
+---------------------
+
+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* perspective.
+
+4) Use the *Customised Input* boxes on the *Invariant* perspective 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* perspective 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: src/sas/sasgui/perspectives/invariant/media/report_template.html
===================================================================
--- src/sas/sasgui/perspectives/invariant/media/report_template.html	(revision d85c194ea2f78cb2b9b3de9c969e1b8ebea6b6d2)
+++ src/sas/sasgui/perspectives/invariant/media/report_template.html	(revision d85c194ea2f78cb2b9b3de9c969e1b8ebea6b6d2)
@@ -0,0 +1,201 @@
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta name=Generator >
+</head>
+<body lang=EN-US>
+<div class=WordSection1>
+<font size='4'>
+<p class=MsoNormal><b><span >%s</span></b></p>
+<p class=MsoNormal><span >%s</span></p>
+</font>
+<font size='3'>
+<p class=MsoNormal><b><span > Input
+parameters</span></b></p>
+<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0>
+ <tr>
+  <td width=170 valign=top>
+  <p class=MsoNormal > Parameter</p>
+  </td>
+  <td width=213 valign=top >
+  <p class=MsoNormal > Value</p>
+  </td>
+  <td width=170 valign=top >
+  <p class=MsoNormal > Unit</p>
+  </td>
+ </tr>
+ <tr>
+  <td width=170 valign=top >
+  <p class=MsoNormal > scale</p>
+  </td>
+  <td width=213 valign=top >
+  <p class=MsoNormal > %s</p>
+  </td>
+  <td width=170 valign=top >&nbsp;</p>
+  </td>
+ </tr>
+ <tr>
+  <td width=170 valign=top >
+  <p class=MsoNormal > porod constant</p>
+  </td>
+  <td width=213 valign=top >
+  <p class=MsoNormal > %s</p>
+  </td>
+  <td width=170 valign=top >&nbsp;</p>
+  </td>
+ </tr>
+ <tr>
+  <td width=170 valign=top>
+  <p class=MsoNormal > background</p>
+  </td>
+  <td width=170 valign=top >
+  <p class=MsoNormal > %s</p>
+  </td>
+  <td width=170 valign=top ><span > cm<sup>-1</sup></span></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=170 valign=top >
+  <p class=MsoNormal > contrast</p>
+  </td>
+  <td width=213 valign=top >
+  <p class=MsoNormal > %s</p>
+  </td>
+  <td width=170 valign=top >
+  <p class=MsoNormal ><span > A<sup>-2</sup></span></p>
+  </td>
+ </tr>
+</table>
+<p class=MsoNormal><b><span > Extrapolation</span></b></p>
+<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0>
+ <tr>
+  <td width=213 valign=top >
+  <p class=MsoNormal > %s</p>
+  </td>
+  <td width=213 valign=top >
+  <p class=MsoNormal > %s</p>
+  </td>
+ </tr>
+ <tr>
+  <td width=213 valign=top >
+  <p class=MsoNormal > npts low = %s</p>
+  </td>
+  <td width=213 valign=top > npts high = %s</p>
+  </td>
+ </tr>
+ <tr>
+  <td width=213 valign=top >
+  <p class=MsoNormal > %s</p>
+  </td>
+  <td width=213 valign=top >
+  <p class=MsoNormal > %s</p>
+  </td>
+ </tr>
+</table>
+<p class=MsoNormal><b><span > Outputs</span></b></p>
+<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0>
+ <tr>
+  <td width=110 valign=top >
+  <p class=MsoNormal s> Parameter</p>
+  </td>
+  <td width=150 valign=top >
+  <p class=MsoNormal >&nbsp;</p>
+  </td>
+  <td width=255 valign=top >
+  <p class=MsoNormal > Value</p>
+  </td>
+  <td width=65 valign=top >
+  <p class=MsoNormal > Unit</p>
+  </td>
+ </tr>
+ <tr>
+  <td width=110 rowspan=4 >
+  <p class=MsoNormal > invariant (Q<sup>*</sup>)</p>
+  </td>
+  <td width=150 valign=top >
+  <p class=MsoNormal > low Q extrapolation</p>
+  </td>
+  <td width=230 valign=top >
+  <p class=MsoNormal > %s</p>
+  </td>
+  <td width=65 valign=top >
+  <p class=MsoNormal > (cmA)<sup>-1</sup></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=150 valign=top >
+  <p class=MsoNormal > data</p>
+  </td>
+  <td width=230 valign=top >
+  <p class=MsoNormal > %s</p>
+  </td>
+  <td width=65 valign=top >
+  <p class=MsoNormal > (cmA)<sup>-1</sup></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=150 valign=top >
+  <p class=MsoNormal > high Q extrapolation</p>
+  </td>
+  <td width=230 valign=top >
+  <p class=MsoNormal > %s</p>
+  </td>
+  <td width=65 valign=top >
+  <p class=MsoNormal > (cmA)<sup>-1</sup></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=150 valign=top >
+  <p class=MsoNormal > total</p>
+  </td>
+  <td width=230 valign=top >
+  <p class=MsoNormal > %s</p>
+  </td>
+  <td width=65 valign=top >
+  <p class=MsoNormal > (cmA)<sup>-1</sup></p>
+  </td>
+ </tr>
+ <tr>
+  <td width=110 valign=top >
+  <p class=MsoNormal > volume fraction</p>
+  </td>
+  <td width=150 valign=top >
+  <p class=MsoNormal >&nbsp;</p>
+  </td>
+  <td width=230 valign=top >
+  <p class=MsoNormal > %s</p>
+  </td>
+  <td width=65 valign=top >
+  <p class=MsoNormal >&nbsp;</p>
+  </td>
+ </tr>
+ <tr>
+  <td width=110 valign=top >
+  <p class=MsoNormal > specific surface</p>
+  </td>
+  <td width=150 valign=top >
+  <p class=MsoNormal >&nbsp;</p>
+  </td>
+  <td width=230 valign=top >
+  <p class=MsoNormal > %s</p>
+  </td>
+  <td width=65 valign=top >
+  <p class=MsoNormal >&nbsp;</p>
+  </td>
+ </tr>
+</table>
+</font>
+<p class=MsoNormal>&nbsp;</p>
+<font size=4>
+<br><b><span > Plot</span></b>
+<center>
+<br>Invariant Computation
+<br>Data: "%s"
+<img src="%s" height=400 width=550>
+</center>
+</font>
+</div>
+
+</body>
+
+</html>
