Index: docs/sphinx-docs/source/_extensions/dollarmath.py
===================================================================
--- docs/sphinx-docs/source/_extensions/dollarmath.py	(revision eddf6af5bcc4640826d67df071f3e5da5dd092a8)
+++ docs/sphinx-docs/source/_extensions/dollarmath.py	(revision 2a2fb0936f077a24a3d2740fedf8d38a3e8a606f)
@@ -11,5 +11,5 @@
 
 import re
-_dollar = re.compile(r"(?:^|(?<=\s))[$]([^\n]*?)(?<![\\])[$](?:$|(?=\s|[.,;:?\\()]))")
+_dollar = re.compile(r"(?:^|(?<=\s|[-(]))[$]([^\n]*?)(?<![\\])[$](?:$|(?=\s|[-.,;:?\\)]))")
 _notdollar = re.compile(r"\\[$]")
 
Index: setup.py
===================================================================
--- setup.py	(revision 36ca21e21e4a495fcd26ca357d897051fd52bdb6)
+++ setup.py	(revision ae42c8589ea023f3c98bbe8f3b2bc53247632701)
@@ -428,5 +428,5 @@
     entry_points={
         'console_scripts': [
-            "sasview = sas.sasview.sasview:run",
+            "sasview = sas.sasview.sasview:run_gui",
         ]
     },
Index: src/examples/test_panel2D.py
===================================================================
--- src/examples/test_panel2D.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
+++ src/examples/test_panel2D.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -205,5 +205,5 @@
             L=Loader()
             
-            #Recieves data 
+            #Receives data
             try:
                 output=L.load(path)
Index: src/sas/sascalc/calculator/instrument.py
===================================================================
--- src/sas/sascalc/calculator/instrument.py	(revision 574adc767a9e86744546f8edd6a23dc4f81914ad)
+++ src/sas/sascalc/calculator/instrument.py	(revision f4775563fe889a4e12295a145627987e7a33ab93)
@@ -314,5 +314,5 @@
         """
         To plot the wavelength spactrum
-        : requirment: matplotlib.pyplot
+        : requirement: matplotlib.pyplot
         """
         try:
Index: c/sas/sascalc/data_util/uniquelist.py
===================================================================
--- src/sas/sascalc/data_util/uniquelist.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ 	(revision )
@@ -1,40 +1,0 @@
-#
-
-def uniquelist(inputlist, hash=None): 
-    '''remove redunduant elements from the give list
-    and return a list of unique elements.
-
-    inputlist: input list
-    hash: use this function to make the items in the list hashable.
-
-    Implementation details:
-        This function is order-preserving.
-    '''
-    if hash is None:
-        hash = __builtins__.hash
-    seen = {}
-    result = []
-    for item in inputlist:
-        marker = hash(item)
-        if marker in seen: continue
-        seen[marker] = 1
-        result.append(item)
-    return result
-
-
-def test():
-    assert uniquelist([1,2,2,3])==[1,2,3]
-    return
-
-
-def main():
-    test()
-    return
-
-if __name__ == '__main__': main()
-
-
-# version
-__id__ = "$Id$"
-
-# End of file 
Index: src/sas/sascalc/dataloader/file_reader_base_class.py
===================================================================
--- src/sas/sascalc/dataloader/file_reader_base_class.py	(revision 1576693eb6208343e668351293db980887525f6e)
+++ src/sas/sascalc/dataloader/file_reader_base_class.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -123,5 +123,5 @@
         """
         Generic error handler to add an error to the current datainfo to
-        propogate the error up the error chain.
+        propagate the error up the error chain.
         :param msg: Error message
         """
