ess.reduce.nexus.workflow.assemble_beamline#
- ess.reduce.nexus.workflow.assemble_beamline(detector, source_position, sample_position, gravity)[source]#
Add beamline information (gravity vector, source- and sample-position) to detector.
This is performed separately and after
get_calibrated_detector()
to avoid as false dependency of, e.g., the reshaped detector numbers on the sample position. The latter can change during a run, e.g., for a rotating sample. The detector numbers might be used, e.g., to mask certain detector pixels, and should not depend on the sample position.- Parameters:
detector (
CalibratedDetector
[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
))]) – NeXus detector group.source_position (
Position
[NXsource
,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
))]) – Position of the neutron source.sample_position (
Position
[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
))]) – Position of the sample.gravity (
nexus.types.GravityVector
(scipp.Variable
)) – Gravity vector.
- Return type:
CalibratedBeamline
[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
))]