Changeset a65ffcb in sasview for sansmodels/src/sans/models


Ignore:
Timestamp:
Sep 21, 2009 9:31:06 AM (15 years ago)
Author:
Gervaise Alina <gervyh@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
65883cf
Parents:
5859862
Message:

write unittest for guinier model

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/test/utest_other_models.py

    r9ce41c6 ra65ffcb  
    11021102        self.comp = GuinierModel() 
    11031103        self.comp.setParam('scale',1.0) 
    1104         self.comp.setParam('rg', 60) 
     1104        self.comp.setParam('rg', 1) 
    11051105         
    11061106        self.x = numpy.array([0.4, 1.3]) 
     
    11161116    def test1D(self): 
    11171117        """ Test 1D model for a GuinierModel""" 
    1118         self.assertAlmostEqual(self.comp.run(1.0), 5.6387e-5, 4) 
     1118        self.assertAlmostEqual(self.comp.run(1.0),0.716531, 4) 
    11191119         
    11201120    def test1D_2(self): 
    11211121        """ Test 2D model for a GuinierModel""" 
    1122         self.assertAlmostEqual(self.comp.run([1.0, 1.3]), 5.6387e-5, 4)   
    1123         from sans.models.GuinierModel import GuinierModel 
    1124         self.shape_indep_list.append(GuinierModel ) 
     1122        self.assertAlmostEqual(self.comp.run([1.0, 1.3]),0.716531, 4) 
     1123      
    11251124         
    11261125    def testEval_1D(self): 
Note: See TracChangeset for help on using the changeset viewer.