Changes in / [5c44f33:3342eb3] in sasview


Ignore:
Files:
1 added
12 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • build_tools/conda/README.md

    rcf20539 r981a1d4  
    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

    rd7ee8b9b r20b238df  
    1 xcopy %RECIPE_DIR%\bin %PREFIX%\DLLs /E 
    2 xcopy %RECIPE_DIR%\include %PREFIX%\include /E 
    3 xcopy %RECIPE_DIR%\lib %PREFIX%\libs /E 
    4  
    5 xcopy %RECIPE_DIR%\bin %PREFIX%\Library\bin /E 
    6 xcopy %RECIPE_DIR%\include %PREFIX%\Library\include /E 
    7 xcopy %RECIPE_DIR%\lib %PREFIX%\Library\lib /E 
    8  
    9 ::"%PYTHON%" setup.py build -cmingw32 
    10 "%PYTHON%" configure.py 
    11 if errorlevel 1 exit 1 
    12 "%PYTHON%" setup.py build 
    13 if errorlevel 1 exit 1 
    141"%PYTHON%" setup.py install 
    152if errorlevel 1 exit 1 
  • build_tools/conda/pyopencl/meta.yaml

    r0037131 r20b238df  
    3838  run: 
    3939    - python 
    40     - setuptools 
    4140    - numpy 
    4241    - pytools >=2014.2 
  • sasview/setup_exe.py

    r42811b8 r61c93b3  
    280280# Copying the images directory to the distribution directory. 
    281281for f in findall(images_dir): 
    282     if not ".svn" in f: 
     282    if os.path.split(f)[0].count('.svn')==0: 
    283283        data_files.append(("images", [f])) 
    284284 
    285285# Copying the HTML help docs 
    286286for f in findall(media_dir): 
    287     if not ".svn" in f: 
     287    if os.path.split(f)[0].count('.svn')==0: 
    288288        data_files.append(("media", [f])) 
    289289 
    290290# Copying the sample data user data 
    291291for f in findall(test_dir): 
    292     if not ".svn" in f: 
     292    if os.path.split(f)[0].count('.svn')==0: 
    293293        data_files.append(("test", [f])) 
    294  
    295 # See if the documentation has been built, and if so include it. 
    296 doc_path = os.path.join(build_path, "doc") 
    297 if 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)])) 
    302 else: 
    303     raise Exception("You must first build the documentation before creating an installer.") 
    304  
     294         
    305295if py26MSdll != None: 
    306296    # install the MSVC 9 runtime dll's into the application folder 
     
    333323    ]) 
    334324#packages.append('IPython') 
    335 includes = ['site','lxml._elementpath', 'lxml.etree'] 
     325includes = ['site'] 
    336326 
    337327# Exclude packages that are not needed but are often found on build systems 
  • src/sas/dataloader/manipulations.py

    rddc192a r400155b  
    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

    ref3445e2 r79492222  
    6767                    raise  RuntimeError, "ascii_reader: cannot open %s" % path 
    6868                buff = input_f.read() 
    69                 lines = buff.splitlines() 
     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') 
    7077                  
    7178                x  = numpy.zeros(0) 
     
    7481                dx = numpy.zeros(0) 
    7582                 
    76                 #temp. space to sort data 
     83               #temp. space to sort data 
    7784                tx  = numpy.zeros(0) 
    7885                ty  = numpy.zeros(0) 
     
    213220                                pass 
    214221                             
    215                         x = numpy.append(x, _x) 
     222                        x = numpy.append(x, _x)  
    216223                        y = numpy.append(y, _y) 
    217224                         
     
    287294                        i += 1 
    288295                    except: 
     296 
    289297                        # It is data and meet non - number, then stop reading 
    290298                        if is_data == True: 
  • src/sas/fit/ScipyFitting.py

    ra10364b rfd5ac0d  
    115115            low,high = model.details[p][1:3] 
    116116            if low is not None and numpy.isfinite(low): 
    117                 if value == 0: 
     117                if p.value == 0: 
    118118                    # This value works on Scipy 
    119119                    # Do not change numbers below 
  • src/sas/guiframe/documentation_window.py

    r9afc543 ra4340d1  
    99else: 
    1010    import wx.html as html 
    11 from gui_manager import get_app_dir 
    1211 
    13 PATH_APP = get_app_dir()  
    14  
     12    
    1513class DocumentationWindow(Frame): 
    16     def __init__(self, parent, id, path, title, size=(850, 540)): 
     14    def __init__(self, parent, id, path, title='Help', size=(850, 540)): 
    1715        Frame.__init__(self, parent, id, title, size=size) 
    1816 
     
    2119            docs_path = os.path.join(os.environ[SPHINX_DOC_ENV]) 
    2220        else: 
    23             # For the installer, docs are in a top-level directory.  We're not 
    24             # bothering to worry about docs when running using the old 
    25             # (non - run.py) way. 
    26             docs_path = os.path.join(PATH_APP, "doc") 
     21            docs_path = os.path.join(PATH_APP, "..", "..", "doc") 
    2722 
    28         if not os.path.exists(docs_path): 
     23        if (not os.path.exists(docs_path)): 
     24            print "logging" 
    2925            logging.error("Could not find Sphinx documentation at %s \ 
    3026            -- has it been built?", docs_path) 
     
    4238 
    4339            webbrowser.open_new_tab("file:///" + docs_path + "/" + path) 
    44             print ("file:///" + docs_path + "/" + path) 
    4540 
    4641  
  • src/sas/guiframe/gui_manager.py

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

    r8729965 rb45cde3  
    5757        Show a general help dialog.  
    5858        """ 
    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) 
     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) 
    7269         
    7370    def populate_file_menu(self): 
  • src/sas/perspectives/fitting/basepage.py

    r4380c03 r6e653582  
    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 
    18631988                 
    18641989    def _draw_model(self, update_chisqr=True, source='model'): 
     
    29183043    def on_model_help_clicked(self, event): 
    29193044        """ 
    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 
     3045        on 'More details' button 
    29333046        """ 
    29343047        from sas.perspectives.fitting.help_panel import  HelpWindow 
     
    29393052        model_path = os.path.join(path, "model_functions.html") 
    29403053        if self.model == None: 
    2941             name = 'index.html' 
     3054            name = 'FuncHelp' 
    29423055        else: 
    29433056            name = self.formfactorbox.GetValue() 
    29443057        frame = HelpWindow(None, -1, pageToOpen=model_path) 
    2945         #If model name exists and model is not a custom model 
     3058        # If model name exists and model is not a custom model 
    29463059        #mod_cat = self.categorybox.GetStringSelection() 
    29473060        if frame.rhelp.HasAnchor(name): 
     
    29633076    def _on_mag_help(self, event):     
    29643077        """ 
    2965         Bring up Magnetic Angle definition bmp image whenever the ? button  
    2966         is clicked. Calls DocumentationWindow with the path of the location  
    2967         within the documentation tree (after /doc/ ....". When using old  
    2968         versions of Wx When (i.e. before 2.9 and therefore not part of release 
    2969         versions distributed via installer) it brings up an image viewer 
    2970         box which allows the user to click through the rest of the images in  
    2971         the directory.  Not ideal but probably better than alternative which 
    2972         would bring up the entire discussion of how magnetic models work?  
    2973         Specially since it is not likely to be accessed.  The normal release 
    2974         versions bring up the normal image box. 
    2975          
    2976         :param evt: Triggers on clicking ? in Magnetic Angles? box 
    2977         """ 
    2978          
    2979         from sas.guiframe.documentation_window import DocumentationWindow 
    2980          
    2981         _TreeLocation = "_images/M_angles_pic.bmp" 
    2982         _doc_viewer = DocumentationWindow(self, -1, \ 
    2983              _TreeLocation,"Magnetic Angle Defintions") 
    2984   
     3078        Magnetic angles help panel 
     3079        """ 
     3080        from sas.perspectives.fitting.help_panel import  HelpWindow 
     3081        # Get models help model_function path 
     3082        #import sas.perspectives.fitting as fitmedia 
     3083        from sas.models import get_data_path 
     3084 
     3085        media = get_data_path(media='media') 
     3086        path = os.path.join(media, "mag_pic.html")  
     3087        name = "Polar/Magnetic Angles" 
     3088        frame = HelpWindow(None, -1,   
     3089                           title=' Help: Polarization/Magnetization Angles',   
     3090                           pageToOpen=path, size=(865, 450))    
     3091        try:  
     3092            frame.splitter.DetachWindow(frame.lpanel) 
     3093            # Display only the right side one 
     3094            frame.lpanel.Hide()  
     3095            frame.Show(True) 
     3096        except: 
     3097            frame.Destroy()  
     3098            msg = 'Display Error\n' 
     3099            info = "Info" 
     3100            wx.MessageBox(msg, info) 
     3101 
    29853102    def _on_mag_on(self, event):     
    29863103        """ 
     
    30143131    def on_pd_help_clicked(self, event): 
    30153132        """ 
    3016         Bring up Polydispersity Documentation whenever the ? button is clicked.  
    3017         Calls DocumentationWindow with the path of the location within the 
    3018         documentation tree (after /doc/ ....".  Note that when using old  
    3019         versions of Wx (before 2.9) and thus not the release version of  
    3020         istallers, the help comes up at the top level of the file as  
    3021         webbrowser does not pass anything past the # to the browser when it is 
    3022         running "file:///...." 
    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") 
     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) 
    30333144         
    30343145    def on_left_down(self, event): 
  • src/sas/perspectives/fitting/models.py

    r6f82ba1 rb9a5f0e  
    310310 
    311311        # regular model names only 
    312         try: 
    313             self.model_name_list = [] 
    314             from sas.models.SphereModel import SphereModel 
    315             self.model_dictionary[SphereModel.__name__] = SphereModel 
    316             #        self.shape_list.append(SphereModel) 
    317             self.multiplication_factor.append(SphereModel) 
    318             self.model_name_list.append(SphereModel.__name__) 
    319         except: 
    320             pass 
    321  
    322         try: 
    323             from sas.models.BinaryHSModel import BinaryHSModel 
    324             self.model_dictionary[BinaryHSModel.__name__] = BinaryHSModel 
    325             #        self.shape_list.append(BinaryHSModel) 
    326             self.model_name_list.append(BinaryHSModel.__name__) 
    327         except: 
    328             pass 
    329  
    330         try: 
    331             from sas.models.FuzzySphereModel import FuzzySphereModel 
    332             self.model_dictionary[FuzzySphereModel.__name__] = FuzzySphereModel 
    333             #        self.shape_list.append(FuzzySphereModel) 
    334             self.multiplication_factor.append(FuzzySphereModel) 
    335             self.model_name_list.append(FuzzySphereModel.__name__) 
    336         except: 
    337             pass 
    338  
    339         try: 
    340             from sas.models.RaspBerryModel import RaspBerryModel 
    341             self.model_dictionary[RaspBerryModel.__name__] = RaspBerryModel 
    342             #        self.shape_list.append(RaspBerryModel) 
    343             self.model_name_list.append(RaspBerryModel.__name__) 
    344         except: 
    345             pass 
    346  
    347         try: 
    348             from sas.models.CoreShellModel import CoreShellModel 
    349  
    350             self.model_dictionary[CoreShellModel.__name__] = CoreShellModel 
    351             #        self.shape_list.append(CoreShellModel) 
    352             self.multiplication_factor.append(CoreShellModel) 
    353             self.model_name_list.append(CoreShellModel.__name__) 
    354         except: 
    355             pass 
    356  
    357         try: 
    358             from sas.models.Core2ndMomentModel import Core2ndMomentModel 
    359             self.model_dictionary[Core2ndMomentModel.__name__] = Core2ndMomentModel 
    360             #        self.shape_list.append(Core2ndMomentModel) 
    361             self.model_name_list.append(Core2ndMomentModel.__name__) 
    362         except: 
    363             pass 
    364  
    365         try: 
    366             from sas.models.CoreMultiShellModel import CoreMultiShellModel 
    367             self.model_dictionary[CoreMultiShellModel.__name__] = CoreMultiShellModel 
    368             #        self.shape_list.append(CoreMultiShellModel) 
    369             self.multiplication_factor.append(CoreMultiShellModel) 
    370             self.multi_func_list.append(CoreMultiShellModel) 
    371         except: 
    372             pass 
    373  
    374         try: 
    375             from sas.models.VesicleModel import VesicleModel 
    376             self.model_dictionary[VesicleModel.__name__] = VesicleModel 
    377             #        self.shape_list.append(VesicleModel) 
    378             self.multiplication_factor.append(VesicleModel) 
    379             self.model_name_list.append(VesicleModel.__name__) 
    380         except: 
    381             pass 
    382  
    383         try: 
    384             from sas.models.MultiShellModel import MultiShellModel 
    385             self.model_dictionary[MultiShellModel.__name__] = MultiShellModel 
    386             #        self.shape_list.append(MultiShellModel) 
    387             self.multiplication_factor.append(MultiShellModel) 
    388             self.model_name_list.append(MultiShellModel.__name__) 
    389         except: 
    390             pass 
    391  
    392         try: 
    393             from sas.models.OnionExpShellModel import OnionExpShellModel 
    394             self.model_dictionary[OnionExpShellModel.__name__] = OnionExpShellModel 
    395             #        self.shape_list.append(OnionExpShellModel) 
    396             self.multiplication_factor.append(OnionExpShellModel) 
    397             self.multi_func_list.append(OnionExpShellModel) 
    398         except: 
    399             pass 
    400  
    401         try: 
    402             from sas.models.SphericalSLDModel import SphericalSLDModel 
    403  
    404             self.model_dictionary[SphericalSLDModel.__name__] = SphericalSLDModel 
    405             #        self.shape_list.append(SphericalSLDModel) 
    406             self.multiplication_factor.append(SphericalSLDModel) 
    407             self.multi_func_list.append(SphericalSLDModel) 
    408         except: 
    409             pass 
    410  
    411         try: 
    412             from sas.models.LinearPearlsModel import LinearPearlsModel 
    413  
    414             self.model_dictionary[LinearPearlsModel.__name__] = LinearPearlsModel 
    415             #        self.shape_list.append(LinearPearlsModel) 
    416             self.model_name_list.append(LinearPearlsModel.__name__) 
    417         except: 
    418             pass 
    419  
    420         try: 
    421             from sas.models.PearlNecklaceModel import PearlNecklaceModel 
    422  
    423             self.model_dictionary[PearlNecklaceModel.__name__] = PearlNecklaceModel 
    424             #        self.shape_list.append(PearlNecklaceModel) 
    425             self.model_name_list.append(PearlNecklaceModel.__name__) 
    426         except: 
    427             pass 
    428  
    429         try: 
    430             from sas.models.CylinderModel import CylinderModel 
    431  
    432             self.model_dictionary[CylinderModel.__name__] = CylinderModel 
    433             #        self.shape_list.append(CylinderModel) 
    434             self.multiplication_factor.append(CylinderModel) 
    435             self.model_name_list.append(CylinderModel.__name__) 
    436         except: 
    437             pass 
    438  
    439         try: 
    440             from sas.models.CoreShellCylinderModel import CoreShellCylinderModel 
    441  
    442             self.model_dictionary[CoreShellCylinderModel.__name__] = CoreShellCylinderModel 
    443             #        self.shape_list.append(CoreShellCylinderModel) 
    444             self.multiplication_factor.append(CoreShellCylinderModel) 
    445             self.model_name_list.append(CoreShellCylinderModel.__name__) 
    446         except: 
    447             pass 
    448  
    449         try: 
    450             from sas.models.CoreShellBicelleModel import CoreShellBicelleModel 
    451  
    452             self.model_dictionary[CoreShellBicelleModel.__name__] = CoreShellBicelleModel 
    453             #        self.shape_list.append(CoreShellBicelleModel) 
    454             self.multiplication_factor.append(CoreShellBicelleModel) 
    455             self.model_name_list.append(CoreShellBicelleModel.__name__) 
    456         except: 
    457             pass 
    458  
    459         try: 
    460             from sas.models.HollowCylinderModel import HollowCylinderModel 
    461  
    462             self.model_dictionary[HollowCylinderModel.__name__] = HollowCylinderModel 
    463             #        self.shape_list.append(HollowCylinderModel) 
    464             self.multiplication_factor.append(HollowCylinderModel) 
    465             self.model_name_list.append(HollowCylinderModel.__name__) 
    466         except: 
    467             pass 
    468  
    469         try: 
    470             from sas.models.FlexibleCylinderModel import FlexibleCylinderModel 
    471  
    472             self.model_dictionary[FlexibleCylinderModel.__name__] = FlexibleCylinderModel 
    473             #        self.shape_list.append(FlexibleCylinderModel) 
    474             self.model_name_list.append(FlexibleCylinderModel.__name__) 
    475         except: 
    476             pass 
    477  
    478         try: 
    479             from sas.models.FlexCylEllipXModel import FlexCylEllipXModel 
    480  
    481             self.model_dictionary[FlexCylEllipXModel.__name__] = FlexCylEllipXModel 
    482             #        self.shape_list.append(FlexCylEllipXModel) 
    483             self.model_name_list.append(FlexCylEllipXModel.__name__) 
    484         except: 
    485             pass 
    486  
    487         try: 
    488             from sas.models.StackedDisksModel import StackedDisksModel 
    489  
    490             self.model_dictionary[StackedDisksModel.__name__] = StackedDisksModel 
    491             #        self.shape_list.append(StackedDisksModel) 
    492             self.multiplication_factor.append(StackedDisksModel) 
    493             self.model_name_list.append(StackedDisksModel.__name__) 
    494         except: 
    495             pass 
    496  
    497         try: 
    498             from sas.models.ParallelepipedModel import ParallelepipedModel 
    499  
    500             self.model_dictionary[ParallelepipedModel.__name__] = ParallelepipedModel 
    501             #        self.shape_list.append(ParallelepipedModel) 
    502             self.multiplication_factor.append(ParallelepipedModel) 
    503             self.model_name_list.append(ParallelepipedModel.__name__) 
    504         except: 
    505             pass 
    506  
    507         try: 
    508             from sas.models.CSParallelepipedModel import CSParallelepipedModel 
    509  
    510             self.model_dictionary[CSParallelepipedModel.__name__] = CSParallelepipedModel 
    511             #        self.shape_list.append(CSParallelepipedModel) 
    512             self.multiplication_factor.append(CSParallelepipedModel) 
    513             self.model_name_list.append(CSParallelepipedModel.__name__) 
    514         except: 
    515             pass 
    516  
    517         try: 
    518             from sas.models.EllipticalCylinderModel import EllipticalCylinderModel 
    519  
    520             self.model_dictionary[EllipticalCylinderModel.__name__] = EllipticalCylinderModel 
    521             #        self.shape_list.append(EllipticalCylinderModel) 
    522             self.multiplication_factor.append(EllipticalCylinderModel) 
    523             self.model_name_list.append(EllipticalCylinderModel.__name__) 
    524         except: 
    525             pass 
    526  
    527         try: 
    528             from sas.models.CappedCylinderModel import CappedCylinderModel 
    529  
    530             self.model_dictionary[CappedCylinderModel.__name__] = CappedCylinderModel 
    531             #       self.shape_list.append(CappedCylinderModel) 
    532             self.model_name_list.append(CappedCylinderModel.__name__) 
    533         except: 
    534             pass 
    535  
    536         try: 
    537             from sas.models.EllipsoidModel import EllipsoidModel 
    538  
    539             self.model_dictionary[EllipsoidModel.__name__] = EllipsoidModel 
    540             #        self.shape_list.append(EllipsoidModel) 
    541             self.multiplication_factor.append(EllipsoidModel) 
    542             self.model_name_list.append(EllipsoidModel.__name__) 
    543         except: 
    544             pass 
    545  
    546         try: 
    547             from sas.models.CoreShellEllipsoidModel import CoreShellEllipsoidModel 
    548  
    549             self.model_dictionary[CoreShellEllipsoidModel.__name__] = CoreShellEllipsoidModel 
    550             #        self.shape_list.append(CoreShellEllipsoidModel) 
    551             self.multiplication_factor.append(CoreShellEllipsoidModel) 
    552             self.model_name_list.append(CoreShellEllipsoidModel.__name__) 
    553         except: 
    554             pass 
    555  
    556         try: 
    557             from sas.models.CoreShellEllipsoidXTModel import CoreShellEllipsoidXTModel 
    558  
    559             self.model_dictionary[CoreShellEllipsoidXTModel.__name__] = CoreShellEllipsoidXTModel 
    560             #        self.shape_list.append(CoreShellEllipsoidXTModel) 
    561             self.multiplication_factor.append(CoreShellEllipsoidXTModel) 
    562             self.model_name_list.append(CoreShellEllipsoidXTModel.__name__) 
    563         except: 
    564             pass 
    565  
    566         try: 
    567             from sas.models.TriaxialEllipsoidModel import TriaxialEllipsoidModel 
    568  
    569             self.model_dictionary[TriaxialEllipsoidModel.__name__] = TriaxialEllipsoidModel 
    570             #        self.shape_list.append(TriaxialEllipsoidModel) 
    571             self.multiplication_factor.append(TriaxialEllipsoidModel) 
    572             self.model_name_list.append(TriaxialEllipsoidModel.__name__) 
    573         except: 
    574             pass 
    575  
    576         try: 
    577             from sas.models.LamellarModel import LamellarModel 
    578  
    579             self.model_dictionary[LamellarModel.__name__] = LamellarModel 
    580             #        self.shape_list.append(LamellarModel) 
    581             self.model_name_list.append(LamellarModel.__name__) 
    582         except: 
    583             pass 
    584  
    585         try: 
    586             from sas.models.LamellarFFHGModel import LamellarFFHGModel 
    587  
    588             self.model_dictionary[LamellarFFHGModel.__name__] = LamellarFFHGModel 
    589             #        self.shape_list.append(LamellarFFHGModel) 
    590             self.model_name_list.append(LamellarFFHGModel.__name__) 
    591         except: 
    592             pass 
    593  
    594         try: 
    595             from sas.models.LamellarPSModel import LamellarPSModel 
    596  
    597             self.model_dictionary[LamellarPSModel.__name__] = LamellarPSModel 
    598             #        self.shape_list.append(LamellarPSModel) 
    599             self.model_name_list.append(LamellarPSModel.__name__) 
    600         except: 
    601             pass 
    602  
    603         try: 
    604             from sas.models.LamellarPSHGModel import LamellarPSHGModel 
    605  
    606             self.model_dictionary[LamellarPSHGModel.__name__] = LamellarPSHGModel 
    607             #        self.shape_list.append(LamellarPSHGModel) 
    608             self.model_name_list.append(LamellarPSHGModel.__name__) 
    609         except: 
    610             pass 
    611  
    612         try: 
    613             from sas.models.LamellarPCrystalModel import LamellarPCrystalModel 
    614  
    615             self.model_dictionary[LamellarPCrystalModel.__name__] = LamellarPCrystalModel 
    616             #        self.shape_list.append(LamellarPCrystalModel) 
    617             self.model_name_list.append(LamellarPCrystalModel.__name__) 
    618         except: 
    619             pass 
    620  
    621         try: 
    622             from sas.models.SCCrystalModel import SCCrystalModel 
    623  
    624             self.model_dictionary[SCCrystalModel.__name__] = SCCrystalModel 
    625             #        self.shape_list.append(SCCrystalModel) 
    626             self.model_name_list.append(SCCrystalModel.__name__) 
    627         except: 
    628             pass 
    629  
    630         try: 
    631             from sas.models.FCCrystalModel import FCCrystalModel 
    632  
    633             self.model_dictionary[FCCrystalModel.__name__] = FCCrystalModel 
    634             #        self.shape_list.append(FCCrystalModel) 
    635             self.model_name_list.append(FCCrystalModel.__name__) 
    636         except: 
    637             pass 
    638  
    639         try: 
    640             from sas.models.BCCrystalModel import BCCrystalModel 
    641  
    642             self.model_dictionary[BCCrystalModel.__name__] = BCCrystalModel 
    643             #        self.shape_list.append(BCCrystalModel) 
    644             self.model_name_list.append(BCCrystalModel.__name__) 
    645         except: 
    646             pass 
    647  
    648  
     312        self.model_name_list = [] 
     313        from sas.models.SphereModel import SphereModel 
     314        self.model_dictionary[SphereModel.__name__] = SphereModel 
     315#        self.shape_list.append(SphereModel) 
     316        self.multiplication_factor.append(SphereModel) 
     317        self.model_name_list.append(SphereModel.__name__) 
     318         
     319        from sas.models.BinaryHSModel import BinaryHSModel 
     320        self.model_dictionary[BinaryHSModel.__name__] = BinaryHSModel 
     321#        self.shape_list.append(BinaryHSModel) 
     322        self.model_name_list.append(BinaryHSModel.__name__) 
     323                         
     324        from sas.models.FuzzySphereModel import FuzzySphereModel 
     325        self.model_dictionary[FuzzySphereModel.__name__] = FuzzySphereModel 
     326#        self.shape_list.append(FuzzySphereModel) 
     327        self.multiplication_factor.append(FuzzySphereModel) 
     328        self.model_name_list.append(FuzzySphereModel.__name__) 
     329                         
     330        from sas.models.RaspBerryModel import RaspBerryModel 
     331        self.model_dictionary[RaspBerryModel.__name__] = RaspBerryModel 
     332#        self.shape_list.append(RaspBerryModel) 
     333        self.model_name_list.append(RaspBerryModel.__name__) 
     334                 
     335        from sas.models.CoreShellModel import CoreShellModel 
     336        self.model_dictionary[CoreShellModel.__name__] = CoreShellModel 
     337#        self.shape_list.append(CoreShellModel) 
     338        self.multiplication_factor.append(CoreShellModel) 
     339        self.model_name_list.append(CoreShellModel.__name__) 
     340         
     341        from sas.models.Core2ndMomentModel import Core2ndMomentModel 
     342        self.model_dictionary[Core2ndMomentModel.__name__] = Core2ndMomentModel 
     343#        self.shape_list.append(Core2ndMomentModel) 
     344        self.model_name_list.append(Core2ndMomentModel.__name__) 
     345         
     346        from sas.models.CoreMultiShellModel import CoreMultiShellModel 
     347        self.model_dictionary[CoreMultiShellModel.__name__] = CoreMultiShellModel 
     348#        self.shape_list.append(CoreMultiShellModel) 
     349        self.multiplication_factor.append(CoreMultiShellModel) 
     350        self.multi_func_list.append(CoreMultiShellModel) 
     351 
     352        from sas.models.VesicleModel import VesicleModel 
     353        self.model_dictionary[VesicleModel.__name__] = VesicleModel 
     354#        self.shape_list.append(VesicleModel) 
     355        self.multiplication_factor.append(VesicleModel) 
     356        self.model_name_list.append(VesicleModel.__name__) 
     357         
     358        from sas.models.MultiShellModel import MultiShellModel 
     359        self.model_dictionary[MultiShellModel.__name__] = MultiShellModel 
     360#        self.shape_list.append(MultiShellModel) 
     361        self.multiplication_factor.append(MultiShellModel) 
     362        self.model_name_list.append(MultiShellModel.__name__) 
     363         
     364        from sas.models.OnionExpShellModel import OnionExpShellModel 
     365        self.model_dictionary[OnionExpShellModel.__name__] = OnionExpShellModel 
     366#        self.shape_list.append(OnionExpShellModel) 
     367        self.multiplication_factor.append(OnionExpShellModel) 
     368        self.multi_func_list.append(OnionExpShellModel) 
     369                          
     370        from sas.models.SphericalSLDModel import SphericalSLDModel 
     371        self.model_dictionary[SphericalSLDModel.__name__] = SphericalSLDModel 
     372#        self.shape_list.append(SphericalSLDModel) 
     373        self.multiplication_factor.append(SphericalSLDModel) 
     374        self.multi_func_list.append(SphericalSLDModel) 
     375 
     376         
     377        from sas.models.LinearPearlsModel import LinearPearlsModel 
     378        self.model_dictionary[LinearPearlsModel.__name__] = LinearPearlsModel 
     379#        self.shape_list.append(LinearPearlsModel) 
     380        self.model_name_list.append(LinearPearlsModel.__name__) 
     381           
     382        from sas.models.PearlNecklaceModel import PearlNecklaceModel 
     383        self.model_dictionary[PearlNecklaceModel.__name__] = PearlNecklaceModel 
     384#        self.shape_list.append(PearlNecklaceModel) 
     385        self.model_name_list.append(PearlNecklaceModel.__name__) 
     386        #self.multiplication_factor.append(PearlNecklaceModel) 
     387         
     388        from sas.models.CylinderModel import CylinderModel 
     389        self.model_dictionary[CylinderModel.__name__] = CylinderModel 
     390#        self.shape_list.append(CylinderModel) 
     391        self.multiplication_factor.append(CylinderModel) 
     392        self.model_name_list.append(CylinderModel.__name__) 
     393         
     394        from sas.models.CoreShellCylinderModel import CoreShellCylinderModel 
     395        self.model_dictionary[CoreShellCylinderModel.__name__] = CoreShellCylinderModel 
     396#        self.shape_list.append(CoreShellCylinderModel) 
     397        self.multiplication_factor.append(CoreShellCylinderModel) 
     398        self.model_name_list.append(CoreShellCylinderModel.__name__) 
     399         
     400        from sas.models.CoreShellBicelleModel import CoreShellBicelleModel 
     401        self.model_dictionary[CoreShellBicelleModel.__name__] = CoreShellBicelleModel 
     402#        self.shape_list.append(CoreShellBicelleModel) 
     403        self.multiplication_factor.append(CoreShellBicelleModel) 
     404        self.model_name_list.append(CoreShellBicelleModel.__name__) 
     405                 
     406        from sas.models.HollowCylinderModel import HollowCylinderModel 
     407        self.model_dictionary[HollowCylinderModel.__name__] = HollowCylinderModel 
     408#        self.shape_list.append(HollowCylinderModel) 
     409        self.multiplication_factor.append(HollowCylinderModel) 
     410        self.model_name_list.append(HollowCylinderModel.__name__) 
     411               
     412        from sas.models.FlexibleCylinderModel import FlexibleCylinderModel 
     413        self.model_dictionary[FlexibleCylinderModel.__name__] = FlexibleCylinderModel 
     414#        self.shape_list.append(FlexibleCylinderModel) 
     415        self.model_name_list.append(FlexibleCylinderModel.__name__) 
     416 
     417        from sas.models.FlexCylEllipXModel import FlexCylEllipXModel 
     418        self.model_dictionary[FlexCylEllipXModel.__name__] = FlexCylEllipXModel 
     419#        self.shape_list.append(FlexCylEllipXModel) 
     420        self.model_name_list.append(FlexCylEllipXModel.__name__) 
     421         
     422        from sas.models.StackedDisksModel import StackedDisksModel 
     423        self.model_dictionary[StackedDisksModel.__name__] = StackedDisksModel 
     424#        self.shape_list.append(StackedDisksModel) 
     425        self.multiplication_factor.append(StackedDisksModel) 
     426        self.model_name_list.append(StackedDisksModel.__name__) 
     427         
     428        from sas.models.ParallelepipedModel import ParallelepipedModel 
     429        self.model_dictionary[ParallelepipedModel.__name__] = ParallelepipedModel 
     430#        self.shape_list.append(ParallelepipedModel) 
     431        self.multiplication_factor.append(ParallelepipedModel) 
     432        self.model_name_list.append(ParallelepipedModel.__name__) 
     433         
     434        from sas.models.CSParallelepipedModel import CSParallelepipedModel 
     435        self.model_dictionary[CSParallelepipedModel.__name__] = CSParallelepipedModel 
     436#        self.shape_list.append(CSParallelepipedModel) 
     437        self.multiplication_factor.append(CSParallelepipedModel) 
     438        self.model_name_list.append(CSParallelepipedModel.__name__) 
     439         
     440        from sas.models.EllipticalCylinderModel import EllipticalCylinderModel 
     441        self.model_dictionary[EllipticalCylinderModel.__name__] = EllipticalCylinderModel 
     442#        self.shape_list.append(EllipticalCylinderModel) 
     443        self.multiplication_factor.append(EllipticalCylinderModel) 
     444        self.model_name_list.append(EllipticalCylinderModel.__name__) 
     445         
     446        from sas.models.BarBellModel import BarBellModel 
     447        self.model_dictionary[BarBellModel.__name__] = BarBellModel 
     448#        self.shape_list.append(BarBellModel) 
     449        self.model_name_list.append(BarBellModel.__name__) 
     450        # not implemeted yet! 
     451        #self.multiplication_factor.append(BarBellModel) 
     452         
     453        from sas.models.CappedCylinderModel import CappedCylinderModel 
     454        self.model_dictionary[CappedCylinderModel.__name__] = CappedCylinderModel 
     455 #       self.shape_list.append(CappedCylinderModel) 
     456        self.model_name_list.append(CappedCylinderModel.__name__) 
     457        # not implemeted yet! 
     458        #self.multiplication_factor.append(CappedCylinderModel) 
     459         
     460        from sas.models.EllipsoidModel import EllipsoidModel 
     461        self.model_dictionary[EllipsoidModel.__name__] = EllipsoidModel 
     462#        self.shape_list.append(EllipsoidModel) 
     463        self.multiplication_factor.append(EllipsoidModel) 
     464        self.model_name_list.append(EllipsoidModel.__name__) 
     465       
     466        from sas.models.CoreShellEllipsoidModel import CoreShellEllipsoidModel 
     467        self.model_dictionary[CoreShellEllipsoidModel.__name__] = CoreShellEllipsoidModel 
     468#        self.shape_list.append(CoreShellEllipsoidModel) 
     469        self.multiplication_factor.append(CoreShellEllipsoidModel) 
     470        self.model_name_list.append(CoreShellEllipsoidModel.__name__) 
     471 
     472        from sas.models.CoreShellEllipsoidXTModel import CoreShellEllipsoidXTModel 
     473        self.model_dictionary[CoreShellEllipsoidXTModel.__name__] = CoreShellEllipsoidXTModel 
     474#        self.shape_list.append(CoreShellEllipsoidXTModel) 
     475        self.multiplication_factor.append(CoreShellEllipsoidXTModel) 
     476        self.model_name_list.append(CoreShellEllipsoidXTModel.__name__) 
     477          
     478        from sas.models.TriaxialEllipsoidModel import TriaxialEllipsoidModel 
     479        self.model_dictionary[TriaxialEllipsoidModel.__name__] = TriaxialEllipsoidModel 
     480#        self.shape_list.append(TriaxialEllipsoidModel) 
     481        self.multiplication_factor.append(TriaxialEllipsoidModel) 
     482        self.model_name_list.append(TriaxialEllipsoidModel.__name__) 
     483         
     484        from sas.models.LamellarModel import LamellarModel 
     485        self.model_dictionary[LamellarModel.__name__] = LamellarModel 
     486#        self.shape_list.append(LamellarModel) 
     487        self.model_name_list.append(LamellarModel.__name__) 
     488         
     489        from sas.models.LamellarFFHGModel import LamellarFFHGModel 
     490        self.model_dictionary[LamellarFFHGModel.__name__] = LamellarFFHGModel 
     491#        self.shape_list.append(LamellarFFHGModel) 
     492        self.model_name_list.append(LamellarFFHGModel.__name__) 
     493         
     494        from sas.models.LamellarPSModel import LamellarPSModel 
     495        self.model_dictionary[LamellarPSModel.__name__] = LamellarPSModel 
     496#        self.shape_list.append(LamellarPSModel) 
     497        self.model_name_list.append(LamellarPSModel.__name__) 
     498      
     499        from sas.models.LamellarPSHGModel import LamellarPSHGModel 
     500        self.model_dictionary[LamellarPSHGModel.__name__] = LamellarPSHGModel 
     501#        self.shape_list.append(LamellarPSHGModel) 
     502        self.model_name_list.append(LamellarPSHGModel.__name__) 
     503         
     504        from sas.models.LamellarPCrystalModel import LamellarPCrystalModel 
     505        self.model_dictionary[LamellarPCrystalModel.__name__] = LamellarPCrystalModel 
     506#        self.shape_list.append(LamellarPCrystalModel) 
     507        self.model_name_list.append(LamellarPCrystalModel.__name__) 
     508         
     509        from sas.models.SCCrystalModel import SCCrystalModel 
     510        self.model_dictionary[SCCrystalModel.__name__] = SCCrystalModel 
     511#        self.shape_list.append(SCCrystalModel) 
     512        self.model_name_list.append(SCCrystalModel.__name__) 
     513         
     514        from sas.models.FCCrystalModel import FCCrystalModel 
     515        self.model_dictionary[FCCrystalModel.__name__] = FCCrystalModel 
     516#        self.shape_list.append(FCCrystalModel) 
     517        self.model_name_list.append(FCCrystalModel.__name__) 
     518         
     519        from sas.models.BCCrystalModel import BCCrystalModel 
     520        self.model_dictionary[BCCrystalModel.__name__] = BCCrystalModel 
     521#        self.shape_list.append(BCCrystalModel) 
     522        self.model_name_list.append(BCCrystalModel.__name__) 
     523       
    649524        ## Structure factor 
    650         try: 
    651             from sas.models.SquareWellStructure import SquareWellStructure 
    652  
    653             self.model_dictionary[SquareWellStructure.__name__] = SquareWellStructure 
    654             self.struct_list.append(SquareWellStructure) 
    655             self.model_name_list.append(SquareWellStructure.__name__) 
    656         except: 
    657             pass 
    658  
    659         try: 
    660             from sas.models.HardsphereStructure import HardsphereStructure 
    661  
    662             self.model_dictionary[HardsphereStructure.__name__] = HardsphereStructure 
    663             self.struct_list.append(HardsphereStructure) 
    664             self.model_name_list.append(HardsphereStructure.__name__) 
    665         except: 
    666             pass 
    667  
    668         try: 
    669             from sas.models.StickyHSStructure import StickyHSStructure 
    670  
    671             self.model_dictionary[StickyHSStructure.__name__] = StickyHSStructure 
    672             self.struct_list.append(StickyHSStructure) 
    673             self.model_name_list.append(StickyHSStructure.__name__) 
    674         except: 
    675             pass 
    676  
    677         try: 
    678             from sas.models.HayterMSAStructure import HayterMSAStructure 
    679  
    680             self.model_dictionary[HayterMSAStructure.__name__] = HayterMSAStructure 
    681             self.struct_list.append(HayterMSAStructure) 
    682             self.model_name_list.append(HayterMSAStructure.__name__) 
    683         except: 
    684             pass 
    685  
     525        from sas.models.SquareWellStructure import SquareWellStructure 
     526        self.model_dictionary[SquareWellStructure.__name__] = SquareWellStructure 
     527        self.struct_list.append(SquareWellStructure) 
     528        self.model_name_list.append(SquareWellStructure.__name__) 
     529         
     530        from sas.models.HardsphereStructure import HardsphereStructure 
     531        self.model_dictionary[HardsphereStructure.__name__] = HardsphereStructure 
     532        self.struct_list.append(HardsphereStructure) 
     533        self.model_name_list.append(HardsphereStructure.__name__) 
     534          
     535        from sas.models.StickyHSStructure import StickyHSStructure 
     536        self.model_dictionary[StickyHSStructure.__name__] = StickyHSStructure 
     537        self.struct_list.append(StickyHSStructure) 
     538        self.model_name_list.append(StickyHSStructure.__name__) 
     539         
     540        from sas.models.HayterMSAStructure import HayterMSAStructure 
     541        self.model_dictionary[HayterMSAStructure.__name__] = HayterMSAStructure 
     542        self.struct_list.append(HayterMSAStructure) 
     543        self.model_name_list.append(HayterMSAStructure.__name__) 
    686544 
    687545 
    688546        ##shape-independent models 
    689         try: 
    690             from sas.models.PowerLawAbsModel import PowerLawAbsModel 
    691  
    692             self.model_dictionary[PowerLawAbsModel.__name__] = PowerLawAbsModel 
    693             #        self.shape_indep_list.append(PowerLawAbsModel) 
    694             self.model_name_list.append(PowerLawAbsModel.__name__) 
    695         except: 
    696             pass 
    697  
    698         try: 
    699             from sas.models.BEPolyelectrolyte import BEPolyelectrolyte 
    700  
    701             self.model_dictionary[BEPolyelectrolyte.__name__] = BEPolyelectrolyte 
    702             #        self.shape_indep_list.append(BEPolyelectrolyte) 
    703             self.model_name_list.append(BEPolyelectrolyte.__name__) 
    704             self.form_factor_dict[str(wx.NewId())] =  [SphereModel] 
    705         except: 
    706             pass 
    707  
    708         try: 
    709             from sas.models.BroadPeakModel import BroadPeakModel 
    710  
    711             self.model_dictionary[BroadPeakModel.__name__] = BroadPeakModel 
    712             #        self.shape_indep_list.append(BroadPeakModel) 
    713             self.model_name_list.append(BroadPeakModel.__name__) 
    714         except: 
    715             pass 
    716  
    717         try: 
    718             from sas.models.CorrLengthModel import CorrLengthModel 
    719  
    720             self.model_dictionary[CorrLengthModel.__name__] = CorrLengthModel 
    721             #        self.shape_indep_list.append(CorrLengthModel) 
    722             self.model_name_list.append(CorrLengthModel.__name__) 
    723         except: 
    724             pass 
    725  
    726         try: 
    727             from sas.models.DABModel import DABModel 
    728  
    729             self.model_dictionary[DABModel.__name__] = DABModel 
    730             #        self.shape_indep_list.append(DABModel) 
    731             self.model_name_list.append(DABModel.__name__) 
    732         except: 
    733             pass 
    734  
    735         try: 
    736             from sas.models.DebyeModel import DebyeModel 
    737  
    738             self.model_dictionary[DebyeModel.__name__] = DebyeModel 
    739             #        self.shape_indep_list.append(DebyeModel) 
    740             self.model_name_list.append(DebyeModel.__name__) 
    741         except: 
    742             pass 
    743  
    744         try: 
    745             from sas.models.FractalModel import FractalModel 
    746  
    747             self.model_dictionary[FractalModel.__name__] = FractalModel 
    748             #        self.shape_indep_list.append(FractalModel) 
    749             self.model_name_list.append(FractalModel.__name__) 
    750         except: 
    751             pass 
    752  
    753         try: 
    754             from sas.models.FractalCoreShellModel import FractalCoreShellModel 
    755  
    756             self.model_dictionary[FractalCoreShellModel.__name__] = FractalCoreShellModel 
    757             #        self.shape_indep_list.append(FractalCoreShellModel) 
    758             self.model_name_list.append(FractalCoreShellModel.__name__) 
    759         except: 
    760             pass 
    761  
    762         try: 
    763             from sas.models.GaussLorentzGelModel import GaussLorentzGelModel 
    764  
    765             self.model_dictionary[GaussLorentzGelModel.__name__] = GaussLorentzGelModel 
    766             #        self.shape_indep_list.append(GaussLorentzGelModel) 
    767             self.model_name_list.append(GaussLorentzGelModel.__name__) 
    768         except: 
    769             pass 
    770  
    771         try: 
    772             from sas.models.GuinierModel import GuinierModel 
    773  
    774             self.model_dictionary[GuinierModel.__name__] = GuinierModel 
    775             #        self.shape_indep_list.append(GuinierModel) 
    776             self.model_name_list.append(GuinierModel.__name__) 
    777         except: 
    778             pass 
    779  
    780         try: 
    781             from sas.models.GuinierPorodModel import GuinierPorodModel 
    782  
    783             self.model_dictionary[GuinierPorodModel.__name__] = GuinierPorodModel 
    784             #        self.shape_indep_list.append(GuinierPorodModel) 
    785             self.model_name_list.append(GuinierPorodModel.__name__) 
    786         except: 
    787             pass 
    788  
    789         try: 
    790             from sas.models.LorentzModel import LorentzModel 
    791  
    792             self.model_dictionary[LorentzModel.__name__] = LorentzModel 
    793             #        self.shape_indep_list.append(LorentzModel) 
    794             self.model_name_list.append(LorentzModel.__name__) 
    795         except: 
    796             pass 
    797  
    798         try: 
    799             from sas.models.MassFractalModel import MassFractalModel 
    800  
    801             self.model_dictionary[MassFractalModel.__name__] = MassFractalModel 
    802             #        self.shape_indep_list.append(MassFractalModel) 
    803             self.model_name_list.append(MassFractalModel.__name__) 
    804         except: 
    805             pass 
    806  
    807         try: 
    808             from sas.models.MassSurfaceFractal import MassSurfaceFractal 
    809  
    810             self.model_dictionary[MassSurfaceFractal.__name__] = MassSurfaceFractal 
    811             #        self.shape_indep_list.append(MassSurfaceFractal) 
    812             self.model_name_list.append(MassSurfaceFractal.__name__) 
    813         except: 
    814             pass 
    815  
    816         try: 
    817             from sas.models.PeakGaussModel import PeakGaussModel 
    818  
    819             self.model_dictionary[PeakGaussModel.__name__] = PeakGaussModel 
    820             #        self.shape_indep_list.append(PeakGaussModel) 
    821             self.model_name_list.append(PeakGaussModel.__name__) 
    822         except: 
    823             pass 
    824  
    825         try: 
    826             from sas.models.PeakLorentzModel import PeakLorentzModel 
    827  
    828             self.model_dictionary[PeakLorentzModel.__name__] = PeakLorentzModel 
    829             #        self.shape_indep_list.append(PeakLorentzModel) 
    830             self.model_name_list.append(PeakLorentzModel.__name__) 
    831         except: 
    832             pass 
    833  
    834         try: 
    835             from sas.models.Poly_GaussCoil import Poly_GaussCoil 
    836  
    837             self.model_dictionary[Poly_GaussCoil.__name__] = Poly_GaussCoil 
    838             #        self.shape_indep_list.append(Poly_GaussCoil) 
    839             self.model_name_list.append(Poly_GaussCoil.__name__) 
    840         except: 
    841             pass 
    842  
    843         try: 
    844             from sas.models.PolymerExclVolume import PolymerExclVolume 
    845  
    846             self.model_dictionary[PolymerExclVolume.__name__] = PolymerExclVolume 
    847             #        self.shape_indep_list.append(PolymerExclVolume) 
    848             self.model_name_list.append(PolymerExclVolume.__name__) 
    849         except: 
    850             pass 
    851  
    852         try: 
    853             from sas.models.PorodModel import PorodModel 
    854  
    855             self.model_dictionary[PorodModel.__name__] = PorodModel 
    856             #        self.shape_indep_list.append(PorodModel) 
    857             self.model_name_list.append(PorodModel.__name__) 
    858         except: 
    859             pass 
    860  
    861         try: 
    862             from sas.models.RPA10Model import RPA10Model 
    863  
    864             self.model_dictionary[RPA10Model.__name__] = RPA10Model 
    865             #        self.shape_indep_list.append(RPA10Model) 
    866             self.multi_func_list.append(RPA10Model) 
    867         except: 
    868             pass 
    869  
    870         try: 
    871             from sas.models.StarPolymer import StarPolymer 
    872  
    873             self.model_dictionary[StarPolymer.__name__] = StarPolymer 
    874             #        self.shape_indep_list.append(StarPolymer) 
    875             self.model_name_list.append(StarPolymer.__name__) 
    876         except: 
    877             pass 
    878  
    879         try: 
    880             from sas.models.SurfaceFractalModel import SurfaceFractalModel 
    881  
    882             self.model_dictionary[SurfaceFractalModel.__name__] = SurfaceFractalModel 
    883             #        self.shape_indep_list.append(SurfaceFractalModel) 
    884             self.model_name_list.append(SurfaceFractalModel.__name__) 
    885         except: 
    886             pass 
    887  
    888         try: 
    889             from sas.models.TeubnerStreyModel import TeubnerStreyModel 
    890  
    891             self.model_dictionary[TeubnerStreyModel.__name__] = TeubnerStreyModel 
    892             #        self.shape_indep_list.append(TeubnerStreyModel) 
    893             self.model_name_list.append(TeubnerStreyModel.__name__) 
    894         except: 
    895             pass 
    896  
    897         try: 
    898             from sas.models.TwoLorentzianModel import TwoLorentzianModel 
    899  
    900             self.model_dictionary[TwoLorentzianModel.__name__] = TwoLorentzianModel 
    901             #        self.shape_indep_list.append(TwoLorentzianModel) 
    902             self.model_name_list.append(TwoLorentzianModel.__name__) 
    903         except: 
    904             pass 
    905  
    906         try: 
    907             from sas.models.TwoPowerLawModel import TwoPowerLawModel 
    908  
    909             self.model_dictionary[TwoPowerLawModel.__name__] = TwoPowerLawModel 
    910             #        self.shape_indep_list.append(TwoPowerLawModel) 
    911             self.model_name_list.append(TwoPowerLawModel.__name__) 
    912         except: 
    913             pass 
    914  
    915         try: 
    916             from sas.models.UnifiedPowerRgModel import UnifiedPowerRgModel 
    917  
    918             self.model_dictionary[UnifiedPowerRgModel.__name__] = UnifiedPowerRgModel 
    919             #        self.shape_indep_list.append(UnifiedPowerRgModel) 
    920             self.multi_func_list.append(UnifiedPowerRgModel) 
    921         except: 
    922             pass 
    923  
    924         try: 
    925             from sas.models.LineModel import LineModel 
    926  
    927             self.model_dictionary[LineModel.__name__] = LineModel 
    928             #        self.shape_indep_list.append(LineModel) 
    929             self.model_name_list.append(LineModel.__name__) 
    930         except: 
    931             pass 
    932  
    933         try: 
    934             from sas.models.ReflectivityModel import ReflectivityModel 
    935  
    936             self.model_dictionary[ReflectivityModel.__name__] = ReflectivityModel 
    937             #        self.shape_indep_list.append(ReflectivityModel) 
    938             self.multi_func_list.append(ReflectivityModel) 
    939         except: 
    940             pass 
    941  
    942         try: 
    943             from sas.models.ReflectivityIIModel import ReflectivityIIModel 
    944  
    945             self.model_dictionary[ReflectivityIIModel.__name__] = ReflectivityIIModel 
    946             #        self.shape_indep_list.append(ReflectivityIIModel) 
    947             self.multi_func_list.append(ReflectivityIIModel) 
    948         except: 
    949             pass 
    950  
    951         try: 
    952             from sas.models.GelFitModel import GelFitModel 
    953  
    954             self.model_dictionary[GelFitModel.__name__] = GelFitModel 
    955             #        self.shape_indep_list.append(GelFitModel) 
    956             self.model_name_list.append(GelFitModel.__name__) 
    957         except: 
    958             pass 
    959  
    960         try: 
    961             from sas.models.PringlesModel import PringlesModel 
    962  
    963             self.model_dictionary[PringlesModel.__name__] = PringlesModel 
    964             #        self.shape_indep_list.append(PringlesModel) 
    965             self.model_name_list.append(PringlesModel.__name__) 
    966         except: 
    967             pass 
    968  
    969         try: 
    970             from sas.models.RectangularPrismModel import RectangularPrismModel 
    971  
    972             self.model_dictionary[RectangularPrismModel.__name__] = RectangularPrismModel 
    973             #        self.shape_list.append(RectangularPrismModel) 
    974             self.multiplication_factor.append(RectangularPrismModel) 
    975             self.model_name_list.append(RectangularPrismModel.__name__) 
    976         except: 
    977             pass 
    978  
    979         try: 
    980             from sas.models.RectangularHollowPrismInfThinWallsModel import RectangularHollowPrismInfThinWallsModel 
    981  
    982             self.model_dictionary[RectangularHollowPrismInfThinWallsModel.__name__] = RectangularHollowPrismInfThinWallsModel 
    983             #        self.shape_list.append(RectangularHollowPrismInfThinWallsModel) 
    984             self.multiplication_factor.append(RectangularHollowPrismInfThinWallsModel) 
    985             self.model_name_list.append(RectangularHollowPrismInfThinWallsModel.__name__) 
    986         except: 
    987             pass 
    988  
    989         try: 
    990             from sas.models.RectangularHollowPrismModel import RectangularHollowPrismModel 
    991  
    992             self.model_dictionary[RectangularHollowPrismModel.__name__] = RectangularHollowPrismModel 
    993             #        self.shape_list.append(RectangularHollowPrismModel) 
    994             self.multiplication_factor.append(RectangularHollowPrismModel) 
    995             self.model_name_list.append(RectangularHollowPrismModel.__name__) 
    996         except: 
    997             pass 
    998  
    999         try: 
    1000             from sas.models.MicelleSphCoreModel import MicelleSphCoreModel 
    1001  
    1002             self.model_dictionary[MicelleSphCoreModel.__name__] = MicelleSphCoreModel 
    1003             #        self.shape_list.append(MicelleSphCoreModel) 
    1004             self.multiplication_factor.append(MicelleSphCoreModel) 
    1005             self.model_name_list.append(MicelleSphCoreModel.__name__) 
    1006         except: 
    1007             pass 
    1008  
     547        from sas.models.PowerLawAbsModel import PowerLawAbsModel 
     548        self.model_dictionary[PowerLawAbsModel.__name__] = PowerLawAbsModel 
     549#        self.shape_indep_list.append(PowerLawAbsModel) 
     550        self.model_name_list.append(PowerLawAbsModel.__name__) 
     551         
     552        from sas.models.BEPolyelectrolyte import BEPolyelectrolyte 
     553        self.model_dictionary[BEPolyelectrolyte.__name__] = BEPolyelectrolyte 
     554#        self.shape_indep_list.append(BEPolyelectrolyte) 
     555        self.model_name_list.append(BEPolyelectrolyte.__name__) 
     556        self.form_factor_dict[str(wx.NewId())] =  [SphereModel] 
     557         
     558        from sas.models.BroadPeakModel import BroadPeakModel 
     559        self.model_dictionary[BroadPeakModel.__name__] = BroadPeakModel 
     560#        self.shape_indep_list.append(BroadPeakModel) 
     561        self.model_name_list.append(BroadPeakModel.__name__) 
     562         
     563        from sas.models.CorrLengthModel import CorrLengthModel 
     564        self.model_dictionary[CorrLengthModel.__name__] = CorrLengthModel 
     565#        self.shape_indep_list.append(CorrLengthModel) 
     566        self.model_name_list.append(CorrLengthModel.__name__) 
     567         
     568        from sas.models.DABModel import DABModel 
     569        self.model_dictionary[DABModel.__name__] = DABModel 
     570#        self.shape_indep_list.append(DABModel) 
     571        self.model_name_list.append(DABModel.__name__) 
     572         
     573        from sas.models.DebyeModel import DebyeModel 
     574        self.model_dictionary[DebyeModel.__name__] = DebyeModel 
     575#        self.shape_indep_list.append(DebyeModel) 
     576        self.model_name_list.append(DebyeModel.__name__) 
     577         
     578        from sas.models.FractalModel import FractalModel 
     579        self.model_dictionary[FractalModel.__name__] = FractalModel 
     580#        self.shape_indep_list.append(FractalModel) 
     581        self.model_name_list.append(FractalModel.__name__) 
     582         
     583        from sas.models.FractalCoreShellModel import FractalCoreShellModel 
     584        self.model_dictionary[FractalCoreShellModel.__name__] = FractalCoreShellModel 
     585#        self.shape_indep_list.append(FractalCoreShellModel) 
     586        self.model_name_list.append(FractalCoreShellModel.__name__) 
     587         
     588        from sas.models.GaussLorentzGelModel import GaussLorentzGelModel 
     589        self.model_dictionary[GaussLorentzGelModel.__name__] = GaussLorentzGelModel 
     590#        self.shape_indep_list.append(GaussLorentzGelModel) 
     591        self.model_name_list.append(GaussLorentzGelModel.__name__) 
     592                 
     593        from sas.models.GuinierModel import GuinierModel 
     594        self.model_dictionary[GuinierModel.__name__] = GuinierModel 
     595#        self.shape_indep_list.append(GuinierModel) 
     596        self.model_name_list.append(GuinierModel.__name__) 
     597         
     598        from sas.models.GuinierPorodModel import GuinierPorodModel 
     599        self.model_dictionary[GuinierPorodModel.__name__] = GuinierPorodModel 
     600#        self.shape_indep_list.append(GuinierPorodModel) 
     601        self.model_name_list.append(GuinierPorodModel.__name__) 
     602 
     603        from sas.models.LorentzModel import LorentzModel 
     604        self.model_dictionary[LorentzModel.__name__] = LorentzModel 
     605#        self.shape_indep_list.append(LorentzModel) 
     606        self.model_name_list.append(LorentzModel.__name__) 
     607 
     608        from sas.models.MassFractalModel import MassFractalModel 
     609        self.model_dictionary[MassFractalModel.__name__] = MassFractalModel 
     610#        self.shape_indep_list.append(MassFractalModel) 
     611        self.model_name_list.append(MassFractalModel.__name__) 
     612         
     613        from sas.models.MassSurfaceFractal import MassSurfaceFractal 
     614        self.model_dictionary[MassSurfaceFractal.__name__] = MassSurfaceFractal 
     615#        self.shape_indep_list.append(MassSurfaceFractal) 
     616        self.model_name_list.append(MassSurfaceFractal.__name__) 
     617         
     618        from sas.models.PeakGaussModel import PeakGaussModel 
     619        self.model_dictionary[PeakGaussModel.__name__] = PeakGaussModel 
     620#        self.shape_indep_list.append(PeakGaussModel) 
     621        self.model_name_list.append(PeakGaussModel.__name__) 
     622         
     623        from sas.models.PeakLorentzModel import PeakLorentzModel 
     624        self.model_dictionary[PeakLorentzModel.__name__] = PeakLorentzModel 
     625#        self.shape_indep_list.append(PeakLorentzModel) 
     626        self.model_name_list.append(PeakLorentzModel.__name__) 
     627         
     628        from sas.models.Poly_GaussCoil import Poly_GaussCoil 
     629        self.model_dictionary[Poly_GaussCoil.__name__] = Poly_GaussCoil 
     630#        self.shape_indep_list.append(Poly_GaussCoil) 
     631        self.model_name_list.append(Poly_GaussCoil.__name__) 
     632         
     633        from sas.models.PolymerExclVolume import PolymerExclVolume 
     634        self.model_dictionary[PolymerExclVolume.__name__] = PolymerExclVolume 
     635#        self.shape_indep_list.append(PolymerExclVolume) 
     636        self.model_name_list.append(PolymerExclVolume.__name__) 
     637         
     638        from sas.models.PorodModel import PorodModel 
     639        self.model_dictionary[PorodModel.__name__] = PorodModel 
     640#        self.shape_indep_list.append(PorodModel) 
     641        self.model_name_list.append(PorodModel.__name__) 
     642         
     643        from sas.models.RPA10Model import RPA10Model 
     644        self.model_dictionary[RPA10Model.__name__] = RPA10Model 
     645#        self.shape_indep_list.append(RPA10Model) 
     646        self.multi_func_list.append(RPA10Model) 
     647 
     648        from sas.models.StarPolymer import StarPolymer 
     649        self.model_dictionary[StarPolymer.__name__] = StarPolymer 
     650#        self.shape_indep_list.append(StarPolymer) 
     651        self.model_name_list.append(StarPolymer.__name__) 
     652 
     653        from sas.models.SurfaceFractalModel import SurfaceFractalModel 
     654        self.model_dictionary[SurfaceFractalModel.__name__] = SurfaceFractalModel 
     655#        self.shape_indep_list.append(SurfaceFractalModel) 
     656        self.model_name_list.append(SurfaceFractalModel.__name__) 
     657         
     658        from sas.models.TeubnerStreyModel import TeubnerStreyModel 
     659        self.model_dictionary[TeubnerStreyModel.__name__] = TeubnerStreyModel 
     660#        self.shape_indep_list.append(TeubnerStreyModel) 
     661        self.model_name_list.append(TeubnerStreyModel.__name__) 
     662 
     663        from sas.models.TwoLorentzianModel import TwoLorentzianModel 
     664        self.model_dictionary[TwoLorentzianModel.__name__] = TwoLorentzianModel 
     665#        self.shape_indep_list.append(TwoLorentzianModel) 
     666        self.model_name_list.append(TwoLorentzianModel.__name__) 
     667         
     668        from sas.models.TwoPowerLawModel import TwoPowerLawModel 
     669        self.model_dictionary[TwoPowerLawModel.__name__] = TwoPowerLawModel 
     670#        self.shape_indep_list.append(TwoPowerLawModel) 
     671        self.model_name_list.append(TwoPowerLawModel.__name__) 
     672         
     673        from sas.models.UnifiedPowerRgModel import UnifiedPowerRgModel 
     674        self.model_dictionary[UnifiedPowerRgModel.__name__] = UnifiedPowerRgModel 
     675#        self.shape_indep_list.append(UnifiedPowerRgModel) 
     676        self.multi_func_list.append(UnifiedPowerRgModel) 
     677 
     678        from sas.models.LineModel import LineModel 
     679        self.model_dictionary[LineModel.__name__] = LineModel 
     680#        self.shape_indep_list.append(LineModel) 
     681        self.model_name_list.append(LineModel.__name__) 
     682         
     683        from sas.models.ReflectivityModel import ReflectivityModel 
     684        self.model_dictionary[ReflectivityModel.__name__] = ReflectivityModel 
     685#        self.shape_indep_list.append(ReflectivityModel) 
     686        self.multi_func_list.append(ReflectivityModel) 
     687         
     688        from sas.models.ReflectivityIIModel import ReflectivityIIModel 
     689        self.model_dictionary[ReflectivityIIModel.__name__] = ReflectivityIIModel 
     690#        self.shape_indep_list.append(ReflectivityIIModel) 
     691        self.multi_func_list.append(ReflectivityIIModel) 
     692         
     693        from sas.models.GelFitModel import GelFitModel 
     694        self.model_dictionary[GelFitModel.__name__] = GelFitModel 
     695#        self.shape_indep_list.append(GelFitModel) 
     696        self.model_name_list.append(GelFitModel.__name__) 
     697 
     698        from sas.models.PringlesModel import PringlesModel 
     699        self.model_dictionary[PringlesModel.__name__] = PringlesModel 
     700#        self.shape_indep_list.append(PringlesModel) 
     701        self.model_name_list.append(PringlesModel.__name__) 
     702 
     703        from sas.models.RectangularPrismModel import RectangularPrismModel 
     704        self.model_dictionary[RectangularPrismModel.__name__] = RectangularPrismModel 
     705#        self.shape_list.append(RectangularPrismModel) 
     706        self.multiplication_factor.append(RectangularPrismModel) 
     707        self.model_name_list.append(RectangularPrismModel.__name__) 
     708 
     709        from sas.models.RectangularHollowPrismInfThinWallsModel import RectangularHollowPrismInfThinWallsModel 
     710        self.model_dictionary[RectangularHollowPrismInfThinWallsModel.__name__] = RectangularHollowPrismInfThinWallsModel 
     711#        self.shape_list.append(RectangularHollowPrismInfThinWallsModel) 
     712        self.multiplication_factor.append(RectangularHollowPrismInfThinWallsModel) 
     713        self.model_name_list.append(RectangularHollowPrismInfThinWallsModel.__name__) 
     714 
     715        from sas.models.RectangularHollowPrismModel import RectangularHollowPrismModel 
     716        self.model_dictionary[RectangularHollowPrismModel.__name__] = RectangularHollowPrismModel 
     717#        self.shape_list.append(RectangularHollowPrismModel) 
     718        self.multiplication_factor.append(RectangularHollowPrismModel) 
     719        self.model_name_list.append(RectangularHollowPrismModel.__name__) 
     720 
     721        from sas.models.MicelleSphCoreModel import MicelleSphCoreModel 
     722        self.model_dictionary[MicelleSphCoreModel.__name__] = MicelleSphCoreModel 
     723#        self.shape_list.append(MicelleSphCoreModel) 
     724        self.multiplication_factor.append(MicelleSphCoreModel) 
     725        self.model_name_list.append(MicelleSphCoreModel.__name__) 
    1009726 
    1010727 
  • test/park_integration/test/utest_fit_cylinder.py

    ra10364b r35ec279  
    1010from sas.dataloader.loader import Loader 
    1111 
     12#@unittest.skip("") 
    1213class TestSingleFit(unittest.TestCase): 
    1314    """ test single fitting """ 
  • test/sasdataloader/test/utest_averaging.py

    ra10364b r35ec279  
    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                  nbins = 20) 
    109         ##r.nbins_phi = 20 
     107                 center_y=self.data.detector[0].beam_center.y) 
     108        r.nbins_phi = 20 
    110109         
    111110        o = r(self.data) 
    112111        answer = Loader().load('ring_testdata.txt') 
    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) 
     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) 
    118116             
    119117    def test_circularavg(self): 
     
    196194        import math 
    197195         
    198         nbins = 19 
    199         phi_min = math.pi / (nbins + 1) 
    200         phi_max = math.pi * 2 - phi_min 
    201          
    202         r = SectorPhi(r_min=.005, 
    203                       r_max=.01, 
    204                       phi_min=phi_min, 
    205                       phi_max=phi_max, 
    206                       nbins=nbins) 
     196        r = SectorPhi(r_min=.005, r_max=.01, phi_min=0, phi_max=math.pi*2.0) 
     197        r.nbins_phi = 20 
    207198        o = r(self.data) 
    208199 
Note: See TracChangeset for help on using the changeset viewer.