Changes in test/sasdataloader/test/utest_averaging.py [35ec279:a10364b] in sasview
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/sasdataloader/test/utest_averaging.py
r35ec279 ra10364b 105 105 r = Ring(r_min=.005, r_max=.01, 106 106 center_x=self.data.detector[0].beam_center.x, 107 center_y=self.data.detector[0].beam_center.y) 108 r.nbins_phi = 20 107 center_y=self.data.detector[0].beam_center.y, 108 nbins = 20) 109 ##r.nbins_phi = 20 109 110 110 111 o = r(self.data) 111 112 answer = Loader().load('ring_testdata.txt') 112 for i in range(r.nbins_phi): 113 self.assertAlmostEqual(o.x[i], answer.x[i], 4) 114 self.assertAlmostEqual(o.y[i], answer.y[i], 4) 115 self.assertAlmostEqual(o.dy[i], answer.dy[i], 4) 113 114 for i in range(r.nbins_phi - 1): 115 self.assertAlmostEqual(o.x[i + 1], answer.x[i], 4) 116 self.assertAlmostEqual(o.y[i + 1], answer.y[i], 4) 117 self.assertAlmostEqual(o.dy[i + 1], answer.dy[i], 4) 116 118 117 119 def test_circularavg(self): … … 194 196 import math 195 197 196 r = SectorPhi(r_min=.005, r_max=.01, phi_min=0, phi_max=math.pi*2.0) 197 r.nbins_phi = 20 198 nbins = 19 199 phi_min = math.pi / (nbins + 1) 200 phi_max = math.pi * 2 - phi_min 201 202 r = SectorPhi(r_min=.005, 203 r_max=.01, 204 phi_min=phi_min, 205 phi_max=phi_max, 206 nbins=nbins) 198 207 o = r(self.data) 199 208
Note: See TracChangeset
for help on using the changeset viewer.