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

LoadIsawDetCal v1

Summary

Since ISAW already has the capability to calibrate the instrument using single crystal peaks, this algorithm leverages this in mantid. It loads in a detcal file from ISAW and moves all of the detector panels accordingly. The target instruments for this feature are SNAP and TOPAZ.

See Also

SaveIsawDetCal

Properties

Name

Direction

Type

Default

Description

InputWorkspace

InOut

Workspace

Mandatory

The workspace containing the geometry to be calibrated.

Filename

Input

list of str lists

Mandatory

The input filename of the ISAW DetCal file (Two files allowed for SNAP) . Allowed extensions: [‘.detcal’, ‘.peaks’, ‘.integrate’]

Filename2

Input

string

The input filename of the second ISAW DetCal file (West banks for SNAP) . Allowed extensions: [‘.detcal’, ‘.peaks’, ‘.integrate’]

TimeOffset

Output

number

Time Offset

Description

Moves the detectors in an instrument using the origin and 2 vectors of the rotated plane from an ISAW DetCal file.

Usage

#Write a ISAW DetCal file
import mantid
filename=mantid.config.getString("defaultsave.directory")+"loadIsawDetCalTest.DetCal"
f=open(filename,'w')
f.write("5      1    256    256 50.1000 49.9000  0.2000  55.33   50.0000   16.7548  -16.7548  0.00011 -0.00002  1.00000  0.00000  1.00000  0.00000\n")
f.close()

iw = LoadEmptyInstrument(Filename="unit_testing/MINITOPAZ_Definition.xml",)
LoadIsawDetCal(InputWorkspace=iw,FileName=filename)
bank = iw.getInstrument().getComponentByName("bank1")
print("Position after LoadDetCal : {}".format(bank.getPos()))

Output:

Position after LoadDetCal : [0.5,0.167548,-0.167548]

Categories: AlgorithmIndex | Diffraction\DataHandling | DataHandling\Isaw

Source

C++ header: LoadIsawDetCal.h

C++ source: LoadIsawDetCal.cpp