@@ -325,5 +325,5 @@
     def splitline(line):
         """
-        Splits a line into pieces based on common delimeters
+        Splits a line into pieces based on common delimiters
         :param line: A single line of text
         :return: list of values
Index: src/sas/sascalc/dataloader/readers/cansas_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/cansas_reader.py	(revision 61f329f00cdb8b300656d1c1feb4e78f35e59745)
+++ src/sas/sascalc/dataloader/readers/cansas_reader.py	(revision 2469df7fc9ffa047115c5bffe589ed307b12c363)
@@ -82,5 +82,5 @@
 
     def read(self, xml_file, schema_path="", invalid=True):
-        if schema_path != "" or invalid != True:
+        if schema_path != "" or not invalid:
             # read has been called from self.get_file_contents because xml file doens't conform to schema
             _, self.extension = os.path.splitext(os.path.basename(xml_file))
@@ -942,5 +942,5 @@
             pos, "z", datainfo.sample.position.z,
             {"unit": datainfo.sample.position_unit})
-        if written == True:
+        if written:
             self.append(pos, sample)
 
@@ -955,5 +955,5 @@
             ori, "yaw", datainfo.sample.orientation.z,
             {"unit": datainfo.sample.orientation_unit})
-        if written == True:
+        if written:
             self.append(ori, sample)
 
@@ -1002,5 +1002,5 @@
             size, "z", datainfo.source.beam_size.z,
             {"unit": datainfo.source.beam_size_unit})
-        if written == True:
+        if written:
             self.append(size, source)
 
@@ -1058,5 +1058,5 @@
                     size, "z", aperture.size.z,
                     {"unit": aperture.size_unit})
-                if written == True:
+                if written:
                     self.append(size, apert)
 
@@ -1081,5 +1081,5 @@
             written = written | self.write_node(det, "SDD", item.distance,
                                                 {"unit": item.distance_unit})
-            if written == True:
+            if written:
                 self.append(det, instr)
 
@@ -1091,5 +1091,5 @@
             written = written | self.write_node(off, "z", item.offset.z,
                                                 {"unit": item.offset_unit})
-            if written == True:
+            if written:
                 self.append(off, det)
 
@@ -1103,5 +1103,5 @@
                                                 item.orientation.z,
                                                 {"unit": item.orientation_unit})
-            if written == True:
+            if written:
                 self.append(ori, det)
 
@@ -1115,5 +1115,5 @@
                                                 item.beam_center.z,
                                                 {"unit": item.beam_center_unit})
-            if written == True:
+            if written:
                 self.append(center, det)
 
@@ -1125,5 +1125,5 @@
             written = written | self.write_node(pix, "z", item.pixel_size.z,
                                                 {"unit": item.pixel_size_unit})
-            if written == True:
+            if written:
                 self.append(pix, det)
             self.write_node(det, "slit_length", item.slit_length,
Index: src/sas/sascalc/dataloader/readers/danse_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/danse_reader.py	(revision af3e9f590874286ad2be3a1e5be489d605e8a9a0)
+++ src/sas/sascalc/dataloader/readers/danse_reader.py	(revision 2469df7fc9ffa047115c5bffe589ed307b12c363)
@@ -157,5 +157,5 @@
         # Store all data
         # Store wavelength
-        if has_converter == True and self.current_datainfo.source.wavelength_unit != 'A':
+        if has_converter and self.current_datainfo.source.wavelength_unit != 'A':
             conv = Converter('A')
             wavelength = conv(wavelength,
@@ -164,5 +164,5 @@
 
         # Store distance
-        if has_converter == True and detector.distance_unit != 'm':
+        if has_converter and detector.distance_unit != 'm':
             conv = Converter('m')
             distance = conv(distance, units=detector.distance_unit)
@@ -170,5 +170,5 @@
 
         # Store pixel size
-        if has_converter == True and detector.pixel_size_unit != 'mm':
+        if has_converter and detector.pixel_size_unit != 'mm':
             conv = Converter('mm')
             pixel = conv(pixel, units=detector.pixel_size_unit)
Index: src/sas/sascalc/file_converter/otoko_loader.py
===================================================================
--- src/sas/sascalc/file_converter/otoko_loader.py	(revision 0b1a677a6bec9b3b30979ce36e64645b3028908b)
+++ src/sas/sascalc/file_converter/otoko_loader.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -36,5 +36,5 @@
 
         Given the paths of two header files, this function will load each axis in
-        turn.  If loading is successfull then an instance of the OTOKOData class
+        turn.  If loading is successful then an instance of the OTOKOData class
         will be returned, else an exception will be raised.
 
Index: src/sas/sascalc/fit/AbstractFitEngine.py
===================================================================
--- src/sas/sascalc/fit/AbstractFitEngine.py	(revision 574adc767a9e86744546f8edd6a23dc4f81914ad)
+++ src/sas/sascalc/fit/AbstractFitEngine.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -78,7 +78,7 @@
     def get_params(self, fitparams):
         """
-        return a list of value of paramter to fit
-
-        :param fitparams: list of paramaters name to fit
+        return a list of value of parameter to fit
+
+        :param fitparams: list of parameters name to fit
 
         """
Index: src/sas/sascalc/fit/qsmearing.py
===================================================================
--- src/sas/sascalc/fit/qsmearing.py	(revision 50fcb09b3ee47cf23c26b90d9c291f41415c0aa5)
+++ src/sas/sascalc/fit/qsmearing.py	(revision 2469df7fc9ffa047115c5bffe589ed307b12c363)
@@ -90,5 +90,5 @@
             #print "data1D.dx[0]",data1D.dx[0],data1D.dxl[0]
     # If we found resolution smearing data, return a QSmearer
-    if _found_resolution == True:
+    if _found_resolution:
          return pinhole_smear(data, model)
 
@@ -113,5 +113,5 @@
                 break
     # If we found slit smearing data, return a slit smearer
-    if _found_slit == True:
+    if _found_slit:
         return slit_smear(data, model)
     return None
Index: src/sas/sascalc/pr/c_extensions/Cinvertor.c
===================================================================
--- src/sas/sascalc/pr/c_extensions/Cinvertor.c	(revision d04ac056c476a91de374975fdb618e1cf1d27ca1)
+++ src/sas/sascalc/pr/c_extensions/Cinvertor.c	(revision a52f32f0dbf9ba217a21de95ba57c8862a042cad)
@@ -735,5 +735,5 @@
 
 const char get_peaks_doc[] =
-	"Returns the number of peaks in the output P(r) distrubution\n"
+	"Returns the number of peaks in the output P(r) distribution\n"
 	"for the given set of coefficients.\n"
 	" @param args: c-parameters\n"
Index: src/sas/sascalc/pr/fit/AbstractFitEngine.py
===================================================================
--- src/sas/sascalc/pr/fit/AbstractFitEngine.py	(revision 574adc767a9e86744546f8edd6a23dc4f81914ad)
+++ src/sas/sascalc/pr/fit/AbstractFitEngine.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -78,7 +78,7 @@
     def get_params(self, fitparams):
         """
-        return a list of value of paramter to fit
-
-        :param fitparams: list of paramaters name to fit
+        return a list of value of parameter to fit
+
+        :param fitparams: list of parameters name to fit
 
         """
Index: src/sas/sascalc/pr/invertor.py
===================================================================
--- src/sas/sascalc/pr/invertor.py	(revision d04ac056c476a91de374975fdb618e1cf1d27ca1)
+++ src/sas/sascalc/pr/invertor.py	(revision 2469df7fc9ffa047115c5bffe589ed307b12c363)
@@ -222,8 +222,5 @@
         elif name == 'est_bck':
             value = self.get_est_bck()
-            if value == 1:
-                return True
-            else:
-                return False
+            return value == 1
         elif name in self.__dict__:
             return self.__dict__[name]
@@ -460,5 +457,5 @@
 
         # If we need to fit the background, add a term
-        if self.est_bck == True:
+        if self.est_bck:
             nfunc_0 = nfunc
             nfunc += 1
@@ -506,5 +503,5 @@
 
         # Keep a copy of the last output
-        if self.est_bck == False:
+        if not self.est_bck:
             self.out = c
             self.cov = err
@@ -658,5 +655,5 @@
         file.write("#slit_width=%g\n" % self.slit_width)
         file.write("#background=%g\n" % self.background)
-        if self.est_bck == True:
+        if self.est_bck:
             file.write("#has_bck=1\n")
         else:
@@ -738,8 +735,5 @@
                     elif line.startswith('#has_bck='):
                         toks = line.split('=')
-                        if int(toks[1]) == 1:
-                            self.est_bck = True
-                        else:
-                            self.est_bck = False
+                        self.est_bck = int(toks[1]) == 1
 
                     # Now read in the parameters
Index: src/sas/sascalc/pr/num_term.py
===================================================================
--- src/sas/sascalc/pr/num_term.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
+++ src/sas/sascalc/pr/num_term.py	(revision 2469df7fc9ffa047115c5bffe589ed307b12c363)
@@ -55,5 +55,5 @@
         medi = 0
         for i in range(dv):
-            if odd == True:
+            if odd:
                 medi = osc[int(med)]
             else:
@@ -98,7 +98,7 @@
                 new_osc3.append(self.osc_list[i])
 
-        if flag9 == True:
+        if flag9:
             self.dataset = new_osc1
-        elif flag8 == True:
+        elif flag8:
             self.dataset = new_osc2
         else:
@@ -141,6 +141,5 @@
             div = len(nts)
             tem = float(div) / 2.0
-            odd = self.is_odd(div)
-            if odd == True:
+            if self.is_odd(div):
                 nt = nts[int(tem)]
             else:
@@ -148,5 +147,5 @@
             return nt, self.alpha_list[nt - 10], self.mess_list[nt - 10]
         except:
-            #TODO: check the logic above and make sure it doesn't 
+            #TODO: check the logic above and make sure it doesn't
             # rely on the try-except.
             return self.nterm_min, self.invertor.alpha, ''
Index: src/sas/sasgui/guiframe/data_processor.py
===================================================================
--- src/sas/sasgui/guiframe/data_processor.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
+++ src/sas/sasgui/guiframe/data_processor.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -758,5 +758,5 @@
         cell pop up context by right clicking on a cell and gives the
         option to cut, paste, and clear. This will probably be removed in
-        future versions and is being superceded by more traditional cut and
+        future versions and is being superseded by more traditional cut and
         paste options.
         """
@@ -800,5 +800,5 @@
         THIS METHOD IS NOT CURRENTLY USED.  it is part of right click cell
         context menu which is being removed. This will probably be removed in
-        future versions and is being superceded by more traditional cut and
+        future versions and is being superseded by more traditional cut and
         paste options
         """
@@ -812,5 +812,5 @@
         THIS METHOD IS NOT CURRENTLY USED.  it is part of right click cell
         context menu which is being removed. This will probably be removed in
-        future versions and is being superceded by more traditional cut and
+        future versions and is being superseded by more traditional cut and
         paste options
         """
@@ -828,5 +828,5 @@
         THIS METHOD IS NOT CURRENTLY USED.  it is part of right click cell
         context menu which is being removed. This will probably be removed in
-        future versions and is being superceded by more traditional cut and
+        future versions and is being superseded by more traditional cut and
         paste options
         """
@@ -1233,5 +1233,5 @@
         """
         Get object represented by the given cells and plot them.  Basically
