ess.reduce.diagnostics.load_nexus.load_detectors#
- ess.reduce.diagnostics.load_nexus.load_detectors(filename, *, detectors=None, bank_sizes=None)[source]#
Load detector data from a NeXus file. We attempt to use the GenericNeXusWorkflow first and fall back to raw Scippnexus code if necessary. By default, an attempt at loading each detector as a DataArray is made. If this fails (because signal shapes are incompatible or some fields are missing), the loader will fall back to loading the detector as a DataGroup.
- Parameters:
detectors (
list[str] |str|None, default:None) – List of detectors to load. A single string can also be provided to load only one detector. IfNone, all NXdetectors are loaded.bank_sizes (
Optional[nexus.types.DetectorBankSizes(dict)], default:None) – Dictionary specifying how to reshape each detector’s data array. The keys should correspond to detector names, and the values should be dictionaries mapping dimension names to reshaped sizes. IfNone, no reshaping is applied.
- Return type: