ess.reduce.nexus.workflow.load_nexus_sample#
- ess.reduce.nexus.workflow.load_nexus_sample(location)[source]#
Load a NeXus sample group from a file.
If there is no sample group in the file, an empty group is returned. This should not happen, but handling it gracefully makes testing and working with pre-production files easier. There should be little harm in returning an empty group. Subsequent extract of the sample position will then default to the origin.
- Parameters:
location (
NeXusComponentLocationSpec
[NXsample
,TypeVar
(RunType
,nexus.types.BackgroundRun
(int
),nexus.types.EmptyBeamRun
(int
),nexus.types.SampleRun
(int
),TransmissionRun
[nexus.types.SampleRun
(int
)],TransmissionRun
[nexus.types.BackgroundRun
(int
)],nexus.types.VanadiumRun
(int
))]) – Location spec for the sample group.- Return type:
NeXusComponent
[NXsample
,TypeVar
(RunType
,nexus.types.BackgroundRun
(int
),nexus.types.EmptyBeamRun
(int
),nexus.types.SampleRun
(int
),TransmissionRun
[nexus.types.SampleRun
(int
)],TransmissionRun
[nexus.types.BackgroundRun
(int
)],nexus.types.VanadiumRun
(int
))]