-        plot the colum in y vs the column in x.
+        plot the column in y vs the column in x.
         """
 
@@ -1961,5 +1961,5 @@
         selection_sizer.Add(self.save_to_file, (iy, ix),
                             (1, 1), wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
-        #contruction the sizer contaning button
+        #contruction the sizer containing button
         button_sizer.Add((20, 20), 1, wx.EXPAND | wx.ADJUST_MINSIZE, 0)
 
Index: src/sas/sasgui/guiframe/events.py
===================================================================
--- src/sas/sasgui/guiframe/events.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sasgui/guiframe/events.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -14,5 +14,5 @@
 #create a panel slicer
 (SlicerPanelEvent, EVT_SLICER_PANEL)   = wx.lib.newevent.NewEvent()
-#print update paramaters for panel slicer
+#print update parameers for panel slicer
 (SlicerParamUpdateEvent, EVT_SLICER_PARS_UPDATE)   = wx.lib.newevent.NewEvent()
 #update the slicer from the panel
Index: src/sas/sasgui/guiframe/local_perspectives/data_loader/data_loader.py
===================================================================
--- src/sas/sasgui/guiframe/local_perspectives/data_loader/data_loader.py	(revision b963b2066d6a76fe5073000c5a596a6fd0130ac4)
+++ src/sas/sasgui/guiframe/local_perspectives/data_loader/data_loader.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -90,5 +90,5 @@
     def can_load_data(self):
         """
-        if return True, then call handler to laod data
+        if return True, then call handler to load data
         """
         return True
Index: src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py
===================================================================
--- src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py	(revision 2469df7fc9ffa047115c5bffe589ed307b12c363)
@@ -827,5 +827,5 @@
         on_Modify Plot Property_close
         """
-        if self.appD.okay_clicked == True:
+        if self.appD.okay_clicked:
             info = self.appD.get_current_values()
             self.appearance_selected_plot.custom_color = \
Index: src/sas/sasgui/guiframe/local_perspectives/plotting/binder.py
===================================================================
--- src/sas/sasgui/guiframe/local_perspectives/plotting/binder.py	(revision 463e7ffce130ae386f93cd18b87a1120743e88b5)
+++ src/sas/sasgui/guiframe/local_perspectives/plotting/binder.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -359,5 +359,5 @@
         # TODO: Do we need an explicit focus command for keyboard?
         # TODO: Can we tab between items?
-        # TODO: How do unhandled events get propogated to axes, figure and
+        # TODO: How do unhandled events get propagated to axes, figure and
         # TODO: finally to application?  Do we need to implement a full tags
         # TODO: architecture a la Tk?
Index: src/sas/sasgui/guiframe/local_perspectives/plotting/boxSlicer.py
===================================================================
--- src/sas/sasgui/guiframe/local_perspectives/plotting/boxSlicer.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/guiframe/local_perspectives/plotting/boxSlicer.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -216,5 +216,5 @@
         """
         self.base.thaw_axes()
-        # Post paramters
+        # Post parameters
         event = SlicerParameterEvent()
         event.type = self.__class__.__name__
Index: src/sas/sasgui/guiframe/local_perspectives/plotting/masking.py
===================================================================
--- src/sas/sasgui/guiframe/local_perspectives/plotting/masking.py	(revision 45dffa69cb5935e2da7c77a2f040debb07ceb1c6)
+++ src/sas/sasgui/guiframe/local_perspectives/plotting/masking.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -77,5 +77,5 @@
     def compute(self):
         """
-        excuting computation
+        executing computation
         """
         elapsed = time.time() - self.starttime
Index: src/sas/sasgui/guiframe/plugin_base.py
===================================================================
--- src/sas/sasgui/guiframe/plugin_base.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/guiframe/plugin_base.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -82,5 +82,5 @@
     def can_load_data(self):
         """
-        if return True, then call handler to laod data
+        if return True, then call handler to load data
         """
         return False
Index: src/sas/sasgui/guiframe/proxy.py
===================================================================
--- src/sas/sasgui/guiframe/proxy.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
+++ src/sas/sasgui/guiframe/proxy.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -17,5 +17,5 @@
 connect() function:
     - auto detects proxy in windows, osx
-    - in ux systems, the http_proxy enviroment variable must be set
+    - in ux systems, the http_proxy environment variable must be set
     - if it fails, try to find the proxy.pac address.
       - parses the file, and looks up for all possible proxies
Index: src/sas/sasgui/perspectives/calculator/gen_scatter_panel.py
===================================================================
--- src/sas/sasgui/perspectives/calculator/gen_scatter_panel.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
+++ src/sas/sasgui/perspectives/calculator/gen_scatter_panel.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -113,5 +113,5 @@
     def compute(self):
         """
