-
I want to write a test that checks that the integration 2D works as intended. For this, I am generating arrays for radial, azimuthal and the resulting integrated patterns: tth = numpy.linspace(0, 30, 200)
chi = numpy.linspace(-180, 180, 180)
intensity = numpy.full((chi.size, tth.size), 10) I am then using # ai is the azimuthal integrator
calc_image = ai.calcfrom2d(intensity, tth, chi, mask=ai.mask) But the problem is that when I do the integration on this
I attached an HDF5 file that contain all the data for easier browsing: test_pyFAI_2d.zip I guess some bins are empty but I do not really understand why ? How could I avoid this ? Should I create a more sparse Full Python scriptimport pyFAI import pyFAI.detectors from pyFAI.azimuthalIntegrator import AzimuthalIntegrator import numpy import matplotlib.pyplot as plt |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The holes you see are consequences of the gaps in the detector "Pilatus 1M" which are hard-coded in the
Note that the |
Beta Was this translation helpful? Give feedback.
The holes you see are consequences of the gaps in the detector "Pilatus 1M" which are hard-coded in the
pyFAI.detectors
class.https://github.com/silx-kit/pyFAI/blob/main/src/pyFAI/detectors/_dectris.py#L69
You can always re-define the detector's mask like:
Note that the
calcfrom1/2d
does interpolation while integrate performs histogramming, the difference is subtle but you won't get back what you input initially.