Changeset 8f93522 in sasmodels
- Timestamp:
- Oct 10, 2016 12:36:59 PM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 2f2c70c
- Parents:
- 479d0f3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/sasview_model.py
red10b57 r8f93522 320 320 else: 321 321 hidden = set() 322 if self._model_info.structure_factor: 323 hidden.add('scale') 324 hidden.add('background') 325 self._model_info.parameters.defaults['background'] = 0. 322 326 323 327 self._persistency_dict = {} … … 668 672 return [self.multiplicity], [1.0] 669 673 else: 670 return [np.NaN], [1.0] 674 # For hidden parameters use the default value. 675 value = self._model_info.parameters.defaults.get(par.name, np.NaN) 676 return [value], [1.0] 671 677 elif par.polydisperse: 672 678 dis = self.dispersion[par.name] … … 689 695 cylinder = Cylinder() 690 696 return cylinder.evalDistribution([0.1, 0.1]) 697 698 def test_structure_factor(): 699 # type: () -> float 700 """ 701 Test that a sasview model (cylinder) can be run. 702 """ 703 Model = _make_standard_model('hardsphere') 704 model = Model() 705 value = model.evalDistribution([0.1, 0.1]) 706 if np.isnan(value): 707 raise ValueError("hardsphere returns null") 691 708 692 709 def test_rpa():
Note: See TracChangeset
for help on using the changeset viewer.