Changes in / [23054a1:1a580fb] in sasmodels
- Location:
- sasmodels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/hayter_msa.c
r3fc5d27 r4962519 70 70 SofQ=sqhcal(Qdiam, gMSAWave); 71 71 }else{ 72 SofQ=NAN; 72 //SofQ=NaN; 73 SofQ=-1.0; 73 74 // print "Error Level = ",ierr 74 75 // print "Please report HPMSA problem with above error code" -
sasmodels/sasview_model.py
r749a7d4 ra38b065 734 734 return [self.params[par.name]], [1.0] 735 735 736 def test_ cylinder():736 def test_model(): 737 737 # type: () -> float 738 738 """ 739 Test that the cylinder model runs, returning the value at [0.1,0.1].739 Test that a sasview model (cylinder) can be run. 740 740 """ 741 741 Cylinder = _make_standard_model('cylinder') … … 746 746 # type: () -> float 747 747 """ 748 Test that 2-D hardsphere model runs and doesn't produce NaN.748 Test that a sasview model (cylinder) can be run. 749 749 """ 750 750 Model = _make_standard_model('hardsphere') … … 757 757 # type: () -> float 758 758 """ 759 Test that the 2-D RPA model runs759 Test that a sasview model (cylinder) can be run. 760 760 """ 761 761 RPA = _make_standard_model('rpa') … … 763 763 return rpa.evalDistribution([0.1, 0.1]) 764 764 765 def test_empty_distribution():766 # type: () -> None767 """768 Make sure that sasmodels returns NaN when there are no polydispersity points769 """770 Cylinder = _make_standard_model('cylinder')771 cylinder = Cylinder()772 cylinder.setParam('radius', -1.0)773 cylinder.setParam('background', 0.)774 Iq = cylinder.evalDistribution(np.asarray([0.1]))775 assert np.isnan(Iq[0]), "empty distribution fails"776 765 777 766 def test_model_list(): 778 767 # type: () -> None 779 768 """ 780 Make sure that all models build as sasview models 769 Make sure that all models build as sasview models. 781 770 """ 782 771 from .exception import annotate_exception … … 805 794 806 795 if __name__ == "__main__": 807 print("cylinder(0.1,0.1)=%g"%test_cylinder()) 808 #test_empty_distribution() 796 print("cylinder(0.1,0.1)=%g"%test_model())
Note: See TracChangeset
for help on using the changeset viewer.