ess.nmx.scaling.average_roughly_scaled_intensities#

ess.nmx.scaling.average_roughly_scaled_intensities(binned, scale_factor)[source]#

Scale the intensities by the estimated scale factor.

Parameters:
Returns:

scaling.EstimatedScaledIntensities (scipp.DataArray) – Average scaled intensities on hkl(asu) indices per wavelength.

Notes

The average of roughly scaled intensities are calculated by the following formula:

\[EstimatedScaledI_{\lambda} = \dfrac{ \sum_{i=1}^{N_{\lambda, (hkl)}} EstimatedScaledI_{\lambda, (hkl)} }{ N_{\lambda, (hkl)} }\]

And scaled intensities on each hkl(asu) indices per wavelength are calculated by the following formula:

\begin{eqnarray} EstimatedScaledI_{\lambda, (hkl)} \\ = \dfrac{ \sum_{i=1}^{N_{\lambda=reference, (hkl)}} \sum_{j=1}^{N_{\lambda, (hkl)}} \dfrac{I_{j}}{I_{i}} }{ N_{\lambda=reference, (hkl)}*N_{\lambda, (hkl)} } \\ = \dfrac{ \sum_{i=1}^{N_{\lambda=reference, (hkl)}} \dfrac{1}{I_{i}} }{ N_{\lambda=reference, (hkl)} } * \dfrac{ \sum_{j=1}^{N_{\lambda, (hkl)}} I_{j} }{ N_{\lambda, (hkl)} } \\ = average( \dfrac{1}{I_{\lambda=reference, (hkl)}} ) * average( I_{\lambda, (hkl)} ) \end{eqnarray}

Therefore the binned(wavelength dimension) should be grouped along the hkl(asu) coordinate in the calculation.