Index: LICENSE.TXT
===================================================================
--- LICENSE.TXT	(revision a3e3ef589b5480f01cfe7c9d68b47e807fa7f49c)
+++ LICENSE.TXT	(revision 0347c89548bfa290a2a6d55486e8885f15a16a35)
@@ -1,3 +1,3 @@
-Copyright (c) 2009-2017, SasView Developers
+Copyright (c) 2009-2018, SasView Developers
 All rights reserved.
 
Index: docs/sasview/.gitignore
===================================================================
--- docs/sasview/.gitignore	(revision 356af60ef4067ec412316b5d0ea7e787955d8487)
+++ docs/sasview/.gitignore	(revision 356af60ef4067ec412316b5d0ea7e787955d8487)
@@ -0,0 +1,1 @@
+/README.txt
Index: docs/sasview/README.txt
===================================================================
--- docs/sasview/README.txt	(revision 356af60ef4067ec412316b5d0ea7e787955d8487)
+++ docs/sasview/README.txt	(revision 356af60ef4067ec412316b5d0ea7e787955d8487)
@@ -0,0 +1,4 @@
+The files in this folder are **not** shipped with the installer version of SasView.
+
+The Tutorial.pdf file here should be manually copied to /sasview/src/sas/sasview/media 
+whenever it is updated.
Index: docs/sphinx-docs/source/conf.py
===================================================================
--- docs/sphinx-docs/source/conf.py	(revision 153b75a64d88ad8b0597c08dada6ae0ca20c08d1)
+++ docs/sphinx-docs/source/conf.py	(revision b229a3bf14cf52237670dc67090e092cbe9939db)
@@ -81,5 +81,5 @@
 version = '4.2'
 # The full version, including alpha/beta/rc tags.
-release = '4.2.0-beta'
+release = '4.2.0'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
Index: docs/sphinx-docs/source/user/tutorial.rst
===================================================================
--- docs/sphinx-docs/source/user/tutorial.rst	(revision 711d7e73d0b08b755b97a00d4943ab6decde7671)
+++ docs/sphinx-docs/source/user/tutorial.rst	(revision 893d852f3c5e35f1efabd15a592a84ceaeec035d)
@@ -8,7 +8,15 @@
 .. note:: In Windows use [Alt]-[Cursor left] to return to the previous page
 
+The following tutorial was written for Version 2.x but is still a useful overview of 
+much of the analysis capability in SasView (but disregard Appendix XIII if using 
+Version 4.2 or later)
+
+:download:`Old Tutorial <sasview/Tutorial.pdf>`
+
+The following tutorials have been written for Version 4.x
+
 :download:`Getting Started with Sasview <sasview/getting_started_with_sasview.pdf>`
 
 :download:`Basic 1D Fitting in Sasview <sasview/basic_1d_fitting_in_sasview_v3x_4x.pdf>`
 
-:download:`Old Tutorial <sasview/Tutorial.pdf>`
+:download:`Simultaneous 1D Fitting in Sasview <sasview/simultaneous_1d_fitting_in_sasview_v3x_4x.pdf>`
Index: installers/license.txt
===================================================================
--- installers/license.txt	(revision 2f6d340b9cd179b18c2a4efe77d149f45c7e98de)
+++ installers/license.txt	(revision d3114cc7e4ecdb328ff50a2af61f638107326813)
@@ -1,21 +1,31 @@
 This software was originally developed by the University of Tennessee 
 as part of the Distributed Data Analysis of Neutron Scattering 
-Experiments (DANSE) project funded by the US National Science Foundation
-and is currently being developed as an open source project hosted on GitHub
-and managed by a consortium of scattering facilities.
+Experiments (DANSE) project funded by the US National Science 
+Foundation (NSF), but is currently being developed as an Open Source 
+project hosted on GitHub and managed by a consortium of scattering 
+facilities.
 
-Participating facilities include: the University of Tennessee, the University 
-of Maryland, the European Spallation Source, the National Institute of 
-Standards & Technology Center for Neutron Research, the Oak Ridge National 
-Laboratory Neutron Sciences Directorate, the ISIS Neutron & Muon Source, the 
-Institut Laue Langevin, the Diamond Light Source, and Delft University of 
-Technology.
+Participating facilities include (in alphabetical order): 
+the Australian National Science & Technology Centre for Neutron 
+Scattering, the Diamond Light Source, the European Spallation Source, 
+the Institut Laue Langevin, the ISIS Pulsed Neutron & Muon Source, 
+the National Institute of Standards & Technology Center for Neutron 
+Research, the Oak Ridge National Laboratory Neutron Sciences 
+Directorate, and the Technical University Delft Reactor Institute.
 
-If you use this application to do scientific research that leads to publication, 
-we kindly ask that you acknowledge the use of the software with the following 
-sentence:
+SasView is distributed under a 'Three-clause' BSD licence which you 
+may read here: https://github.com/SasView/sasview/blob/master/LICENSE.TXT 
 
-*"This work benefited from the use of the SasView application, originally 
-developed under NSF award DMR-0520547."*
+SasView is free to download and use, including for commercial purposes.
 
