Table of Contents
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.
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’] |
Filename2 | Input | string | The input filename of the second ISAW DetCal file (West banks for SNAP) . Allowed extensions: [‘.detcal’] | |
TimeOffset | Output | number | Time Offset |
Moves the detectors in an instrument using the origin and 2 vectors of the rotated plane from an ISAW DetCal file.
#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="IDFs_for_UNIT_TESTING/MINITOPAZ_Definition.xml",)
LoadIsawDetCal(InputWorkspace=iw,FileName=filename)
bank = iw.getInstrument().getComponentByName("bank1")
print "Position after LoadDetCal :",bank.getPos()
Output:
Position after LoadDetCal : [0.5,0.167548,-0.167548]
Categories: Algorithms | Diffraction\DataHandling | DataHandling\Isaw