Changes in / [a4a1ac9:44e8f48] in sasview


Ignore:
Files:
3 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • .gitignore

    r153b75a r1b605fb  
    3434/docs/sphinx-docs/build 
    3535/docs/sphinx-docs/source-temp 
     36/docs/sphinx-docs/source/dev/api 
     37/docs/sphinx-docs/source/user/guiframe 
     38/docs/sphinx-docs/source/user/models 
     39/docs/sphinx-docs/source/user/sasview 
     40/docs/sphinx-docs/source/user/perspectives 
    3641/docs/sphinx-docs/katex*.zip 
    3742/docs/sphinx-docs/node_modules 
  • docs/sphinx-docs/build_sphinx.py

    r153b75a rdf72475  
    88from __future__ import print_function 
    99 
    10 import sys 
     10import subprocess 
    1111import os 
    1212from os.path import join as joinpath, abspath, dirname, isdir, exists, relpath 
     13import sys 
     14import fnmatch 
    1315import shutil 
    14 import subprocess 
    1516import imp 
     17 
    1618from glob import glob 
    1719from distutils.dir_util import copy_tree 
     
    1921from distutils.spawn import find_executable 
    2022 
    21 PLATFORM = '.%s-%s'%(get_platform(), sys.version[:3]) 
     23from shutil import copy 
     24from os import listdir 
     25 
     26platform = '.%s-%s'%(get_platform(),sys.version[:3]) 
    2227 
    2328# sphinx paths 
     
    3035SASVIEW_ROOT = joinpath(SPHINX_ROOT, '..', '..') 
    3136SASVIEW_DOCS = joinpath(SPHINX_ROOT, "source") 
    32 SASVIEW_BUILD = abspath(joinpath(SASVIEW_ROOT, "build", "lib"+PLATFORM)) 
     37SASVIEW_BUILD = abspath(joinpath(SASVIEW_ROOT, "build", "lib"+platform)) 
    3338SASVIEW_MEDIA_SOURCE = joinpath(SASVIEW_ROOT, "src", "sas") 
    3439SASVIEW_DOC_TARGET = joinpath(SASVIEW_BUILD, "doc") 
     
    6065 
    6166def inplace_change(filename, old_string, new_string): 
    62     # Thanks to http://stackoverflow.com/questions/4128144/replace-string-within-file-contents 
    63     s = open(filename).read() 
    64     if old_string in s: 
    65         print('Changing "{old_string}" to "{new_string}"'.format(**locals())) 
    66         s = s.replace(old_string, new_string) 
    67         with open(filename, 'w') as f: 
    68             f.write(s) 
    69     else: 
    70         print('No occurences of "{old_string}" found.'.format(**locals())) 
     67# Thanks to http://stackoverflow.com/questions/4128144/replace-string-within-file-contents 
     68        s=open(filename).read() 
     69        if old_string in s: 
     70                print('Changing "{old_string}" to "{new_string}"'.format(**locals())) 
     71                s=s.replace(old_string, new_string) 
     72                f=open(filename, 'w') 
     73                f.write(s) 
     74                f.flush() 
     75                f.close() 
     76        else: 
     77                print('No occurences of "{old_string}" found.'.format(**locals())) 
    7178 
    7279def _remove_dir(dir_path): 
     
    234241        finally: 
    235242            fd_in.close() 
    236     with ZipFile(cache_path) as archive: 
    237         archive.extractall(destination) 
     243    with ZipFile(cache_path) as zip: 
     244        zip.extractall(destination) 
    238245 
    239246def convert_katex(): 
  • docs/sphinx-docs/source/conf.py

    rb229a3b ra8bbba2  
    1111# All configuration values have a default; values that are commented out 
    1212# serve to show the default. 
    13 from __future__ import print_function 
    1413 
    1514import sys, os, collections 
     
    2322sys.path.insert(0, build_lib) 
    2423sys.path.insert(0, os.path.abspath('_extensions')) # for sphinx extensions 
    25 print("-- path --") 
    26 print("\n".join(sys.path)) 
     24print "-- path --" 
     25print "\n".join(sys.path) 
    2726 
    2827# -- General configuration ----------------------------------------------------- 
     
    8180version = '4.2' 
    8281# The full version, including alpha/beta/rc tags. 
    83 release = '4.2.0' 
     82release = '4.2.0-beta' 
    8483 
    8584# The language for content autogenerated by Sphinx. Refer to documentation 
  • docs/sphinx-docs/source/rst_prolog

    r153b75a r1659f54  
    1 .. TODO: This file is ignored!  Prolog comes from sasmodels/doc/rst_prolog. 
    2  
    31.. Set up some substitutions to make life easier... 
    42 
  • docs/sphinx-docs/source/user/tutorial.rst

    re873408 r3bd677b  
    1010:download:`Getting Started with Sasview <sasview/getting_started_with_sasview.pdf>` 
    1111 
    12 :download:`Basic 1D Fitting in Sasview <sasview/basic_1d_fitting_in_sasview_v3x_4x.pdf>` 
    13  
    14 :download:`Simultaneous 1D Fitting in Sasview <sasview/simultaneous_1d_fitting_in_sasview_v3x_4x.pdf>` 
    15  
    1612:download:`Old Tutorial <sasview/Tutorial.pdf>` 
  • src/sas/sasgui/perspectives/calculator/media/slit_calculator_help.rst

    r346745a r643efb5  
    1111----------- 
    1212 
    13 This tool enables X-ray users to calculate the slit size (FWHM/2) for resolution  
    14 smearing purposes based on their half beam profile data (as Q vs Intensity; any  
    15 other data fields are ignored). 
     13This tool enables X-ray users to calculate the slit size (FWHM/2) for smearing 
     14based on their half beam profile data. 
    1615 
    17 Method 
    18 ------ 
    19  
    20 The tool works by sequentially summing 10 or more intensity values until a  
    21 maximum value is attained. It then locates the Q values for the points just before,  
    22 and just after, **half** of this maximum value and interpolates between them to get  
    23 an accurate value for the Q value for the half maximum. 
    24  
    25 NOTE! Whilst it may have some more generic applicability, the calculator has 
    26 only been tested with beam profile data from Anton-Paar SAXSess\ :sup:`TM`\  software. 
    27 The beam profile file does not carry any information about the units of the  
    28 Q data. It is probably |nm^-1| but the resolution calculations assume the slit  
    29 height/width has units of |Ang^-1|. If the beam profile data is not in these  
    30 units then it, or the result, must be manually converted. 
     16*NOTE! Whilst it may have some more generic applicability, the calculator has 
     17only been tested with beam profile data from Anton-Paar SAXSess\ :sup:`TM` software.* 
    3118 
    3219.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     
    4027 
    4128   *NOTE! To see an example of the beam profile file format, visit the file 
    42    beam profile.DAT in your {installation_directory}/SasView/test_1d folder.* 
     29   beam profile.DAT in your {installation_directory}/SasView/test folder.* 
    4330 
    44313) Once a data is loaded, the slit size is automatically computed and displayed 
    4532   in the tool window. 
    4633 
     34*NOTE! The beam profile file does not carry any information about the units of 
     35the Q data. This calculator assumes the data has units of 1/\ |Ang|\ . If the 
     36data is not in these units it must be manually converted beforehand.* 
     37 
    4738.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    4839 
    49 .. note::  This help document was last changed by Steve King, 09Sep2018 
     40.. note::  This help document was last changed by Steve King, 01May2015 
  • src/sas/sasgui/perspectives/fitting/basepage.py

    rb4398819 rfa412df  
    27782778        Function called when 'Help' button is pressed next to model 
    27792779        of interest.  This calls DocumentationWindow from 
    2780         documentation_window.py. It will load the top level of the html model 
    2781         help documenation sphinx generated if either a plugin model (which 
    2782         normally does not have an html help help file) is selected or if no 
    2783         model is selected. Otherwise, if a regula model is selected, the 
    2784         documention for that model will be sent to a browser window. 
    2785  
    2786         :todo the quick fix for no documentation in plugins is the if statment. 
    2787         However, the right way to do this would be to check whether the hmtl 
    2788         file exists and load the model docs if it does and the general docs if 
    2789         it doesn't - this will become important if we ever figure out how to 
    2790         build docs for plugins on the fly.  Sep 9, 2018 -PDB 
     2780        documentation_window.py. It will load the top level of the model 
     2781        help documenation sphinx generated html if no model is presented. 
     2782        If a model IS present then if documention for that model exists 
     2783        it will load to that  point otherwise again it will go to the top. 
     2784        For Wx2.8 and below is used (i.e. non-released through installer) 
     2785        a browser is loaded and the top of the model documentation only is 
     2786        accessible because webbrowser module does not pass anything after 
     2787        the # to the browser. 
    27912788 
    27922789        :param event: on Help Button pressed event 
    27932790        """ 
    27942791 
    2795         if (self.model is not None) and (self.categorybox.GetValue() 
    2796                                          != "Plugin Models"): 
     2792        if self.model is not None: 
    27972793            name = self.formfactorbox.GetValue() 
    27982794            _TreeLocation = 'user/models/%s.html' % name 
  • src/sas/sasview/__init__.py

    rb229a3b ra8bbba2  
    1 __version__ = "4.2.0" 
     1__version__ = "4.2.0-beta" 
    22__build__ = "GIT_COMMIT" 
  • src/sas/sasview/local_config.py

    rb229a3b rb963b20  
    4848'''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.''' 
    4949_acknowledgement_citation = \ 
    50 '''M. Doucet et al. SasView Version 4.2, Zenodo, 10.5281/zenodo.1412041''' 
     50'''M. Doucet et al. SasView Version 4.1.2, Zenodo, 10.5281/zenodo.825675''' 
    5151 
    5252_acknowledgement =  \ 
Note: See TracChangeset for help on using the changeset viewer.