-        excuting computation
+        executing computation
         """
         #elapsed = time.time() - self.starttime
Index: src/sas/sasgui/perspectives/calculator/media/sas_calculator_help.rst
===================================================================
--- src/sas/sasgui/perspectives/calculator/media/sas_calculator_help.rst	(revision 5ed76f8390eac56ff5d3779fd9c454d0c8fe1dc0)
+++ src/sas/sasgui/perspectives/calculator/media/sas_calculator_help.rst	(revision 1b67f3e34016e1f2e1d667e4f207ab670abdd1d5)
@@ -26,5 +26,8 @@
 intensity from the particle is
 
-.. image:: gen_i.png
+.. math::
+
+    I(\vec Q) = \frac{1}{V}\left|
+        \sum_j^N v_j \beta_j \exp(i\vec Q \cdot \vec r_j)\right|^2
 
 Equation 1.
@@ -46,5 +49,5 @@
 atomic structure (such as taken from a PDB file) to get the right normalization.
 
-*NOTE! $\beta_j$ displayed in the GUI may be incorrect but this will not
+*NOTE!* $\beta_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.*
 
@@ -56,6 +59,6 @@
 ^^^^^^^^^^^^^^^^^^^
 
-For magnetic scattering, only the magnetization component, $M_\perp$,
-perpendicular to the scattering vector $Q$ contributes to the magnetic
+For magnetic scattering, only the magnetization component, $\mathbf{M}_\perp$,
+perpendicular to the scattering vector $\vec Q$ contributes to the magnetic
 scattering length.
 
@@ -64,5 +67,8 @@
 The magnetic scattering length density is then
 
-.. image:: dm_eq.png
+.. math::
+
+    \beta_M = \frac{\gamma r_0}{2 \mu_B}\sigma \cdot \mathbf{M}_\perp
+        = D_M\sigma \cdot \mathbf{M}_\perp
 
 where the gyromagnetic ratio is $\gamma = -1.913$, $\mu_B$ is the Bohr
@@ -81,6 +87,6 @@
 .. image:: gen_mag_pic.png
 
-Now let us assume that the angles of the *Q* vector and the spin-axis (x')
-to the x-axis are $\phi$ and $\theta_\text{up}$ respectively (see above). Then,
+Now let us assume that the angles of the $\vec Q$ vector and the spin-axis ($x'$)
+to the $x$-axis are $\phi$ and $\theta_\text{up}$ respectively (see above). Then,
 depending upon the polarization (spin) state of neutrons, the scattering
 length densities, including the nuclear scattering length density ($\beta_N$)
@@ -89,24 +95,25 @@
 *  for non-spin-flips
 
-   .. image:: sld1.png
+.. math::
+    \beta_{\pm\pm} = \beta_N \mp D_M M_{\perp x'}
 
 *  for spin-flips
 
-   .. image:: sld2.png
+.. math::
+    \beta_{\pm\mp} = - D_M(M_{\perp y'} \pm i M_{\perp z'})
 
 where
 
-.. image:: mxp.png
+.. math::
 
-.. image:: myp.png
+    M_{\perp x'} &= M_{0q_x}\cos\theta_\text{up} + M_{0q_y}\sin\theta_\text{up} \\
+    M_{\perp y'} &= M_{0q_y}\cos\theta_\text{up} - M_{0q_x}\sin\theta_\text{up} \\
+    M_{\perp z'} &= M_{0z} \\
+    M_{0q_x} &= (M_{0x}\cos\phi - M_{0y}\sin\phi)\cos\phi \\
+    M_{0q_y} &= (M_{0y}\sin\phi - M_{0y}\cos\phi)\sin\phi
 
-.. image:: mzp.png
-
-.. image:: mqx.png
-
-.. image:: mqy.png
-
-Here the $M0_x$, $M0_y$ and $M0_z$ are the $x$, $y$ and $z$
-components of the magnetisation vector in the laboratory $xyz$ frame.
+Here the $M_{0x}$, $M_{0y}$ and $M_{0z}$ are
+the $x$, $y$ and $z$ components of the magnetisation vector in the
+laboratory $x$-$y$-$z$ frame.
 
 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
@@ -148,5 +155,8 @@
 uses the Debye equation below providing a 1D output
 
-.. image:: gen_debye_eq.png
+.. math::
+
+    I(|\vec Q|) = \frac{1}{V}\sum_j^N v_j\beta_j \sum_k^N v_k \beta_k
+        \frac{\sin(|\vec Q||\vec r_j - \vec r_k|)}{|\vec Q||\vec r_j - \vec r_k|}
 
 where $v_j \beta_j \equiv b_j$ is the scattering
Index: src/sas/sasgui/perspectives/calculator/model_editor.py
===================================================================
--- src/sas/sasgui/perspectives/calculator/model_editor.py	(revision 23359ccb520c33d89444d0732d752a3bc0226916)
+++ src/sas/sasgui/perspectives/calculator/model_editor.py	(revision 2469df7fc9ffa047115c5bffe589ed307b12c363)
@@ -338,5 +338,5 @@
             list_fnames = os.listdir(self.plugin_dir)
             # fake existing regular model name list
-            m_list = [model.name + ".py" for model in self.model_list]
+            m_list = [model + ".py" for model in self.model_list]
             list_fnames.append(m_list)
             if t_fname in list_fnames and title != mname:
@@ -344,5 +344,5 @@
                 msg = "Name exists already."
 
-        if self.good_name == False:
+        if not self.good_name:
             self.name_tcl.SetBackgroundColour('pink')
             info = 'Error'
Index: src/sas/sasgui/perspectives/calculator/resolcal_thread.py
===================================================================
--- src/sas/sasgui/perspectives/calculator/resolcal_thread.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sasgui/perspectives/calculator/resolcal_thread.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -44,5 +44,5 @@
     def compute(self):
         """
