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:
binned (
scaling.WavelengthBinned
(scipp.DataArray
)) – Intensities binned in the wavelength dimension. It will be grouped by reflection (hkl) in the process.scale_factor (
scaling.EstimatedScaleFactor
(scipp.DataArray
)) –The estimated scale factor per reflection(hkl) of the reference wavelength bin. See
estimate_scale_factor_per_hkl_asu_from_reference()
for the calculation of the estimated scale factor.\[EstimatedScaleFactor_{(hkl)} = average( \dfrac{1}{I_{\lambda=reference, (hkl)}} )\]
- Returns:
scaling.EstimatedScaledIntensities
(scipp.DataArray
) – Average scaled intensities onhkl(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 thehkl(asu)
coordinate in the calculation.