AlignAndFocusPowderFromFiles v1

../_images/AlignAndFocusPowderFromFiles-v1_dlg.png

AlignAndFocusPowderFromFiles dialog.

Summary

The algorithm used for reduction of powder diffraction data

Properties

Name Direction Type Default Description
Filename Input list of str lists Mandatory Files to combine in reduction. Allowed extensions: [‘_event.nxs’, ‘.nxs.h5’]
MaxChunkSize Input number 0 Specify maximum Gbytes of file to read in one chunk. Default is whole file.
FilterBadPulses Input number 0 Filter out events measured while proton charge is more than 5% below average
AbsorptionWorkspace Input MatrixWorkspace   Divide data by this Pixel-by-pixel workspace
CacheDir Input string   the directory in which the cache file will be created
OutputWorkspace Output MatrixWorkspace Mandatory Combined output workspace
UnfocussedWorkspace Output MatrixWorkspace   Treated data in d-spacing before focussing (optional). This will likely need rebinning.
Characterizations Input TableWorkspace   Characterizations table
CalFileName Input string   The name of the calibration file with offset, masking, and grouping data. Allowed extensions: [‘.h5’, ‘.hd5’, ‘.hdf’, ‘.cal’]
GroupFilename Input string   Overrides grouping from CalFileName. Allowed extensions: [‘.xml’, ‘.cal’]
GroupingWorkspace InOut GroupingWorkspace   Optional: A GroupingWorkspace giving the grouping info.
CalibrationWorkspace InOut TableWorkspace   Optional: A Workspace containing the calibration information. Either this or CalibrationFile needs to be specified.
OffsetsWorkspace Input OffsetsWorkspace   Optional: An OffsetsWorkspace giving the detector calibration values.
MaskWorkspace InOut MaskWorkspace   Optional: A workspace giving which detectors are masked.
MaskBinTable Input TableWorkspace   Optional: A workspace giving pixels and bins to mask.
Params Input dbl list   A comma separated list of first bin boundary, width, last bin boundary. Optionally this can be followed by a comma and more widths and last boundary pairs. Negative width values indicate logarithmic binning.
ResampleX Input number 0 Number of bins in x-axis. Non-zero value overrides “Params” property. Negative value means logarithmic binning.
Dspacing Input boolean True Bin in Dspace. (True is Dspace; False is TOF)
PreserveEvents Input boolean True If the InputWorkspace is an EventWorkspace, this will preserve the full event list (warning: this will use much more memory!).
RemovePromptPulseWidth Input number 0 Width of events (in microseconds) near the prompt pulse to remove. 0 disables
CompressTolerance Input number 1e-05 Compress events (in microseconds) within this tolerance. (Default 1e-5)
CompressWallClockTolerance Input number Optional The tolerance (in seconds) on the wall-clock time for comparison. Unset means compressing all wall-clock times together disabling pulsetime resolution.
CompressStartTime Input string   An ISO formatted date/time string specifying the timestamp for starting filtering. Ignored if WallClockTolerance is not specified. Default is start of run
LorentzCorrection Input boolean False Multiply each spectrum by sin(theta) where theta is half of the Bragg angle
UnwrapRef Input number 0 Reference total flight path for frame unwrapping. Zero skips the correction
LowResRef Input number 0 Reference DIFC for resolution removal. Zero skips the correction
LowResSpectrumOffset Input number -1 Offset on spectrum No of low resolution spectra from high resolution one. If negative, then all the low resolution TOF will not be processed. Otherwise, low resolution TOF will be stored in an additional set of spectra. If offset is equal to 0, then the low resolution will have same spectrum Nos as the normal ones. Otherwise, the low resolution spectra will have spectrum IDs offset from normal ones.
ReductionProperties Input string __powdereduction  
DMin Input dbl list   Minimum for Dspace axis. (Default 0.)
DMax Input dbl list   Maximum for Dspace axis. (Default 0.)
TMin Input number Optional Minimum for TOF axis. Defaults to 0.
TMax Input number Optional Maximum for TOF or dspace axis. Defaults to 0.
CropWavelengthMin Input number 0 Crop the data at this minimum wavelength. Overrides LowResRef.
CropWavelengthMax Input number Optional Crop the data at this maximum wavelength. Forces use of CropWavelengthMin.
PrimaryFlightPath Input number -1 If positive, focus positions are changed. (Default -1)
SpectrumIDs Input int list   Optional: Spectrum Nos (note that it is not detector ID or workspace indices).
L2 Input dbl list   Optional: Secondary flight (L2) paths for each detector
Polar Input dbl list   Optional: Polar angles (two thetas) for detectors
Azimuthal Input dbl list   Azimuthal angles (out-of-plain) for detectors
FrequencyLogNames Input str list SpeedRequest1,Speed1,frequency,skf1.speed Candidate log names for frequency
WaveLengthLogNames Input str list LambdaRequest,lambda,skf12.lambda Candidate log names for wave length

Description

This is a workflow algorithm that wraps AlignAndFocusPowder to perform a double loop over files with chunks, accumulating the result. The additional properties from what is allowed in AlignAndFocusPowder is for how the file is loaded (e.g. MaxChunkSize and FilterBadPulses), an optional Characterizations table, and an optional AbsorptionWorkspace. The AbsorptionWorkspace should be in units of Wavelength for every detector pixel and is divided from the chunk after loaded. For all other information, see AlignAndFocusPowder.

In broad terms, this algorithm is the pseudo-code:

for filename in filenames:
    cachefile = CreateCacheFilename(filename, ...)
    if cachefile exists:
        wksp_single = LoadNexusProcessed(cachefile)
    else:
        for chunk in DetermineChunking(filename):
            wksp_single_chunk = Load(chunk)
            wksp_single_chunk = AlignAndFocusPowder(wksp_single_chunk, ...)
        # accumulate chunks into wksp_single
        SaveNexusProcess(wksp_single, cachefile)
    # accumulate data from files into OutputWorkspace

Algorithms used by this are:

  1. AlignAndFocusPowder v1
  2. CompressEvents v1
  3. ConvertUnits v1
  4. CreateCacheFilename v1
  5. DeleteWorkspace v1
  6. DetermineChunking v1
  7. Divide v1
  8. EditInstrumentGeometry v1
  9. FilterBadPulses v1
  10. Load v1
  11. LoadNexusProcessed v1
  12. PDDetermineCharacterizations v1
  13. Plus v1
  14. RenameWorkspace v1
  15. SaveNexusProcessed v1

Categories: AlgorithmIndex | Diffraction\Reduction

Source

Python: AlignAndFocusPowderFromFiles.py (last modified: 2019-09-17)