HB3AAdjustSampleNorm v1#
Summary#
Adjusts the detector position based on a detector height and distance offset and normalizes with detector efficiency from a vanadium file or workspace, and converts the input to Q-space.
See Also#
ConvertWANDSCDtoQ, ConvertHFIRSCDtoMDE, HB3AFindPeaks, HB3APredictPeaks, HB3AIntegratePeaks
Properties#
Name |
Direction |
Type |
Default |
Description |
|---|---|---|---|---|
Filename |
Input |
list of str lists |
Input autoreduced detector scan data files to convert to Q-space. Allowed extensions: [‘.nxs.h5’, ‘.nxs’] |
|
VanadiumFile |
Input |
string |
File with Vanadium normalization scan data. Allowed extensions: [‘.nxs’] |
|
NormaliseBy |
Input |
string |
Time |
Normalise to monitor, time or None. Allowed values: [‘None’, ‘Time’, ‘Monitor’] |
NormalizeData |
Input |
boolean |
True |
When False, skip normalization of the output data even if vanadium data is provided. |
InputWorkspaces |
Input |
string |
Workspace or comma-separated workspace list containing input MDHisto scan data. |
|
VanadiumWorkspace |
Input |
IMDHistoWorkspace |
MDHisto workspace containing vanadium normalization data |
|
DetectorHeightOffset |
Input |
number |
0 |
Optional distance (in meters) to move detector height (relative to current position) |
DetectorDistanceOffset |
Input |
number |
0 |
Optional distance (in meters) to move detector distance (relative to current position) |
Wavelength |
Input |
number |
Optional |
Optional wavelength value to use as backup if one was not found in the sample log |
OutputType |
Input |
string |
Q-sample events |
Whether to use ConvertHFIRSCDtoQ for an MDEvent, or ConvertWANDSCDtoQ for an MDHisto. Allowed values: [‘Q-sample events’, ‘Q-sample histogram’, ‘Detector’] |
ScaleByMotorStep |
Input |
boolean |
False |
If True then the intensity of the Q-sample events output will be scaled by the motor step size. This will allow directly comparing the intensity of data measured with different motor step sizes. |
MinValues |
Input |
dbl list |
-10,-10,-10 |
3 comma separated values, one for each q_sample dimension |
MaxValues |
Input |
dbl list |
10,10,10 |
3 comma separated values, one for each q_sample dimension; must be larger than those specified in MinValues |
MergeInputs |
Input |
boolean |
False |
If all inputs should be merged into one MDEvent output workspace |
BinningDim0 |
Input |
dbl list |
-8.02,8.02,401 |
Binning parameters for the 0th dimension. Enter it as acomma-separated list of values with theformat: ‘minimum,maximum,number_of_bins’. |
BinningDim1 |
Input |
dbl list |
-2.52,2.52,126 |
Binning parameters for the 1st dimension. Enter it as acomma-separated list of values with theformat: ‘minimum,maximum,number_of_bins’. |
BinningDim2 |
Input |
dbl list |
-8.02,8.02,401 |
Binning parameters for the 2nd dimension. Enter it as acomma-separated list of values with theformat: ‘minimum,maximum,number_of_bins’. |
Grouping |
Input |
string |
None |
Group pixels (shared by input and normalization). Allowed values: [‘None’, ‘2x2’, ‘4x4’] |
OutputWorkspace |
Output |
Mandatory |
Output MDWorkspace in Q-space, name is prefix if multiple input files were provided. |
|
OutputNormalizationWorkspace |
Output |
Optional MDEvent output workspace containing the per-file vanadium normalization scaled by the monitor flux ratio. Requires NormalizeData=False, OutputType=’Q-sample events’, and vanadium data. When multiple inputs are provided, MergeInputs must also be True. |
||
OutputGroupingWorkspace |
Output |
Optional: output GroupingWorkspace mapping every detector’s workspace index to its group ID. Only produced when Grouping is ‘2x2’ or ‘4x4’. |
Description#
Takes in DEMAND detector scan data from files or workspaces and converts them to Q-space, providing an optional adjustment of the detector positions. DetectorHeightOffset adjusts all banks along the y-axis, and DetectorDistanceOffset adjusts banks along the z-axis. Both parameters move the detector relative to the current detector position.
The output can be either an MDEventWorkspace or a
MDHistoWorkspace. For a MDHistoWorkspace,
the conversion to Q-space is done using ConvertWANDSCDtoQ while ConvertHFIRSCDtoMDE is used for outputting an
MDEventWorkspace.
If multiple data file are included then the output will be a
WorkspaceGroup containing all the
MDWorkspace.
Normalisation#
During loading a few different types of normalisation can be applied,
vanadium, time or monitor and motor step size. VanadiumFile or
VanadiumWorkspace is applied by dividing the data detector
pixel-by-pixel. The NormaliseBy option time or monitor uses that
log values from the data (and vanadium if used) input and is applied
to each scan axis step. The ScaleByMotorStep scales the entire data
by the step size of either the omega or phi axis, this is only
applied when OutputType is Q-sample events and allows the comparison of peak
intensities found with IntegratePeaksMD
to be directly compared between scans measured with different step
sizes.
Path to MDNorm#
Setting NormalizeData=False with OutputType=Q-sample events suppresses the division of the
data by the vanadium and flux, and instead makes the vanadium-based normalization available as a
separate MDEventWorkspace via OutputNormalizationWorkspace.
The two workspaces — unnormalized data and normalization — can then be passed to
MDNorm, which applies symmetry-correct normalization to an arbitrary Q-sample
or HKL binning chosen after data collection. This deferred-normalization workflow avoids
rebinning artefacts that arise when the vanadium correction is applied before converting to
the final reciprocal-space grid.
When multiple input files are provided, MergeInputs=True must also be set so that the
per-file normalization workspaces are merged into a single output alongside the merged data
workspace.
Grouping#
A grouping option is available group pixels by either 2x2 or 4x4 which reduces memory usage and improves the performance of subsequent reduction steps. The default is the original detector pixelation.
See HB3AIntegratePeaks for complete examples of the HB3A workflow.
Categories: AlgorithmIndex | Crystal\Corrections
Source#
Python: HB3AAdjustSampleNorm.py