-(C) 2009-2015 UTK, UMD, ESS, NIST, ORNL, ISIS, ILL, DLS, DUT
+© 2009-2018 UMD, UTK, NIST, ORNL, ISIS, ESS, ANSTO, ILL, TUD, DLS 
+
+
+If you use SasView to do productive scientific research that leads to 
+a publication, we ask that you acknowledge use of the program with 
+the following text:
+
+"This work benefited from the use of the SasView application, originally 
+developed under NSF Award DMR-0520547. SasView also contains code 
+developed with funding from the EU Horizon 2020 programme under the 
+SINE2020 project Grant No 654000."
Index: src/sas/sasgui/guiframe/gui_manager.py
===================================================================
--- src/sas/sasgui/guiframe/gui_manager.py	(revision b963b2066d6a76fe5073000c5a596a6fd0130ac4)
+++ src/sas/sasgui/guiframe/gui_manager.py	(revision 5f082513a911651a38883ad5781724342d27ee72)
@@ -1281,5 +1281,7 @@
         if config._do_tutorial and (IS_WIN or sys.platform == 'darwin'):
             wx_id = wx.NewId()
-            self._help_menu.Append(wx_id, '&Tutorial', 'Software tutorial')
+            # Pluralised both occurences of 'Tutorial' in the line below
+            # S King, Sep 2018
+            self._help_menu.Append(wx_id, '&Tutorials', 'Software tutorials')
             wx.EVT_MENU(self, wx_id, self._onTutorial)
 
@@ -2144,42 +2146,17 @@
 
         """
-        if config._do_tutorial:
-            path = config.TUTORIAL_PATH
-            if IS_WIN:
-                try:
-                    from sas.sasgui.guiframe.pdfview import PDFFrame
-                    dialog = PDFFrame(None, -1, "Tutorial", path)
-                    # put icon
-                    self.put_icon(dialog)
-                    dialog.Show(True)
-                except:
-                    logger.error("Error in _onTutorial: %s" % sys.exc_value)
-                    try:
-                        # Try an alternate method
-                        logger.error(
-                            "Could not open the tutorial pdf, trying xhtml2pdf")
-                        from xhtml2pdf import pisa
-                        pisa.startViewer(path)
-                    except:
-                        logger.error(
-                            "Could not open the tutorial pdf with xhtml2pdf")
-                        msg = "This feature requires 'PDF Viewer'\n"
-                        wx.MessageBox(msg, 'Error')
-            else:
-                try:
-                    command = "open '%s'" % path
-                    os.system(command)
-                except:
-                    try:
-                        # Try an alternate method
-                        logger.error(
-                            "Could not open the tutorial pdf, trying xhtml2pdf")
-                        from xhtml2pdf import pisa
-                        pisa.startViewer(path)
-                    except:
-                        logger.error(
-                            "Could not open the tutorial pdf with xhtml2pdf")
-                        msg = "This feature requires the Preview application\n"
-                        wx.MessageBox(msg, 'Error')
+        # Action changed from that in 2.x/3.x/4.0.x/4.1.x
+        # Help >> Tutorial used to bring up a pdf of the
+        # original 2.x tutorial.
+        # Code below, implemented from 4.2.0, redirects
+        # action to the Tutorials page of the help 
+        # documentation to give access to all available
+        # tutorials
+        # S King, Sep 2018
+
+        from documentation_window import DocumentationWindow
+        _TreeLocation = "user/tutorial.html"
+        DocumentationWindow(self, -1, _TreeLocation, "",
+                            "SasView Documentation")
 
     def _onSphinxDocs(self, evt):
Index: src/sas/sasgui/guiframe/report_dialog.py
===================================================================
--- src/sas/sasgui/guiframe/report_dialog.py	(revision 91552b528f8c52835ef769f59e30707071f7f9b9)
+++ src/sas/sasgui/guiframe/report_dialog.py	(revision d0ce666faaf0f9284be2e607a0ac846cdd9a682b)
@@ -7,4 +7,5 @@
 import sys
 import wx.html as html
+from sas.sasgui.guiframe.report_image_handler import ReportImageHandler
 
 logger = logging.getLogger(__name__)
@@ -70,4 +71,6 @@
         button_close = wx.Button(self, wx.ID_OK, "Close")
         button_close.SetToolTipString("Close this report window.")
+        button_close.Bind(wx.EVT_BUTTON, self.onClose,
+                          id=button_close.GetId())
         hbox.Add(button_close)
         button_close.SetFocus()
@@ -117,5 +120,5 @@
 
 
-    def OnClose(self, event=None):
+    def onClose(self, event=None):
         """
         Close the Dialog
