Changeset 21b116f in sasmodels


Ignore:
Timestamp:
Apr 6, 2016 11:13:59 AM (9 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
3fb3449
Parents:
d2bb604
Message:

fix the remaining references to the parameter table as list

Location:
sasmodels
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/bumps_model.py

    raaf75b6 r21b116f  
    8383    pars = {}     # floating point parameters 
    8484    pd_types = {} # distribution names 
    85     for p in model_info['parameters']: 
     85    for p in model_info['parameters'].call_parameters: 
    8686        value = kwargs.pop(p.name, p.default) 
    8787        pars[p.name] = Parameter.default(value, name=p.name, limits=p.limits) 
     
    9595                value = kwargs.pop(name, default) 
    9696                pars[name] = Parameter.default(value, name=name, limits=limits) 
    97             pd_types[p.name+'_pd_type'] = kwargs.pop(name, 'gaussian') 
     97            name = p.name + '_pd_type' 
     98            pd_types[name] = kwargs.pop(name, 'gaussian') 
    9899 
    99100    if kwargs:  # args not corresponding to parameters 
  • sasmodels/compare.py

    rd2bb604 r21b116f  
    877877        model_info = opts['def'] 
    878878        pars, pd_types = bumps_model.create_parameters(model_info, **opts['pars']) 
     879        # Initialize parameter ranges, fixing the 2D parameters for 1D data. 
    879880        if not opts['is2d']: 
    880             for p in model_info['parameters'].type['1d']: 
     881            for p in model_info['parameters'].user_parameters(is2d=False): 
    881882                for ext in ['', '_pd', '_pd_n', '_pd_nsigma']: 
    882883                    k = p.name+ext 
  • sasmodels/list_pars.py

    ra84a0ca r21b116f  
    2525    for name in sorted(MODELS): 
    2626        model_info = load_model_info(name) 
    27         for p in model_info['parameters']: 
     27        for p in model_info['parameters'].kernel_parameters: 
    2828            partable.setdefault(p.name, []) 
    2929            partable[p.name].append(name) 
  • sasmodels/modelinfo.py

    rd2bb604 r21b116f  
    378378        self.call_parameters = full_list 
    379379 
    380     """ # Suppress these for now until we see how they are used 
    381     def __getitem__(self, k): 
    382         if isinstance(k, (int, slice)): 
    383             return self.parameters[k] 
    384         else: 
    385             return self._name_table[k] 
    386  
    387     def __contains__(self, key): 
    388         return key in self._name_table 
    389  
    390     def __iter__(self): 
    391         return iter(self.expanded_parameters) 
    392     """ 
    393  
    394380    def _categorize_parameters(self): 
    395381        # Set the kernel parameters.  Assumes background and scale are the 
Note: See TracChangeset for help on using the changeset viewer.