-        excuting computation
+        executing computation
         """
         self.image = map(self.func, self.qx, self.qy,
Index: src/sas/sasgui/perspectives/fitting/fitpage.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/fitpage.py	(revision 0be6b6b28eb272db645718a0ed11a5975f0d85fc)
+++ src/sas/sasgui/perspectives/fitting/fitpage.py	(revision df4af9b201bb6e7ad7c295993873c92368617701)
@@ -1733,5 +1733,8 @@
         ind = 0
         while(ind < len(list)):
-            fun_box.Append(list[ind])        
+            for key, val in list.items():
+                if val == ind:
+                    fun_box.Append(key, val)
+                    break
             ind += 1
 
@@ -1762,5 +1765,5 @@
         value = fun_box.GetValue()
         if value in self.model.fun_list:
-            fun_val = fun_box.GetSelection()
+            fun_val = self.model.fun_list[value]
 
         self.model.setParam(name, fun_val)
Index: src/sas/sasgui/perspectives/fitting/fitproblem.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/fitproblem.py	(revision 251ef68424c8f373dfb82af3c159086491c5f975)
+++ src/sas/sasgui/perspectives/fitting/fitproblem.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -1,5 +1,5 @@
 """
 Inferface containing information to store data, model, range of data, etc...
-and retreive this information. This is an inferface
+and retrieve this information. This is an inferface
 for a fitProblem i.e relationship between data and model.
 """
@@ -56,5 +56,5 @@
         """
         :param flag: bool.When flag is 1 get the computer smear value. When
-            flag is 0 ingore smear value.
+            flag is 0 ignore smear value.
         """
         self.smearer_enable = flag
@@ -305,5 +305,5 @@
         """
         :param flag: bool.When flag is 1 get the computer smear value. When
-            flag is 0 ingore smear value.
+            flag is 0 ignore smear value.
         """
         self._smear_on = flag
Index: src/sas/sasgui/perspectives/fitting/fitting.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/fitting.py	(revision 9706d88b71e719f590147b9914149630bce2f1d2)
+++ src/sas/sasgui/perspectives/fitting/fitting.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -763,5 +763,5 @@
         the current page and set value.
         :param value: integer 0 or 1
-        :param uid: the id related to a page contaning fitting information
+        :param uid: the id related to a page containing fitting information
         """
         if uid in self.page_finder.keys():
@@ -778,8 +778,8 @@
         Used by simfitpage.py to reset a parameter given the string constrainst.
 
-        :param modelname: the name ot the model for with the parameter
+        :param modelname: the name of the model for with the parameter
                             has to reset
         :param value: can be a string in this case.
-        :param names: the paramter name
+        :param names: the parameter name
         """
         sim_page_id = self.sim_page.uid
@@ -797,5 +797,5 @@
         name into model name and parameter name example: ::
 
-            paramaterset (item) = M1.A
+            parameterset (item) = M1.A
             Will return model_name = M1 , parameter name = A
 
@@ -1117,5 +1117,5 @@
     def store_data(self, uid, data_list=None, caption=None):
         """
-        Recieve a list of data and store them ans well as a caption of
+        Receive a list of data and store them ans well as a caption of
         the fit page where they come from.
         :param uid: if related to a fit page
@@ -1196,5 +1196,5 @@
         for a given interactor.
 
-        :param event: contains type of slicer , paramaters for updating
+        :param event: contains type of slicer , parameters for updating
             the panel and panel_name to find the slicer 's panel concerned.
         """
Index: src/sas/sasgui/perspectives/fitting/fitting_widgets.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/fitting_widgets.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sasgui/perspectives/fitting/fitting_widgets.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -64,5 +64,5 @@
         selection_sizer.Add(self.data_2d_selected, (iy, ix),
                            (1, 1), wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
-        #contruction the sizer contaning button
+        #contruction the sizer containing button
         button_sizer.Add((20, 20), 1, wx.EXPAND | wx.ADJUST_MINSIZE, 0)
         button_sizer.Add(button_cancel, 0,
Index: src/sas/sasgui/perspectives/fitting/gpu_options.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/gpu_options.py	(revision 3bd677bda9477bbd07235d9fba448f09ae1b3932)
+++ src/sas/sasgui/perspectives/fitting/gpu_options.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -88,5 +88,5 @@
         self.option_button = {}
         self.buttons = []
-        #Check if SAS_OPENCL is already set as enviromental variable
+        #Check if SAS_OPENCL is already set as environment variable
         self.sas_opencl = os.environ.get("SAS_OPENCL", "")
 
Index: src/sas/sasgui/perspectives/fitting/media/fitting.rst
===================================================================
--- src/sas/sasgui/perspectives/fitting/media/fitting.rst	(revision 3bd677bda9477bbd07235d9fba448f09ae1b3932)
+++ src/sas/sasgui/perspectives/fitting/media/fitting.rst	(revision c926a9787e05478bd241a391873fc259e32825d6)
@@ -18,4 +18,6 @@
 
    Polarisation/Magnetic Scattering <magnetism/magnetism>
+   
+   Oriented Particles <orientation/orientation>
 
    Information on the SasView Optimisers <optimizer>
Index: src/sas/sasgui/perspectives/fitting/simfitpage.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/simfitpage.py	(revision 0a3c740de7a24dad98e912cdeee179e382e3839a)
+++ src/sas/sasgui/perspectives/fitting/simfitpage.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -976,5 +976,5 @@
         param_cbox = self.constraints_list[-1].param_cbox
         param_cbox.Clear()
-        # insert only fittable paramaters
+        # insert only fittable parameters
         for param in param_list:
             param_cbox.Append(str(param), model)
Index: src/sas/sasgui/perspectives/invariant/invariant_details.py
===================================================================
--- src/sas/sasgui/perspectives/invariant/invariant_details.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sasgui/perspectives/invariant/invariant_details.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -422,5 +422,5 @@
         except:
             scale = RECTANGLE_SCALE
-            self.warning_msg += "Recieve an invalid scale for %s\n"
+            self.warning_msg += "Receive an invalid scale for %s\n"
             self.warning_msg += "check this value : %s\n" % str(percentage)
         return  scale
Index: src/sas/sasgui/perspectives/invariant/invariant_panel.py
===================================================================
--- src/sas/sasgui/perspectives/invariant/invariant_panel.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/perspectives/invariant/invariant_panel.py	(revision 2469df7fc9ffa047115c5bffe589ed307b12c363)
@@ -707,5 +707,5 @@
 
         # reset power_out to default to get ready for another '_on_text'
-        if self.is_power_out == True:
+        if self.is_power_out:
             self.state.container = copy.deepcopy(self.inv_container)
             self.state.timestamp = self._get_time_stamp()
Index: src/sas/sasgui/perspectives/invariant/invariant_state.py
===================================================================
--- src/sas/sasgui/perspectives/invariant/invariant_state.py	(revision 1fa4f7368e26981352615cbfb337a581ed97031f)
+++ src/sas/sasgui/perspectives/invariant/invariant_state.py	(revision 2469df7fc9ffa047115c5bffe589ed307b12c363)
@@ -655,5 +655,5 @@
         : return: None
         """
