@@ -169,7 +169,7 @@ def test_ring_averages_azimuthally(self):
169169 data1d = ring_object (averager_data .data )
170170
171171 expected_area = test_data .area_under_region (r_min = r_min , r_max = r_max )
172- actual_area = integrate .simpson (data1d ._data_contents ["I" ].value , data1d ._data_contents ["Q " ].value )
172+ actual_area = integrate .simpson (data1d ._data_contents ["I" ].value , data1d ._data_contents ["Phi " ].value )
173173
174174 self .assertAlmostEqual (actual_area , expected_area , 1 )
175175
@@ -223,9 +223,9 @@ def test_sectorq_averaging_without_fold(self):
223223
224224 r_min = 0
225225 r_max = 0.9 * averager_data .qmax
226- phi_min = Pi / 6
227- phi_max = 5 * Pi / 6
228- nbins = int (test_data .matrix_size * np .sqrt (2 )/ 4 ) # usually reliable
226+ phi_min = Pi / 6.0
227+ phi_max = 5.0 * Pi / 6.0
228+ nbins = int (0.25 * test_data .matrix_size * np .sqrt (2 )) # usually reliable
229229
230230 wedge_object = SectorQ (r_range = (r_min , r_max ), phi_range = (phi_min ,phi_max ), nbins = nbins )
231231 # Explicitly set fold to False - results span full +/- range
@@ -256,9 +256,9 @@ def test_sectorq_averaging_with_fold(self):
256256
257257 r_min = 0
258258 r_max = 0.9 * averager_data .qmax
259- phi_min = Pi / 6
260- phi_max = 5 * Pi / 6
261- nbins = int (test_data .matrix_size * np .sqrt (2 )/ 4 ) # usually reliable
259+ phi_min = Pi / 6.0
260+ phi_max = 5.0 * Pi / 6.0
261+ nbins = int (0.25 * test_data .matrix_size * np .sqrt (2 )) # usually reliable
262262
263263 wedge_object = SectorQ (r_range = (r_min , r_max ), phi_range = (phi_min ,phi_max ), nbins = nbins )
264264 # Explicitly set fold to True - points either side of 0,0 are averaged
@@ -317,16 +317,15 @@ def test_wedgeq_averaging(self):
317317
318318 r_min = 0.1 * averager_data .qmax
319319 r_max = 0.9 * averager_data .qmax
320- phi_min = Pi / 6
321- phi_max = 5 * Pi / 6
320+ phi_min = Pi / 6.0
321+ phi_max = 5.0 * Pi / 6.0
322322 nbins = int (test_data .matrix_size * np .sqrt (2 )/ 4 ) # usually reliable
323323
324324 wedge_object = WedgeQ (r_range = (r_min , r_max ), phi_range = (phi_min ,phi_max ), nbins = nbins )
325325 data1d = wedge_object (averager_data .data )
326326
327327 expected_area = test_data .area_under_region (r_min = r_min , r_max = r_max ,
328- phi_min = phi_min ,
329- phi_max = phi_max )
328+ phi_min = phi_min , phi_max = phi_max )
330329 actual_area = integrate .simpson (data1d ._data_contents ["I" ].value , data1d ._data_contents ["Q" ].value )
331330
332331 self .assertAlmostEqual (actual_area , expected_area , 1 )
@@ -351,8 +350,6 @@ def test_wedgephi_init(self):
351350 nbins = 100
352351 # base = 10
353352
354- # wedge_object = WedgePhi(r_min=r_min, r_max=r_max, phi_min=phi_min,
355- # phi_max=phi_max, nbins=nbins, base=base)
356353 wedge_object = WedgePhi (r_range = (r_min , r_max ), phi_range = (phi_min ,phi_max ), nbins = nbins )
357354
358355 self .assertEqual (wedge_object .r_min , r_min )
@@ -380,17 +377,17 @@ def test_wedgephi_averaging(self):
380377
381378 r_min = 0.1 * averager_data .qmax
382379 r_max = 0.9 * averager_data .qmax
383- phi_min = Pi / 6
384- phi_max = 5 * Pi / 6
385- nbins = int (test_data .matrix_size * np .sqrt (2 )/ 4 ) # usually reliable
380+ phi_min = Pi / 6.0
381+ phi_max = 5.0 * Pi / 6.0
382+ nbins = int (0.25 * test_data .matrix_size * np .sqrt (2 )) # usually reliable
386383
387384 wedge_object = WedgePhi (r_range = (r_min , r_max ), phi_range = (phi_min ,phi_max ), nbins = nbins )
388385 data1d = wedge_object (averager_data .data )
389386
390387 expected_area = test_data .area_under_region (r_min = r_min , r_max = r_max ,
391- phi_min = phi_min ,
392- phi_max = phi_max )
393- actual_area = integrate .simpson (data1d ._data_contents ["I" ].value , data1d ._data_contents ["Q " ].value )
388+ phi_min = phi_min , phi_max = phi_max )
389+
390+ actual_area = integrate .simpson (data1d ._data_contents ["I" ].value , data1d ._data_contents ["Phi " ].value )
394391
395392 self .assertAlmostEqual (actual_area , expected_area , 1 )
396393
0 commit comments