GetDetectorOffsets

From MantidProject

Jump to: navigation, search

Contents

Summary

Creates a .cal file containing offsets for each detector.

Properties

Order Name Direction Type Default Description
1 InputWorkspace Input Workspace Mandatory A 2D workspace with X values of d-spacing. The workspace must have first been processed with CrossCorrelate.
2 OutputWorkspace Output Workspace Mandatory Workspace containing the offsets.
3 Step Input Double 0.01 The step size.
4 DReference Input Double 2.0 The expected peak position in d-spacing.
5 XMin Input Double 0.0 The start of the X range for fitting.
6 XMax Input Double 0.0 The end of the X range for fitting
7 GroupingFileName Input Filename Mandatory The name of the output CalFile (.cal extension)

Description

This algorithm requires a workspace that is both in d-spacing, but has also been preprocessed by the CrossCorrelate algorithm. In this first step you select one spectrum to be the reference spectrum and all of the other spectrum are cross correlated against it. Each output spectrum then contains a peak whose location defines the offset from the reference spectrum.

The algorithm iterates over each spectrum in the workspace and fits a Gaussian function to the reference peak. The fit is used to calculate the centre of the fitted peak, and the offset is then calculated as:

peakCentre * step / (dreference + PeakCentre * step)

This is then written into a .cal file for every detector that contributes to that spectrum. All of the entries in the cal file are initially set to both be included, but also to all group into a single group on DiffractionFocussing. The CreateCalFileByNames algorithm can be used to alter the grouping in the cal file.

Usage

Python

GetDetectorOffsets("InputW","OutputW",0.01,2.0,1.8,2.2,"output.cal")

Source Code

Header GetDetectorOffsets.h

Source GetDetectorOffsets.cpp

Personal tools
Create a book