Changeset b32dafd in sasmodels for sasmodels/sasview_model.py
- Timestamp:
- Aug 5, 2016 3:59:13 PM (8 years ago)
- 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:
- 99f446a
- Parents:
- 7722b4a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/sasview_model.py
r50ec515 rb32dafd 45 45 MODELS = {} 46 46 def find_model(modelname): 47 # type: (str) -> SasviewModelType 48 """ 49 Find a model by name. If the model name ends in py, try loading it from 50 custom models, otherwise look for it in the list of builtin models. 51 """ 47 52 # TODO: used by sum/product model to load an existing model 48 53 # TODO: doesn't handle custom models properly … … 340 345 else: 341 346 value = np.array([self.params.get(p.id+str(k), np.NaN) 342 for k in range(1, p.length+1)])347 for k in range(1, p.length+1)]) 343 348 args[p.id] = value 344 349 … … 587 592 # new dispersers in the set_dispersion call and create a new 588 593 # one instead of trying to assign parameters. 589 from . import weights590 594 disperser = weights.dispersers[dispersion.__class__.__name__] 591 595 dispersion = weights.MODELS[disperser]() … … 634 638 Cylinder = _make_standard_model('cylinder') 635 639 cylinder = Cylinder() 636 return cylinder.evalDistribution([0.1, 0.1])640 return cylinder.evalDistribution([0.1, 0.1]) 637 641 638 642 def test_rpa(): … … 643 647 RPA = _make_standard_model('rpa') 644 648 rpa = RPA(3) 645 return rpa.evalDistribution([0.1, 0.1])649 return rpa.evalDistribution([0.1, 0.1]) 646 650 647 651
Note: See TracChangeset
for help on using the changeset viewer.