Changeset be86916 in sasmodels
- Timestamp:
- Nov 6, 2016 5:29:57 AM (8 years ago)
- Branches:
- release_v0.95
- Parents:
- f837f0b
- git-author:
- Paul Kienzle <pkienzle@…> (10/10/16 12:36:59)
- git-committer:
- Andrew Jackson <andrew.jackson@…> (11/06/16 05:29:57)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/sasview_model.py
r9c1a59c rbe86916 311 311 else: 312 312 hidden = set() 313 if self._model_info.structure_factor: 314 hidden.add('scale') 315 hidden.add('background') 316 self._model_info.parameters.defaults['background'] = 0. 313 317 314 318 self._persistency_dict = {} … … 655 659 return [self.multiplicity], [1.0] 656 660 else: 657 return [np.NaN], [1.0] 661 # For hidden parameters use the default value. 662 value = self._model_info.parameters.defaults.get(par.name, np.NaN) 663 return [value], [1.0] 658 664 elif par.polydisperse: 659 665 dis = self.dispersion[par.name] … … 676 682 cylinder = Cylinder() 677 683 return cylinder.evalDistribution([0.1, 0.1]) 684 685 def test_structure_factor(): 686 # type: () -> float 687 """ 688 Test that a sasview model (cylinder) can be run. 689 """ 690 Model = _make_standard_model('hardsphere') 691 model = Model() 692 value = model.evalDistribution([0.1, 0.1]) 693 if np.isnan(value): 694 raise ValueError("hardsphere returns null") 678 695 679 696 def test_rpa():
Note: See TracChangeset
for help on using the changeset viewer.