@@ -123,7 +126,7 @@
         """
         for fig in self.fig_urls:
-            self.imgRAM.RemoveFile(fig)
+            ReportImageHandler.remove_figure(fig)
 
-        self.Close()
+        self.Destroy()
 
     def HTML2PDF(self, data, filename):
Index: src/sas/sasgui/guiframe/report_image_handler.py
===================================================================
--- src/sas/sasgui/guiframe/report_image_handler.py	(revision d0ce666faaf0f9284be2e607a0ac846cdd9a682b)
+++ src/sas/sasgui/guiframe/report_image_handler.py	(revision d0ce666faaf0f9284be2e607a0ac846cdd9a682b)
@@ -0,0 +1,81 @@
+import wx
+import logging
+
+logger = logging.getLogger(__name__)
+
+
+class ReportImageHandler:
+    # Singleton class that manages all report plot images
+    # To call the handler, call the static method set_figs
+
+    class _ReportImageHandler:
+
+        def __init__(self):
+            wx.FileSystem.AddHandler(wx.MemoryFSHandler())
+            self.img_holder = wx.MemoryFSHandler()
+            self.refs = {}
+            self.indices = []
+
+        def set_figs(self, figs, bitmaps, perspective):
+            """
+            Save figures and images to memory and return refernces
+            :param figs: A list of matplotlib Figures
+            :param bitmaps: A list of bitmaps
+            :param perspective: A String with the perspective name
+            :return: A tuple of a list of Figures and a list of memory refs
+            """
+            imgs = []
+            refs = []
+            if figs is None or len(figs) == 0:
+                figs = [None]
+            for fig in figs:
+                if fig is not None:
+                    ind = figs.index(fig)
+                    bitmap = bitmaps[ind]
+
+                # name of the fig
+                name = self.create_unique_name(perspective)
+                # AddFile, image can be retrieved with 'memory:filename'
+                ref = 'memory:' + name
+                self.refs[ref] = fig
+                self.img_holder.AddFile(name, bitmap, wx.BITMAP_TYPE_PNG)
+                refs.append(ref)
+                imgs.append(fig)
+            return imgs, refs
+
+        def create_unique_name(self, perspective, index=None):
+            """
+            Create a unique key for each item in memory
+            :param perspective: The perspective name as a string
+            :param index: The base index used for incrementing the name
+            :return: A unique file name not currently in use
+            """
+            if not index:
+                index = len(self.indices)
+            if index in self.indices:
+                name = self.create_unique_name(index + 1)
+            else:
+                self.indices.append(index)
+                name = 'img_{}_{:03d}.png'.format(str(perspective), index)
+            return name
+
+    instance = None
+
+    @staticmethod
+    def check_for_empty_instance():
+        if ReportImageHandler.instance is None:
+            ReportImageHandler.instance = \
+                ReportImageHandler._ReportImageHandler()
+
+    @staticmethod
+    def set_figs(figs, bitmaps, perspective):
+        ReportImageHandler.check_for_empty_instance()
+        return ReportImageHandler.instance.set_figs(figs, bitmaps, perspective)
+
+    @staticmethod
+    def remove_figure(fig_url):
+        try:
+            ReportImageHandler.check_for_empty_instance()
+            ReportImageHandler.instance.refs.pop(fig_url)
+        except Exception as e:
+            logger.warn(e)
Index: src/sas/sasgui/perspectives/calculator/media/slit_calculator_help.rst
===================================================================
--- src/sas/sasgui/perspectives/calculator/media/slit_calculator_help.rst	(revision 170b2516193fc586b239038e447b4aa31092d672)
+++ src/sas/sasgui/perspectives/calculator/media/slit_calculator_help.rst	(revision 346745a30813fd45fc6d6f85fe5dd51bb9790081)
@@ -11,9 +11,22 @@
 -----------
 
-This tool enables X-ray users to calculate the slit size (FWHM/2) for smearing
-based on their half beam profile data.
+This tool enables X-ray users to calculate the slit size (FWHM/2) for resolution 
+smearing purposes based on their half beam profile data (as Q vs Intensity; any 
+other data fields are ignored).
+
+Method
+------
+
+The tool works by sequentially summing 10 or more intensity values until a 
+maximum value is attained. It then locates the Q values for the points just before, 
+and just after, **half** of this maximum value and interpolates between them to get 
+an accurate value for the Q value for the half maximum.
 
 NOTE! Whilst it may have some more generic applicability, the calculator has
-only been tested with beam profile data from Anton-Paar SAXSess\ :sup:`TM` software.
+only been tested with beam profile data from Anton-Paar SAXSess\ :sup:`TM`\  software.
+The beam profile file does not carry any information about the units of the 
+Q data. It is probably |nm^-1| but the resolution calculations assume the slit 
+height/width has units of |Ang^-1|. If the beam profile data is not in these 
+units then it, or the result, must be manually converted.
 
 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
@@ -27,14 +40,10 @@
 
    *NOTE! To see an example of the beam profile file format, visit the file
-   beam profile.DAT in your {installation_directory}/SasView/test folder.*
+   beam profile.DAT in your {installation_directory}/SasView/test_1d 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
+.. note::  This help document was last changed by Steve King, 09Sep2018
Index: src/sas/sasgui/perspectives/fitting/basepage.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/basepage.py	(revision 8a51dea053e540915bf4b4f3fe86a6b09a456d4f)
+++ src/sas/sasgui/perspectives/fitting/basepage.py	(revision b43988196e5c4f2dfbf3ec5c9b66703d5656b08d)
@@ -31,4 +31,5 @@
 
 from sas.sasgui.guiframe.panel_base import PanelBase
+from sas.sasgui.guiframe.report_image_handler import ReportImageHandler
 from sas.sasgui.guiframe.utils import format_number, check_float, IdList, \
     check_int
@@ -651,34 +652,10 @@
         by plotting, putting it into wx.FileSystem image object
         """
-        images = []
-        refs = []
-
-        # For no figures in the list, prepare empty plot
-        if figs is None or len(figs) == 0:
-            figs = [None]
-
-        # Loop over the list of figures
-        # use wx.MemoryFSHandler
-        imgRAM = wx.MemoryFSHandler()
-        for fig in figs:
-            if fig is not None:
-                ind = figs.index(fig)
-                canvas = canvases[ind]
-
-            # store the image in wx.FileSystem Object
-            wx.FileSystem.AddHandler(wx.MemoryFSHandler())
-
-            # index of the fig
-            ind = figs.index(fig)
-
-            # AddFile, image can be retrieved with 'memory:filename'
-            name = 'img_fit%s.png' % ind
-            refs.append('memory:' + name)
-            imgRAM.AddFile(name, canvas.bitmap, wx.BITMAP_TYPE_PNG)
-            # append figs
-            images.append(fig)
-
-        return imgRAM, images, refs
-
+        bitmaps = []
+        for canvas in canvases:
+            bitmaps.append(canvas.bitmap)
+        imgs, refs = ReportImageHandler.set_figs(figs, bitmaps, 'fit')
+
+        return ReportImageHandler.instance, imgs, refs
 
     def on_save(self, event):
