Index: DataLoader/test/sectorphi_testdata.txt
===================================================================
--- DataLoader/test/sectorphi_testdata.txt	(revision 2e83ff3bdd5364bcde2c7caff6e9a377ea369d6b)
+++ DataLoader/test/sectorphi_testdata.txt	(revision 2e83ff3bdd5364bcde2c7caff6e9a377ea369d6b)
@@ -0,0 +1,20 @@
+0.0392699081699 1.17011551291 0.194245536643
+0.11780972451 1.00702036435 0.15833831009
+0.196349540849 0.720495528288 0.139457714809
+0.274889357189 1.04665851696 0.168853943548
+0.353429173529 1.13277227588 0.16379429199
+0.431968989869 1.06130576997 0.166925861186
+0.510508806208 1.13347769037 0.162057077746
+0.589048622548 1.11225550557 0.165855813491
+0.667588438888 1.09533180265 0.164835409907
+0.746128255228 1.10213941705 0.162478295782
+0.824668071567 1.02044158661 0.165187569415
+0.903207887907 1.14615084518 0.165822352514
+0.981747704247 0.952913709668 0.154726336649
+1.06028752059 0.946459144917 0.151824506059
+1.13882733693 1.23601572249 0.175965656101
+1.21736715327 1.18990929137 0.17124143576
+1.29590696961 1.2276650882 0.173295377002
+1.37444678595 1.04512596159 0.160699465091
+1.45298660229 1.18745088214 0.173383042523
+1.53152641863 1.10936624389 0.158273843573
Index: DataLoader/test/sectorq_testdata.txt
===================================================================
--- DataLoader/test/sectorq_testdata.txt	(revision 2e83ff3bdd5364bcde2c7caff6e9a377ea369d6b)
+++ DataLoader/test/sectorq_testdata.txt	(revision 2e83ff3bdd5364bcde2c7caff6e9a377ea369d6b)
@@ -0,0 +1,20 @@
+0.005125 4.02127205236 0.416045610328
+0.005375 3.456822 0.339451616582
+0.005625 2.88693827586 0.315514810618
+0.005875 2.19392444828 0.275050117582
+0.006125 1.93326715152 0.242041015277
+0.006375 1.56115175 0.208243430602
+0.006625 1.346252875 0.205110707531
+0.006875 1.11982316216 0.173969798727
+0.007125 0.94929915 0.15645917998
+0.007375 0.856048947368 0.150091984723
+0.007625 0.792349027027 0.14932042113
+0.007875 0.753030718182 0.132690754628
+0.008125 0.633578104651 0.123741945015
+0.008375 0.492303623256 0.11017450586
+0.008625 0.491610770213 0.105544246448
+0.008875 0.438532753333 0.102175142057
+0.009125 0.417049091489 0.0985475710833
+0.009375 0.334298295833 0.0918248077183
+0.009625 0.329847168519 0.0825040729343
+0.009875 0.263231283434 0.0844113633186
Index: DataLoader/test/slabx_testdata.txt
===================================================================
--- DataLoader/test/slabx_testdata.txt	(revision 2e83ff3bdd5364bcde2c7caff6e9a377ea369d6b)
+++ DataLoader/test/slabx_testdata.txt	(revision 2e83ff3bdd5364bcde2c7caff6e9a377ea369d6b)
@@ -0,0 +1,50 @@
+-0.00962159132857 0.336011011698 0.488617721661
+-0.00934874822941 0.169341263697 0.349298397763
+-0.00880305371584 0.266137690959 0.313454527129
+-0.00853020246473 0.53042309512 0.640848517184
+-0.0082573486596 0.131506032964 0.344582750407
+-0.00771163371395 0.37855077978 0.399878542284
+-0.00743877273675 1.22305004732 0.935636337563
+-0.00689304418196 1.02510396941 0.58056790098
+-0.00662017676773 1.19776697142 0.927276156351
+-0.00607443607399 2.14592640815 0.901774646566
+-0.00580156295786 1.76245186063 1.08131130719
+-0.00525581159553 3.51263196728 1.1534380121
+-0.00498293351273 4.61403810461 1.80060761383
+-0.00443717295236 6.69224442442 1.57849762651
+-0.00416429063819 11.8881503783 2.95751106458
+-0.00361852235044 16.0018161184 2.38615115797
+-0.00334563654027 31.0490619358 4.80037655086
+-0.0030727497282 41.6119181784 5.4639575083
+-0.00252697342519 71.8163563059 5.09207979935
+-0.0022540840977 68.9541223734 6.96581065982
+-0.00170830349931 1.20299985601 0.55602187788
+-0.00143541239187 -0.128405536814 0.361476507781
+-0.000889628969094 0.0231291411266 0.0980509703716
+-0.000616736817209 -0.00597983500599 0.0317586096182
+-7.09520410675e-005 0.0373361802828 0.198768805372
+0.000201940419739 0.0242580599324 0.0639653694525
+0.000747725078196 -0.0087954171462 0.243371558064
+0.0010206171124 -0.00564032235597 0.0308438685116
+0.00156640018212 0.120815708312 0.230887528979
+0.0018392910542 21.7610203455 3.89785284026
+0.00238507106417 93.9292971261 5.78185222632
+0.00265796003862 58.9392435113 6.55609779464
+0.00293084821709 37.950776621 5.20451320059
+0.00347662185922 23.7617216423 2.89473033587
+0.00374950715944 14.366068712 3.23457901336
+0.00429527430965 7.2450736643 1.59436243284
+0.00456815599622 4.51699023104 1.75524641669
+0.00511391518373 4.10500397804 1.21069572594
+0.00538679252127 3.24603156387 1.5410611893
+0.00593254227544 1.70186533105 0.772902657452
+0.00620541452867 1.91954073316 1.16236757432
+0.00675115337898 1.53864804114 0.754629321052
+0.00702401981269 0.645836241027 0.678560805804
+0.00756974628881 0.799244089968 0.555296393723
+0.00784260616787 0.291996503792 0.498600259667
+0.00838831879964 1.02382604351 0.624324964568
+0.00866117138903 0.273189896174 0.38726921435
+0.00893402138521 0.301093569069 0.475351425154
+0.00947971327134 0.390765056355 0.387460775789
+0.009752554998 -0.123282440572 0.288906086779
Index: DataLoader/test/slaby_testdata.txt
===================================================================
--- DataLoader/test/slaby_testdata.txt	(revision 2e83ff3bdd5364bcde2c7caff6e9a377ea369d6b)
+++ DataLoader/test/slaby_testdata.txt	(revision 2e83ff3bdd5364bcde2c7caff6e9a377ea369d6b)
@@ -0,0 +1,50 @@
+-0.00981530818509 0.173195927461 0.0844172521474
+-0.00926962320349 0.210505590753 0.0595361190668
+-0.00899677650894 0.244652190359 0.0895850556564
+-0.00845107512056 0.265993035634 0.0666080660306
+-0.00817822059005 0.289475366563 0.0969882347891
+-0.00763250426466 0.216956446732 0.061297641466
+-0.00735964263312 0.277331425421 0.0933738803126
+-0.00681391284071 0.342725434095 0.0724261717065
+-0.00654104484319 0.392190755871 0.109042871956
+-0.00626817488704 0.451098964813 0.116550921567
+-0.00572242942561 0.379721052239 0.076777026569
+-0.0054495540837 0.433801290053 0.110385286078
+-0.004903798586 0.508594445542 0.0851650192039
+-0.00463091859359 0.66912469559 0.136796594192
+-0.0040851545302 0.666639612581 0.0976268706729
+-0.00381227062264 0.720316847689 0.14147286728
+-0.0032664994643 0.679325124262 0.0989068147202
+-0.00299361237696 0.837852009544 0.151796196236
+-0.00244783559451 0.89718102713 0.112105037602
+-0.00217494606284 1.03946978054 0.170625894622
+-0.00162916512721 1.05983563324 0.12375260214
+-0.00135627388669 0.834750958983 0.153510704997
+-0.000810490268858 1.09975110023 0.124203411212
+-0.000537598054997 1.24420235765 0.185462933977
+-0.000264705680137 1.34991530032 0.193521832628
+0.000281079225678 1.20557718686 0.129412513236
+0.000553971593183 1.21112766832 0.183621560056
+0.00109975574876 1.27182919665 0.133242114799
+0.00137264737339 1.09335671556 0.176749528981
+0.00191842930769 1.02445153724 0.119230433073
+0.00219131945392 0.850946924462 0.153617640862
+0.00273709769594 0.791470959296 0.107464292498
+0.00300998562829 0.701643527447 0.139845645016
+0.00355575870709 0.63143127987 0.093594419565
+0.0038286436901 0.632079990389 0.131442574167
+0.00437441013479 0.59655095652 0.0916924511775
+0.00464729143306 0.594690488652 0.131146805216
+0.00519304977289 0.463676357535 0.0821774481155
+0.00546592665105 0.46676750257 0.117880857587
+0.00573880189245 0.410666655107 0.110910802531
+0.00628454713816 0.331947656254 0.0715186428864
+0.00655741697909 0.309823313461 0.10101066015
+0.00710315068867 0.255464454284 0.0663090097757
+0.00737601439397 0.221117625971 0.0848258256613
+0.00792173509717 0.312394128941 0.0708509004541
+0.00819459193174 0.188273445935 0.086184613514
+0.00874029815851 0.22540410608 0.0607480009671
+0.00901314738739 0.149537864138 0.0815039441345
+0.00955883766788 0.163658449578 0.0598329441459
+0.0098316785562 0.130573569595 0.0762388059779
Index: DataLoader/test/utest_averaging.py
===================================================================
--- DataLoader/test/utest_averaging.py	(revision f8d0ee7d16486b0110eac370d5d689f1f3d8bc8d)
+++ DataLoader/test/utest_averaging.py	(revision 2e83ff3bdd5364bcde2c7caff6e9a377ea369d6b)
@@ -61,4 +61,94 @@
         self.assertAlmostEqual(ds, 0.011979881083557541, 4)
             
