ess.sans.i_of_q.preprocess_monitor_data
ess.sans.i_of_q.preprocess_monitor_data#
- ess.sans.i_of_q.preprocess_monitor_data(monitor, *, wavelength_bins=None, non_background_range=None)#
Prepare monitor data for computing the transmission fraction. The input data are first converted to wavelength (if needed). If a
non_background_range
is provided, it defines the region where data is considered not to be background, and regions outside are background. A mean background level will be computed from the background and will be subtracted from the non-background counts. Finally, if wavelength bins are provided, the data is rebinned to match the requested binning.- Parameters
monitor (
Union
[Dict
[str
,DataArray
],DataArray
]) – The monitor (or group of monitors) to be pre-processed.wavelength_bins (
Optional
[Variable
], default:None
) – The binning in wavelength to use for the rebinning.non_background_range (
Optional
[Variable
], default:None
) – The range of wavelengths that defines the data which does not constitute background. Everything outside this range is treated as background counts.
- Returns
Union
[Dict
[str
,DataArray
],DataArray
] – The input monitors converted to wavelength, cleaned of background counts, and rebinned to the requested wavelength binning.