Changeset d9afe942 in sasview for src/sas/sascalc/calculator
- Timestamp:
- Sep 15, 2016 8:33:57 AM (8 years ago)
- Branches:
- 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
- Children:
- 1e5005e
- Parents:
- ef6d1d8
- git-author:
- Paul Kienzle <pkienzle@…> (08/10/16 21:32:49)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (09/15/16 08:33:57)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/calculator/BaseComponent.py
rcb4ef58 rd9afe942 7 7 # imports 8 8 import copy 9 from collections import OrderedDict 10 9 11 import numpy 10 12 #TO DO: that about a way to make the parameter … … 254 256 Return a list of all available parameters for the model 255 257 """ 256 list = self.params.keys()258 list = _ordered_keys(self.params) 257 259 # WARNING: Extending the list with the dispersion parameters 258 260 list.extend(self.getDispParamList()) … … 264 266 """ 265 267 list = [] 266 267 for item in self.dispersion.keys(): 268 for p in self.dispersion[item].keys(): 268 for item in _ordered_keys(self.dispersion): 269 for p in _ordered_keys(self.dispersion[item]): 269 270 if p not in ['type']: 270 271 list.append('%s.%s' % (item.lower(), p.lower())) … … 309 310 """ 310 311 raise ValueError, "Model operation are no longer supported" 312 313 314 def _ordered_keys(d): 315 keys = list(d.keys()) 316 if not isinstance(d, OrderedDict): 317 keys.sort() 318 return keys
Note: See TracChangeset
for help on using the changeset viewer.