SetDetScale v1

../_images/SetDetScale-v1_dlg.png

SetDetScale dialog.

Summary

Set/change the detScale parameters for a MatrixWorkspace or PeaksWorkspace instrument

Properties

Name Direction Type Default Description
Workspace InOut Workspace Mandatory MatrixWorkspace or PeaksWorkspace with instrument.
DetScaleList Input str list   Comma separated list detectorNumbers:detScales eg. 13:1.046504,14:1.259293

Description

Given a PeaksWorkspace or MatrixWorkspace with an instrument, this algorithm will set or change the detector bank scales that are used in SaveHKL and AnvredCorrection. The input format is the same as used in anvred3.py, so DetScaleList input can be pasted from the definition of detScale there. The default values can be set in the instrument parameter file.

Usage

Example:

w=LoadIsawPeaks("TOPAZ_3007.peaks")

print "Before SetDetScale:"
print '{0:.5f}'.format(w.getInstrument().getNumberParameter("detScale17")[0])
print '{0:.5f}'.format(w.getInstrument().getNumberParameter("detScale49")[0])

#This SetDetScale will change the parameters set in parameter file
SetDetScale(Workspace=w, DetScaleList='17:1.0,49:2.0')
print "After SetDetScale:"
print '{0:.5f}'.format(w.getInstrument().getNumberParameter("detScale17")[0])
print '{0:.5f}'.format(w.getInstrument().getNumberParameter("detScale49")[0])

Output:

Before SetDetScale:
1.18898
0.79420
After SetDetScale:
1.00000
2.00000

Categories: Algorithms | DataHandling\Instrument