-        if self.cansas == True:
+        if self.cansas:
             return self._read_cansas(path)
         else:
@@ -763,5 +763,5 @@
         """
         # Sanity check
-        if self.cansas == True:
+        if self.cansas:
             doc = self.write_toXML(datainfo, invstate)
             # Write the XML document
Index: src/sas/sasgui/perspectives/pr/explore_dialog.py
===================================================================
--- src/sas/sasgui/perspectives/pr/explore_dialog.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sasgui/perspectives/pr/explore_dialog.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -93,5 +93,5 @@
 
         :TODO: Would be nice to add printing and log/linear scales.
-            The current verison of plottools no longer plays well with
+            The current version of plottools no longer plays well with
             plots outside of guiframe. Guiframe team needs to fix this.
         """
Index: src/sas/sasgui/perspectives/pr/inversion_state.py
===================================================================
--- src/sas/sasgui/perspectives/pr/inversion_state.py	(revision 1fa4f7368e26981352615cbfb337a581ed97031f)
+++ src/sas/sasgui/perspectives/pr/inversion_state.py	(revision 2469df7fc9ffa047115c5bffe589ed307b12c363)
@@ -389,5 +389,5 @@
 
         """
-        if self.cansas == True:
+        if self.cansas:
             return self._read_cansas(path)
         else:
@@ -505,5 +505,5 @@
         """
         # Sanity check
-        if self.cansas == True:
+        if self.cansas:
             doc = self.write_toXML(datainfo, prstate)
             # Write the XML document
Index: src/sas/sasgui/perspectives/pr/pr.py
===================================================================
--- src/sas/sasgui/perspectives/pr/pr.py	(revision cb62bd55ae79395ac6e01d8b2077f4d496625c41)
+++ src/sas/sasgui/perspectives/pr/pr.py	(revision 2469df7fc9ffa047115c5bffe589ed307b12c363)
@@ -407,8 +407,8 @@
             y[i] = value
 
-        if self._normalize_output == True:
+        if self._normalize_output:
             y = y / total
             dy = dy / total
-        elif self._scale_output_unity == True:
+        elif self._scale_output_unity:
             y = y / pmax
             dy = dy / pmax
@@ -544,5 +544,5 @@
             lines = buff.split('\n')
             for line in lines:
-                if data_started == True:
+                if data_started:
                     try:
                         toks = line.split()
Index: src/sas/sasgui/plottools/PlotPanel.py
===================================================================
--- src/sas/sasgui/plottools/PlotPanel.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
+++ src/sas/sasgui/plottools/PlotPanel.py	(revision 2469df7fc9ffa047115c5bffe589ed307b12c363)
@@ -476,5 +476,5 @@
             return
         self.mousemotion = True
-        if self.leftdown == True and self.mousemotion == True:
+        if self.leftdown and self.mousemotion:
             ax = event.inaxes
             if ax is not None:  # the dragging is perform inside the figure
Index: src/sas/sasgui/plottools/binder.py
===================================================================
--- src/sas/sasgui/plottools/binder.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
+++ src/sas/sasgui/plottools/binder.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -366,5 +366,5 @@
         # TODO: Do we need an explicit focus command for keyboard?
         # TODO: Can we tab between items?
-        # TODO: How do unhandled events get propogated to axes, figure and
+        # TODO: How do unhandled events get propagated to axes, figure and
         # TODO: finally to application?  Do we need to implement a full tags
         # TODO: architecture a la Tk?