+    def test_slabX(self):
+        """
+            Test slab in X
+            The test data was not generated by IGOR.
+        """
+        from DataLoader.manipulations import SlabX
+        
+        r = SlabX(x_min=-.01, x_max=.01, y_min=-0.0002, y_max=0.0002, bin_width=0.0004)
+        r.fold = False
+        o = r(self.data)
+    
+        answer = Loader().load('slabx_testdata.txt')
+        for i in range(len(o.x)):
+            self.assertAlmostEqual(o.x[i], answer.x[i], 4)
+            self.assertAlmostEqual(o.y[i], answer.y[i], 4)
+            self.assertAlmostEqual(o.dy[i], answer.dy[i], 4)
+            
+    def test_slabY(self):
+        """
+            Test slab in Y
+            The test data was not generated by IGOR.
+        """
+        from DataLoader.manipulations import SlabY
+        
+        r = SlabY(x_min=.005, x_max=.01, y_min=-0.01, y_max=0.01, bin_width=0.0004)
+        r.fold = False
+        o = r(self.data)
+    
+        answer = Loader().load('slaby_testdata.txt')
+        for i in range(len(o.x)):
+            self.assertAlmostEqual(o.x[i], answer.x[i], 4)
+            self.assertAlmostEqual(o.y[i], answer.y[i], 4)
+            self.assertAlmostEqual(o.dy[i], answer.dy[i], 4)
+            
+    def test_sectorphi_full(self):
+        """
+            Test sector averaging I(phi)
+            When considering the whole azimuthal range (2pi), 
+            the answer should be the same as ring averaging.
+            The test data was not generated by IGOR.
+        """
+        from DataLoader.manipulations import SectorPhi
+        import math
+        
+        r = SectorPhi(r_min=.005, r_max=.01, phi_min=0, phi_max=math.pi*2.0)
+        r.nbins_phi = 20
+        o = r(self.data)
+    
+        answer = Loader().load('ring_testdata.txt')
+        for i in range(len(o.x)):
+            self.assertAlmostEqual(o.x[i], answer.x[i], 4)
+            self.assertAlmostEqual(o.y[i], answer.y[i], 4)
+            self.assertAlmostEqual(o.dy[i], answer.dy[i], 4)
+            
+    def test_sectorphi_quarter(self):
+        """
+            Test sector averaging I(phi)
+            The test data was not generated by IGOR.
+        """
+        from DataLoader.manipulations import SectorPhi
+        import math
+        
+        r = SectorPhi(r_min=.005, r_max=.01, phi_min=0, phi_max=math.pi/2.0)
+        r.nbins_phi = 20
+        o = r(self.data)
+    
+        answer = Loader().load('sectorphi_testdata.txt')
+        for i in range(len(o.x)):
+            self.assertAlmostEqual(o.x[i], answer.x[i], 4)
+            self.assertAlmostEqual(o.y[i], answer.y[i], 4)
+            self.assertAlmostEqual(o.dy[i], answer.dy[i], 4)
+            
+    def test_sectorq_full(self):
+        """
+            Test sector averaging I(q)
+            The test data was not generated by IGOR.
+        """
+        from DataLoader.manipulations import SectorQ
+        import math
+        
+        r = SectorQ(r_min=.005, r_max=.01, phi_min=0, phi_max=math.pi/2.0)
+        r.nbins_phi = 20
+        o = r(self.data)
+    
+        answer = Loader().load('sectorq_testdata.txt')
+        for i in range(len(o.x)):
+            self.assertAlmostEqual(o.x[i], answer.x[i], 4)
+            self.assertAlmostEqual(o.y[i], answer.y[i], 4)
+            self.assertAlmostEqual(o.dy[i], answer.dy[i], 4)
+            
 
 if __name__ == '__main__':
