Changeset d1520fc in sasview


Ignore:
Timestamp:
Feb 13, 2018 12:15:53 PM (7 years ago)
Author:
GitHub <noreply@…>
Parents:
61bfd36 (diff), 9592c6f (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.
git-author:
Jeff Krzywon <krzywon@…> (02/13/18 12:15:53)
git-committer:
GitHub <noreply@…> (02/13/18 12:15:53)
Message:

Merge 9592c6fe2e6d97a1a1f2c24d361c096926db6c57 into 61bfd3677b70fdddc3b49008cbc8a8713a2baaa2

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/dataloader/loader.py

    rdc8d1c2 r9592c6f  
    5454        self.wildcards = ['All (*.*)|*.*'] 
    5555 
     56        # Deprecated extensions 
     57        self.deprecated_extensions = ['.asc', '.nxs'] 
     58 
    5659        # Creation time, for testing 
    5760        self._created = time.time() 
     
    7376        # Gets set to a string if the file has an associated reader that fails 
    7477        msg_from_reader = None 
     78        extlist = [ext for ext in self.deprecated_extensions if 
     79                   path.lower().endswith(ext)] 
     80        if extlist: 
     81            msg = ("\rThe file you are attempting to load, {}, is no longer " 
     82                   "loadable by SasView. The file extension suggests the data " 
     83                   "set is in pixel space. SasView will no longer reduce raw da" 
     84                   "ta sets. Please provide fully reduced data in Q space. No a" 
     85                   "ttempt to load the data has been made." 
     86                   .format(path)) 
     87            raise RuntimeError(msg) 
    7588        try: 
    7689            return super(Registry, self).load(path, format=format) 
  • docs/sphinx-docs/source/user/marketplace.rst

    r59dfb53 r1eb86a5  
    66plug-in fitting models for *SasView* for all to use. 
    77 
    8 .. note:: These plug-in models require SasView version 4.0 or later. 
     8.. note::  
     9    These plug-in models require SasView version 4.0 or later. However,  
     10    not *all* models may work with *every* version of SasView because  
     11    of changes to our API. 
    912 
    1013Contributed models should be written in Python (only version 2.7.x is 
     
    1215combination of Python and C. You only need to upload the .py/.c source 
    1316code files to the Marketplace! 
     17 
     18Please put a comment in your code to indicate which version of SasView you  
     19wrote the model for. 
    1420 
    1521For guidance on how to write a plugin model see :ref:`Writing_a_Plugin` . It 
  • src/sas/sasgui/guiframe/media/data_formats_help.rst

    r959eb01 r1eb86a5  
    2828 
    2929*  .TXT 
    30 *  .ASC 
    3130*  .DAT 
    3231*  .XML (in canSAS format v1.0 and 1.1) 
     32*  .H5  (as NeXus NXcanSAS only) 
     33*  .NXS (as NeXus NXcanSAS only) 
     34 
     35.. note:: 
     36    From SasView version 4.2 onwards files written in the NIST .ASC format are no longer read. This is because that  
     37    format normally represents *raw* and not reduced data. 
    3338 
    3439If using CSV output from, for example, a spreadsheet, ensure that it is not using commas as delimiters for thousands. 
     
    4045 
    4146For a description of the ISIS 1D format see: 
    42 http://www.isis.stfc.ac.uk/instruments/loq/software/colette-ascii-file-format-descriptions9808.pdf 
     47https://www.isis.stfc.ac.uk/Pages/colette-ascii-file-format-descriptions.pdf 
    4348 
    4449For a description of the NXcanSAS format see: 
     
    5863-------------- 
    5964 
    60 SasView will read ASCII ('text') files in the NIST 2D format (with the extensions .ASC or .DAT) or files in the NeXus NXcanSAS (HDF5) format (with the extension .H5). File extensions are not case-sensitive. Both of these formats are written by the `Mantid Framework <http://www.mantidproject.org/>`_. 
     65SasView will read ASCII ('text') files in the NIST 2D format (with the extension .DAT) or files in the NeXus NXcanSAS (HDF5) format (with the extension .H5 or .NXS). File extensions are not case-sensitive. Both of these formats are written by the `Mantid Framework <http://www.mantidproject.org/>`_. 
    6166 
    6267Most of the header lines in the NIST 2D format can actually be removed except the last line, and only the first three columns (*Qx, Qy,* and *I(Qx,Qy)*) are actually required. 
     68 
     69.. note:: 
     70    From SasView version 4.2 onwards files written in the NIST .ASC format are no longer read. This is because that  
     71    format normally represents *raw* and not reduced data. 
     72 
     73.. note:: 
     74    SasView does not read the standard NeXus format, only the NXcanSAS subset.  
    6375 
    6476The SasView :ref:`File_Converter_Tool` available in SasView 4.1 onwards can be used to convert data sets in the 2D BSL/OTOKO format into the NeXus NXcanSAS (HDF5) format. 
  • src/sas/sasgui/perspectives/calculator/calculator.py

    r235f514 r61bfd36  
    8686                ("Generic Scattering Calculator", 
    8787                        gensas_help, self.on_gen_model), 
     88                ("Orientation Viewer", "Show 3-D view of oriented shape", self.on_show_orientation), 
    8889                ("Python Shell/Editor", pyconsole_help, self.on_python_console), 
    8990                ("Image Viewer", imageviewer_help, self.on_image_viewer), ] 
     
    190191            self.gen_frame.Show(False) 
    191192        self.gen_frame.Show(True) 
     193 
     194    def on_show_orientation(self, event): 
     195        """ 
     196        Make sasmodels orientation & jitter viewer available 
     197        """ 
     198        from sasmodels.jitter import run 
     199        run() 
    192200 
    193201    def on_image_viewer(self, event): 
  • src/sas/sasgui/perspectives/file_converter/media/file_converter_help.rst

    r59decb81 rfafb396  
    1919    or with a comma or semi-colon delimiter 
    2020*   2D `ISIS ASCII formatted 
    21     <http://www.isis.stfc.ac.uk/instruments/loq/software/ 
    22     colette-ascii-file-format-descriptions9808.pdf>`_ data 
     21    <https://www.isis.stfc.ac.uk/Pages/colette-ascii-file-format-descriptions.pdf>`_ data 
    2322*   `1D BSL/OTOKO format 
    2423    <http://www.diamond.ac.uk/Beamlines/Soft-Condensed-Matter/small-angle/ 
  • src/sas/sasgui/perspectives/fitting/basepage.py

    r58a8f76 r1f4d708  
    13671367            except Exception: 
    13681368                logger.error(traceback.format_exc()) 
    1369             selection = self._find_polyfunc_selection(disp_model) 
     1369            index, selection = self._find_polyfunc_selection(disp_model) 
    13701370            for list in self.fittable_param: 
    13711371                if list[1] == key and list[7] is not None: 
    1372                     list[7].SetSelection(selection) 
     1372                    list[7].SetSelection(index) 
    13731373                    # For the array disp_model, set the values and weights 
    1374                     if selection == 1: 
     1374                    if selection == 'array': 
    13751375                        disp_model.set_weights(self.values[key], 
    13761376                                               self.weights[key]) 
     
    13851385                            logger.error(traceback.format_exc()) 
    13861386            # For array, disable all fixed params 
    1387             if selection == 1: 
     1387            if selection == 'array': 
    13881388                for item in self.fixed_param: 
    13891389                    if item[1].split(".")[0] == key.split(".")[0]: 
     
    26682668    def _find_polyfunc_selection(self, disp_func=None): 
    26692669        """ 
    2670         FInd Comboox selection from disp_func 
     2670        Find Combobox selection from disp_func 
    26712671 
    26722672        :param disp_function: dispersion distr. function 
     
    26752675        if disp_func is not None: 
    26762676            try: 
    2677                 return POLYDISPERSITY_MODELS.values().index(disp_func.__class__) 
     2677                return (list(POLYDISPERSITY_MODELS).index(disp_func.type), 
     2678                       disp_func.type) 
    26782679            except ValueError: 
    26792680                pass  # Fall through to default class 
    2680         return POLYDISPERSITY_MODELS.keys().index('gaussian') 
     2681        return (list(POLYDISPERSITY_MODELS).index('gaussian'), 'gaussian') 
    26812682 
    26822683    def on_reset_clicked(self, event): 
Note: See TracChangeset for help on using the changeset viewer.