Index: src/sas/sasgui/plottools/fitDialog.py
===================================================================
--- src/sas/sasgui/plottools/fitDialog.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/plottools/fitDialog.py	(revision 2469df7fc9ffa047115c5bffe589ed307b12c363)
@@ -44,5 +44,5 @@
         fitting and derives and displays specialized output parameters based
         on the scale choice of the plot calling it.
-        
+
         :note1: The fitting is currently a bit convoluted as besides using
         plottools.transform.py to handle all the conversions, it uses
@@ -55,5 +55,5 @@
         This would considerably simplify the code and remove the need I think
         for LineModel.py and possibly fittins.py altogether.   -PDB 7/10/16
-        
+
         :note2: The linearized fits do not take resolution into account. This
         means that for poor resolution such as slit smearing the answers will
@@ -142,5 +142,5 @@
         """
 
-        # set up sizers first. 
+        # set up sizers first.
         # vbox is the panel sizer and is a vertical sizer
         # The first element of the panel is sizer which is a gridbagsizer
@@ -151,5 +151,5 @@
         sizer = wx.GridBagSizer(5, 5)
         sizer_button = wx.BoxSizer(wx.HORIZONTAL)
-        
+
         #size of string boxes in pixels
         _BOX_WIDTH = 100
@@ -395,7 +395,7 @@
         sizer_button.Add(self.btClose, 0,
                          wx.LEFT | wx.RIGHT | wx.ADJUST_MINSIZE, 10)
-        
+
         vbox.Add(sizer)
-        self.static_line_1 = wx.StaticLine(self, -1)        
+        self.static_line_1 = wx.StaticLine(self, -1)
         vbox.Add(self.static_line_1, 0, wx.EXPAND, 0)
         vbox.Add(sizer_button, 0, wx.EXPAND | wx.BOTTOM | wx.TOP, 10)
@@ -439,5 +439,5 @@
         # makes transformation for y as a line to fit
         if self.x != []:
-            if self.checkFitValues(self.xminFit) == True:
+            if self.checkFitValues(self.xminFit):
                 # Check if the field of Fit Dialog contain values
                 # and use the x max and min of the user
Index: src/sas/sasgui/plottools/plottable_interactor.py
===================================================================
--- src/sas/sasgui/plottools/plottable_interactor.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
+++ src/sas/sasgui/plottools/plottable_interactor.py	(revision 2469df7fc9ffa047115c5bffe589ed307b12c363)
@@ -166,5 +166,5 @@
         from within the boundaries of an artist.
         """
-        if self._context_menu == True:
+        if self._context_menu:
             self._context_menu = False
             evt.artist = self.marker
@@ -216,5 +216,5 @@
         """
         if not evt.artist.__class__.__name__ == "AxesSubplot":
-            if self._context_menu == False:
+            if not self._context_menu:
                 self.base.plottable_selected(None)
                 try:
Index: src/sas/sasgui/plottools/plottables.py
===================================================================
--- src/sas/sasgui/plottools/plottables.py	(revision 2d9526dfda3bdfe3c9159ab7d9db8399b4a00848)
+++ src/sas/sasgui/plottools/plottables.py	(revision 2469df7fc9ffa047115c5bffe589ed307b12c363)
@@ -227,5 +227,5 @@
         max_value = None
         for p in self.plottables:
-            if p.hidden == True:
+            if p.hidden:
                 continue
             if p.x is not None:
@@ -1062,5 +1062,5 @@
         Renders the plottable on the graph
         """
-        if self.interactive == True:
+        if self.interactive:
             kw['symbol'] = self.symbol
             kw['id'] = self.id
Index: src/sas/sasgui/plottools/toolbar.py
===================================================================
--- src/sas/sasgui/plottools/toolbar.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sasgui/plottools/toolbar.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -145,5 +145,5 @@
     def OnPrintPage(self, page):
         """
-        Most rudimentry OnPrintPage overide.  instatiates a dc object, gets
+        Most rudimentry OnPrintPage override.  instatiates a dc object, gets
         its size, gets the size of the figure object, scales it to the dc
         canvas size keeping the aspect ratio intact, then prints as bitmap
Index: src/sas/sasview/sasview.py
===================================================================
--- src/sas/sasview/sasview.py	(revision 0225a3fcdeccce342b5c26576640d8cdc6dd3ebd)
+++ src/sas/sasview/sasview.py	(revision 20fa5fe0c3e314a850432d5e463d03ceed3e453a)
@@ -203,5 +203,5 @@
     plugin_dir = os.path.join(sas.get_user_dir(), PLUGIN_MODEL_DIR)
     os.environ['SAS_MODELPATH'] = plugin_dir
-    #Initiliaze enviromental variable with custom setting but only if variable not set
+    #Initialize environment variable with custom setting but only if variable not set
     SAS_OPENCL = sas.get_custom_config().SAS_OPENCL
     if SAS_OPENCL and "SAS_OPENCL" not in os.environ:
Index: test/fileconverter/test/utest_nxcansas_writer.py
===================================================================
--- test/fileconverter/test/utest_nxcansas_writer.py	(revision 248ff7332a99edb391f42db2a242a497473df452)
+++ test/fileconverter/test/utest_nxcansas_writer.py	(revision c16ffe793868818e1b09471359df4663e364c0a0)
@@ -3,5 +3,4 @@
 
 import os
-import pylint
 import unittest
 import warnings
