Changeset f8d0ee7 in sasview for DataLoader/test


Ignore:
Timestamp:
Sep 17, 2008 4:34:32 PM (16 years ago)
Author:
Mathieu Doucet <doucetm@…>
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:
1f8accb
Parents:
76e2369
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • DataLoader/test/utest_averaging.py

    r76e2369 rf8d0ee7  
    4444            self.assertAlmostEqual(o.dy[i], answer.dy[i], 4) 
    4545             
     46    def test_box(self): 
     47        """ 
     48            Test circular averaging 
     49            The test data was not generated by IGOR. 
     50        """ 
     51        from DataLoader.manipulations import Boxsum, Boxavg 
     52         
     53        r = Boxsum(x_min=.01, x_max=.015, y_min=0.01, y_max=0.015) 
     54        s, ds = r(self.data) 
     55        self.assertAlmostEqual(s, 151.81809601016641, 4) 
     56        self.assertAlmostEqual(ds, 16.245399156009537, 4) 
     57     
     58        r = Boxavg(x_min=.01, x_max=.015, y_min=0.01, y_max=0.015) 
     59        s, ds = r(self.data) 
     60        self.assertAlmostEqual(s, 0.11195555855955155, 4) 
     61        self.assertAlmostEqual(ds, 0.011979881083557541, 4) 
     62             
    4663 
    4764if __name__ == '__main__': 
Note: See TracChangeset for help on using the changeset viewer.