Changes in / [840ac87:1dc134e6] in sasview


Ignore:
Files:
3 added
17 edited

Legend:

Unmodified
Added
Removed
  • LICENSE.TXT

    r0347c89 rb01252e  
    1111 
    1212THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
     13 
     14Also see https://github.com/SasView/sasview/blob/master/installers/license.txt 
  • docs/sphinx-docs/source/user/RELEASE.rst

    r8ac05a5 r9849f8a  
    1818 
    1919With this version the change to the new model API and plugins infrastructure 
    20 begun with 4.0 is essentially complete (though extensions are in the works 
    21 and more are likely they should remain backwardly compatible with previous 
     20begun with 4.0 is essentially complete (though extensions are in the works, 
     21and more are likely, they should remain backwardly compatible with previous 
    2222versions of SasView). 
    2323 
    24 .. warning:: Old-style plugin models, including old sum|multiply models will continue 
    25              to be supported (i.e. SasView will be able to run them) in 4.x. However, 
    26              the expectation is that such support will be removed in 5.0 and everyone 
    27              is strongly encouraged to convert their custom models to the new API. 
     24.. warning:: Old-style plugin models, including old sum|multiply models, continue 
     25             to be supported (i.e. SasView will run them) in 4.x, although our 
     26             automatic on-the-fly translation may not cope in all use cases (see  
     27             Known Issues below). However, this backward compatibility will be  
     28             removed in 5.0 and users are therefore strongly encouraged to  
     29             convert their custom models to the new API. 
    2830 
    2931Finally, the changes to orientation angles and orientational distribution 
     
    5658  objects have been rectified. Some questions remain however. 
    5759* The known issue with the core_shell_parallelepiped model is now fixed. 
     60* An error in the be_polyelectrolyte model was identified and rectified, but  
     61  the fix is yet to be validated. 
    5862* A number of issues and inconsistencies with the creation of 
    5963  sum|multiply models have been rectified. 
     
    6468* There are several data loading improvements. 
    6569* There are several improvements to Save/Load Project. 
     70* The SasView version number now appears in Reports. 
     71* The Release Notes are now available from the program Help menu. 
    6672* There have been numerous other bug fixes. 
    6773 
     
    7076Several sections of the help documentation have undergone significant 
    7177checking and updating, particularly those relating to orientation, 
    72 magnetic scattering, and polydispersity distributions. Detailed 
    73 advanced instructions for plugin writing and some scripting 
    74 instructions have been added. 
     78magnetic scattering, and polydispersity distributions. 
     79 
     80Detailed advanced instructions for plugin writing and some scripting 
     81instructions have also been added. 
     82 
     83Concerns about the intended versus implemented meaning of some parameters 
     84in the bcc_paracrystal, fcc_paracrystal, and sc_paracrystal models have 
     85been brought to our attention. These have yet to be resolved and so a 
     86Warning has been placed on each of these models. Anyone who feels they 
     87may have the requisite expertise to investigate these concerns is strongly 
     88encouraged to contact the Developers! 
    7589 
    7690Other Work 
     
    90104Bug Fixes 
    91105^^^^^^^^^ 
     106* Fixes #  14: Loading a saved project is really really slow 
    92107* Fixes # 260: Box integration does not update when entering values in dialog 
    93108* Fixes # 446: Saving plot as PGF (not PDF!) format throws error 
     
    109124* Fixes # 784: Add 3D integral to Correlation Function analysis 
    110125* Fixes # 786: core_shell_parallelepiped 1-D model is incorrect 
    111 * Fixes # 818: "report button" followed by "save" makes an empty pdf file 
     126* Fixes # 818: “report button” followed by “save” makes an empty pdf file??? 
     127* Fixes # 830: Check compliance of loader against NXcanSAS-1.0 release 
    112128* Fixes # 838: Fix model download from marketplace 
    113129* Fixes # 848: can't save analysis when only one fit page 
    114 * Fixes # 849: Load Folder should ignore files starting with "." 
     130* Fixes # 849: Load Folder should ignore files starting with . 
    115131* Fixes # 852: More unit tests, especially for oriented or 2d models 
    116132* Fixes # 854: remove unnecessary sleep() in fitting perspective 
     
    134150* Fixes # 906: polydispersity not showing up in tabulated results 
    135151* Fixes # 912: About box points to misleading contributors page on Github 
     152* Fixes # 913: Need to add Diamond developer and logo in relevant places 
    136153* Fixes # 915: load project issues 
    137154* Fixes # 916: Proper Logging 
     
    151168* Fixes # 961: sasmodels tests should fail if the parameter name does not exist 
    152169* Fixes # 962: star polymer typo in docs 
     170* Fixes # 966: Inconsistent chi2 reporting 
    153171* Fixes # 967: no uncertainties errors on fitting parameters 
    154172* Fixes # 969: About Box not picking up dls_logo.png 
     
    166184* Fixes #1006: multiplicity models don't work with SQ 
    167185* Fixes #1007: spherical_sld model freezes SasView 
    168 * Fixes #1008: plugin model scaling not working? S 
     186* Fixes #1008: plugin model scaling not working? 
    169187* Fixes #1010: Win64 build script not creating working executable 
    170188* Fixes #1011: sld_test failing on ubuntu 
     189* Fixes #1012: ESS GUI not updating after fitting 
    171190* Fixes #1013: FileReaderBaseClass output[] not reset - same file loaded multiple times 
    172191* Fixes #1018: add Boltzmann distribution 
     
    174193* Fixes #1024: Update version numbers in master 
    175194* Fixes #1025: Sum/multiply editor hangs 
     195* Fixes #1030: volume normalization for hollow shapes is different from solvent-filled shapes 
    176196* Fixes #1032: convert C++ modules to C 
    177197* Fixes #1035: Order of combining P(Q) and S(Q) in Plugins seems to matter 
    178198* Fixes #1037: data loader crop not working? & all fits crashing 
    179199* Fixes #1043: problem compiling marketplace models 
     200* Fixes #1044: Unable to upload c file to marketplace 
     201* Fixes #1046: convert non builtin models in the marketplace to new API 
    180202* Fixes #1050: fix appveyor test for sasmodels win 64 python 3 
    181203* Fixes #1052: Can't use a user-created plugin model in a plugin model 
     204* Fixes #1054: Check plugin & orientation descriptions in full docs once SasModels PR #57 is merged 
    182205* Fixes #1057: phi rotation issue for elliptical cylinder 
    183206* Fixes #1060: incorrect default for rectangle dispersion 
    184207* Fixes #1062: win32 build not installing correctly 
    185 * Fixes #1064: Fitting did not converge!!! error with a Sum|Multi plugin model 
     208* Fixes #1064: "Fitting did not converge!!!" error with a Sum|Multi plugin model 
     209* Fixes #1068: 2d data (from NG7) not loadiing - strange format? 
    186210* Fixes #1069: GUI problem when using polydispersity/orientation distributions 
    187211* Fixes #1070: Parameter error boxes should not be editable 
     212* Fixes #1072: Orientation distributions seem to depend on initial angle 
    188213* Fixes #1079: Remove save button in report dialog on Mac 
    189214* Fixes #1081: GUI problem with new orientation distribution 
     
    191216* Fixes #1099: Erratic behaviour of Sum|Multi model in 4.1.2 
    192217* Fixes #1101: Batch results page not displaying polydispersity values 
     218* Fixes #1128: AutoPlot generation for model documentation does not include background 
    193219* Fixes #1131: OpencCl dialog does not open 
    194220* Fixes #1132: Slit Size Calculator Tool not working 
     
    196222* Fixes #1141: Intro to scripting.rst needs improvement 
    197223* Fixes #1142: Plugin framework is broken 
    198 * Fixes #1044: Unable to upload c file to marketplace 
    199224* Fixes #1145: Update models in model marketplace to 4.2 when 4.2 is released. 
    200 * Fixes #1148: Documentation for S(Q) models need updating 
    201 * Fixes #1128: AutoPlot generation for model documentation does not include background 
    202  
    203 It is recommended that all users upgrade to this version, but your 
    204 attention is drawn to the Changes section above. 
     225* Fixes #1155: BE Polyelectrolyte errors 
     226* Fixes #1160: fix VR for core_shell_cylinder, fractal_core_shell and hollow_cylinder 
     227* Fixes #1163: Fix help note in sum of sum|multiply interface 
     228* Fixes #1164: Sphinx doc build does not support superscript or substitution 
     229* Fixes #1166: No longer able to report from multiple fit pages 
     230* Fixes #1167: Clarify the documentation for the Spinodal Model 
     231* Fixes #1173: more problems with math in plugins 
     232* Fixes #1176: Make Release Notes/Known Issues available from Help in Menu Bar 
     233* Fixes #1179: PDF Report should contain SasView Version Number 
     234* Fixes #1183: Test from creating new model reset all parameters to default in all open FitPages 
     235 
     236**It is recommended that all users upgrade to this version, but your  
     237attention is drawn to the Changes section above.** 
    205238 
    206239 
     
    586619* Tools: provides a number of useful supplementary tools such as SLD 
    587620  calculation 
     621 
    588622Fitting 
    589623^^^^^^^ 
     
    627661  or plotting the evolution of the fit parameters with error bars (from within 
    628662  the application). 
     663 
    629664Tools 
    630665^^^^^ 
     
    637672* A slit size calculator optimized for Anton Paar Saxess is provided. 
    638673* A kiessig fringe thickness calculator is provided 
     674 
    639675Plots and plot management 
    640676^^^^^^^^^^^^^^^^^^^^^^^^^ 
     
    651687* Extensive context sensitive plot/fitting/manipulation options are available 
    652688  through a right mouse click pop-up menu on plots. 
     689 
    653690Data management 
    654691^^^^^^^^^^^^^^^ 
     
    666703  right click menus and the toolbar.  The data explorer can be re-started 
    667704  from the menu bar. 
     705 
    668706Data manipulation 
    669707^^^^^^^^^^^^^^^^^ 
     
    672710* A 2D data maks editor is provided 
    673711* 2D mask can be applied to the circular averaging. 
     712 
    674713Miscellaneous features 
    675714^^^^^^^^^^^^^^^^^^^^^^ 
     
    753792Known Issues 
    754793============ 
     794 
     795A full list of known bugs and feature requests by release version that  
     796users may wish to be aware of can be viewed at http://trac.sasview.org/report/3 
     797 
    7557984.2.0 - All systems 
    756799------------------- 
    757 There are currently no major known issues. A full list of known bugs and 
    758 feature requests by release version that users may wish to be aware of 
    759 can be viewed at http://trac.sasview.org/report/3 
    760  
    761 .. note:: Any corrections to models that may become known/available will be 
    762           posted to Marketplace as available (and fixed in the following  
    763           release) 
     800The refactoring of the plugin model architecture means that some issues  
     801may be encountered if Save Project/Analysis files using plugin models  
     802created in earlier versions of SasView are loaded in version 4.2.0. 
     803 
     804For example: 
     805 
     806* on loading an old project file an error window appears with the error  
     807  *This model state has missing or outdated information* or *dictionary changed size during iteration*. 
     808 
     809   * if this occurs, try restarting SasView and reloading the project. 
     810    
     811* on loading an old project file all the FitPages and Graphs appear, but  
     812  only the SasView default model parameters appear in the FitPages. 
     813 
     814  * this has happened because plugin model parameter names have changed.  
     815    There are two possible workarounds: 
     816     
     817   * Install the version of SasView that the project was created in,  
     818     recreate the plugin in that version, then run 4.2.0 and re-load  
     819     the project. All being well, 4.2.0 will still compile the old  
     820     plugin. 
     821 
     822   * If 4.2.0 cannot compile the old plugin, the more tedious solution  
     823     is to use a text editor to do global search & replace operations  
     824     to change all the parameter names in the project file by hand. The  
     825     quickest way to see the *existing* parameter names is simply to  
     826     scroll to the bottom of the project file. To see what the *new*  
     827     parameter names should be, simply create the equivalent plugin in  
     828     SasView 4.2.0. In most instances, what was *p1_parameter* will  
     829     become *A_parameter*, *p2_parameter* will become *B_parameter*,  
     830     and so on.  
    764831 
    7658324.1.x- All systems 
  • docs/sphinx-docs/source/user/tutorial.rst

    r893d852 rbe460ce  
    2121 
    2222:download:`Simultaneous 1D Fitting in Sasview <sasview/simultaneous_1d_fitting_in_sasview_v3x_4x.pdf>` 
     23 
     24:download:`Correlation Function Analysis in SasView <sasview/correlation_function_analysis_in_sasview_v4x.pdf>` 
  • installers/license.txt

    rd3114cc r73c51df  
    1919SasView is free to download and use, including for commercial purposes. 
    2020 
    21 © 2009-2018 UMD, UTK, NIST, ORNL, ISIS, ESS, ANSTO, ILL, TUD, DLS  
     21© 2009-2018 UMD, UTK, NIST, ORNL, ISIS, ESS, ANSTO, ILL, TUD, DLS, BAM  
    2222 
    2323 
  • src/sas/sascalc/fit/pagestate.py

    r59873e1 r863ac2c  
    767767                if len(value.strip()) == 0: 
    768768                    continue 
    769                 title = value + " [" + repo_time + "]" 
     769                title = (value + " [" + repo_time + "] [SasView v" + 
     770                         SASVIEW_VERSION + "]") 
    770771                title_name = HEADER % title 
    771772            elif name == "data": 
  • src/sas/sasgui/guiframe/aboutbox.py

    rb963b20 r1b4cb41  
    108108        self.bitmap_button_tudelft = wx.BitmapButton(self, -1, wx.NullBitmap) 
    109109        self.bitmap_button_dls = wx.BitmapButton(self, -1, wx.NullBitmap) 
     110        self.bitmap_button_bam = wx.BitmapButton(self, -1, wx.NullBitmap) 
    110111 
    111112        self.static_line_3 = wx.StaticLine(self, -1) 
     
    128129        self.Bind(wx.EVT_BUTTON, self.onTudelftLogo, self.bitmap_button_tudelft) 
    129130        self.Bind(wx.EVT_BUTTON, self.onDlsLogo, self.bitmap_button_dls) 
     131        self.Bind(wx.EVT_BUTTON, self.onBamLogo, self.bitmap_button_bam) 
    130132        # end wxGlade 
    131133        # fill in acknowledgements 
     
    226228        logo = wx.Bitmap(image) 
    227229        self.bitmap_button_dls.SetBitmapLabel(logo) 
     230 
     231        image = file_dir + "/images/bam_logo.png" 
     232        if os.path.isfile(config._bam_logo): 
     233            image = config._bam_logo 
     234        logo = wx.Bitmap(image) 
     235        self.bitmap_button_bam.SetBitmapLabel(logo) 
    228236 
    229237        # resize dialog window to fit version number nicely 
     
    258266        self.bitmap_button_tudelft.SetSize(self.bitmap_button_tudelft.GetBestSize()) 
    259267        self.bitmap_button_dls.SetSize(self.bitmap_button_dls.GetBestSize()) 
     268        self.bitmap_button_bam.SetSize(self.bitmap_button_bam.GetBestSize()) 
    260269        # end wxGlade 
    261270 
     
    325334        sizer_logos.Add(self.bitmap_button_dls, 0, 
    326335                        wx.LEFT|wx.ADJUST_MINSIZE, 2) 
     336        sizer_logos.Add(self.bitmap_button_bam, 0, 
     337                        wx.LEFT|wx.ADJUST_MINSIZE, 2) 
    327338 
    328339        sizer_logos.Add((10, 50), 0, wx.ADJUST_MINSIZE, 0) 
     
    430441        event.Skip() 
    431442 
     443    def onBamLogo(self, event): 
     444        """ 
     445        """ 
     446        # wxGlade: DialogAbout.<event_handler> 
     447        launchBrowser(config._bam_url) 
     448        event.Skip() 
     449 
    432450# end of class DialogAbout 
    433451 
  • src/sas/sasgui/guiframe/config.py

    r8ac05a5 r1b4cb41  
    5151'''M. Doucet et al. SasView Version 4.1.2, Zenodo, 10.5281/zenodo.825675''' 
    5252_acknowledgement =  \ 
    53 '''This work was originally developed as part of the DANSE project funded by the US NSF under Award DMR-0520547,\n but is currently maintained by a collaboration between UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO, TU Delft, DLS, and the scattering community.\n\n SasView also contains code developed with funding from the EU Horizon 2020 programme under the SINE2020 project (Grant No 654000).\nA list of individual contributors can be found at: http://www.sasview.org/contact.html 
     53'''This work was originally developed as part of the DANSE project funded by the US NSF under Award DMR-0520547,\n but is currently maintained by a collaboration between UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO, TU Delft, DLS, BAM and the scattering community.\n\n SasView also contains code developed with funding from the EU Horizon 2020 programme under the SINE2020 project (Grant No 654000).\nA list of individual contributors can be found at: http://www.sasview.org/contact.html 
    5454''' 
    5555 
     
    9090_tudelft_url = "http://www.tnw.tudelft.nl/en/cooperation/facilities/reactor-instituut-delft/" 
    9191_dls_url = "http://www.diamond.ac.uk/" 
     92_bam_url = "http://www.bam.de/" 
    9293_danse_url = "http://www.cacr.caltech.edu/projects/danse/release/index.html" 
    9394_inst_url = "http://www.utk.edu" 
    9495_corner_image = os.path.join(icon_path, "angles_flat.png") 
    9596_welcome_image = os.path.join(icon_path, "SVwelcome.png") 
    96 _copyright = "(c) 2009 - 2018, UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO, TU Delft, and DLS" 
     97_copyright = "(c) 2009 - 2018, UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO, TU Delft, DLS and BAM" 
    9798marketplace_url = "http://marketplace.sasview.org/" 
    9899 
  • src/sas/sasgui/guiframe/local_perspectives/data_loader/data_loader.py

    r2924532 r9c7e2b8  
    182182                file_errors[basename] = [log_msg] 
    183183                continue 
    184  
    185184            try: 
    186185                message = "Loading {}...\n".format(p_file) 
     
    204203                self.load_update(message="Loaded {}\n".format(p_file), 
    205204                                 info="info") 
    206  
    207205            except NoKnownLoaderException as e: 
    208206                exception_occurred = True 
    209                 error_message = "Loading data failed!\n" + e.message 
    210                 self.load_complete(output=None, 
    211                                    message=error_message, 
    212                                    info="warning") 
    213  
     207                error_message = "Loading data failed!" + e.message 
     208                file_errors[basename] = [error_message] 
    214209            except Exception as e: 
    215210                exception_occurred = True 
     
    220215                file_err += " following:\n" 
    221216                file_err += e.message 
    222                 self.load_complete(output=None, 
    223                                    message=file_err, 
    224                                    info="error") 
     217                file_errors[basename] = [file_err] 
    225218 
    226219        if len(file_errors) > 0: 
     
    231224                for message in error_array: 
    232225                    error_message += message + "\n" 
    233                 error_message = error_message[:-1] 
    234226            self.load_complete(output=output, 
    235227                               message=error_message, 
  • src/sas/sasgui/perspectives/corfunc/corfunc_panel.py

    r2a399ca r5652efc  
    2020 
    2121OUTPUT_STRINGS = { 
    22     'max': "Long Period / 2 (A): ", 
     22    'max': "Long Period (A): ", 
    2323    'Lc': "Average Hard Block Thickness (A): ", 
    2424    'dtr': "Average Interface Thickness (A): ", 
  • src/sas/sasgui/perspectives/corfunc/corfunc_state.py

    r1fa4f736 r5652efc  
    2828# List of output parameters, used by __str__ 
    2929output_list = [ 
    30     ['max', "Long Period / 2 (A): "], 
     30    ['max', "Long Period (A): "], 
    3131    ['Lc', "Average Hard Block Thickness (A): "], 
    3232    ['dtr', "Average Interface Thickness (A): "], 
  • src/sas/sasgui/perspectives/corfunc/media/corfunc_help.rst

    r501712f r490f790  
    3333Both analyses are performed in 3 stages: 
    3434 
    35 *  Extrapolation of the scattering curve to :math:`Q = 0` and toward  
    36    :math:`Q = \infty` 
     35*  Extrapolation of the scattering curve to :math:`q = 0` and toward  
     36   :math:`q = \infty` 
    3737*  Smoothed merging of the two extrapolations into the original data 
    3838*  Fourier / Hilbert Transform of the smoothed data to give the correlation 
     
    4747------------- 
    4848 
    49 To :math:`Q = 0` 
     49To :math:`q = 0` 
    5050................ 
    5151 
     
    6767the impact on any extrapolated parameters will be least significant. 
    6868 
    69 To :math:`Q = \infty` 
     69To :math:`q = \infty` 
    7070..................... 
    7171 
     
    145145        - do they smoothly curve onto the ordinate at x = 0? (if not check the value  
    146146          of :math:`\sigma` is sensible) 
    147         - are there ripples at x values corresponding to (2 :math:`pi` over) the two  
     147        - are there ripples at x values corresponding to (2 :math:`\pi` over) the two  
    148148          q values at which the extrapolated and experimental data are merged? 
    149         - are there any artefacts at x values corresponding to 2 :math:`pi` / q\ :sub:`max` in  
     149        - are there any artefacts at x values corresponding to 2 :math:`\pi` / q\ :sub:`max` in  
    150150          the experimental data?  
    151151        - and lastly, do the significant features/peaks in the correlation functions  
     
    158158    -q^{4} I(q) 
    159159 
    160 The IDF is proportional to the second derivative of Γ\ :sub:`1`\ (x). 
     160The IDF is proportional to the second derivative of Γ\ :sub:`1`\ (x) and represents a  
     161superposition of thickness distributions from all the contributing lamellae.  
    161162 
    162163Hilbert 
     
    192193*   Local Crystallinity :math:`= L_c/L_p` 
    193194 
     195.. warning:: If the sample does not possess lamellar morphology then "Compute  
     196    Parameters" will return garbage! 
     197         
     198 
    194199Volume Fraction Profile 
    195200....................... 
     
    213218 
    214219The reader is directed to the references for information on these parameters. 
     220 
    215221 
    216222References 
     
    263269Once the Q ranges have been set, click the "Calculate Bg" button to determine the  
    264270background level. Alternatively, enter your own value into the box. If the box turns  
    265 yellow this indicates that background subtraction has created some negative intensities. 
     271yellow this indicates that background subtraction has created some negative intensities.  
     272This may still be fine provided the peak intensity is very much greater than the  
     273background level. The important point is that the extrapolated dataset must approach  
     274zero at high-q. 
    266275 
    267276Now click the "Extrapolate" button to extrapolate the data. The graph window will update  
     
    296305 
    297306.. note:: 
    298     This help document was last changed by Steve King, 26Sep2017 
     307    This help document was last changed by Steve King, 28Sep2017 
  • src/sas/sasgui/perspectives/corfunc/media/fdr-pdfs.rst

    r959eb01 r577460c  
    77 
    88:download:`Fibre_Diffraction_Review_1994_3_25-29.pdf <Fibre_Diffraction_Review_1994_3_25-29.pdf>` 
     9 
    910:download:`Fibre_Diffraction_Review_2004_12_24.pdf <Fibre_Diffraction_Review_2004_12_24.pdf>` 
     11 
    1012:download:`Fibre_Diffraction_Review_2005_13_19-22.pdf <Fibre_Diffraction_Review_2005_13_19-22.pdf>` 
  • src/sas/sasgui/perspectives/fitting/fitpage.py

    rdabcaf7 rba1c145  
    33    fitting  a model and one data 
    44""" 
     5from __future__ import print_function 
     6 
    57import sys 
    68import wx 
     
    12541256        if saved_pars: 
    12551257            self.get_paste_params(saved_pars) 
     1258 
     1259        # Make sure the model parameters correspond to the fit parameters 
     1260        self._update_paramv_on_fit() 
    12561261 
    12571262        if event is not None: 
  • src/sas/sasgui/perspectives/fitting/fitting.py

    raf7d2e5 raba4559  
    339339        Update custom model list in the fitpage combo box 
    340340        """ 
    341         custom_model = 'Plugin Models' 
    342341        try: 
    343342            # Update edit menus 
     
    347346            if not new_pmodel_list: 
    348347                return 
    349             # Set the new plugin model list for all fit pages 
     348 
     349            # Redraws to a page not in focus are showing up as if they are 
     350            # in the current page tab. 
     351            current_page_index = self.fit_panel.GetSelection() 
     352            current_page = self.fit_panel.GetCurrentPage() 
     353            last_drawn_page = current_page 
     354 
     355            # Set the new plugin model list for all fit pages; anticipating 
     356            # categories, the updated plugin may be in either the form factor 
     357            # or the structure factor combo boxes 
    350358            for uid, page in self.fit_panel.opened_pages.iteritems(): 
    351                 if hasattr(page, "formfactorbox"): 
    352                     page.model_list_box = new_pmodel_list 
    353                     mod_cat = page.categorybox.GetStringSelection() 
    354                     if mod_cat == custom_model: 
    355                         box = page.formfactorbox 
    356                         model_name = box.GetValue() 
    357                         model = (box.GetClientData(box.GetCurrentSelection()) 
    358                                  if model_name else None) 
    359                         page._show_combox_helper() 
    360                         new_index = box.FindString(model_name) 
    361                         new_model = (box.GetClientData(new_index) 
    362                                      if new_index >= 0 else None) 
    363                         if new_index >= 0: 
    364                             box.SetStringSelection(model_name) 
    365                         else: 
    366                             box.SetStringSelection('') 
    367                         if model and new_model != model: 
    368                             page._on_select_model(keep_pars=True) 
    369                     if hasattr(page, "structurebox"): 
    370                         selected_name = page.structurebox.GetStringSelection() 
    371  
    372                         page.structurebox.Clear() 
    373                         page.initialize_combox() 
    374  
    375                         index = page.structurebox.FindString(selected_name) 
    376                         if index == -1: 
    377                             index = 0 
    378                         page.structurebox.SetSelection(index) 
    379                         page._on_select_model() 
     359                pbox = getattr(page, "formfactorbox", None) 
     360                sbox = getattr(page, "structurebox", None) 
     361                if pbox is None: 
     362                    continue 
     363 
     364                # Set the new model list for the page 
     365                page.model_list_box = new_pmodel_list 
     366 
     367                # Grab names of the P and S models from the page.  Need to do 
     368                # this before resetting the form factor box since that clears 
     369                # the structure factor box. 
     370                old_struct = old_form = None 
     371                form_name = pbox.GetValue() 
     372                struct_name = sbox.GetStringSelection() 
     373                if form_name: 
     374                    old_form = pbox.GetClientData(pbox.GetCurrentSelection()) 
     375                if struct_name: 
     376                    old_struct = sbox.GetClientData(sbox.GetCurrentSelection()) 
     377 
     378                # Reset form factor combo box.  We are doing this for all 
     379                # categories not just plugins since eventually the category 
     380                # manager will allow plugin models to be anywhere. 
     381                page._show_combox_helper() 
     382                form_index = pbox.FindString(form_name) 
     383                pbox.SetSelection(form_index) 
     384                new_form = (pbox.GetClientData(form_index) 
     385                            if form_index != wx.NOT_FOUND else None) 
     386                #print("form: %r"%form_name, old_form, new_form) 
     387 
     388                # Reset structure factor combo box; even if the model list 
     389                # hasn't changed, the model may have.  Show the structure 
     390                # factor combobox if the selected model is a form factor. 
     391                sbox.Clear() 
     392                page.initialize_combox() 
     393                if new_form is not None and getattr(new_form, 'is_form_factor', False): 
     394                    sbox.Show() 
     395                    sbox.Enable() 
     396                    page.text2.Show() 
     397                    page.text2.Enable() 
     398                struct_index = sbox.FindString(struct_name) 
     399                sbox.SetSelection(struct_index) 
     400                new_struct = (sbox.GetClientData(struct_index) 
     401                              if struct_index != wx.NOT_FOUND else None) 
     402                #print("struct: %r"%struct_name, old_struct, new_struct) 
     403 
     404                # Update the page if P or S has changed 
     405                if old_form != new_form or old_struct != new_struct: 
     406                    #print("triggering model update") 
     407                    page._on_select_model(keep_pars=True) 
     408                    last_drawn_page = page 
     409 
     410            # If last drawn is not the current, then switch the current to the 
     411            # last drawn then switch back.  Very ugly. 
     412            if last_drawn_page != current_page: 
     413                for page_index in range(self.fit_panel.PageCount): 
     414                    if self.fit_panel.GetPage(page_index) == last_drawn_page: 
     415                        self.fit_panel.SetSelection(page_index) 
     416                        break 
     417                self.fit_panel.SetSelection(current_page_index) 
     418 
    380419        except Exception: 
    381420            logger.error("update_custom_combo: %s", sys.exc_value) 
  • src/sas/sasgui/perspectives/invariant/invariant_state.py

    rfa412df re9920cd  
    130130        my_time, date = self.timestamp 
    131131        file_name = self.file 
     132        from sas.sasview.__init__ import __version__ as sasview_version 
    132133 
    133134        state_num = int(self.saved_state['state_num']) 
    134135        state = "\n[Invariant computation for %s: " % file_name 
    135         state += "performed at %s on %s] \n" % (my_time, date) 
     136        state += "performed at %s on %s] " % (my_time, date) 
     137        state += "[SasView v%s]\n" % (sasview_version) 
    136138        state += "State No.: %d \n" % state_num 
    137139        state += "\n=== Inputs ===\n" 
  • src/sas/sasview/local_config.py

    r8ac05a5 r1b4cb41  
    5151'''M. Doucet et al. SasView Version 4.2, Zenodo, 10.5281/zenodo.1412041''' 
    5252_acknowledgement =  \ 
    53 '''This work was originally developed as part of the DANSE project funded by the US NSF under Award DMR-0520547,\n but is currently maintained by a collaboration between UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO, TU Delft, DLS, and the scattering community.\n\n SasView also contains code developed with funding from the EU Horizon 2020 programme under the SINE2020 project (Grant No 654000).\nA list of individual contributors can be found at: http://www.sasview.org/contact.html 
     53'''This work was originally developed as part of the DANSE project funded by the US NSF under Award DMR-0520547,\n but is currently maintained by a collaboration between UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO, TU Delft, DLS, BAM and the scattering community.\n\n SasView also contains code developed with funding from the EU Horizon 2020 programme under the SINE2020 project (Grant No 654000).\nA list of individual contributors can be found at: http://www.sasview.org/contact.html 
    5454''' 
    5555 
     
    7676_tudelft_logo = os.path.join(icon_path, "tudelft_logo.png") 
    7777_dls_logo = os.path.join(icon_path, "dls_logo.png") 
     78_bam_logo = os.path.join(icon_path, "bam_logo.png") 
    7879_nsf_logo = os.path.join(icon_path, "nsf_logo.png") 
    7980_danse_logo = os.path.join(icon_path, "danse_logo.png") 
     
    9495_corner_image = os.path.join(icon_path, "angles_flat.png") 
    9596_welcome_image = os.path.join(icon_path, "SVwelcome.png") 
    96 _copyright = "(c) 2009 - 2018, UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO, TU Delft, and DLS" 
     97_copyright = "(c) 2009 - 2018, UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO, TU Delft, DLS and BAM" 
    9798marketplace_url = "http://marketplace.sasview.org/" 
    9899 
Note: See TracChangeset for help on using the changeset viewer.