Index: sansmodels/src/sans/models/test/utest_other_models.py
===================================================================
--- sansmodels/src/sans/models/test/utest_other_models.py	(revision a65ffcbd1503dbedc3725116c164ef11ff70f0ab)
+++ sansmodels/src/sans/models/test/utest_other_models.py	(revision 7ef319e68ef906f6b1d16766cf30679154c648cf)
@@ -5,6 +5,22 @@
             Some models return limit of the function at critical point .
             So the user should expect finite value for some critical points.
+            Only critical q=0 will be tested. 
+            
+            Critical points tests that fail. the user is responsible of changing
+            the model tested or document the failure.
+            
             Initial values for models are given as the one of Igo software.
     @author: Gervaise Alina / UTK
+    @summary: Run by G. Alina 10/21/2009
+            Most of the lamellar tests are not passing. Check lamellar im
+            plementation.
+            critial points tested not passing for:
+            - Flexible Cylinder
+            - PeakLorenzt
+            - Squarewell Structure
+            - StickyHstructure
+            - hardSphereStructure
+            
+            
 """
 
@@ -56,5 +72,7 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
         
-        
+    def testCriticalPoint(self):
+        """ Test coreshell at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))
   
 class TestMultiShellModel(unittest.TestCase):
@@ -102,4 +120,7 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
     
+    def testCriticalPoint(self):
+        """ Test multishell at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))
     
 class TestVesicleModel(unittest.TestCase):
@@ -145,5 +166,9 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
     
-      
+    def testCriticalPoint(self):
+        """ Test vesicle at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0))) 
+        
+        
 class TestBinaryHSModel(unittest.TestCase):
     """ Unit tests for BinaryHS Model"""
@@ -189,5 +214,9 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 0.5]),self.xy_matrix[0][1],8)
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
-     
+        
+    def testCriticalPoint(self):
+        """ Test BinaryHS at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))
+       
      
 class TestCoreShellCylinderModel(unittest.TestCase):
@@ -242,4 +271,8 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
  
+    def testCriticalPoint(self):
+        """ Test CoreShellCylinder at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))
+ 
  
 class TestHollowCylinderModel(unittest.TestCase):
@@ -291,4 +324,8 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
         
+    def testCriticalPoint(self):
+        """ Test HollowCylinder at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))
+        
         
 class TestFlexibleCylinderModel(unittest.TestCase):
@@ -340,4 +377,7 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
    
+    def testCriticalPoint(self):
+        """ Test FlexibleCylinder at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))
   
               
@@ -396,5 +436,9 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 0.5]),self.xy_matrix[0][1],8)
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
-  
+    
+    def testCriticalPoint(self):
+        """ Test StackedDisks at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0))) 
+   
   
 class TestParallelepipedModel(unittest.TestCase):
@@ -448,4 +492,7 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
    
+    def testCriticalPoint(self):
+        """ Test Parallelepiped at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))
   
 class TestEllipticalCylinderModel(unittest.TestCase):
@@ -499,5 +546,8 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 0.5]),self.xy_matrix[0][1],8)
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
-        
+    
+    def testCriticalPoint(self):
+        """ Test EllipticalCylinder at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0))) 
   
         
@@ -549,5 +599,8 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 0.5]),self.xy_matrix[0][1],8)
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
-        
+    
+    def testCriticalPoint(self):
+        """ Test Ellipsoid at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))
         
 class TestCoreShellEllipsoidModel(unittest.TestCase):
@@ -603,5 +656,8 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 0.5]),self.xy_matrix[0][1],8)
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
- 
+    
+    def testCriticalPoint(self):
+        """ Test CoreShellEllipsoid at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))
     
 class TestTriaxialEllipsoidModel(unittest.TestCase):
@@ -656,5 +712,8 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 0.5]),self.xy_matrix[0][1],8)
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
-                     
+    
+    def testCriticalPoint(self):
+        """ Test TriaxialEllipsoid at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))            
    
 class TestLamellarModel(unittest.TestCase):
@@ -699,4 +758,7 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)        
    
+    def testCriticalPoint(self):
+        """ Test Lamellar at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))
      
 class TestLamellarFFHGModel(unittest.TestCase):
@@ -743,5 +805,8 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 0.5]),self.xy_matrix[0][1],8)
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)        
-                  
+    
+    def testCriticalPoint(self):
+        """ Test LamellarFFHG at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))              
     
 class TestLamellarPSModel(unittest.TestCase):
@@ -789,5 +854,7 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)        
             
-     
+    def testCriticalPoint(self):
+        """ Test LamellarPS at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))
      
 class TestLamellarPSHGModel(unittest.TestCase):
@@ -836,5 +903,8 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 0.5]),self.xy_matrix[0][1],8)
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)        
-     
+    
+    def testCriticalPoint(self):
+        """ Test LamellarPSHG at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))
      
 class TestSquareWellStructure(unittest.TestCase):
@@ -878,5 +948,8 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 0.5]),self.xy_matrix[0][1],8)
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
-                         
+    
+    def testCriticalPoint(self):
+        """ Test SquareWellStructure at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))                     
      
 class TestHardsphereStructure(unittest.TestCase):
@@ -917,5 +990,8 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 0.5]),self.xy_matrix[0][1],8)
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
-                      
+    
+    def testCriticalPoint(self):
+        """ Test HardsphereStructure at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))                  
     
 class TestStickyHSStructure(unittest.TestCase):
