Ignore:
Timestamp:
Mar 18, 2016 8:45:19 AM (9 years ago)
Author:
ajj
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:
b609c34
Parents:
bd971ec
Message:

Deal with dodgy models

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/models.py

    rbac3988 rcde9d7d  
    302302        #Build list automagically from sasmodels package 
    303303        for mod_name in sasmodels.core.list_models(): 
    304             mod_def = sasmodels.core.load_model_info(mod_name) 
    305             self.model_dictionary[mod_def['name']] = make_class(mod_def,dtype=None,namestyle='name') 
    306             if mod_def['structure_factor'] == True: 
    307                 self.struct_list.append(self.model_dictionary[mod_def['name']]) 
    308             if mod_def['variant_info'] is not None: 
    309                 self.multi_func_list.append(self.model_dictionary[mod_def['name']]) 
    310             else: 
    311                 self.model_name_list.append(mod_def['name']) 
    312             if mod_def['ER'] is not None: 
    313                 self.multiplication_factor.append(self.model_dictionary[mod_def['name']]) 
     304            try: 
     305                mod_def = sasmodels.core.load_model_info(mod_name) 
     306                self.model_dictionary[mod_def['name']] = make_class(mod_def,dtype=None,namestyle='name') 
     307                if mod_def['structure_factor'] == True: 
     308                    self.struct_list.append(self.model_dictionary[mod_def['name']]) 
     309                if mod_def['variant_info'] is not None: 
     310                    self.multi_func_list.append(self.model_dictionary[mod_def['name']]) 
     311                else: 
     312                    self.model_name_list.append(mod_def['name']) 
     313                if mod_def['ER'] is not None: 
     314                    self.multiplication_factor.append(self.model_dictionary[mod_def['name']]) 
     315            except: 
     316                logging.info("Problem loading %s model" % mod_name) 
    314317 
    315318        #Looking for plugins 
Note: See TracChangeset for help on using the changeset viewer.