Changeset 4547688 in sasview


Ignore:
Timestamp:
Feb 18, 2015 4:33:17 AM (9 years ago)
Author:
butler
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:
69032d4
Parents:
0d9401e (diff), 53df2ea (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:
9 edited

Legend:

Unmodified
Added
Removed
  • build_tools/conda/README.md

    r981a1d4 rcf20539  
    4848# $ conda config --set binstar_upload yes 
    4949``` 
     50 
     51# Useful Links 
     52 
     53* http://conda.pydata.org/docs/build.html 
  • build_tools/conda/pyopencl/bld.bat

    r20b238df rd7ee8b9b  
     1xcopy %RECIPE_DIR%\bin %PREFIX%\DLLs /E 
     2xcopy %RECIPE_DIR%\include %PREFIX%\include /E 
     3xcopy %RECIPE_DIR%\lib %PREFIX%\libs /E 
     4 
     5xcopy %RECIPE_DIR%\bin %PREFIX%\Library\bin /E 
     6xcopy %RECIPE_DIR%\include %PREFIX%\Library\include /E 
     7xcopy %RECIPE_DIR%\lib %PREFIX%\Library\lib /E 
     8 
     9::"%PYTHON%" setup.py build -cmingw32 
     10"%PYTHON%" configure.py 
     11if errorlevel 1 exit 1 
     12"%PYTHON%" setup.py build 
     13if errorlevel 1 exit 1 
    114"%PYTHON%" setup.py install 
    215if errorlevel 1 exit 1 
  • sasview/setup_exe.py

    r61c93b3 rb9fc674  
    280280# Copying the images directory to the distribution directory. 
    281281for f in findall(images_dir): 
    282     if os.path.split(f)[0].count('.svn')==0: 
     282    if not ".svn" in f: 
    283283        data_files.append(("images", [f])) 
    284284 
    285285# Copying the HTML help docs 
    286286for f in findall(media_dir): 
    287     if os.path.split(f)[0].count('.svn')==0: 
     287    if not ".svn" in f: 
    288288        data_files.append(("media", [f])) 
    289289 
    290290# Copying the sample data user data 
    291291for f in findall(test_dir): 
    292     if os.path.split(f)[0].count('.svn')==0: 
     292    if not ".svn" in f: 
    293293        data_files.append(("test", [f])) 
    294          
     294 
     295# See if the documentation has been built, and if so include it. 
     296doc_path = os.path.join(build_path, "doc") 
     297if os.path.exists(doc_path): 
     298    for dirpath, dirnames, filenames in os.walk(doc_path): 
     299        for filename in filenames: 
     300            sub_dir = os.path.join("doc", os.path.relpath(dirpath, doc_path)) 
     301            data_files.append((sub_dir, [os.path.join(dirpath, filename)])) 
     302else: 
     303    raise Exception("You must first build the documentation before creating an installer.") 
     304 
    295305if py26MSdll != None: 
    296306    # install the MSVC 9 runtime dll's into the application folder 
  • src/sas/dataloader/manipulations.py

    r400155b rddc192a  
    623623        phi_values = numpy.zeros(self.nbins_phi) 
    624624        phi_err    = numpy.zeros(self.nbins_phi) 
    625          
    626         # Shift to apply to calculated phi values in order to center first bin at zero 
    627         phi_shift = Pi / self.nbins_phi 
     625     
     626        # Shift to apply to calculated phi values in order to center first bin at zero 
     627        phi_shift = Pi / self.nbins_phi 
    628628 
    629629        for npt in range(len(data)): 
  • src/sas/dataloader/readers/ascii_reader.py

    r79492222 ref3445e2  
    6767                    raise  RuntimeError, "ascii_reader: cannot open %s" % path 
    6868                buff = input_f.read() 
    69                 lines = buff.split('\n') 
    70                  
    71                 #Jae could not find python universal line spliter: 
    72                 #keep the below for now 
    73                 # some ascii data has \r line separator, 
    74                 # try it when the data is on only one long line 
    75                 if len(lines) < 2 : 
    76                     lines = buff.split('\r') 
     69                lines = buff.splitlines() 
    7770                  
    7871                x  = numpy.zeros(0) 
     
    8174                dx = numpy.zeros(0) 
    8275                 
    83                #temp. space to sort data 
     76                #temp. space to sort data 
    8477                tx  = numpy.zeros(0) 
    8578                ty  = numpy.zeros(0) 
     
    220213                                pass 
    221214                             
    222                         x = numpy.append(x, _x)  
     215                        x = numpy.append(x, _x) 
    223216                        y = numpy.append(y, _y) 
    224217                         
     
    294287                        i += 1 
    295288                    except: 
    296  
    297289                        # It is data and meet non - number, then stop reading 
    298290                        if is_data == True: 
  • test/sasdataloader/test/utest_averaging.py

    r35ec279 ref3445e2  
    105105        r = Ring(r_min=.005, r_max=.01,  
    106106                 center_x=self.data.detector[0].beam_center.x,  
    107                  center_y=self.data.detector[0].beam_center.y) 
    108         r.nbins_phi = 20 
     107                 center_y=self.data.detector[0].beam_center.y, 
     108                 nbins = 20) 
     109        ##r.nbins_phi = 20 
    109110         
    110111        o = r(self.data) 
    111112        answer = Loader().load('ring_testdata.txt') 
    112         for i in range(r.nbins_phi): 
    113             self.assertAlmostEqual(o.x[i], answer.x[i], 4) 
    114             self.assertAlmostEqual(o.y[i], answer.y[i], 4) 
    115             self.assertAlmostEqual(o.dy[i], answer.dy[i], 4) 
     113         
     114        for i in range(r.nbins_phi - 1): 
     115            self.assertAlmostEqual(o.x[i + 1], answer.x[i], 4) 
     116            self.assertAlmostEqual(o.y[i + 1], answer.y[i], 4) 
     117            self.assertAlmostEqual(o.dy[i + 1], answer.dy[i], 4) 
    116118             
    117119    def test_circularavg(self): 
     
    194196        import math 
    195197         
    196         r = SectorPhi(r_min=.005, r_max=.01, phi_min=0, phi_max=math.pi*2.0) 
    197         r.nbins_phi = 20 
     198        r = SectorPhi(r_min=.005, 
     199                      r_max=.01, 
     200                      phi_min=0.15707963, 
     201                      phi_max=math.pi*2.-0.15707963, 
     202                      nbins=19) 
    198203        o = r(self.data) 
    199204 
  • src/sas/guiframe/gui_manager.py

    r4d5c42f r707c6be  
    21642164        from documentation_window import DocumentationWindow 
    21652165         
    2166         sphinx_doc_viewer = DocumentationWindow(self, -1, "index.html") 
    2167 #        sphinx_doc_viewer.Show() 
    2168  
     2166        sphinx_doc_viewer = DocumentationWindow(self, -1, "index.html", \ 
     2167                                                "General Help") 
    21692168 
    21702169    def set_manager(self, manager): 
  • src/sas/guiframe/local_perspectives/data_loader/data_loader.py

    rb45cde3 r8729965  
    5757        Show a general help dialog.  
    5858        """ 
    59         from help_panel import  HelpWindow 
    60         frame = HelpWindow(None, -1)  
    61         if hasattr(frame, "IsIconized"): 
    62             if not frame.IsIconized(): 
    63                 try: 
    64                     icon = self.parent.GetIcon() 
    65                     frame.SetIcon(icon) 
    66                 except: 
    67                     pass   
    68         frame.Show(True) 
     59#        from documentation_window import DocumentationWindow      
     60#        _sphinx_doc_viewer = DocumentationWindow(self, -1, "/user/guiframe/ \ 
     61#            data_explorer_help.html", "DataLoader Help") 
     62#        from help_panel import  HelpWindow 
     63#        frame = HelpWindow(None, -1)  
     64#        if hasattr(frame, "IsIconized"): 
     65#            if not frame.IsIconized(): 
     66#                try: 
     67#                    icon = self.parent.GetIcon() 
     68#                    frame.SetIcon(icon) 
     69#                except: 
     70#                    pass   
     71#        frame.Show(True) 
    6972         
    7073    def populate_file_menu(self): 
  • src/sas/perspectives/fitting/basepage.py

    r6e653582 r0d9401e  
    18611861                              [max_state, max_value], unit]) 
    18621862            
    1863 #    The following funcion seems to be superseded with fillsizer and  
    1864 #    init combo box.  certainly it seems not to know about categories and uses  
    1865 #    only shapes and shape independent -- tested after commenting out and does 
    1866 #    not seem to cause problem.  Leave commented out for now but delete in 
    1867 #    a code cleanup once clear it really is no longer used. 
    1868 #    PDB  8 April 2014 
    1869  
    1870 #    def _set_model_sizer_selection(self, model): 
    1871 #        """ 
    1872 #        Display the sizer according to the type of the current model 
    1873 #        """ 
    1874 #        if model == None: 
    1875 #            return 
    1876 #        if hasattr(model, "s_model"): 
    1877 #             
    1878 #            class_name = model.s_model.__class__ 
    1879 #            name = model.s_model.name 
    1880 #            flag = (name != "NoStructure") 
    1881 #            if flag and \ 
    1882 #                (class_name in self.model_list_box["Structure Factors"]): 
    1883 #                self.structurebox.Show() 
    1884 #                self.text2.Show() 
    1885 #                self.structurebox.Enable() 
    1886 #               self.text2.Enable() 
    1887  #               items = self.structurebox.GetItems() 
    1888  #               self.sizer1.Layout() 
    1889  #                
    1890  #               for i in range(len(items)): 
    1891  #                   if items[i] == str(name): 
    1892  #                       self.structurebox.SetSelection(i) 
    1893  #                       break 
    1894  #                    
    1895  #       if hasattr(model, "p_model"): 
    1896  #           class_name = model.p_model.__class__ 
    1897  #           name = model.p_model.name 
    1898  #           self.formfactorbox.Clear() 
    1899  #            
    1900  #           for k, list in self.model_list_box.iteritems(): 
    1901  #               if k in["P(Q)*S(Q)", "Shapes"] and \ 
    1902  #                   class_name in self.model_list_box["Shapes"]: 
    1903  #                   self.shape_rbutton.SetValue(True) 
    1904  #                   ## fill the form factor list with new model 
    1905  #                   self._populate_box(self.formfactorbox, 
    1906  #                                      self.model_list_box["Shapes"]) 
    1907  #                   items = self.formfactorbox.GetItems() 
    1908  #                   ## set comboxbox to the selected item 
    1909  #                   for i in range(len(items)): 
    1910  #                       if items[i] == str(name): 
    1911  #                           self.formfactorbox.SetSelection(i) 
    1912  #                           break 
    1913  #                   return 
    1914  #               elif k == "Shape-Independent": 
    1915  #                   self.shape_indep_rbutton.SetValue(True) 
    1916  #               elif k == "Structure Factors": 
    1917  #                   self.struct_rbutton.SetValue(True) 
    1918  #               elif k == "Multi-Functions": 
    1919  #                   continue 
    1920  #               else: 
    1921  #                   self.plugin_rbutton.SetValue(True) 
    1922  #               
    1923  #               if class_name in list: 
    1924  #                   ## fill the form factor list with new model 
    1925  #                   self._populate_box(self.formfactorbox, list) 
    1926  #                   items = self.formfactorbox.GetItems() 
    1927  #                   ## set comboxbox to the selected item 
    1928  #                   for i in range(len(items)): 
    1929  #                       if items[i] == str(name): 
    1930  #                           self.formfactorbox.SetSelection(i) 
    1931  #                           break 
    1932  #                   break 
    1933  #       else: 
    1934             ## Select the model from the menu 
    1935 #            class_name = model.__class__ 
    1936 #            name = model.name 
    1937 #            self.formfactorbox.Clear() 
    1938 #            items = self.formfactorbox.GetItems() 
    1939 #     
    1940 #            for k, list in self.model_list_box.iteritems(): 
    1941 #                if k in["P(Q)*S(Q)", "Shapes"] and \ 
    1942 #                    class_name in self.model_list_box["Shapes"]: 
    1943 #                    if class_name in self.model_list_box["P(Q)*S(Q)"]: 
    1944 #                        self.structurebox.Show() 
    1945 #                        self.text2.Show() 
    1946 #                       self.structurebox.Enable() 
    1947 #                       self.structurebox.SetSelection(0) 
    1948 #                       self.text2.Enable() 
    1949 #                   else: 
    1950 #                        self.structurebox.Hide() 
    1951 #                        self.text2.Hide() 
    1952 #                        self.structurebox.Disable() 
    1953 #                        self.structurebox.SetSelection(0) 
    1954 #                        self.text2.Disable() 
    1955 #                         
    1956 #                    self.shape_rbutton.SetValue(True) 
    1957                     ## fill the form factor list with new model 
    1958 #                    self._populate_box(self.formfactorbox, 
    1959 #                                       self.model_list_box["Shapes"]) 
    1960 #                    items = self.formfactorbox.GetItems() 
    1961 #                    ## set comboxbox to the selected item 
    1962 #                    for i in range(len(items)): 
    1963 #                        if items[i] == str(name): 
    1964 #                            self.formfactorbox.SetSelection(i) 
    1965 #                            break 
    1966 #                    return 
    1967 #                elif k == "Shape-Independent": 
    1968 #                    self.shape_indep_rbutton.SetValue(True) 
    1969 #                elif k == "Structure Factors": 
    1970 #                    self.struct_rbutton.SetValue(True) 
    1971 #                elif k == "Multi-Functions": 
    1972 #                    continue 
    1973 #                else: 
    1974 #                    self.plugin_rbutton.SetValue(True) 
    1975 #                if class_name in list: 
    1976 #                    self.structurebox.SetSelection(0) 
    1977 #                    self.structurebox.Disable() 
    1978 #                    self.text2.Disable() 
    1979                     ## fill the form factor list with new model 
    1980 #                    self._populate_box(self.formfactorbox, list) 
    1981 #                    items = self.formfactorbox.GetItems() 
    1982                     ## set comboxbox to the selected item 
    1983 #                    for i in range(len(items)): 
    1984 #                        if items[i] == str(name): 
    1985 #                            self.formfactorbox.SetSelection(i) 
    1986 #                            break 
    1987 #                    break 
    19881863                 
    19891864    def _draw_model(self, update_chisqr=True, source='model'): 
     
    30432918    def on_model_help_clicked(self, event): 
    30442919        """ 
    3045         on 'More details' button 
     2920        Function called when 'Details' button is pressed next to model 
     2921        of interest.  As of Feb 2015 this function follows two paths: 
     2922        For regular models that ship with the release, it calls the Sphinx 
     2923        generated html documentation.  For plugin models it still uses the 
     2924        old pop up window reading the description provided in the model. 
     2925         
     2926        This will presumably be deprecated when the sas mdels team decides 
     2927        on how to discover new models and grab their documentation from the 
     2928        file. 
     2929         
     2930        PDB 18 Feb 2015 
     2931         
     2932        :param evt: on Details Button pressed event 
    30462933        """ 
    30472934        from sas.perspectives.fitting.help_panel import  HelpWindow 
     
    30522939        model_path = os.path.join(path, "model_functions.html") 
    30532940        if self.model == None: 
    3054             name = 'FuncHelp' 
     2941            name = 'index.html' 
    30552942        else: 
    30562943            name = self.formfactorbox.GetValue() 
    30572944        frame = HelpWindow(None, -1, pageToOpen=model_path) 
    3058         # If model name exists and model is not a custom model 
     2945        #If model name exists and model is not a custom model 
    30592946        #mod_cat = self.categorybox.GetStringSelection() 
    30602947        if frame.rhelp.HasAnchor(name): 
     
    31313018    def on_pd_help_clicked(self, event): 
    31323019        """ 
    3133         Button event for PD help 
    3134         """ 
    3135         from help_panel import  HelpWindow 
    3136         import sas.models as models 
    3137          
    3138         # Get models help model_function path 
    3139         path = models.get_data_path(media='media') 
    3140         pd_path = os.path.join(path, "pd_help.html") 
    3141  
    3142         frame = HelpWindow(None, -1, pageToOpen=pd_path) 
    3143         frame.Show(True) 
     3020        Bring up Polydispersit Documentation whenever the ? button is clicked.  
     3021        Calls DocumentationWindow with the path of the location within the 
     3022        documentation tree (after /doc/ ...." 
     3023         
     3024        :param evt: Triggers on clicking ? in polydispersity box 
     3025        """ 
     3026         
     3027        from sas.guiframe.documentation_window import DocumentationWindow 
     3028         
     3029        _TreeLocation = "user/perspectives/fitting/fitting_help.html" 
     3030        _TreeLocation += "#polydispersity-distributions" 
     3031        _doc_viewer = DocumentationWindow(self, -1, \ 
     3032             _TreeLocation,"Polydispersity Help") 
    31443033         
    31453034    def on_left_down(self, event): 
Note: See TracChangeset for help on using the changeset viewer.