ess.isissans.general.get_monitor_data#
- ess.isissans.general.get_monitor_data(dg, nexus_name, spectrum_number)[source]#
Extract monitor data that was loaded together with detector data.
If the raw file is histogram data, Mantid stores this as a Workspace2D, where some or all spectra correspond to monitors.
- Parameters:
dg (
LoadedFileContents[TypeVar(RunType)]) – Data loaded with Mantid and converted to Scipp.nexus_name (
NeXusName[TypeVar(MonitorType,ess.reduce.nexus.types.IncidentMonitor(int),ess.reduce.nexus.types.TransmissionMonitor(int))]) – Name of the monitor in the NeXus file, e.g. ‘incident_monitor’ or ‘transmission_monitor’. Used when raw data is an EventWorkspace, where monitors are stored in a group with this name.spectrum_number (
MonitorSpectrumNumber[TypeVar(MonitorType,ess.reduce.nexus.types.IncidentMonitor(int),ess.reduce.nexus.types.TransmissionMonitor(int))]) – Spectrum number of the monitor in the NeXus file, e.g., 3 for incident monitor or 4 for transmission monitor. This is used when the raw data is a Workspace2D, where the monitor data is stored in a spectrum with this number.
- Returns:
NeXusComponent[TypeVar(MonitorType,ess.reduce.nexus.types.IncidentMonitor(int),ess.reduce.nexus.types.TransmissionMonitor(int)),TypeVar(RunType)] – Monitor data extracted from the loaded file.