\(\renewcommand\AA{\unicode{x212B}}\)
Exercise 3ΒΆ
The aim of this exercise is to write a small algorithm that wraps a small script that focuses some powder diffraction data.
Write an algorithm called PowderDiffractionReduce
. The algorithm should
have 3 properties:
Filename
: A FileProperty for a TOF data file to load (ignore extensions)CalFilename
: A FileProperty for a cal file (ignore extensions)OutputWorkspace
: An output WorkspaceProperty to hold the final result.
The steps the algorithm should perform are:
Use the Load algorithm to load the TOF data
Apply the calibration file using ApplyDiffCal
Run ConvertUnits on the TOF data to convert to
dSpacing
Run DiffractionFocussing on the previous output & focus the data using the same cal file from the earlier step (called a grouping file here)
Set the output from the
DiffractionFocussing
algorithm as the output ofPowderDiffractionReduce
Delete the temporary reference using DeleteWorkspace
To test the algorithm, execute the script that contains the algorithm to register it with Mantid. It will then show up in the list of algorithms. Use the following inputs:
Filename
: HRP39182.RAWCalFilename
: hrpd_new_072_01_corr.calOutputWorkspace
: focussed
When plotting the output workspace it should look like this:
Once finished check your answer with the provided Exercise 3 Solutions