ess.dream.io.geant4.load_mcstas_monitor#

ess.dream.io.geant4.load_mcstas_monitor(file_path, position)[source]#

Load a monitor from a McStas file.

Parameters:
  • file_path (MonitorFilename[TypeVar(RunType, ess.reduce.nexus.types.BackgroundRun (int), ess.reduce.nexus.types.EmptyBeamRun (int), ess.reduce.nexus.types.SampleRun (int), TransmissionRun[ess.reduce.nexus.types.SampleRun (int)], TransmissionRun[ess.reduce.nexus.types.BackgroundRun (int)], ess.reduce.nexus.types.VanadiumRun (int))]) – Indicates where to load data from.

  • position (ess.powder.types.CaveMonitorPosition (scipp.Variable)) –

    The position of the monitor.

    Note that the files contain the position. But we don’t know what coordinate system they are define din. So we cannot reliably use them.

Returns:

NeXusComponent[ess.reduce.nexus.types.Monitor1 (int), TypeVar(RunType, ess.reduce.nexus.types.BackgroundRun (int), ess.reduce.nexus.types.EmptyBeamRun (int), ess.reduce.nexus.types.SampleRun (int), TransmissionRun[ess.reduce.nexus.types.SampleRun (int)], TransmissionRun[ess.reduce.nexus.types.BackgroundRun (int)], ess.reduce.nexus.types.VanadiumRun (int))] – A scipp.DataArray containing the loaded histogram.