ess.bifrost.detector.get_calibrated_detector_bifrost#

ess.bifrost.detector.get_calibrated_detector_bifrost(detector, analyzer, *, transform, offset, primary_graph, secondary_graph)[source]#

Extract the data array corresponding to a detector’s signal field.

This includes:

  • Reshaping the data array is reshaped to the logical detector shape.

  • Assigning geometry coordinate “position”.

  • Assigning spectrometer coordinates such as “final_energy”, “secondary_flight_time”, and “L1”.

Parameters:
  • detector (NeXusComponent[NXdetector, TypeVar(RunType, ess.reduce.nexus.types.SampleRun (int), ess.reduce.nexus.types.VanadiumRun (int))]) – Loaded NeXus detector.

  • analyzer (Analyzer[TypeVar(RunType, ess.reduce.nexus.types.SampleRun (int), ess.reduce.nexus.types.VanadiumRun (int))]) – Loaded analyzer parameters.

  • transform (NeXusTransformation[NXdetector, TypeVar(RunType, ess.reduce.nexus.types.SampleRun (int), ess.reduce.nexus.types.VanadiumRun (int))]) – Transformation that determines the detector position.

  • offset (DetectorPositionOffset[TypeVar(RunType, ess.reduce.nexus.types.SampleRun (int), ess.reduce.nexus.types.VanadiumRun (int))]) – Offset to add to the detector position.

  • primary_graph (PrimarySpecCoordTransformGraph[TypeVar(RunType, ess.reduce.nexus.types.SampleRun (int), ess.reduce.nexus.types.VanadiumRun (int))]) – Coordinate transformation graph for the primary spectrometer.

  • secondary_graph (SecondarySpecCoordTransformGraph[TypeVar(RunType, ess.reduce.nexus.types.SampleRun (int), ess.reduce.nexus.types.VanadiumRun (int))]) – Coordinate transformation graph for the secondary spectrometer. Must be a closure over analyzer parameters. And those parameters must have a compatible shape with data.

Returns:

EmptyDetector[TypeVar(RunType, ess.reduce.nexus.types.SampleRun (int), ess.reduce.nexus.types.VanadiumRun (int))] – Detector geometry and spectrometer coordinates.