\(\renewcommand\AA{\unicode{x212B}}\)
SNAPReduce v1¶
Summary¶
Properties¶
Name |
Direction |
Type |
Default |
Description |
---|---|---|---|---|
RunNumbers |
Input |
long list |
0 |
Run numbers to process, comma separated |
Background |
Input |
long |
Optional |
Background to subtract from each individual run |
Masking |
Input |
string |
None |
Mask to be applied to the data. Allowed values: [‘None’, ‘Horizontal’, ‘Vertical’, ‘Masking Workspace’, ‘Custom - xml masking file’] |
MaskingWorkspace |
Input |
The workspace containing the mask. |
||
MaskingFilename |
Input |
string |
The file containing the xml mask. |
|
Calibration |
Input |
string |
Convert Units |
The type of conversion to d_spacing to be used. Allowed values: [‘Convert Units’, ‘Calibration File’, ‘DetCal File’] |
CalibrationFilename |
Input |
string |
The calibration file to convert to d_spacing. Allowed extensions: [‘.h5’, ‘.cal’] |
|
DetCalFilename |
Input |
list of str lists |
ISAW DetCal file. Allowed extensions: [‘.detcal’] |
|
Binning |
Input |
dbl list |
0.5,-0.004,7 |
Min, Step, and Max of d-space bins. Logarithmic binning is used if Step is negative. |
Normalization |
Input |
string |
None |
If needed what type of input to use as normalization, Extracted from Data uses a background determination that is peak independent.This implemantation can be tested in algorithm SNAP Peak Clipping Background. Allowed values: [‘None’, ‘From Workspace’, ‘From Processed Nexus’, ‘Extracted from Data’] |
NormalizationFilename |
Input |
string |
The file containing the processed nexus for normalization. |
|
NormalizationWorkspace |
Input |
The workspace containing the normalization data. |
||
PeakClippingWindowSize |
Input |
long |
10 |
Read live data - requires a saved run in the current IPTS with the same instrument configuration |
SmoothingRange |
Input |
long |
10 |
Read live data - requires a saved run in the current IPTS with the same instrument configuration |
GroupDetectorsBy |
Input |
string |
All |
Detector groups to use for future focussing: All detectors as one group, Groups (East,West for SNAP), Columns for SNAP, detector banks. Allowed values: [‘All’, ‘Column’, ‘Banks’, ‘Modules’, ‘2_4 Grouping’] |
MaxChunkSize |
Input |
number |
16 |
Specify maximum Gbytes of file to read in one chunk. Zero reads the whole file at once. |
ProcessingMode |
Input |
string |
Production |
Set-Up Mode is used for establishing correct parameters. Production Mode only Normalized workspace is kept for each run. Allowed values: [‘Set-Up’, ‘Production’] |
FinalUnits |
Input |
string |
dSpacing |
Units to convert the data to at the end of processing. Allowed values: [‘dSpacing’, ‘MomentumTransfer’, ‘Wavelength’] |
OptionalPrefix |
Input |
string |
Optional Prefix to be added to workspaces and output filenames |
|
SaveData |
Input |
boolean |
False |
Save data in the following formats: Ascii- d-spacing ,Nexus Processed,GSAS and Fullprof |
OutputDirectory |
Input |
string |
Default value is proposal shared directory |
|
EnableConfigurator |
Input |
boolean |
False |
Do not reduce, just save the configuration file for autoreduction |
ConfigSaveDir |
Input |
string |
Default directory is /SNS/IPTS-XXXX/shared/config where XXXX is theIPTS number of the first input run number |
Description¶
The purpose of this algorithm is to do a full reduction of SNAP data. This allows several runs, and with all the typical options that are usually used at the beamline, including calibrate from a cal file and from Convert Units, mask from file workspace and default masks, several groupings and save in GSAS or Fullprof format.
AutoConfiguration Creator¶
Option EnableConfigurator bypasses the autoreduction. Instead, a file containing the names and values of certain input properties is saved to disk.
All properties except RunNumbers, EnableConfigurator, and ConfigSaveDir are saved.
The set of property names and values are cast into a python dictionary, then saved in JSON format.
The file name follows the format YYYY-MM-DD_HH-MM-SS.json, the timestamp being the time of file creation.
The file is saved to the location specified in ConfigSaveDir. If no location is specified then the file is saved to /SNS/SNAP/IPTS-XXXX/shared/autoreduce/configurations/, where XXXX stands for the IPTS number of the first run passed on to property “RunNumbers”.
Usage¶
Categories: AlgorithmIndex | Diffraction\Reduction
Source¶
Python: SNAPReduce.py