@@ -2801,17 +2778,21 @@
         Function called when 'Help' button is pressed next to model
         of interest.  This calls DocumentationWindow from
-        documentation_window.py. It will load the top level of the model
-        help documenation sphinx generated html if no model is presented.
-        If a model IS present then if documention for that model exists
-        it will load to that  point otherwise again it will go to the top.
-        For Wx2.8 and below is used (i.e. non-released through installer)
-        a browser is loaded and the top of the model documentation only is
-        accessible because webbrowser module does not pass anything after
-        the # to the browser.
+        documentation_window.py. It will load the top level of the html model
+        help documenation sphinx generated if either a plugin model (which
+        normally does not have an html help help file) is selected or if no
+        model is selected. Otherwise, if a regula model is selected, the
+        documention for that model will be sent to a browser window.
+
+        :todo the quick fix for no documentation in plugins is the if statment.
+        However, the right way to do this would be to check whether the hmtl
+        file exists and load the model docs if it does and the general docs if
+        it doesn't - this will become important if we ever figure out how to
+        build docs for plugins on the fly.  Sep 9, 2018 -PDB
 
         :param event: on Help Button pressed event
         """
 
-        if self.model is not None:
+        if (self.model is not None) and (self.categorybox.GetValue()
+                                         != "Plugin Models"):
             name = self.formfactorbox.GetValue()
             _TreeLocation = 'user/models/%s.html' % name
Index: src/sas/sasgui/perspectives/fitting/report_dialog.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/report_dialog.py	(revision 69a68979fe94b8f135a602e7f02b162e34616d53)
+++ src/sas/sasgui/perspectives/fitting/report_dialog.py	(revision 44e8f48e6ada97db8eb483009edc07705c6329a2)
@@ -72,14 +72,12 @@
         filename = basename + ext
 
-        # save figures
-        pictures = []
-        for num in range(self.nimages):
-            pic_name = basename + '_img%s.png' % num
-            # save the image for use with pdf writer
-            self.report_list[2][num].savefig(pic_name)
-            pictures.append(pic_name)
+        # save the images for use with pdf writer
+        pictures = [
+            '_'.join((basename, url.split(':')[1])) for url in self.fig_urls]
+        for i, pic in enumerate(pictures):
+            self.report_list[2][i].savefig(pic)
 
         # translate png references int html from in-memory name to on-disk name
-        html = self.report_html.replace("memory:img_fit", basename+'_img')
+        html = self.report_html.replace("memory:", basename+'_')
 
         #set file extensions
Index: src/sas/sasgui/perspectives/invariant/invariant_panel.py
===================================================================
--- src/sas/sasgui/perspectives/invariant/invariant_panel.py	(revision 2469df7fc9ffa047115c5bffe589ed307b12c363)
+++ src/sas/sasgui/perspectives/invariant/invariant_panel.py	(revision 44e8f48e6ada97db8eb483009edc07705c6329a2)
@@ -24,4 +24,5 @@
 from sas.sasgui.guiframe.panel_base import PanelBase
 from sas.sasgui.guiframe.documentation_window import DocumentationWindow
+from sas.sasgui.guiframe.report_image_handler import ReportImageHandler
 
 logger = logging.getLogger(__name__)
@@ -783,5 +784,8 @@
         report_img = self.state.image
         report_list = [report_html_str, report_text_str, report_img]
-        dialog = ReportDialog(report_list, None, -1, "")
+        ReportImageHandler.check_for_empty_instance()
+        imgRAM = ReportImageHandler.instance.img_holder
+        refs = [self.state.wximgbmp]
+        dialog = ReportDialog(report_list, imgRAM, refs, None, wx.ID_ANY, "")
         dialog.Show()
 
Index: src/sas/sasgui/perspectives/invariant/invariant_state.py
===================================================================
--- src/sas/sasgui/perspectives/invariant/invariant_state.py	(revision 2469df7fc9ffa047115c5bffe589ed307b12c363)
+++ src/sas/sasgui/perspectives/invariant/invariant_state.py	(revision fa412df39d3c5338c2c5f69fed935b428f385ebe)
@@ -12,4 +12,5 @@
 from lxml import etree
 from sas.sascalc.dataloader.readers.cansas_reader import Reader as CansasReader
+from sas.sasgui.guiframe.report_image_handler import ReportImageHandler
 from sas.sascalc.dataloader.readers.cansas_reader import get_content
 from sas.sasgui.guiframe.utils import format_number
@@ -611,12 +612,8 @@
         wximgbmp = wx.BitmapFromImage(wximg)
         # store the image in wx.FileSystem Object
-        wx.FileSystem.AddHandler(wx.MemoryFSHandler())
-        # use wx.MemoryFSHandler
-        self.imgRAM = wx.MemoryFSHandler()
-        # AddFile, image can be retrieved with 'memory:filename'
-        self.imgRAM.AddFile('img_inv.png', wximgbmp, wx.BITMAP_TYPE_PNG)
-
-        self.wximgbmp = 'memory:img_inv.png'
-        self.image = fig
+        imgs, refs = ReportImageHandler.set_figs([fig], [wximgbmp], 'inv')
+
+        self.wximgbmp = refs[0]
+        self.image = imgs[0]
 
 class Reader(CansasReader):
Index: src/sas/sasgui/perspectives/invariant/report_dialog.py
===================================================================
--- src/sas/sasgui/perspectives/invariant/report_dialog.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sasgui/perspectives/invariant/report_dialog.py	(revision d0ce666faaf0f9284be2e607a0ac846cdd9a682b)
@@ -41,5 +41,5 @@
 
         # put image path in the report string
-        self.report_html = self.report_list[0] % "memory:img_inv.png"
+        self.report_html = self.report_list[0] % self.fig_urls[0]
         # layout
         self._setup_layout()
Index: src/sas/sasview/__init__.py
===================================================================
--- src/sas/sasview/__init__.py	(revision a8bbba273d487ea330a418be9e5d9c5fe5d8eed8)
+++ src/sas/sasview/__init__.py	(revision b229a3bf14cf52237670dc67090e092cbe9939db)
@@ -1,2 +1,2 @@
-__version__ = "4.2.0-beta"
+__version__ = "4.2.0"
 __build__ = "GIT_COMMIT"
Index: src/sas/sasview/local_config.py
===================================================================
--- src/sas/sasview/local_config.py	(revision b963b2066d6a76fe5073000c5a596a6fd0130ac4)
+++ src/sas/sasview/local_config.py	(revision b229a3bf14cf52237670dc67090e092cbe9939db)
@@ -48,5 +48,5 @@
 '''This work benefited from the use of the SasView application, originally developed under NSF Award DMR-0520547. SasView also contains code developed with funding from the EU Horizon 2020 programme under the SINE2020 project Grant No 654000.'''
 _acknowledgement_citation = \
-'''M. Doucet et al. SasView Version 4.1.2, Zenodo, 10.5281/zenodo.825675'''
+'''M. Doucet et al. SasView Version 4.2, Zenodo, 10.5281/zenodo.1412041'''
 
 _acknowledgement =  \
Index: src/sas/sasview/media/.gitignore
===================================================================
--- src/sas/sasview/media/.gitignore	(revision 356af60ef4067ec412316b5d0ea7e787955d8487)
+++ src/sas/sasview/media/.gitignore	(revision 356af60ef4067ec412316b5d0ea7e787955d8487)
@@ -0,0 +1,1 @@
+/README.txt
Index: src/sas/sasview/media/README.txt
===================================================================
--- src/sas/sasview/media/README.txt	(revision efe730d4bba7a05c203957e4495eece8359fcd77)
+++ src/sas/sasview/media/README.txt	(revision 356af60ef4067ec412316b5d0ea7e787955d8487)
@@ -1,6 +1,8 @@
+The files in this folder are what get shipped in the installer \media folder.
+
+The help documentation gets shipped in the /doc folder.
+
 This Tutorial.pdf is what appears when you click on 'Tutorial' under 'Help'
-in the menu bar.
+in the SasView menu bar. It has been manually copied over from sasview/docs/sasview.
 
-The source files are in: /sasview/docs/sasview
-
-The getting_started_with_sasview.pdf has been manually added here until the auto-generated LibreOffice doc build is up and running.
+The new tutorial pdfs here have been manually copied over from the website /downloads folder.
Index: c/sas/sasview/test/1d_data/cansas1d.xsl
===================================================================
--- src/sas/sasview/test/1d_data/cansas1d.xsl	(revision e6d309ca9e26e7a2a3d9509a7b0784030d7c2335)
+++ 	(revision )
@@ -1,508 +1,0 @@
-<?xml version="1.0"?>
-
-<!--
-########### SVN repository information ###################
-# $Date$
-# $Author$
-# $Revision$
-# $HeadURL$
-# $Id$
-########### SVN repository information ###################
-
-Purpose:
-	This stylesheet is used to translate cansas1d:1.1
-	XML data files into a display form for viewing
-	in a web browser such as Firefox or Internet Explorer
-	that supports client-side XSLT formatting.
-
-Usage:
-	xsltproc cansas1d.xsl datafile.xml > datafile.html
-	(or include it as indicated at the documentation site
-	http://www.cansas.org/wgwiki/index.php/cansas1d_documentation)
-
-Copyright (c) 2013, UChicago Argonne, LLC
-This file is distributed subject to a Software License Agreement found
-in the file LICENSE that is included with this distribution. 
--->
-
-<xsl:stylesheet version="1.1"
-	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-	xmlns:cs="urn:cansas1d:1.1"
-	xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
-	>
-
-	<xsl:template match="/">
-<!-- DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" -->
-		<html>
-			<head>
-				<title>SAS data in canSAS 1-D format</title>
-			</head>
-			<body>
-				<h1>SAS data in canSAS 1-D format</h1>
-				<small>generated using <TT>cansas1d.xsl</TT> from canSAS</small>
-				<BR />
-				<table border="2">
-					<tr>
-						<th bgcolor="lavender">canSAS 1-D XML version:</th>
-						<td><xsl:value-of select="cs:SASroot/@version" /></td>
-					</tr>
-					<tr>
-						<th bgcolor="lavender">number of entries:</th>
-						<td><xsl:value-of select="count(cs:SASroot/cs:SASentry)" /></td>
-					</tr>
-					<xsl:if test="count(/cs:SASroot//cs:SASentry)>1">
-						<!-- if more than one SASentry, make a table of contents -->
-						<xsl:for-each select="/cs:SASroot//cs:SASentry">
-							<tr>
-								<th bgcolor="lavender">SASentry-<xsl:value-of select="position()" /></th>
-								<td>
-									<a href="#SASentry-{generate-id(.)}">
-										<xsl:if test="@name!=''">(<xsl:value-of select="@name" />)</xsl:if>
-										<xsl:value-of select="cs:Title" />
-									</a>
-								</td>
-								<xsl:if test="count(cs:SASdata)>1">
-									<td>
-										<!-- if more than one SASdata, make a local table of contents -->
-										<xsl:for-each select="cs:SASdata">
-											<xsl:if test="position()>1">
-												<xsl:text> | </xsl:text>
-											</xsl:if>
-											<a href="#SASdata-{generate-id(.)}">
-												<xsl:choose>
-													<xsl:when test="cs:name!=''">
-														<xsl:value-of select="cs:name" />
-													</xsl:when>
-													<xsl:when test="@name!=''">
-														<xsl:value-of select="@name" />
-													</xsl:when>
-													<xsl:otherwise>
-														SASdata<xsl:value-of select="position()" />
-													</xsl:otherwise>
-												</xsl:choose>
-											</a>
-										</xsl:for-each>
-									</td>
-								</xsl:if>
-							</tr>
-						</xsl:for-each>
-					</xsl:if>
-				</table>
-				<xsl:apply-templates  />
-				<hr />
-				<small><center>$Id$</center></small>
-			</body>
-		</html>
-	</xsl:template>
-
-	<xsl:template match="cs:SASroot">
-		<xsl:for-each select="cs:SASentry">
-			<hr />
-			<br />
-			<a id="#SASentry-{generate-id(.)}"  name="SASentry-{generate-id(.)}" />
-			<h1>SASentry<xsl:value-of select="position()" />:<xsl:if 
-				test="@name!=''">(<xsl:value-of select="@name" />)</xsl:if>
-				<xsl:value-of select="cs:Title" /></h1>
-			<xsl:if test="count(cs:SASdata)>1">
-				<table border="2">
-					<caption>SASdata contents</caption>
-					<xsl:for-each select="cs:SASdata">
-						<tr>
-							<th>SASdata-<xsl:value-of select="position()" /></th>
-							<td>
-								<a href="#SASdata-{generate-id(.)}">
-									<xsl:choose>
-									<xsl:when test="@name!=''">
-											<xsl:value-of select="@name" />
-										</xsl:when>
-										<xsl:otherwise>
-											SASdata<xsl:value-of select="position()" />
-										</xsl:otherwise>
-									</xsl:choose>
-								</a>
-							</td>
-						</tr>
-					</xsl:for-each>
-				</table>
-			</xsl:if>
-			<br />
-			<table border="2">
-				<tr>
-					<th>SAS data</th>
-					<xsl:for-each select="cs:SAStransmission_spectrum"><th>transmission spectrum: <xsl:value-of select="@name" /></th></xsl:for-each>
-					<th>Selected Metadata</th>
-				</tr>
-				<tr>
-					<td valign="top"><xsl:apply-templates  select="cs:SASdata" /></td>
-					<xsl:apply-templates  select="cs:SAStransmission_spectrum" />
-					<td valign="top">
-						<table border="2">
-							<tr bgcolor="lavender">
-								<th>name</th>
-								<th>value</th>
-								<th>unit</th>
-							</tr>
-							<tr>
-								<td>Title</td>
-								<td><xsl:value-of select="cs:Title" /></td>
-								<td />
-							</tr>
-							<tr>
-								<td>Run</td>
-								<td><xsl:value-of select="cs:Run" /></td>
-								<td />
-							</tr>
-							<tr><xsl:apply-templates  select="run" /></tr>
-							<xsl:apply-templates  select="cs:SASsample" />
-							<xsl:apply-templates  select="cs:SASinstrument" />
-							<xsl:apply-templates  select="cs:SASprocess" />
-							<xsl:apply-templates  select="cs:SASnote" />
-						</table>
-					</td>
-				</tr>
-			</table>
-		</xsl:for-each>
-	</xsl:template>
-
-	<xsl:template match="cs:SAStransmission_spectrum">
-		<td valign="top">
-		    <table border="2">
-			<caption><xsl:if 
-				test="@name!=''"><xsl:value-of select="@name" /></xsl:if> (<xsl:value-of 
-				select="count(cs:Tdata)" /> points)
-				<a id="#Tdata-{generate-id(.)}"  name="Tdata-{generate-id(.)}" />
-			</caption>
-			<tr bgcolor="lavender">
-				<xsl:for-each select="cs:Tdata[1]/*">
-					<th>
-						<xsl:value-of select="name()" /> 
-						<xsl:if test="@unit!=''"> (<xsl:value-of select="@unit" />)</xsl:if>
-					</th>
-				</xsl:for-each>
-			</tr>
-		    	<xsl:for-each select="cs:Tdata">
-					<tr>
-						<xsl:for-each select="*">
-							<xsl:call-template name="td-value"/>
-						</xsl:for-each>
-					</tr>
-				</xsl:for-each>
-			</table>
-		</td>
-	</xsl:template>
-
-	<xsl:template match="cs:SASdata">
-		<a id="#SASdata-{generate-id(.)}"  name="SASdata-{generate-id(.)}" />
-		<table border="2">
-			<caption><xsl:if 
-				test="@name!=''"><xsl:value-of select="@name" /></xsl:if> (<xsl:value-of 
-				select="count(cs:Idata)" /> points)</caption>
-			<tr bgcolor="lavender">
-				<xsl:for-each select="cs:Idata[1]/*">
-					<th>
-						<xsl:value-of select="name()" /> 
-						<xsl:if test="@unit!=''"> (<xsl:value-of select="@unit" />)</xsl:if>
-					</th>
-				</xsl:for-each>
-			</tr>
-			<xsl:for-each select="cs:Idata">
-				<tr>
-					<xsl:for-each select="*">
-						<xsl:call-template name="td-value"/>
-					</xsl:for-each>
-				</tr>
-			</xsl:for-each>
-		</table>
-	</xsl:template>
-
-	<xsl:template match="cs:SASsample">
-		<tr>
-			<td>SASsample</td>
-			<td><xsl:value-of select="@name" /></td>
-			<td />
-		</tr>
-		<xsl:for-each select="*">
-			<xsl:choose>
-				<xsl:when test="name()='position'">
-					<xsl:apply-templates select="." />
-				</xsl:when>
-				<xsl:when test="name()='orientation'">
-					<xsl:apply-templates select="." />
-				</xsl:when>
-				<xsl:otherwise>
-					<xsl:call-template name="tr-parent-value-units"/>
-				</xsl:otherwise>
-			</xsl:choose>
-		</xsl:for-each>
-	</xsl:template>
-
-	<xsl:template match="cs:SASinstrument">
-		<tr>
-			<td>SASinstrument</td>
-			<td><xsl:value-of select="cs:name" /></td>
-			<td><xsl:value-of select="@name" /></td>
-		</tr>
-		<xsl:for-each select="*">
-			<xsl:choose>
-				<xsl:when test="name()='SASsource'"><xsl:apply-templates select="." /></xsl:when>
-				<xsl:when test="name()='SAScollimation'"><xsl:apply-templates select="." /></xsl:when>
-				<xsl:when test="name()='SASdetector'"><xsl:apply-templates select="." /></xsl:when>
-				<xsl:when test="name()='name'" />
-				<xsl:otherwise>
-					<xsl:call-template name="tr-parent-value-units"/>
-				</xsl:otherwise>
-			</xsl:choose>
-		</xsl:for-each>
-	</xsl:template>
-
-	<xsl:template match="cs:SASsource">
-		<tr>
-			<td><xsl:value-of select="name()" /></td>
-			<td><xsl:value-of select="@name" /></td>
-			<td />
-		</tr>
-		<xsl:for-each select="*">
-			<xsl:choose>
-				<xsl:when test="name()='beam_size'"><xsl:apply-templates select="." /></xsl:when>
-				<xsl:otherwise>
-					<xsl:call-template name="tr-parent-value-units"/>
-				</xsl:otherwise>
-			</xsl:choose>
-		</xsl:for-each>
-	</xsl:template>
-
-	<xsl:template match="cs:beam_size">
-		<xsl:call-template name="tr-parent-name"/>
-		<xsl:for-each select="*">
-			<xsl:call-template name="tr-grandparent-value-units"/>
-		</xsl:for-each>
-	</xsl:template>
-
-	<xsl:template match="cs:SAScollimation">
-		<xsl:for-each select="*">
-			<xsl:choose>
-				<xsl:when test="name()='aperture'"><xsl:apply-templates select="." /></xsl:when>
-				<xsl:otherwise>
-					<xsl:call-template name="tr-parent-value-units"/>
-				</xsl:otherwise>
-			</xsl:choose>
-		</xsl:for-each>
-	</xsl:template>
-
-	<xsl:template match="cs:aperture">
-		<tr>
-			<td><xsl:value-of select="name(..)" />_<xsl:value-of select="name()" /></td>
-			<td><xsl:value-of select="@name" /></td>
-			<td><xsl:value-of select="@type" /></td>
-		</tr>
-		<xsl:for-each select="*">
-			<xsl:choose>
-				<xsl:when test="name()='size'"><xsl:apply-templates select="." /></xsl:when>
-				<xsl:otherwise>
-					<xsl:call-template name="tr-grandparent-value-units"/>
-				</xsl:otherwise>
-			</xsl:choose>
-		</xsl:for-each>
-	</xsl:template>
-
-	<xsl:template match="cs:size">
-		<tr>
-			<xsl:call-template name="td-grandparent"/>
-			<td><xsl:value-of select="@name" /></td>
-			<td />
-		</tr>
-		<xsl:for-each select="*">
-			<tr>
-				<xsl:call-template name="td-greatgrandparent"/>
-				<xsl:call-template name="td-value"/>
-				<xsl:call-template name="td-unit"/>
-			</tr>
-		</xsl:for-each>
-	</xsl:template>
-
-	<xsl:template match="cs:SASdetector">
-		<tr>
-			<td><xsl:value-of select="name()" /></td>
-			<td><xsl:value-of select="cs:name" /></td>
-			<td><xsl:value-of select="@name" /></td>
-		</tr>
-		<xsl:for-each select="*">
-			<xsl:choose>
-				<xsl:when test="name()='name'" />
-				<xsl:when test="name()='offset'"><xsl:apply-templates select="." /></xsl:when>
-				<xsl:when test="name()='orientation'"><xsl:apply-templates select="." /></xsl:when>
-				<xsl:when test="name()='beam_center'"><xsl:apply-templates select="." /></xsl:when>
-				<xsl:when test="name()='pixel_size'"><xsl:apply-templates select="." /></xsl:when>
-				<xsl:otherwise>
-					<xsl:call-template name="tr-parent-value-units"/>
-				</xsl:otherwise>
-			</xsl:choose>
-		</xsl:for-each>
-	</xsl:template>
-
-	<xsl:template match="cs:orientation">
-		<xsl:call-template name="tr-parent-name"/>
-		<xsl:for-each select="*">
-			<xsl:call-template name="tr-grandparent-value-units"/>
-		</xsl:for-each>
-	</xsl:template>
-
-	<xsl:template match="cs:position">
-		<xsl:call-template name="tr-parent-name"/>
-		<xsl:for-each select="*">
-			<xsl:call-template name="tr-grandparent-value-units"/>
-		</xsl:for-each>
-	</xsl:template>
-
-	<xsl:template match="cs:offset">
-		<xsl:call-template name="tr-parent-name"/>
-		<xsl:for-each select="*">
-			<xsl:call-template name="tr-grandparent-value-units"/>
-		</xsl:for-each>
-	</xsl:template>
-
-	<xsl:template match="cs:beam_center">
-		<xsl:call-template name="tr-parent-name"/>
-		<xsl:for-each select="*">
-			<xsl:call-template name="tr-grandparent-value-units"/>
-		</xsl:for-each>
-	</xsl:template>
-
-	<xsl:template match="cs:pixel_size">
-		<xsl:call-template name="tr-parent-name"/>
-		<xsl:for-each select="*">
-			<xsl:call-template name="tr-grandparent-value-units"/>
-		</xsl:for-each>
-	</xsl:template>
-
-	<xsl:template match="cs:term">
-		<tr>
-			<td><xsl:value-of select="@name" /></td>
-			<xsl:call-template name="td-value"/>
-			<xsl:call-template name="td-unit"/>
-		</tr>
-	</xsl:template>
-
-	<xsl:template match="cs:SASprocessnote" mode="standard">
-		<tr>
-			<td><xsl:value-of select="name()" /></td>
-			<xsl:call-template name="td-value"/>
-			<td><xsl:value-of select="@name" /></td>
-		</tr>
-	</xsl:template>
-	
-	<xsl:template match="cs:SASprocessnote" mode="Indra">
-		<!-- 
-			Customization for APS USAXS metadata
-			These will be IgorPro wavenote variables
-		-->
-		<xsl:for-each select="cs:APS_USAXS">
-			<!-- ignore any other elements at this point -->
-			<tr>
-				<td bgcolor="lightgrey"><xsl:value-of select="name(..)" /></td>
-				<td bgcolor="lightgrey"><xsl:value-of select="name()" /></td>
-				<td bgcolor="lightgrey"><xsl:value-of select="@name" /></td>
-			</tr>
-			<xsl:for-each select="*">
-				<tr>
-					<td><xsl:value-of select="name()" /></td>
-					<xsl:call-template name="td-value"/>
-					<td><xsl:value-of select="@name" /></td>
-				</tr>
-			</xsl:for-each>
-		</xsl:for-each>
-	</xsl:template>
-	
-	<xsl:template match="cs:SASprocess">
-		<tr>
-			<td><xsl:value-of select="name()" /></td>
-			<td><xsl:value-of select="cs:name" /></td>
-			<td><xsl:value-of select="@name" /></td>
-		</tr>
-		<xsl:for-each select="*">
-			<xsl:choose>
-				<xsl:when test="name()='name'" />
-				<xsl:when test="name()='term'"><xsl:apply-templates select="." /></xsl:when>
-				<xsl:when test="name()='SASprocessnote'">
-					<xsl:choose>
-						<xsl:when test="../@name='Indra'"><xsl:apply-templates select="." mode="Indra"/></xsl:when>
-						<xsl:otherwise><xsl:apply-templates select="." mode="standard"/></xsl:otherwise>
-					</xsl:choose>
-				</xsl:when>
-				<xsl:otherwise>
-					<tr>
-						<xsl:call-template name="td-grandparent"/>
-						<xsl:call-template name="td-value"/>
-						<td />
-					</tr>
-				</xsl:otherwise>
-			</xsl:choose>
-		</xsl:for-each>
-	</xsl:template>
-
-	<xsl:template match="cs:SASnote">
-		<xsl:if test="@name!=''">
-			<tr>
-				<td><xsl:value-of select="name()" /></td>
-				<xsl:call-template name="td-value"/>
-				<td><xsl:value-of select="@name" /></td>
-			</tr>
-		</xsl:if>
-	</xsl:template>
-	
-	<!-- =============== convenience routines =============== -->
-	
-	<xsl:template name="tr-parent-value-units">
-		<tr>
-			<xsl:call-template name="td-parent"/>
-			<xsl:call-template name="td-value"/>
-			<xsl:call-template name="td-unit"/>
-		</tr>
-	</xsl:template>
-	
-	<xsl:template name="tr-grandparent-value-units">
-		<tr>
-			<xsl:call-template name="td-grandparent"/>
-			<xsl:call-template name="td-value"/>
-			<xsl:call-template name="td-unit"/>
-		</tr>
-	</xsl:template>
-	
-	<xsl:template name="tr-parent-name">
-		<tr>
-			<xsl:call-template name="td-parent"/>
-			<td><xsl:value-of select="@name" /></td>
-			<td />
-		</tr>
-	</xsl:template>
-	
-	<xsl:template name="td-value">
-		<td><xsl:value-of select="." /></td>
-	</xsl:template>
-	
-	<xsl:template name="td-parent">
-		<td><xsl:value-of select="name(..)" 
-			/>_<xsl:value-of select="name()" 
-			/></td>
-	</xsl:template>
-	
-	<xsl:template name="td-grandparent">
-		<td><xsl:value-of select="name(../..)" 
-			/>_<xsl:value-of select="name(..)" 
-			/>_<xsl:value-of select="name()" 
-			/></td>
-	</xsl:template>
-	
-	<xsl:template name="td-greatgrandparent">
-		<td><xsl:value-of select="name(../../..)" 
-			/>_<xsl:value-of select="name(../..)" 
-			/>_<xsl:value-of select="name(..)" 
-			/>_<xsl:value-of select="name()" 
-			/></td>
-	</xsl:template>
-	
-	<xsl:template name="td-unit">
-		<td><xsl:value-of select="@unit" /></td>
-	</xsl:template>
-
-</xsl:stylesheet>
