silx-kit / pyFAI

Fast Azimuthal Integration in Python
Other
104 stars 94 forks source link

azimuth_range for splitpix method of integrate1d #164

Open tgdane opened 9 years ago

tgdane commented 9 years ago

When using splitpix as the method for integrate1d, the azimuth_range argument does not change the integration result. See the below comparison of the splitpix and bbox methods

splitpix_vs_bbox_1d

Commands:

test_image = fabio.open(pth_image).data
ai = pyFAI.AzimuthalIntegrator()
ai.load(pth_poni)
ai.set_maskfile(pth_detMask)
ai.set_flatfiles(pth_flatField)
ai.set_darkfiles(pth_darkFile)

q1, I1 = ai.integrate1d(test_image, 512,
                        radial_range=(4,30), azimuth_range=(0,90),
                        method="splitpix")

q2, I2 = ai.integrate1d(test_image, 512,
                        radial_range=(4,30), azimuth_range=(-90,0),
                        method="splitpix")

q3, I3 = ai.integrate1d(test_image, 512,
                        radial_range=(4,30), azimuth_range=(0,90),
                        method="bbox")

q4, I4 = ai.integrate1d(test_image, 512,
                        radial_range=(4,30), azimuth_range=(-90,0),
                        method="bbox")
kif commented 9 years ago

@GiannisA Apparently there is a mix-up in the cython code used between mine and Giannis's one, at the AzimuthalIntegrator level. We need to remove one of the two versions, probably (mine, splitPixel.pyx) but implement the missing features in the code of Giannis (SplitPixelFull.pyx) which is generally more readable but lacks some features like the limitation in azimuthal angle and 2D integration especially

We should write a test-case to prevent such regression in the future as well. Giannis, do you have some time for a video-conf, soon ?

Cheers, Jérôme