\(\renewcommand\AA{\unicode{x212B}}\)

ApplyDiffCal v1

Summary

Applies a calibration to a workspace for powder diffraction

See Also

AlignDetectors, ConvertDiffCal, ConvertUnits, LoadDiffCal

Properties

Name

Direction

Type

Default

Description

InstrumentWorkspace

InOut

Workspace

Mandatory

Set the workspace whose instrument should be updated

CalibrationFile

Input

string

Optional: The .cal file containing the position correction factors. Either this, CalibrationWorkspace or OffsetsWorkspace needs to be specified. Allowed extensions: [‘.h5’, ‘.hd5’, ‘.hdf’, ‘.cal’]

CalibrationWorkspace

Input

TableWorkspace

Optional: Set the Diffraction Calibration workspace

OffsetsWorkspace

Input

OffsetsWorkspace

Optional: A OffsetsWorkspace containing the calibration offsets. Either this, CalibrationWorkspace or CalibrationFile needs to be specified.

ClearCalibration

Input

boolean

False

Remove any existing calibration from the workspace

Description

Loads diffractometer constants (DIFA, DIFC, TZERO) from a calibration data source and stores them in the instrument parameter map of the InstrumentWorkspace. The constants are used in time of flight diffraction instruments to convert from time of flight to d spacing and vice versa.

This algorithm either reads the constants from the CalibrationWorkspace, reads them from CalibrationFile using LoadDiffCal, or uses ConvertDiffCal to generate them from the OffsetsWorkspace.

This algorithm allows unit conversions between time of flight and d spacing using calibrated diffractometer constants to be performed using the ConvertUnits algorithm. ConvertUnits reads the constants from the instrument parameter map.

When used together with ConvertUnits this algorithm provides a way of converting in both directions between time of flight and d spacing and it is an alternative to using AlignDetectors.

The values of the diffractometer constants that are stored in the instrument parameter map can be viewed on the Show Detectors screen of a workspace.

Categories: AlgorithmIndex | DataHandling\Instrument | Diffraction\DataHandling

Source

C++ header: ApplyDiffCal.h

C++ source: ApplyDiffCal.cpp