Re: Integration of more degrees leads to smaller intensities

Top Page
Delete this message
Reply to this message
Author: Jerome Kieffer
Date:  
To: R.E.Hogenbirk, pyFAI
Subject: Re: Integration of more degrees leads to smaller intensities
Dear Rijk,

PyFAI provides the average of the intensity by default. If you are
interested in the sum of all intensities in the given sector, you have to ask for it:
```
res = ai.integrate1d(scan_sum_data, npt=1e3, radial_range=(q_lim[0], q_lim[1]))
q = res.radial
Isum = res.sum_signal
```

This is well described in the section 2 of https://journals.iucr.org/s/issues/2020/02/00/gy5006/index.html

Few other comments:
* The official documentation is on https://www.silx.org/, RTD is used
intenally for CI, the doc you will find there is either obsolete or
of the development version.
* If you wish to perform integration sector wise, using 2D integration
is much more efficient ... but you have to extract your results. If
performances matters, it is definitely the way to go.
* Beware of oversampling !!! (see https://arxiv.org/abs/1309.3614)
Are you splitting 1 inverse nanometer in 1000 parts ?
The default algorithm for splitting is `BBox` which is
likely to introduce artefacts. Of course, no pixel splitting would be
worse (Moiré pattern). Try "full" pixel splitting for best compromise.
try: `method=("full", "histogram", "cython")` as kwarg. Attention, changing
pixel splitting changes the result. Never mix/compare data obtained
with different pixel splitting methods.

Cheers,

Jerome

On Fri, 21 Nov 2025 10:33:22 +0000
"Rijk Hogenbirk" (via Owner Address of pyfai Mailing List) <pyfai-request@???> wrote:

> Dear pyFAI users,
>
> For my research, I am integrating individual reflections to a.o. study their intensity vs the intensity of their whole Debye-Scherrer ring using ai.integrate1d().
> However, I noticed that the intensity of my full integration of the ring was lower than what I got for a subsection of the ring.
>
> In the readthedocs, I saw that there is some kind of normalisation applied within pyFAI and I suspect this causes the difference.
> Only I do not understand how as the normalisation factor can cause this as by default it just a scalar.
>
> As an example, below I integrated one ring in the image below with different azimuthal ranges, where smaller ranges led to higher intensities.
> [cid:image004.png@01DC5AD9.594E77B0]
> [cid:image005.png@01DC5AD9.594E77B0]
> With the relevant code:
> q_none, i_none = ai.integrate1d(scan_sum_data, npt=1e3, radial_range=(q_lim[0], q_lim[1]))
> q_unit, i_unit = ai.integrate1d(scan_sum_data, npt=1e3, radial_range=(q_lim[0], q_lim[1]))
> q180, i180 = ai.integrate1d(scan_sum_data, npt=1e3, radial_range=(q_lim[0], q_lim[1]), azimuth_range=[-180,180-1e6])
> q90, i90 = ai.integrate1d(scan_sum_data, npt=1e3, radial_range=(q_lim[0], q_lim[1]), azimuth_range=[-90,90])
> q45, i45 = ai.integrate1d(scan_sum_data, npt=1e3, radial_range=(q_lim[0], q_lim[1]), azimuth_range=[-45,45])
> q090, i090 = ai.integrate1d(scan_sum_data, npt=1e3, radial_range=(q_lim[0], q_lim[1]), azimuth_range=[0,90])
>
> Is there any way I can get the integrated intensities such that I compare them to the intensity of the full ring?
>
>
> Best regards,
>
> Rijk Hogenbirk,
> PhD student at RID at TU Delft



--
Jérôme Kieffer