ess.imaging.normalize.normalize_sample_images#
- ess.imaging.normalize.normalize_sample_images(*, samples, background, factor)[source]#
Normalize the sample image stack.
\[NormalizedImages = SampleImages / Background * ScaleFactor\]Note
factor should correct the different neutron flux between the sample and the background.
For example, if the open beam(background) image is taken with longer exposure time than the sample image with the same neutron rate, the scale factor should be larger than 1.
The scale factor could be derived from the exposure time, proton charge or monitor counts depending on the experiment.
- Parameters:
samples (
normalize.SampleImageStacks
(scipp.DataArray
)) – Sample image stack to be normalized.background (
normalize.BackgroundImage
(scipp.DataArray
)) – Background image to be used for normalization.factor (
normalize.ScaleFactor
(scipp.Variable
)) – Scale factor for the normalization.
- Raises:
ValueError: – If the scale factor is negative. It is for the safety of the calculation on short data type. Depending on how you calculate the scale factor, the operation might fail and return negative values.
- Return type: