Changeset 17db833 in sasmodels
- Timestamp:
- Nov 2, 2017 5:59:45 PM (7 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- c11d09f, 82592da, c15e03c
- Parents:
- ce99754
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/sasview_model.py
rce99754 r17db833 764 764 return self.multiplicity, [self.multiplicity], [1.0] 765 765 else: 766 # For hidden parameters use NaN 767 return np.NaN, [np.NaN], [1.0] 766 # For hidden parameters use default values. This sets 767 # scale=1 and background=0 for structure factors 768 default = self._model_info.parameters.defaults.get(par.name, np.NaN) 769 return default, [default], [1.0] 768 770 elif par.polydisperse: 769 771 value = self.params[par.name] … … 796 798 Model = _make_standard_model('hardsphere') 797 799 model = Model() 798 value = model.evalDistribution([0.1, 0.1]) 799 if np.isnan(value): 800 raise ValueError("hardsphere returns null") 800 value2d = model.evalDistribution([0.1, 0.1]) 801 value1d = model.evalDistribution(np.array([0.1*np.sqrt(2)])) 802 #print("hardsphere", value1d, value2d) 803 if np.isnan(value1d) or np.isnan(value2d): 804 raise ValueError("hardsphere returns nan") 801 805 802 806 def test_product(): … … 865 869 print("cylinder(0.1,0.1)=%g"%test_cylinder()) 866 870 #test_product() 867 #test_rpa() 871 #test_structure_factor() 872 #print("rpa:", test_rpa()) 868 873 #test_empty_distribution()
Note: See TracChangeset
for help on using the changeset viewer.