Changeset 6a6d687 in sasview


Ignore:
Timestamp:
Jun 22, 2015 11:23:56 AM (9 years ago)
Author:
krzywon
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
4cf8db9
Parents:
0c17d96 (diff), 038ccfe6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of https://github.com/SasView/sasview.git

Files:
12 edited

Legend:

Unmodified
Added
Removed
  • docs/sphinx-docs/build_sphinx.py

    • Property mode changed from 100644 to 100755
    rc2ee2b1 r9bf64f6  
     1#!/usr/bin/env python 
    12""" 
    23Functions for building sphinx docs. 
     
    148149 
    149150if __name__ == "__main__": 
    150     main() 
     151    rebuild() 
  • sasmodels/setup.py

    r3a39c2e r038ccfe6  
    111111    version = VERSION, 
    112112    description = "Python module for SAS scattering models", 
    113     author = "SAS/DANSE", 
    114     author_email = "sansdanse@gmail.gov", 
    115     url = "http://sansviewproject.svn.sourceforge.net", 
     113    author = "SasView Team", 
     114    author_email = "developers@sasview.org", 
     115    url = "https://github.com/SasView/sasview.git", 
    116116     
    117117    # Place this module under the sas package 
  • sasview/README.txt

    r79492222 r74d5dbf  
    22============= 
    33 
    4 SasView 3.0.0 
    5  
    6     - The GUI look and feel has been refactored to be more familiar for Windows 
    7       users by using MDI frames. Graph windows are also now free-floating 
    8     - Five new models have been added: PringlesModel, CoreShellEllipsoidXTModel, 
    9       RectangularPrismModel, RectangularHollowPrismModel and  
    10       RectangularHollowPrismInfThinWallsModel 
    11     - The data loader now supports ILL DAT data files and reads the full meta  
    12       information from canSAS file formats 
    13     - Redefined convention for specifying angular parameters for anisotropic models 
    14     - A number of minor features have been added such as permitting a log  
    15       distribution of points when using a model to simulate data, and the  
    16       addition of a Kratky plot option to the linear plots 
    17     - A number of bugs have also been fixed 
    18     - Save Project and Save Analysis now work more reliably 
    19     - BETA: Magnetic contrast supporting full polarization analysis has been  
    20             implemented for some spherical and cylindrical models 
    21     - BETA: Two new tools have been added: 
     4SasView 3.1.0 
     5    -The documentation/help has had a complete overhaul including 
     6      - A completely new interface. 
     7      - The text has had a clean-up and been brought up to date with the latest 
     8        features. 
     9      - A Help (or sometimes ?) button has been added to every panel, and some 
     10        sub panels if appropriate, linking to the appropriate section in the 
     11        documentation. 
     12      - The model help has been split so that the details button now brings up 
     13        a very short pop-up giving the equation being used while HELP goes to  
     14        the section in the full documentation describing the model. 
     15      - Extensive help has also been added for the new optimizer engine (see  
     16        below) including rules of thumb on how and when to choose a given 
     17        optimizer and what the parameter do. 
     18    - The optimizer package has been completely replaced.  The new optimizer 
     19      still defaults to the standard Levenberg-Marquardt algorithm.  However 4 
     20      other optimizers are now available. Each starts with a set of default 
     21      parameters which can be tuned.  The DREAM optimizer takes the longest but 
     22      is the most powerful and yields rich information including full parameter 
     23      correlation and uncertainty plots.  A results panel has been added to 
     24      accommodate this.  The five optimizers are: 
     25      - A Levenberg-Marquardt optimizer 
     26      - A Quasi-Newton BFGS optimizer 
     27      - A Nelder-Mead Simplex optimizer 
     28      - A Differential Evolution optimizer 
     29      - A Monte Carlo optimizer DREAM optimizer  
     30    - Several new models added (what are they) 
     31    - Infrastructure to allow SESANS data to bit fit with models in a future 
     32      release was added and can currently be used from command line with some 
     33      caveats. 
     34    - A number of bugs were fixed including a thread crashing issue and a 
     35      incorrect resolution slit smearing. 
     36    - Implemented much more robust error logging to better enable much easier 
     37      debugging in general and particularly debugging an issue reported by 
     38      SasView user. 
     39    - A number of infrastructure tasks under the hood to enhance maintainability 
     40      - Upgrade from Wx 2.9 to 3.0.2 which allows several new features but 
     41        required significant other rework as well. 
     42      - Fully implemented Sphinx to the build process to produce both better 
     43        user documentation and developer documentation. 
     44      - Restructuring of code base to more unified nomenclature and structure 
     45        so that source installation tree more closely matches the installer 
     46        version tree. 
     47      - Code cleanup (an ongoing task)  
     48      - Migration of repository to github simplifying contributions from 
     49        non-project personnel through pull requests 
     50 
     51 
     52    - New in Version 3.0.0 
     53      - The GUI look and feel has been refactored to be more familiar for 
     54        Windows users by using MDI frames. Graph windows are also now free- 
     55        floating. 
     56      - Five new models have been added: PringlesModel, CoreShellEllipsoidXTModel, 
     57        RectangularPrismModel, RectangularHollowPrismModel and  
     58        RectangularHollowPrismInfThinWallsModel. 
     59      - The data loader now supports ILL DAT data files and reads the full meta  
     60        information from canSAS file formats. 
     61      - Redefined convention for specifying angular parameters for anisotropic 
     62        models. 
     63      - A number of minor features have been added such as permitting a log  
     64        distribution of points when using a model to simulate data, and the  
     65        addition of a Kratky plot option to the linear plots. 
     66      - A number of bugs have also been fixed. 
     67      - Save Project and Save Analysis now work more reliably. 
     68      - BETA: Magnetic contrast supporting full polarization analysis has been  
     69            implemented for some spherical and cylindrical models. 
     70      - BETA: Two new tools have been added: 
    2271            * A generic scattering calculator which takes an atomic, magnetic or  
    2372              SLD distribution in space and generates the appropriate 2D  
     
    2877            * An image viewer/converter for data in image format; this reads in  
    2978              an image file and will attempt to convert the image pixels to  
    30               data. Supported formats include: TIFF, TIF, PNG, BMP, JPG 
     79              data. Supported formats include: TIFF, TIF, PNG, BMP, JPG. 
    3180 
    3281    - New in Version 2.2.1 
     
    180229    2.1- System Requirements: 
    181230        - Python version >= 2.5 and < 3.0 should be running on the system 
    182         - We currently use Python 2.6 
     231        - We currently use Python 2.7 
    183232 
    184233    2.2- Installing from source: 
    185         - Get the code from sourceforge at https://svn.code.sf.net/p/sasview/code/ 
    186           for trunk end with code/trunk for a this release version end in  
    187           code/releases/sasview-3.0.0 
     234        - Get the code from sourceforge at https://github.com/SasView/sasview.git 
     235          for this release version use: https://github.com/SasView/sasview/releases 
    188236            - run 'python setup.py install' under the 'sasview-x.x.x' folder 
    189237            - run 'python sasview.py' under the 'sasview' folder. 
    190         - The following modules are required (version numbers are what are used in the release build): 
    191             - wxPython 2.8.12.1 (NOTE: do NOT use version 2.9) 
    192             - matplotlib 1.1.0 
    193             - SciPy 0.10.1 (NOTE: Mac build uses 0.10.0) 
    194             - pisa 3.0.27 (DO NOT USE ver 3.0.33 on windows: it will not work!) 
    195             - setuptools 0.6c11 
    196  
    197             (The following three are easily installed using easy_install) 
    198             - lxml 2.3.0.0 (NOTE: Mac build uses 3.1.0.0) 
    199             - numpy 1.6.1 (NOTE: Mac build uses version 1.6.2) 
    200             - periodictable 1.3.0 
     238        - The following modules are required (version numbers are what are used 
     239          in the windows release build): 
     240        - Common Packages 
     241          - reportlab 3.1.44 
     242          - lxml 3.4.4.0 (MAC 3.4.2.0) 
     243          - PIL 1.1.7 
     244          - xhtml2pdf 3.0.33 (MAC = not installed on build server) 
     245          - unittest-xml-reporting 1.12.0 (MAC 1.10.0) 
     246          - matplotlib Version Installed: 1.4.3 (MAC 1.1.1) 
     247          - bumps Version Installed: 0.7.5.6 
     248          - scipy Version Installed: 0.16.0b2 (MAC 0.11.0) 
     249          - periodictable Version Installed: 1.4.1 
     250          - setuptools Version Installed: 7.0 (MAC 12.0.5) 
     251          - sphinx Version Installed: 1.3.1 (MAC 1.3b2) 
     252          - pyparsing Version Installed: 2.0.3 
     253          - numpy Version Installed: 1.9.2 (MAC 1.6.2) 
     254          - html5lib Version Installed: 0.99999 
     255          - wx Version Installed: 3.0.2.0 
     256           
     257 
     258        - Windows Specific Packages: 
     259          - pywin 219 
     260          - py2exe 0.6.9 
     261          - comtypes 1.1.1 
     262          - MinGW w/ gcc version 4.6.1 (WIN) 
     263          - vcredist_x86.exe (version 9.0.21022.8  -microsoft visual C 2008  
     264              re-distributable) 
     265          - Innosetup (WIN - isetup 5.4.2-unicode) - used to create distributalbe 
    201266             
    202             (The following are additional dependencies for Mac) 
    203             - py2app 0.7.1 
    204              
    205             (The following are additional dependencies for Windows) 
    206             - comtypes 0.6.2 (for PDF support on windows systems) 
    207             - pywin32 build 217 (to read ms office) 
    208             - html5lib 0.95-dev 
    209             - reportlab 2.5 (NOTE: Mab build uses 2.6 though should not be needed) 
    210             - pyparsing 1.5.5 (required for periodictable and bundling 
    211               NOTE: is ALSO present on Mac Build) 
    212             - PIL 1.1.7 (Python Image Library - NOTE: is also present on Mac build) 
    213             - py2exe 0.6.9 (WIN) 
    214             - vcredist_x86.exe (version 9.0.21022.8  -microsoft visual C 2008  
    215               re-distributable) 
    216             - subversion -1.6.0 (<1.6.1) 
    217             - MinGW w/ gcc version 4.6.1 (WIN) 
    218             - Innosetup (WIN - isetup 5.4.2-unicode). 
    219              
    220             (On Windows, the following site has all the dependencies nicely packaged) 
    221             http://www.lfd.uci.edu/~gohlke/pythonlibs/ 
     267        - MAC Specifci Packages: 
     268          - py2app 0.7.1 
     269        - Windows build dependencies can be set up using anaconda. Instructions 
     270          can be found at http://trac.sasview.org/wiki/AnacondaSetup 
    222271 
    223272 
     
    225274 
    226275    3.1- All systems: 
    227         - very old computers may not be able to run 
    228         - polydispersity on multiple parameters included in a simultaneous/ 
     276        - Tutorial has not yet been updated and is somewhat out of date 
     277        - Very old computers may not be able to run 
     278        - Polydispersity on multiple parameters included in a simultaneous/ 
    229279          constrained fit will likely not be correct 
     280        - Constrained/simultaneous fit page does not have a stop button 
     281        - Constrained/simultaneous fit do not accept min/max limits 
    230282        - Save project does not store the state of all the windows 
    231283        - Loading projects can be very slow 
    232284        - Save Project only works once a data set has been associated with 
    233285          a model.  Error is reported on status bar. 
     286        - There is a numerical precision problem with the multishell model when 
     287          the iner radius gets large enough (ticket #288) 
     288        - The angular distribution angles are not clearly defined and may in 
     289          some cases lead to incorrect calculations(ticket #332) 
     290           
    234291 
    235292    3.2- Windows: 
     
    244301                 
    245302    3.4- Linux: 
    246         - None 
     303        - Not well tested 
    247304 
    2483054- SasView website 
  • sasview/local_config.py

    r0ea31ca rc8d22ec  
    1212__version__ = sas.sasview.__version__ 
    1313__build__ = sas.sasview.__build__ 
    14 __download_page__ = 'http://sourceforge.net/projects/sasview/files/' 
    15 __update_URL__ = ['svn.code.sf.net',  
    16                   '/p/sasview/code/trunk/sasview.latestversion'] 
     14__download_page__ = 'https://github.com/SasView/sasview/releases' 
     15__update_URL__ = ['https://github.com/SasView/sasview.git'] 
    1716 
    1817 
     
    2423 
    2524# Debug message should be written to a file? 
    26 __EVT_DEBUG_2_FILE__   = False 
     25__EVT_DEBUG_2_FILE__ = False 
    2726__EVT_DEBUG_FILENAME__ = "debug.log" 
    2827 
     
    3938'''Reference the following website: http://www.sasview.org''' 
    4039_acknowledgement_preamble_bullet3 =\ 
    41 '''Send us your reference for our records: sansdanse@gmail.com''' 
     40'''Reference the model you used if appropriate (see documentation for refs)''' 
     41_acknowledgement_preamble_bullet4 =\ 
     42'''Send us your reference for our records: developers@sasview.org''' 
    4243_acknowledgement_publications = \ 
    43 '''This work benefited from the use of the SasView application, originally  
     44'''This work benefited from the use of the SasView application, originally 
    4445developed under NSF award DMR-0520547. 
    4546''' 
    4647_acknowledgement =  \ 
    4748'''This work originally developed as part of the DANSE project funded by the NSF 
    48 under grant DMR-0520547, and currently maintained by NIST, UMD, ORNL, ISIS, ESS  
     49under grant DMR-0520547, and currently maintained by NIST, UMD, ORNL, ISIS, ESS 
    4950and ILL. 
    5051 
     
    6061logging.info("icon path: %s" % icon_path) 
    6162media_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "media")) 
    62 test_path =  os.path.abspath(os.path.join(os.path.dirname(__file__), "test")) 
     63test_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "test")) 
    6364 
    6465_nist_logo = os.path.join(icon_path, "nist_logo.png") 
     
    9293PLUGIN_STATE_EXTENSIONS = ['.fitv', '.inv', '.prv'] 
    9394PLUGINS_WLIST = ['Fitting files (*.fitv)|*.fitv', 
    94                   'Invariant files (*.inv)|*.inv', 
    95                   'P(r) files (*.prv)|*.prv'] 
     95                 'Invariant files (*.inv)|*.inv', 
     96                 'P(r) files (*.prv)|*.prv'] 
    9697PLOPANEL_WIDTH = 415 
    9798PLOPANEL_HEIGTH = 370 
    9899DATAPANEL_WIDTH = 235 
    99100DATAPANEL_HEIGHT = 700 
    100 SPLASH_SCREEN_PATH = os.path.join(icon_path,"SVwelcome_mini.png") 
    101 TUTORIAL_PATH = os.path.join(media_path,"Tutorial.pdf") 
     101SPLASH_SCREEN_PATH = os.path.join(icon_path, "SVwelcome_mini.png") 
     102TUTORIAL_PATH = os.path.join(media_path, "Tutorial.pdf") 
    102103DEFAULT_STYLE = GUIFRAME.MULTIPLE_APPLICATIONS|GUIFRAME.MANAGER_ON\ 
    103104                    |GUIFRAME.CALCULATOR_ON|GUIFRAME.TOOLBAR_ON 
     
    105106SPLASH_SCREEN_HEIGHT = 366 
    106107SS_MAX_DISPLAY_TIME = 2000 
    107 WELCOME_PANEL_ON  = True 
     108WELCOME_PANEL_ON = True 
    108109WELCOME_PANEL_SHOW = False 
    109110CLEANUP_PLOT = False 
     
    131132def printEVT(message): 
    132133    if __EVT_DEBUG__: 
     134        """ 
     135        :TODO - Need method doc string 
     136        """ 
    133137        print "%g:  %s" % (time.clock(), message) 
    134          
     138 
    135139        if __EVT_DEBUG_2_FILE__: 
    136140            out = open(__EVT_DEBUG_FILENAME__, 'a') 
    137141            out.write("%10g:  %s\n" % (time.clock(), message)) 
    138142            out.close() 
    139              
  • setup.py

    rc2ee2b1 r038ccfe6  
    375375    version = VERSION, 
    376376    description = "SasView application", 
    377     author = "University of Tennessee", 
    378     author_email = "sansdanse@gmail.com", 
     377    author = "SasView Team", 
     378    author_email = "developers@sasview.org", 
    379379    url = "http://sasview.org", 
    380380    license = "PSF", 
    381381    keywords = "small-angle x-ray and neutron scattering analysis", 
    382     download_url = "https://sourceforge.net/projects/sansviewproject/files/", 
     382    download_url = "https://github.com/SasView/sasview.git", 
    383383    package_dir = package_dir, 
    384384    packages = packages, 
  • src/sas/guiframe/acknowledgebox.py

    r0ea31ca rc8d22ec  
    2121      (os.path.isfile("%s/%s.pyc" % (path, 'local_config'))): 
    2222        fObj, path, descr = imp.find_module('local_config', [path]) 
    23         config = imp.load_module('local_config', fObj, path, descr)   
     23        config = imp.load_module('local_config', fObj, path, descr) 
    2424    else: 
    2525        # Try simply importing local_config 
    2626        import local_config as config 
    2727except: 
    28     # Didn't find local config, load the default  
     28    # Didn't find local config, load the default 
    2929    import config 
    30      
     30 
    3131 
    3232class DialogAcknowledge(wx.Dialog): 
    3333    """ 
    3434    "Acknowledgement" Dialog Box 
    35      
     35 
    3636    Shows the current method for acknowledging SasView in 
    3737    scholarly publications. 
    38      
     38 
    3939    """ 
    40      
     40 
    4141    def __init__(self, *args, **kwds): 
    42          
     42 
    4343        kwds["style"] = wx.DEFAULT_DIALOG_STYLE 
    4444        wx.Dialog.__init__(self, *args, **kwds) 
    45          
     45 
    4646        self.ack = wx.TextCtrl(self, style=wx.TE_LEFT|wx.TE_MULTILINE|wx.TE_BESTWRAP|wx.TE_READONLY|wx.TE_NO_VSCROLL) 
    4747        self.ack.SetValue(config._acknowledgement_publications) 
    48         self.ack.SetMinSize((-1,55)) 
     48        self.ack.SetMinSize((-1, 55)) 
    4949        self.preamble = wx.StaticText(self, -1, config._acknowledgement_preamble) 
    5050        items = [config._acknowledgement_preamble_bullet1, 
    5151                 config._acknowledgement_preamble_bullet2, 
    52                  config._acknowledgement_preamble_bullet3] 
     52                 config._acknowledgement_preamble_bullet3, 
     53                 config._acknowledgement_preamble_bullet4] 
    5354        self.list1 = wx.StaticText(self, -1, "\t(1) " + items[0]) 
    5455        self.list2 = wx.StaticText(self, -1, "\t(2) " + items[1]) 
    5556        self.list3 = wx.StaticText(self, -1, "\t(3) " + items[2]) 
     57        self.list4 = wx.StaticText(self, -1, "\t(4) " + items[3]) 
    5658        self.static_line = wx.StaticLine(self, 0) 
    5759        self.__set_properties() 
    5860        self.__do_layout() 
    59          
     61 
    6062    def __set_properties(self): 
    6163        """ 
     64        :TODO - add method documentation 
    6265        """ 
    6366        # begin wxGlade: DialogAbout.__set_properties 
     
    7073    def __do_layout(self): 
    7174        """ 
     75        :TODO - add method documentation 
    7276        """ 
    7377        # begin wxGlade: DialogAbout.__do_layout 
     
    7882        sizer_titles.Add(self.list2, 0, wx.ALL|wx.EXPAND, 5) 
    7983        sizer_titles.Add(self.list3, 0, wx.ALL|wx.EXPAND, 5) 
     84        sizer_titles.Add(self.list4, 0, wx.ALL|wx.EXPAND, 5) 
    8085        sizer_titles.Add(self.static_line, 0, wx.ALL|wx.EXPAND, 0) 
    8186        sizer_titles.Add(self.ack, 0, wx.ALL|wx.EXPAND, 5) 
     
    8691        self.Centre() 
    8792        # end wxGlade 
    88          
     93 
    8994 
    9095##### testing code ############################################################ 
    9196class MyApp(wx.App): 
    9297    """ 
     98    Class for running module as stand alone for testing 
    9399    """ 
    94100    def OnInit(self): 
    95101        """ 
     102        Defines an init when running as standalone 
    96103        """ 
    97104        wx.InitAllImageHandlers() 
  • src/sas/guiframe/config.py

    r0ea31ca rc8d22ec  
    99__version__ = '0.0.0' 
    1010__build__ = '1' 
    11 __download_page__ = 'http://sourceforge.net/projects/sasview/files/' 
    12 __update_URL__ = ['svn.code.sf.net',  
    13                   '/p/sasview/code/trunk/sasview.latestversion'] 
     11__download_page__ = 'https://github.com/SasView/sasview/releases' 
     12__update_URL__ = ['https://github.com/SasView/sasview.git'] 
    1413 
    1514 
     
    2120 
    2221# Debug message should be written to a file? 
    23 __EVT_DEBUG_2_FILE__   = False 
     22__EVT_DEBUG_2_FILE__ = False 
    2423__EVT_DEBUG_FILENAME__ = "debug.log" 
    2524 
     
    3635'''Reference the following website: http://www.sasview.org''' 
    3736_acknowledgement_preamble_bullet3 =\ 
    38 '''Send us your reference for our records: sansdanse@gmail.com''' 
     37'''Reference the model you used if appropriate (see documentation for refs)''' 
     38_acknowledgement_preamble_bullet4 =\ 
     39'''Send us your reference for our records: developers@sasview.org''' 
    3940_acknowledgement_publications = \ 
    40 '''This work benefited from the use of the SasView application, originally  
     41'''This work benefited from the use of the SasView application, originally 
    4142developed under NSF award DMR-0520547. 
    4243''' 
    4344_acknowledgement =  \ 
    4445'''This work originally developed as part of the DANSE project funded by the NSF 
    45 under grant DMR-0520547, and currently maintained by NIST, UMD, ORNL, ISIS, ESS  
     46under grant DMR-0520547, and currently maintained by NIST, UMD, ORNL, ISIS, ESS 
    4647and ILL. 
    4748 
     
    8586PLUGINS_WLIST = [] 
    8687PLUGIN_STATE_EXTENSIONS = [] 
    87 SPLASH_SCREEN_PATH = "images/danse_logo.png"      
     88SPLASH_SCREEN_PATH = "images/danse_logo.png" 
    8889DEFAULT_STYLE = GUIFRAME.SINGLE_APPLICATION 
    8990SPLASH_SCREEN_WIDTH = 500 
    9091SPLASH_SCREEN_HEIGHT = 300 
    91 WELCOME_PANEL_ON  = False 
     92WELCOME_PANEL_ON = False 
    9293TUTORIAL_PATH = None 
    9394SS_MAX_DISPLAY_TIME = 1500 
     
    125126 
    126127def printEVT(message): 
     128    """ 
     129    :TODO - need method documentation 
     130    """ 
    127131    if __EVT_DEBUG__: 
    128132        print "%g:  %s" % (time.clock(), message) 
    129          
     133     
    130134        if __EVT_DEBUG_2_FILE__: 
    131135            out = open(__EVT_DEBUG_FILENAME__, 'a') 
  • src/sas/guiframe/data_processor.py

    rc85b0ae re54dbc3e  
    141141        self.Bind(wx.grid.EVT_GRID_CELL_LEFT_CLICK, self.OnLeftClick) 
    142142        self.Bind(wx.grid.EVT_GRID_CELL_RIGHT_CLICK, self.OnRightClick) 
    143         self.Bind(wx.grid.EVT_GRID_CELL_LEFT_DCLICK, self.OnLeftDoubleClick) 
     143        #self.Bind(wx.grid.EVT_GRID_CELL_LEFT_DCLICK, self.OnLeftDoubleClick) 
    144144        self.Bind(wx.grid.EVT_GRID_RANGE_SELECT, self.OnRangeSelect) 
    145145        self.Bind(wx.grid.EVT_GRID_ROW_SIZE, self.OnRowSize) 
     
    187187        if self.GetNumberCols() > 0: 
    188188            self.default_col_width = self.GetColSize(0) 
    189         self.Bind(wx.grid.EVT_GRID_LABEL_LEFT_CLICK, self.on_left_click) 
    190         self.Bind(wx.grid.EVT_GRID_LABEL_RIGHT_CLICK, self.on_right_click) 
    191         self.Bind(wx.grid.EVT_GRID_CELL_LEFT_CLICK, self.on_selected_cell) 
    192         self.Bind(wx.grid.EVT_GRID_CMD_CELL_CHANGE, self.on_edit_cell) 
    193         self.Bind(wx.grid.EVT_GRID_CELL_RIGHT_CLICK, self.onContextMenu) 
    194  
     189        #self.Bind(wx.grid.EVT_GRID_LABEL_LEFT_CLICK, self.on_left_click) 
     190        #self.Bind(wx.grid.EVT_GRID_LABEL_RIGHT_CLICK, self.on_right_click) 
     191        #self.Bind(wx.grid.EVT_GRID_CELL_LEFT_CLICK, self.on_selected_cell) 
     192        #self.Bind(wx.grid.EVT_GRID_CMD_CELL_CHANGE, self.on_edit_cell) 
     193        #self.Bind(wx.grid.EVT_GRID_CELL_RIGHT_CLICK, self.onContextMenu) 
     194 
     195    def OnLeftClick(self, event): 
     196        sheet.CSheet.OnLeftClick(self, event) 
     197        self.on_selected_cell(event) 
     198         
    195199    def on_edit_cell(self, event): 
    196200        """ 
     
    211215        row, col = event.GetRow(), event.GetCol() 
    212216        cell = (row, col) 
    213         event.Skip() 
    214217        if not flag and not flag_shift: 
    215218            self.selected_cols = [] 
     
    273276            if cell_row > 0 and cell_row < self.max_row_touse: 
    274277                self.axis_value.append(self.GetCellValue(cell_row, cell_col)) 
     278        event.Skip() 
    275279 
    276280    def on_left_click(self, event): 
     
    278282        Catch the left click on label mouse event 
    279283        """ 
    280         event.Skip() 
    281284        flag = event.CmdDown() or event.ControlDown() 
    282285 
     
    317320            if not self.axis_label: 
    318321                self.axis_label = " " 
     322        event.Skip() 
    319323 
    320324    def on_right_click(self, event): 
     
    13851389        wx.EVT_MENU(self, self.save_menu.GetId(), self.on_save_page) 
    13861390 
     1391        # To add the edit menu, call add_edit_menu() here. 
     1392        self.edit = None 
     1393        self.Bind(wx.EVT_MENU_OPEN, self.on_menu_open) 
     1394         
     1395        self.Bind(wx.EVT_CLOSE, self.on_close) 
     1396 
     1397    def add_edit_menu(self, menubar): 
    13871398        self.edit = wx.Menu() 
    13881399 
     
    14141425        self.remove_menu = self.edit.Append(-1, 'Remove Column', hint) 
    14151426        wx.EVT_MENU(self, self.remove_menu.GetId(), self.on_remove_column) 
    1416  
    1417         self.Bind(wx.EVT_MENU_OPEN, self.on_menu_open) 
    14181427        menubar.Append(self.edit, "&Edit") 
    1419         self.Bind(wx.EVT_CLOSE, self.on_close) 
    14201428 
    14211429    def on_copy(self, event): 
  • src/sas/guiframe/documentation_window.py

    re82a901 rc8d22ec  
     1""" 
     2documentation module provides a simple means to add help throughout the 
     3application. It checks for the existence of html2 package needed to support 
     4fully html panel which supports css.  The class defined here takes a title for 
     5the particular help panel, a pointer to the html documentation file of interest 
     6within the documentation tree along with a 'command' string such as a page 
     7anchor or a query string etc.  The path to the doc directory is retrieved 
     8automatically by the class itself.  Thus with these three pieces of information 
     9the class generates a panel with the appropriate title bar and help file 
     10formatted according the style sheets called in the html file.  Finally, if an 
     11old version of Python is running and the html2 package is not available the 
     12class brings up the default browser and passes the file:/// string to it.  In 
     13this case however the instruction portion is usually not passed for security 
     14reasons. 
     15""" 
    116import os 
    217import logging 
     
    520import urllib 
    621 
    7 wx_supports_html2 = True 
     22SPHINX_DOC_ENV = "SASVIEW_DOC_PATH" 
     23WX_SUPPORTS_HTML2 = True 
    824try: 
    925    import wx.html2 as html 
    1026except: 
    11     wx_supports_html2 = False 
     27    WX_SUPPORTS_HTML2 = False 
     28 
    1229 
    1330from gui_manager import get_app_dir 
     
    1532 
    1633class DocumentationWindow(wx.Frame): 
    17     def __init__(self, parent, id, path, url_instruction, title, size=(850, 540)): 
    18         wx.Frame.__init__(self, parent, id, title, size=size) 
     34    """ 
     35    DocumentationWindow inherits from wx.Frame and provides a centralized 
     36    coherent framework for all help documentation.  Help files must be html 
     37    files stored in an properly organized tree below the top 'doc' folder.  In 
     38    order to display the appropriate help file from anywhere in the gui, the 
     39    code simply needs to know the location below the top level where the 
     40    help file resides along with the name of the help file. 
     41    called 
     42    (self, parent, dummy_id, path, url_instruction, title, size=(850, 540)) 
    1943 
    20         SPHINX_DOC_ENV = "SASVIEW_DOC_PATH" 
     44    :param path: path to html file beginning AFTER /doc/ and ending in the 
     45    file.html 
     46    :param url_instructions: anchor string or other query e.g. '#MyAnchor 
     47    :param title - text to place in the title bar of the help panel 
     48    """ 
     49    def __init__(self, parent, dummy_id, path, url_instruction, title, size=(850, 540)): 
     50        wx.Frame.__init__(self, parent, dummy_id, title, size=size) 
     51 
    2152        if SPHINX_DOC_ENV in os.environ: 
    2253            docs_path = os.path.join(os.environ[SPHINX_DOC_ENV]) 
     
    2758            docs_path = os.path.join(get_app_dir(), "doc") 
    2859 
     60        #note that filepath for mac OS, at least in bundle starts with a 
     61        #forward slash as /Application, while the PC string begins C:\ 
     62        #It seems that mac OS is happy with four slashes as in file:////App... 
     63        #Two slashes is not sufficient to indicate path from root.  Thus for now 
     64        #we use "file:///" +... If the mac behavior changes may need to make the 
     65        #file:/// be another constant at the beginning that yields // for Mac 
     66        #and /// for PC. 
     67        #Note added June 21, 2015     PDB 
    2968        file_path = os.path.join(docs_path, path) 
    30         url = "file:///" + urllib.quote(file_path,'\:')+ url_instruction 
     69        url = "file:///" + urllib.quote(file_path, r'/\:')+ url_instruction 
    3170 
    3271        if not os.path.exists(file_path): 
    3372            logging.error("Could not find Sphinx documentation at %s \ 
    3473            -- has it been built?", file_path) 
    35         elif wx_supports_html2: 
     74        elif WX_SUPPORTS_HTML2: 
    3675            # Complete HTML/CSS support! 
    3776            self.view = html.WebView.New(self) 
    3877            self.view.LoadURL(url) 
    3978            self.Show() 
    40         else:  
     79        else: 
    4180            logging.error("No html2 support, popping up a web browser") 
    4281            #For cases that do not build against current version dependency 
    43             # Wx 3.0 we provide a webbrowser call - this is particularly for  
     82            # Wx 3.0 we provide a webbrowser call - this is particularly for 
    4483            #Red hat used at SNS for which Wx 3.0 is not available.  This 
    45             #does not deal with issue of math in docs of course.  
     84            #does not deal with issue of math in docs of course. 
    4685            webbrowser.open_new_tab(url) 
    4786 
    4887def main(): 
     88    """ 
     89    main loop function if running alone for testing. 
     90    """ 
    4991    app = wx.App() 
    5092    DocumentationWindow(None, -1, "index.html", "", "Documentation",) 
  • src/sas/guiframe/gui_manager.py

    r7801df8 r3c2011e  
    12961296        #replace or add a new menu for the current plugin 
    12971297        pos = self._menubar.FindMenu(str(self._applications_menu_name)) 
     1298        if pos == -1 and self._applications_menu_pos > 0: 
     1299            pos = self._applications_menu_pos 
    12981300        if pos != -1: 
    12991301            menu_list = self._current_perspective.populate_menu(self) 
    13001302            if menu_list: 
    13011303                for (menu, name) in menu_list: 
     1304                    print "[%s]" % name 
    13021305                    self._menubar.Replace(pos, menu, name) 
    13031306                    self._applications_menu_name = name 
     1307                self._applications_menu_pos = pos 
    13041308            else: 
    13051309                self._menubar.Remove(pos) 
    13061310                self._applications_menu_name = None 
    1307             #get the position of the menu when it first added 
    1308             self._applications_menu_pos = pos 
     1311                self._applications_menu_pos = -1 
    13091312        else: 
    13101313            menu_list = self._current_perspective.populate_menu(self) 
     
    13161319                        if help_pos == -1: 
    13171320                            self._menubar.Append(menu, name) 
     1321                            self._applications_menu_pos = -1 
    13181322                        else: 
    13191323                            self._menubar.Insert(help_pos-1, menu, name) 
     1324                            self._applications_menu_pos = help_pos - 1 
    13201325                    else: 
    13211326                        self._menubar.Insert(self._applications_menu_pos, menu, name) 
  • src/sas/perspectives/fitting/media/fitting.rst

    rb404a3de rd896039  
    1717   Polarisation/Magnetic Scattering <mag_help> 
    1818 
    19    Information on the SasView Optimisers - Local <optimizer.rst> 
    20  
    21    Information on the SasView Optimisers - Web <https://github.com/bumps/bumps/blob/master/doc/guide/optimizer.rst> 
     19   Information on the SasView Optimisers <optimizer.rst> 
    2220    
  • sasview/setup_exe.py

    rc971c98 r0c17d96  
    231231images_dir = os.path.join(path, "images") 
    232232test_dir = os.path.join(path, "test") 
     233test_1d_dir = os.path.join(path, "test\\1d_data") 
     234test_2d_dir = os.path.join(path, "test\\2d_data") 
     235test_save_dir = os.path.join(path, "test\\save_states") 
     236test_upcoming_dir = os.path.join(path, "test\\upcoming_formats") 
    233237 
    234238matplotlibdatadir = matplotlib.get_data_path() 
     
    290294 
    291295# Copying the sample data user data 
    292 for f in findall(test_dir): 
    293     if not ".svn" in f: 
    294         data_files.append(("test", [f])) 
     296for f in findall(test_1d_dir): 
     297    if not ".svn" in f: 
     298        data_files.append(("test\\1d_data", [f])) 
     299 
     300# Copying the sample data user data 
     301for f in findall(test_2d_dir): 
     302    if not ".svn" in f: 
     303        data_files.append(("test\\2d_data", [f])) 
     304 
     305# Copying the sample data user data 
     306for f in findall(test_save_dir): 
     307    if not ".svn" in f: 
     308        data_files.append(("test\\save_states", [f])) 
     309 
     310# Copying the sample data user data 
     311for f in findall(test_upcoming_dir): 
     312    if not ".svn" in f: 
     313        data_files.append(("test\\upcoming_formats", [f])) 
     314 
    295315 
    296316# See if the documentation has been built, and if so include it. 
     
    310330    # install the MSVC 9 runtime dll's into the application folder 
    311331    data_files.append(("Microsoft.VC90.CRT", py26MSdll_x86)) 
    312  
    313332 
    314333# NOTE: 
     
    335354packages.append('periodictable.core') # not found automatically 
    336355#packages.append('IPython') 
    337 includes = ['site', 'lxml._elementpath', 'lxml.etree'] 
     356includes = ['site', 'lxml._elementpath', 'lxml.etree', 'zmq.backend.cython'] 
    338357 
    339358# Exclude packages that are not needed but are often found on build systems 
    340 excludes = ['Tkinter', 'PyQt4', '_ssl', '_tkagg', 'sip', 'pytz'] 
     359excludes = ['Tkinter', 'PyQt4', '_ssl', '_tkagg', 'sip', 'pytz', 'zmq.libzmq'] 
    341360 
    342361 
     
    353372    # accidental links to msys/cygwin binaries; shouldn't be needed 
    354373    'cygwin1.dll', 
     374    'libzmq.pyd' 
    355375    ] 
    356376 
     
    370390#initialize category stuff 
    371391#from sas.guiframe.CategoryInstaller import CategoryInstaller 
    372 #CategoryInstaller.check_install() 
     392#CategoryInstaller.check_install(s) 
     393 
     394sys.setrecursionlimit(10000) 
    373395 
    374396setup( 
Note: See TracChangeset for help on using the changeset viewer.