Index: DataLoader/test/avg_testdata.txt
===================================================================
--- DataLoader/test/avg_testdata.txt	(revision 76e23691e12caa20c95e83c3161ff5e9ba24edb5)
+++ DataLoader/test/avg_testdata.txt	(revision 76e23691e12caa20c95e83c3161ff5e9ba24edb5)
@@ -0,0 +1,86 @@
+87
+0.000202106299717 -0.027508775 0.082928847514
+0.000551789534483 0.0284421916667 0.0731850536881
+0.000798810493953 1.60736842105e-005 0.0590302471882
+0.00116126782404 0.0438142678571 0.0517950053242
+0.00140714188022 0.064685778125 0.0547626242937
+0.00177124497692 1.07265199091 0.156421969167
+0.00201660336116 36.810534634 0.885116020355
+0.0023850851145 92.1891982143 1.28305716256
+0.00267278050009 84.665209375 1.15017124659
+0.00298274181425 56.7100338028 0.893718563342
+0.00325127626479 37.5359731707 0.676576507407
+0.00357359498717 25.3518046512 0.542944220133
+0.00383959397654 16.5985670833 0.415814550553
+0.0041700170637 11.4996769903 0.334136722646
+0.00443382276153 7.98444159292 0.265817183716
+0.00476991662481 5.6620977193 0.22286211848
+0.00503186595945 4.25155079365 0.183691226291
+0.00539412022968 3.34649076336 0.159830319458
+0.00568671283121 2.65831783099 0.136823053999
+0.00598988289328 2.09287549655 0.120140018787
+0.00626025579568 1.742223725 0.104349883954
+0.00657095900024 1.39967185802 0.0930044848904
+0.00688926719883 1.18864367586 0.0826515909917
+0.00715686844465 0.953296011111 0.0729892127156
+0.0074801022006 0.827779119251 0.0668699693599
+0.00774651148348 0.719786980725 0.0620716112536
+0.00807379933294 0.612540272081 0.0572616304198
+0.00839302584963 0.566606194831 0.0532825833092
+0.00867886586147 0.478724006452 0.047902248102
+0.00897219569306 0.413986979545 0.0454682930801
+0.0092723038804 0.383747495339 0.0429772810607
+0.00957855263679 0.299709392875 0.0379986890102
+0.00989037086379 0.3335908208 0.0393691239425
+0.0101595073016 0.286069857255 0.0370817933172
+0.0104753452352 0.259831640906 0.0348225626354
+0.0107957306999 0.252761626236 0.0343460413844
+0.0110630176098 0.251568055396 0.0336423804744
+0.0113930077886 0.235093004317 0.0328371516903
+0.0116916257614 0.213031539933 0.0306893694272
+0.0119857184654 0.181918172852 0.0294712039203
+0.012284885515 0.209558449686 0.029654495452
+0.0125887644552 0.184974602215 0.028223277554
+0.0128970215248 0.157850908537 0.0269431518661
+0.0131668490761 0.175325451829 0.0276139587923
+0.0134784412725 0.121815444807 0.026429336777
+0.0137937807812 0.16237724087 0.0258899780789
+0.0140622641312 0.135818960632 0.0258645735537
+0.0143930943297 0.129014499722 0.0254960218544
+0.0146864095013 0.142419530685 0.0249695336221
+0.0149988047287 0.143813170789 0.0244766681401
+0.0152973754556 0.122014793995 0.0229128991842
+0.0155997665361 0.128637397727 0.0232999901007
+0.0158704888872 0.126514509848 0.0234398006234
+0.0161759543409 0.125320390268 0.022797589029
+0.0164776012943 0.109229219192 0.0222425678213
+0.0167646754651 0.124861313021 0.0232126170142
+0.0170227523446 0.12825973162 0.0231933098642
+0.0173156876264 0.0947754240896 0.0228973329864
+0.0176417418879 0.122358410056 0.0240616388086
+0.0179991119552 0.0946951700297 0.0223980227203
+0.0182538528641 0.121243864198 0.0251867566004
+0.0185211566597 0.114524376471 0.0254586169395
+0.0188004862436 0.105750747719 0.0248183671151
+0.0190913124594 0.0732775201681 0.0279438273842
+0.0193931167311 0.097700884141 0.0290122599042
+0.0197053932406 0.113561495455 0.0302481661165
+0.0200276506769 0.08421012 0.0293502263012
+0.0203594135936 0.107610352071 0.0327605964871
+0.0205287156218 0.115224884906 0.0344222268277
+0.0208738823951 0.0941588853147 0.0342119909635
+0.0212274412762 0.0870687160305 0.037120278486
+0.0215889783111 0.071684565 0.0385328986423
+0.0217726142518 0.107426831731 0.0435558726696
+0.0221453821308 0.106882672826 0.0445934315513
+0.0223344219011 0.0731600060241 0.042980047662
+0.0227175909983 0.106005602985 0.052102966241
+0.0229116347581 0.0987530476923 0.0533983398452
+0.0233044347998 0.102729822449 0.0601602327345
+0.0235031118611 0.077848535 0.066185247601
+0.0239048296539 0.0854999352941 0.0703156144831
+0.024000069863 0.1014931 0.0797968391526
+0.0243705875591 -0.00442893181818 0.0860634747975
+0.024747558388 0.0889580272727 0.132841659925
+0.024938371921 0.169803994133 0.145644771445
+
Index: DataLoader/test/ring_testdata.txt
===================================================================
--- DataLoader/test/ring_testdata.txt	(revision 76e23691e12caa20c95e83c3161ff5e9ba24edb5)
+++ DataLoader/test/ring_testdata.txt	(revision 76e23691e12caa20c95e83c3161ff5e9ba24edb5)
@@ -0,0 +1,21 @@
+<X>   <Y>   <dY>
+0.15708  0.972421  0.0817009
+0.471239  1.11139  0.0823546
+0.785398  1.09267  0.0823443
+1.09956  1.07895  0.0817159
+1.41372  1.14111  0.0831238
+1.72788  1.07949  0.0840375
+2.04204  1.10197  0.0824725
+2.35619  1.00297  0.0787024
+2.67035  1.02805  0.0804773
+2.98451  0.919877  0.0783511
+3.29867  0.973222  0.0769917
+3.61283  0.915259  0.0760745
+3.92699  0.890996  0.0751355
+4.24115  0.914385  0.0759576
+4.55531  0.980681  0.0791343
+4.86947  0.9385  0.0755147
+5.18363  0.973714  0.0781204
+5.49779  0.968017  0.0781457
+5.81195  1.01289  0.0785441
+6.12611  1.0482  0.0782739
Index: DataLoader/test/utest_abs_reader.py
===================================================================
--- DataLoader/test/utest_abs_reader.py	(revision bee885e9167ee1682eceb5e5c2805ea0f688a26c)
+++ DataLoader/test/utest_abs_reader.py	(revision 76e23691e12caa20c95e83c3161ff5e9ba24edb5)
@@ -69,4 +69,6 @@
         """
         self.assertEqual(self.data.filename, "S2-30dq.d1d")
+        self.assertEqual(len(self.data.x), 134)
+        self.assertEqual(len(self.data.y), 134)
         #          Q           I               dI          dQ  
         # Point 1: 0.003014    0.003010        0.000315    0.008249
Index: DataLoader/test/utest_averaging.py
===================================================================
--- DataLoader/test/utest_averaging.py	(revision 76e23691e12caa20c95e83c3161ff5e9ba24edb5)
+++ DataLoader/test/utest_averaging.py	(revision 76e23691e12caa20c95e83c3161ff5e9ba24edb5)
@@ -0,0 +1,48 @@
+
+import unittest
+
+from DataLoader.loader import  Loader
+from DataLoader.manipulations import Ring, CircularAverage
+ 
+import os.path
+
+class data_info_tests(unittest.TestCase):
+    
+    def setUp(self):
+        self.data = Loader().load('MAR07232_rest.ASC')
+        
+    def test_ring(self):
+        """
+            Test ring averaging
+        """
+        r = Ring(r_min=.005, r_max=.01, 
+                 center_x=self.data.detector[0].beam_center.x, 
+                 center_y=self.data.detector[0].beam_center.y)
+        r.nbins_phi = 20
+        
+        o = r(self.data)
+        answer = Loader().load('ring_testdata.txt')
+        for i in range(r.nbins_phi):
+            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_circularavg(self):
+        """
+            Test circular averaging
+            The test data was not generated by IGOR.
+        """
+        r = CircularAverage(r_min=.00, r_max=.025, 
+                 bin_width=0.0003)
+        r.nbins_phi = 20
+        
+        o = r(self.data)
+        answer = Loader().load('avg_testdata.txt')
+        for i in range(r.nbins_phi):
+            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__':
+    unittest.main()