@@ -952,5 +1028,4 @@
         self.assertEquals(self.comp.run(1.3),self.x_array[1])
         
-        
     def testEval_2D(self):
         """ Test 2D model for a StickyHSStructure with evalDistribution"""
@@ -960,5 +1035,7 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
                
-     
+    def testCriticalPoint(self):
+        """ Test StickyHSStructure at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0))) 
         
 class TestHayterMSAStructure(unittest.TestCase):
@@ -1003,5 +1080,8 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 0.5]),self.xy_matrix[0][1],8)
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
-                       
+    
+    def testCriticalPoint(self):
+        """ Test HayterMSAStructure at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))                   
      
      
@@ -1044,5 +1124,4 @@
         self.assertEquals(self.comp.run(1.3),self.x_array[1])
         
-        
     def testEval_2D(self):
         """ Test 2D model for a BEPolyelectrolyte with evalDistribution"""
@@ -1051,5 +1130,9 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 0.5]),self.xy_matrix[0][1],8)
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
-               
+   
+    def testCriticalPoint(self):
+        """ Test BEPolyelectrolyte at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))            
+             
              
 class TestDABModel(unittest.TestCase):
@@ -1085,5 +1168,4 @@
         self.assertEquals(self.comp.run(1.3),self.x_array[1])
         
-        
     def testEval_2D(self):
         """ Test 2D model for a DABModel with evalDistribution"""
@@ -1092,5 +1174,8 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 0.5]),self.xy_matrix[0][1],8)
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
-               
+    
+    def testCriticalPoint(self):
+        """ Test DABModel at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))           
              
     
@@ -1113,5 +1198,4 @@
         self.xy_matrix = self.comp.evalDistribution([qx_prime, qy_prime])
         
-        
     def test1D(self):
         """ Test 1D model for a GuinierModel"""
@@ -1122,5 +1206,4 @@
         self.assertAlmostEqual(self.comp.run([1.0, 1.3]),0.716531, 4)
      
-        
     def testEval_1D(self):
         """ Test 1D model for a GuinierModel with evalDistribution"""
@@ -1135,4 +1218,7 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
     
+    def testCriticalPoint(self):
+        """ Test GuinierModel at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))
         
         
@@ -1176,4 +1262,8 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
     
+    def testCriticalPoint(self):
+        """ Test DebyeModel at the critical point"""
+        self.assertEquals(self.comp.run(0.0),1.001)
+        
        
 class TestPorodModel(unittest.TestCase):
@@ -1215,5 +1305,5 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
     
-    def testCreaticalPt(self):
+    def testCreaticalPoint(self):
         """ Test for critical point for PorodModel run"""
         self.assertRaises(ZeroDivisionError, self.comp.run, 0.0)
@@ -1259,5 +1349,8 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 0.5]),self.xy_matrix[0][1],8)
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
-        
+    
+    def testCriticalPoint(self):
+        """ Test PeakGauss at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))    
         
 class TestPeakLorentzModel(unittest.TestCase):
@@ -1301,5 +1394,11 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
         
-        
+    def testCriticalPoint(self):
+        """ Test PeakLorentz at the critical point"""
+        self.comp.setParam('B', 0.0)
+        self.assertRaises(ZeroDivisionError, self.comp.run, 10)
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))  
+        
+       
 class TestFractalAbsModel(unittest.TestCase):
     """ Unit tests for FractalAbsModel"""
@@ -1344,5 +1443,8 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 0.5]),self.xy_matrix[0][1],8)
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
-        
+    
+    def testCriticalPoint(self):
+        """ Test Fractal Abs at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))    
    
 class TestFractalModel(unittest.TestCase):
@@ -1389,4 +1491,7 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
         
+    def testCriticalPoint(self):
+        """ Test Fractal at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))
     
 class TestLorentzModel(unittest.TestCase):
@@ -1428,5 +1533,10 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 0.5]),self.xy_matrix[0][1],8)
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
-            
+          
+    def testCriticalPoint(self):
+        """ Test Lorentz at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))
+        
+          
 class TestPowerLawAbsModel(unittest.TestCase):
     """ Unit tests for PowerLawAbsModel"""
@@ -1467,4 +1577,9 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
     
+    def testCriticalPoint(self):
+        """ Test PowerLawAbs at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))
+        
+        
 class TestPowerLawModel(unittest.TestCase):
     """ Unit tests for PowerLawModel"""
@@ -1504,4 +1619,8 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 0.5]),self.xy_matrix[0][1],8)
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
+    
+    def testCriticalPoint(self):
+        """ Test PowerLawModel at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))
       
       
@@ -1544,5 +1663,9 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 0.5]),self.xy_matrix[0][1],8)
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
-        
+    
+    def testCriticalPoint(self):
+        """ Test TeubnerStrey at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))    
+      
       
 class TestLineModel(unittest.TestCase):
@@ -1578,5 +1701,8 @@
         self.assertAlmostEquals(self.comp.runXY([1.3, 0.5]),self.xy_matrix[0][1],8)
         self.assertAlmostEquals(self.comp.runXY([1.3, 1.57]),self.xy_matrix[1][1],8)
-  
+    
+    def testCriticalPoint(self):
+        """ Test line at the critical point"""
+        self.assert_(numpy.isfinite(self.comp.run(0.0)))
  
 if __name__ == '__main__':
