ess.bifrost.io.nexus.load_analyzer_for_detector#
- ess.bifrost.io.nexus.load_analyzer_for_detector(detector_location)[source]#
Find and load the right analyzer for a detector triplet.
Note
Depends heavily on the names of components being preceded by an in-instrument index, and the analyzer and detector components being separated in index by 2. If either condition changes this function will need to be modified.
- Parameters:
detector_location (
NeXusComponentLocationSpec
[NXdetector
,TypeVar
(RunType
,ess.reduce.nexus.types.SampleRun
(int
),ess.reduce.nexus.types.VanadiumRun
(int
))]) – The location of an NXdetector in the NeXus file. The analyzer is identified based on this location.- Returns:
Analyzer
[TypeVar
(RunType
,ess.reduce.nexus.types.SampleRun
(int
),ess.reduce.nexus.types.VanadiumRun
(int
))] – The loaded analyzer for the given detector triplet. Only a subset of fields is returned.