Ignore:
Timestamp:
Dec 9, 2011 12:42:35 PM (12 years ago)
Author:
Jae Cho <jhjcho@…>
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:
849fa92
Parents:
b57e704
Message:

test reference values are updated: there were # of reasons why they failed. 1)we now use degree (instead of rad) staring from the right-x-axis. 2) many corrections made in computation to get consistent with igor. 3) now 2d uses points instead of pixels. But these reference values are just current outputs. Todo: we need to test this averaging more.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansdataloader/test/utest_averaging.py

    rca3b9c5d rb517792  
    125125         
    126126        o = r(self.data) 
     127 
    127128        answer = Loader().load('avg_testdata.txt') 
    128129        for i in range(r.nbins_phi): 
     
    140141        r = Boxsum(x_min=.01, x_max=.015, y_min=0.01, y_max=0.015) 
    141142        s, ds = r(self.data) 
    142         self.assertAlmostEqual(s, 151.81809601016641, 4) 
    143         self.assertAlmostEqual(ds, 16.245399156009537, 4) 
     143        self.assertAlmostEqual(s, 34.278990899999997, 4) 
     144        self.assertAlmostEqual(ds, 7.8007981835194293, 4) 
    144145     
    145146        r = Boxavg(x_min=.01, x_max=.015, y_min=0.01, y_max=0.015) 
    146147        s, ds = r(self.data) 
    147         self.assertAlmostEqual(s, 0.11195555855955155, 4) 
    148         self.assertAlmostEqual(ds, 0.011979881083557541, 4) 
     148        self.assertAlmostEqual(s, 0.10579935462962962, 4) 
     149        self.assertAlmostEqual(ds, 0.024076537603455028, 4) 
    149150             
    150151    def test_slabX(self): 
     
    158159        r.fold = False 
    159160        o = r(self.data) 
    160      
     161 
    161162        answer = Loader().load('slabx_testdata.txt') 
    162163        for i in range(len(o.x)): 
     
    175176        r.fold = False 
    176177        o = r(self.data) 
    177      
     178 
    178179        answer = Loader().load('slaby_testdata.txt') 
    179180        for i in range(len(o.x)): 
     
    195196        r.nbins_phi = 20 
    196197        o = r(self.data) 
    197      
     198 
    198199        answer = Loader().load('ring_testdata.txt') 
    199200        for i in range(len(o.x)): 
     
    213214        r.nbins_phi = 20 
    214215        o = r(self.data) 
    215      
     216 
    216217        answer = Loader().load('sectorphi_testdata.txt') 
    217218        for i in range(len(o.x)): 
     
    231232        r.nbins_phi = 20 
    232233        o = r(self.data) 
    233      
     234 
    234235        answer = Loader().load('sectorq_testdata.txt') 
    235236        for i in range(len(o.x)): 
Note: See TracChangeset for help on using the changeset viewer.