ess.powder.grouping.focus_data_dspacing_and_two_theta#
- ess.powder.grouping.focus_data_dspacing_and_two_theta(data, dspacing_bins, keep_events)[source]#
Reduce the pixel-based data to d-spacing and two-theta dimensions.
The two-theta binning does not use
TwoThetaBins
but instead computes the two-theta bins from the ‘two_theta’ coordinate of the input data. This is necessary to ensure that we have sufficiently high wavelength resolution when performing a monitor normalization in a follow-up workflow step. If we were to useTwoThetaBins
we would be influenced by and limited to the two-theta binning the user requests for the end result, which may not be sufficient.- Parameters:
data (
CountsDspacing
[TypeVar
(RunType
,ess.reduce.nexus.types.SampleRun
(int
),ess.reduce.nexus.types.VanadiumRun
(int
),ess.powder.types.EmptyCanRun
(int
))]) – The input data to be reduced, which must have ‘wavelength’, ‘dspacing’, ‘two_theta’ coordinates.dspacing_bins (
ess.powder.types.DspacingBins
(scipp.Variable
)) – The bins to use for the d-spacing dimension.keep_events (
KeepEvents
[TypeVar
(RunType
,ess.reduce.nexus.types.SampleRun
(int
),ess.reduce.nexus.types.VanadiumRun
(int
),ess.powder.types.EmptyCanRun
(int
))]) – Whether to keep the events in the output. If False, the output will be histogrammed instead of binned.
- Returns:
ReducedCountsDspacing
[TypeVar
(RunType
,ess.reduce.nexus.types.SampleRun
(int
),ess.reduce.nexus.types.VanadiumRun
(int
),ess.powder.types.EmptyCanRun
(int
))] – The reduced data with ‘dspacing’ and ‘two_theta’ dimensions.