Changeset ee563d5 in sasview


Ignore:
Timestamp:
Oct 7, 2016 9:11:15 AM (5 years ago)
Author:
Mathieu Doucet <doucetm@…>
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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
61780e3
Parents:
9b6d62d (diff), 5dd7499 (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

Files:
2 added
144 deleted
15 edited
26 moved

Legend:

Unmodified
Added
Removed
  • .gitignore

    rdf332d8 r5dd7499  
    4141 
    4242/docs/sphinx-docs/build 
     43/docs/sphinx-docs/source-temp 
    4344/docs/sphinx-docs/source/dev/api 
    4445/docs/sphinx-docs/source/user/guiframe 
    4546/docs/sphinx-docs/source/user/models 
    4647/docs/sphinx-docs/source/user/perspectives 
     48/docs/sphinx-docs/source/user/sasgui 
     49 
    4750 
    4851# test outputs 
  • .travis.yml

    r58918de red8f27e7  
    1212  system_site_packages: true 
    1313before_install: 
    14   - 'if [ $TRAVIS_PYTHON_VERSION == "2.7" ]; then sudo apt-get update;sudo apt-get install python-numpy python-scipy python-matplotlib libhdf5-serial-dev python-h5py fglrx opencl-headers python-pyopencl; fi' 
     14  - 'if [ $TRAVIS_PYTHON_VERSION == "2.7" ]; then sudo apt-get update;sudo apt-get install python-matplotlib libhdf5-serial-dev python-h5py fglrx opencl-headers python-pyopencl gfortran libblas-dev liblapack-dev libatlas-dev; fi' 
    1515 
    1616install: 
  • build_tools/requirements.txt

    r785cc657 r0ff9e1f  
    77reportlab==2.5 
    88lxml==2.3 
    9 PIL==1.1.7 
     9#PIL==1.1.7 
    1010periodictable==1.3.0 
    1111bumps==0.7.5.9 
    12 # numpy==1.6.1 
    13 # scipy==0.10.1 
     12numpy>=1.7.1 
     13scipy>=0.18.0 
    1414# wx==2.8.12.1 
    1515# matplotlib==1.1.0 
  • docs/sphinx-docs/build_sphinx.py

    r8096b446 r5dd7499  
    3030SASVIEW_DOCS = os.path.join(SASVIEW_BUILD, "doc") 
    3131SASVIEW_TEST = os.path.join(SASVIEW_SRC, "..", "sasview", "test", "media") 
     32SASVIEW_TOC_SOURCE = os.path.join(CURRENT_SCRIPT_DIR, "source") 
    3233 
    3334# Need to slurp in the new sasmodels model definitions to replace the old model_functions.rst 
     
    3536#/sasview-local-trunk/docs/sphinx-docs/build_sphinx.py 
    3637SASMODELS_SOURCE_PROLOG = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc") 
     38SASMODELS_SOURCE_SESANS = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc", "ref", "sesans") 
    3739SASMODELS_SOURCE_MAGNETISM = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc", "ref", "magnetism") 
    3840SASMODELS_SOURCE_MAGIMG = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc", "ref", "magnetism", "mag_img") 
     
    4143SASMODELS_SOURCE_IMG = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc", "model", "img") 
    4244SASMODELS_SOURCE_AUTOIMG = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc", "_build", "html","_images") 
    43 SASMODELS_DEST_PROLOG = os.path.join(CURRENT_SCRIPT_DIR, "source") 
    44 SASMODELS_DEST_REF_MODELS = os.path.join(CURRENT_SCRIPT_DIR, "source", "user") 
    45 SASMODELS_DEST_MODELS = os.path.join(CURRENT_SCRIPT_DIR, "source", "user", "models") 
    46 SASMODELS_DEST_IMG = os.path.join(CURRENT_SCRIPT_DIR,  "source", "user", "model-imgs", "new-models") 
    47 SASMODELS_DEST_MAGIMG = os.path.join(CURRENT_SCRIPT_DIR,  "source", "user", "mag_img") 
    48 SASMODELS_DEST_BUILDIMG = os.path.join(CURRENT_SCRIPT_DIR,  "source", "user", "models", "img") 
     45## Don't do assemble-in-place 
     46## Assemble the docs in a temporary folder 
     47SASMODELS_DEST_PROLOG = os.path.join(CURRENT_SCRIPT_DIR, "source-temp") 
     48SASMODELS_DEST_REF_MODELS = os.path.join(SASMODELS_DEST_PROLOG, "user") 
     49SASMODELS_DEST_MODELS = os.path.join(SASMODELS_DEST_PROLOG, "user", "models") 
     50SASMODELS_DEST_IMG = os.path.join(SASMODELS_DEST_PROLOG, "user", "model-imgs", "new-models") 
     51SASMODELS_DEST_MAGIMG = os.path.join(SASMODELS_DEST_PROLOG, "user", "mag_img") 
     52SASMODELS_DEST_BUILDIMG = os.path.join(SASMODELS_DEST_PROLOG, "user", "models", "img") 
    4953 
    5054#if os.path.exists(SASMODELS_SOURCE_PROLOG): 
     
    6569 
    6670SPHINX_BUILD = os.path.join(CURRENT_SCRIPT_DIR, "build") 
    67 SPHINX_SOURCE = os.path.join(CURRENT_SCRIPT_DIR, "source") 
     71SPHINX_SOURCE = os.path.join(CURRENT_SCRIPT_DIR, "source-temp") 
    6872SPHINX_SOURCE_API = os.path.join(SPHINX_SOURCE, "dev", "api") 
    6973SPHINX_SOURCE_GUIFRAME = os.path.join(SPHINX_SOURCE, "user", "sasgui", "guiframe") 
     
    7175SPHINX_SOURCE_PERSPECTIVES = os.path.join(SPHINX_SOURCE, "user", "sasgui", "perspectives") 
    7276SPHINX_SOURCE_TEST = os.path.join(SPHINX_SOURCE, "test") 
     77SPHINX_SOURCE_USER = os.path.join(SPHINX_SOURCE, "user") 
    7378 
    7479BUMPS_DOCS = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", 
     
    102107    _remove_dir(SASVIEW_DOCS) 
    103108    _remove_dir(SPHINX_BUILD) 
    104     _remove_dir(SPHINX_SOURCE_GUIFRAME) 
    105     _remove_dir(SPHINX_SOURCE_MODELS) 
    106     _remove_dir(SPHINX_SOURCE_PERSPECTIVES) 
    107     _remove_dir(SPHINX_SOURCE_TEST) 
    108  
     109    _remove_dir(SPHINX_SOURCE) 
     110    #_remove_dir(SPHINX_SOURCE_GUIFRAME) 
     111    #_remove_dir(SPHINX_SOURCE_MODELS) 
     112    #_remove_dir(SPHINX_SOURCE_PERSPECTIVES) 
     113    #_remove_dir(SPHINX_SOURCE_TEST) 
     114 
     115def setup_source_temp(): 
     116    """ 
     117    Copy the source toctrees to new folder for assembling the sphinx-docs 
     118    """ 
     119    print "=== Copying Source toctrees ===" 
     120    if os.path.exists(SASVIEW_TOC_SOURCE): 
     121       print "Found docs folder at ", SASVIEW_TOC_SOURCE 
     122       shutil.copytree(SASVIEW_TOC_SOURCE, SPHINX_SOURCE) 
    109123 
    110124def retrieve_user_docs(): 
     
    190204                    shutil.copy(fromhere,tohere) 
    191205 
     206    if os.path.exists(SASMODELS_SOURCE_SESANS): 
     207        print "Found docs folder SASMODELS_SOURCE_SESANS at ", SASMODELS_SOURCE_SESANS 
     208        if os.path.exists(SPHINX_SOURCE_USER): 
     209            print "Found docs folder SPHINX_SOURCE_USER      at ", SPHINX_SOURCE_USER 
     210            print "Copying sasmodels sesans files..." 
     211            for files in os.listdir(SASMODELS_SOURCE_SESANS): 
     212                if files.endswith(".rst"): 
     213                    fromhere=os.path.join(SASMODELS_SOURCE_SESANS,files) 
     214                    tohere=os.path.join(SPHINX_SOURCE_USER,files) 
     215                    shutil.copy(fromhere,tohere) 
     216 
    192217    if os.path.exists(SASMODELS_SOURCE_MAGNETISM): 
    193218        print "Found docs folder SASMODELS_SOURCE_MAGNETISM at ", SASMODELS_SOURCE_MAGNETISM 
     
    323348def rebuild(): 
    324349    clean() 
     350    setup_source_temp() 
    325351    retrieve_user_docs() 
    326352    retrieve_bumps_docs() 
  • docs/sphinx-docs/source/user/working.rst

    rc43953ef r578a11d  
    1919   Computations with a GPU <gpu_computations> 
    2020    
     21   Converting SANS to SESANS <sans_to_sesans> 
     22    
  • sasview/local_config.py

    r8d3d20a r06707b6  
    4444'''This work benefited from the use of the SasView application, originally developed under NSF Award  
    4545DMR-0520547. SasView also contains code developed with funding from the EU Horizon 2020 research  
    46 and innovation programme under the SINE2020 project Grant No 654000.''' 
     46and innovation programme under the SINE2020 project Grant No 654000 and by Adam Washington.''' 
    4747 
    4848_acknowledgement =  \ 
    4949'''This work was originally developed as part of the DANSE project funded by the US NSF under Award DMR-0520547, but is currently maintained by a  
    5050collaboration between UTK, UMD, NIST, ORNL, ISIS, ESS, ILL and ANSTO. SasView also contains code developed with funding from the EU Horizon 2020  
    51 research and innovation programme under the SINE2020 project (Grant No 654000).''' 
     51research and innovation programme under the SINE2020 project (Grant No 654000) and by Adam Washington (corfunc-py).''' 
    5252 
    5353_homepage = "http://www.sasview.org" 
  • sasview/test/README.txt

    rd4c88e24 r850a498  
    1 Test data sets are included as a convenience to our users. The data sets are organized based on their data structure; 1D data, 2D data, SASVIEW saved states, and data in formats that are not yet implemented but are in the works for future versions. 
    2 1D data sets have at least two columns of data with I(abs. units) on the y-axis and Q on the x-axis. 2D data sets are data sets that give the deduced intensity for each detector pixel. Depending on the file extension, uncertainty and meta data may also be available. 
     1Test data sets are included as a convenience to our users. The data sets are organized based on their data structure; 1D data (ie, I(Q)), 2D data (ie, I(Qx,Qy)), coordinate data (eg, PDB files), image data (eg, TIFF files), SasView saved states, SESANS data, and data in formats that are not yet implemented but which are in the works for future releases. 
     2 
     31D data sets EITHER a) have at least two columns of data with I(abs. units) on the y-axis and Q on the x-axis, OR b) have I and Q in separate files. Data in the latter format need to be converted to a single file format with the File Converter tool before SasView will analyse them. 
     4 
     52D data sets are data sets that give the deduced intensity for each detector pixel. Depending on the file extension, uncertainty and metadata may also be available. 
     6 
     7Coordinate data sets are designed to be read by the Generic Scattering Calculator tool. 
     8 
     9Image data sets are designed to be read by the Image Viewer tool. 
     10 
    311Save states are projects and analyses saved by the SASVIEW program. A single analysis file contains the data and parameters for a single fit (.fit), p(r) inversion (.pr), or invariant calculation (.inv). A project file (.svs) contains the results for every active analysis. 
     12 
     13SESANS data sets primarily contain the neutron polarisation as a function of the spin-echo length. 
  • sasview/test/media/testdata_help.rst

    ra32aa3e rda456fb  
    77sub-folder in your SasView installation folder. 
    88 
    9 The data sets are organized based on their data structure; 1D data, 2D data,  
    10 SASVIEW saved states, and data in formats that are not yet implemented but  
    11 which are in the works for future versions. 
     9The test data sets are organized based on their data structure: 
    1210 
    13 1D data sets have at least two columns of data with Intensity (assumed  
    14 absolute units) on the Y-axis and Q on the X-axis.  
    15  
    16 2D data sets are data sets that give the deduced intensity for each detector  
    17 pixel. Depending on the file extension, uncertainty and meta data may also be  
    18 available. 
    19  
    20 Saved states are projects and analyses saved by the SasView program. A single  
    21 analysis file contains the data and parameters for a single fit (.fit), p(r)  
    22 inversion (.pr), or invariant calculation (.inv). A project file (.svs) contains  
    23 the results for every active analysis. 
    24  
    25 Some of the available test data is described below. 
     11- *1D data* 
     12- *2D data* 
     13- *coordinate data* 
     14- *image data* 
     15- *SESANS data* 
     16- *save states* 
     17- *upcoming formats* 
    2618 
    2719.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    2820 
     211D Data 
     22^^^^^^^ 
     231D data sets EITHER have: 
     24 
     25- at least two columns of data with I(Q) (assumed to be in absolute units) on the y-axis and Q on the x-axis. And additional columns of data may carry uncertainty data, resolution data, or other metadata. 
     26 
     27OR: 
     28 
     29- the I(Q) and Q data in separate files *with no other information*. 
     30 
     31Data in the latter format need to be converted to a single file format with the :ref:`File_Converter_Tool` before they can be analysed in SasView. 
     32 
    29331D Test Data 
    30 ^^^^^^^^^^^^ 
     34............ 
     3533837rear_1D_1.75_16.5 
     36  - Data from a magnetically-oriented surfactant liquid crystal output by the Mantid framework. The data was collected on the SANS2D instrument at ISIS. 
    3137 
     3810wtAOT_Reline_120_reduced / Anton-Paar_PDH / saxsess_example 
     39  - Data from Anton-Paar SAXSess instruments saved in Otto Glatter's PDH format. 
     40   
    3241AOT_Microemulsion 
    3342  - Aerosol-OT surfactant stabilised oil-in-water microemulsion data at three  
     
    3544    (surfactant layer). 
    3645  - Suitable for testing simultaneous fitting. 
    37    
     46 
     47APS_DND-CAT 
     48  - ASCII data from the DND-CAT beamline at the APS. 
     49 
     50APS_X / APS_Y 
     51  - ASCII data output by a reduction software package at the APS. 
     52  - Suitable for testing the :ref:`File_Converter_Tool` . 
     53 
     54FIT2D_I / FIT2D_Q 
     55  - ASCII data output by the FIT2D software package at the ESRF. 
     56  - Suitable for testing the :ref:`File_Converter_Tool` . 
     57 
    3858hSDS_D2O 
    3959  - h25-sodium dodecyl sulphate solutions at two concentrations: 0.5wt% (just  
     
    4262  - Suitable for testing charged S(Q) models. 
    4363 
    44 P123_D2O 
    45   - Lyotropic liquid crystalline solutions of non-ionic ABA block copolymer  
    46     Pluronic P123 in water at three concentrations: 10wt%, 30wt%, and 40wt%. 
    47   - Suitable for testing paracrystal models. 
     64ISIS_83404 / ISIS_98929 
     65  - Polyamide-6 fibres hydrated in D2O exhibiting a broad lamellar peak from the semi-crystalline nanostructure. 
     66  - This is the *same data* as that in Z8300* / Z9800* but in an amalgamated ASCII format! 
     67  - Suitable for testing :ref:`Correlation_Function_Analysis` . 
    4868 
    4969ISIS_Polymer_Blend_TK49 
     
    5272  - Suitable for testing Poly_GaussCoil and RPA10 models. 
    5373 
     74P123_D2O 
     75  - Lyotropic liquid crystalline solutions of non-ionic ABA block copolymer  
     76    Pluronic P123 in water at three concentrations: 10wt%, 30wt%, and 40wt%. 
     77  - Suitable for testing paracrystal models. 
     78 
     79Z8300*.I1D / Z8300*.QAX / Z9800*.I1D / Z9800*.QAX 
     80  - BSL/OTOKO data from polyamide-6 fibres hydrated in D2O exhibiting a broad lamellar peak from the semi-crystalline nanostructure. 
     81  - This is the *same data* as that in ISIS_83404 / ISIS_98929 but in an older separated format! 
     82  - Suitable for testing the :ref:`File_Converter_Tool` . 
     83  - Suitable for testing :ref:`Correlation_Function_Analysis` . 
     84 
    5485.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    5586 
     872D Data 
     88^^^^^^^ 
     892D data sets are data sets that give the reduced intensity for each Qx-Qy bin. Depending on the file format, uncertainty data and metadata may also be available. 
     90 
    56912D Test Data 
    57 ^^^^^^^^^^^^ 
     92............ 
     9333837rear_2D_1.75_16.5 
     94  - Data from a magnetically-oriented surfactant liquid crystal output by the Mantid framework. The data was collected on the SANS2D instrument at ISIS. 
    5895 
    5996P123_D2O 
     
    64101.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    65102 
     103Coordinate Data 
     104^^^^^^^^^^^^^^^ 
     105Coordinate data sets, such as PDB or OMF files, and which describe a specific structure, are designed to be read and viewed in the :ref:`SANS_Calculator_Tool` . 
     106 
     107Coordinate Test Data 
     108.................... 
     109A_Raw_Example-1 
     110  - OMF format data file from a simulation of magnetic spheres. 
     111 
     112diamond 
     113  - PDB format data file for diamond. 
     114 
     115dna 
     116  - PDB format data file for DNA. 
     117 
     118sld_file 
     119  - Example SLD format data file. 
     120 
     121.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     122 
     123Image Data 
     124^^^^^^^^^^ 
     125Image data sets are designed to be read by the :ref:`Image_Viewer_Tool` . They can be converted into synthetic 2D data. 
     126 
     127Image Test Data 
     128............... 
     129ISIS_98940 
     130  - Polyamide-6 fibres hydrated in D2O exhibiting a broad lamellar peak from the semi-crystalline nanostructure. 
     131  - Data is presented in Windows Bitmap (BMP), GIF, JPEG (JPG), PNG, and TIFF (TIF) formats. 
     132 
     133.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     134 
     135SESANS Data 
     136^^^^^^^^^^^ 
     137SESANS (Spin-Echo SANS) data sets primarily contain the neutron polarisation as a function of the spin-echo length. Also see :ref:`SESANS` . 
     138 
     139SESANS Test Data 
     140................ 
     141spheres2micron 
     142  - SESANS data from 2 micron polystyrene spheres in 53% H2O / 47% D2O. 
     143 
     144.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     145 
     146Save States 
     147^^^^^^^^^^^ 
     148Saved states are projects and analyses saved by the SasView program. A single  
     149analysis file contains the data and parameters for a single fit (.fit), p(r)  
     150inversion (.prv), or invariant calculation (.inv). A project file (.svs) contains  
     151the results for every active analysis in a SasView session. 
     152 
    66153Saved State Test Data 
    67 ^^^^^^^^^^^^^^^^^^^^^ 
     154..................... 
     155fitstate.fitv 
     156  - a saved fitting analysis. 
    68157 
    69 _phi_weights.txt 
     158test.inv 
     159  - a saved invariant analysis. 
    70160 
    71 _radius_dist.txt 
     161test002.inv 
     162  - a saved invariant analysis. 
    72163 
    73 _THETA_weights.txt 
    74  
    75 fitstate.fitv 
     164prstate.prv 
     165  - a saved P(r) analysis. 
    76166 
    77167newone.svs 
     168  - a saved SasView project. 
    78169 
    79 prstate.prv 
     170.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    80171 
    81 sld_file.sld 
    82  
    83 test.inv 
    84  
    85 test002.inv 
     172Upcoming Formats 
     173^^^^^^^^^^^^^^^^ 
     174Data in this folder are in formats that are not yet implemented in SasView but which might be in future versions of the program. 
    86175 
    87176.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     
    89178Other Test Data 
    90179^^^^^^^^^^^^^^^ 
     180phi_weights.txt 
    91181 
    92 1000A_sphere_sm.xml 
     182radius_dist.txt 
    93183 
    94 diamond.pdb 
    95  
    96 dna.pdb 
     184THETA_weights.txt 
    97185 
    98186.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    99187 
    100 .. note::  This help document was last changed by Steve King, 26Jun2015 
     188.. note::  This help document was last changed by Steve King, 06Oct2016 
  • src/sas/sasgui/perspectives/calculator/media/image_viewer_help.rst

    rd85c194 rda456fb  
    33.. This is a port of the original SasView html help file to ReSTructured text 
    44.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. 
     5 
     6.. _Image_Viewer_Tool: 
    57 
    68Image Viewer Tool 
  • src/sas/sasgui/perspectives/calculator/media/sas_calculator_help.rst

    r7805458 rda456fb  
    33.. This is a port of the original SasView html help file to ReSTructured text 
    44.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. 
     5 
     6.. _SANS_Calculator_Tool: 
    57 
    68Generic SANS Calculator Tool 
  • src/sas/sasgui/perspectives/calculator/pyconsole.py

    r7673ecd rf1cbae7  
    99import wx 
    1010from wx.lib.dialogs import ScrolledMessageDialog 
     11from wx.lib import layoutf 
     12 
    1113import wx.py.editor as editor 
    1214 
     
    6365        title, icon = "Info", wx.ICON_INFORMATION 
    6466    text = "\n".join(parts) 
    65     dlg = ScrolledMessageDialog(parent, text, title, size=((550, 250))) 
     67    dlg = ResizableScrolledMessageDialog(parent, text, title, size=((550, 250))) 
    6668    fnt = wx.Font(10, wx.TELETYPE, wx.NORMAL, wx.NORMAL) 
    6769    dlg.GetChildren()[0].SetFont(fnt) 
     
    7072    dlg.Destroy() 
    7173    return errmsg is None 
     74 
     75class ResizableScrolledMessageDialog(wx.Dialog): 
     76    """ 
     77    Custom version of wx ScrolledMessageDialog, allowing border resize 
     78    """ 
     79    def __init__(self, parent, msg, caption, 
     80        pos=wx.DefaultPosition, size=(500,300), 
     81        style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER ): 
     82        # Notice, that style can be overrriden in the caller. 
     83        wx.Dialog.__init__(self, parent, -1, caption, pos, size, style) 
     84        x, y = pos 
     85        if x == -1 and y == -1: 
     86            self.CenterOnScreen(wx.BOTH) 
     87 
     88        text = wx.TextCtrl(self, -1, msg, style=wx.TE_MULTILINE | wx.TE_READONLY) 
     89        ok = wx.Button(self, wx.ID_OK, "OK") 
     90 
     91        # Mysterious constraint layouts from  
     92        # https://www.wxpython.org/docs/api/wx.lib.layoutf.Layoutf-class.html 
     93        lc = layoutf.Layoutf('t=t5#1;b=t5#2;l=l5#1;r=r5#1', (self,ok)) 
     94        text.SetConstraints(lc) 
     95        lc = layoutf.Layoutf('b=b5#1;x%w50#1;w!80;h!25', (self,)) 
     96        ok.SetConstraints(lc) 
     97 
     98        self.SetAutoLayout(1) 
     99        self.Layout() 
    72100 
    73101class PyConsole(editor.EditorNotebookFrame): 
  • src/sas/sasgui/perspectives/corfunc/media/corfunc_help.rst

    rf56770ef rda456fb  
    11.. corfunc_help.rst 
     2 
     3.. _Correlation_Function_Analysis: 
    24 
    35Correlation Function Analysis 
  • src/sas/sasgui/perspectives/file_converter/media/file_converter_help.rst

    r97e90b7 rda456fb  
    11.. file_converter_help.rst 
     2 
     3.. _File_Converter_Tool: 
    24 
    35File Converter Tool 
  • src/sas/sasgui/perspectives/fitting/media/plugin.rst

    rcbbb6a4 rb2a3814  
    33Writing a Plugin Model 
    44====================== 
     5 
     6.. note:: If some code blocks are not readable, expand the documentation window 
    57 
    68Overview 
  • src/sas/sasgui/guiframe/dataFitting.py

    rd85c194 r9b6d62d  
    363363        _str = "%s\n" % LoadData2D.__str__(self) 
    364364        return _str  
    365      
    366     def _validity_check(self, other): 
    367         """ 
    368         Checks that the data lengths are compatible. 
    369         Checks that the x vectors are compatible. 
    370         Returns errors vectors equal to original 
    371         errors vectors if they were present or vectors 
    372         of zeros when none was found. 
    373          
    374         :param other: other data set for operation 
    375          
    376         :return: dy for self, dy for other [numpy arrays] 
    377          
    378         :raise ValueError: when lengths are not compatible 
    379          
    380         """ 
    381         err_other = None 
    382         if isinstance(other, Data2D): 
    383             # Check that data lengths are the same 
    384             if len(self.data) != len(other.data) or \ 
    385                 len(self.qx_data) != len(other.qx_data) or \ 
    386                 len(self.qy_data) != len(other.qy_data): 
    387                 msg = "Unable to perform operation: data length are not equal" 
    388                 raise ValueError, msg 
    389             #if len(self.data) < 1: 
    390             #    msg = "Incompatible data sets: I-values do not match" 
    391             #    raise ValueError, msg  
    392             for ind in range(len(self.data)): 
    393                 if self.qx_data[ind] != other.qx_data[ind]: 
    394                     msg = "Incompatible data sets: qx-values do not match" 
    395                     raise ValueError, msg 
    396                 if self.qy_data[ind] != other.qy_data[ind]: 
    397                     msg = "Incompatible data sets: qy-values do not match" 
    398                     raise ValueError, msg 
    399                     
    400             # Check that the scales match 
    401             err_other = other.err_data 
    402             if other.err_data == None or \ 
    403                 (len(other.err_data) != len(other.data)): 
    404                 err_other = numpy.zeros(len(other.data)) 
    405              
    406         # Check that we have errors, otherwise create zero vector 
    407         err = self.err_data 
    408         if self.err_data == None or \ 
    409             (len(self.err_data) != len(self.data)): 
    410             err = numpy.zeros(len(other.data)) 
    411              
    412         return err, err_other 
    413  
    414     def _validity_check_union(self, other): 
    415         """ 
    416         Checks that the data lengths are compatible. 
    417         Checks that the x vectors are compatible. 
    418         Returns errors vectors equal to original 
    419         errors vectors if they were present or vectors 
    420         of zeros when none was found. 
    421          
    422         :param other: other data set for operation 
    423          
    424         :return: bool 
    425          
    426         :raise ValueError: when data types are not compatible 
    427          
    428         """ 
    429         if not isinstance(other, Data2D): 
    430             msg = "Unable to perform operation: different types of data set" 
    431             raise ValueError, msg    
    432         return True 
    433      
     365 
    434366    def _perform_operation(self, other, operation): 
    435367        """ 
Note: See TracChangeset for help on using the changeset viewer.