1 | import mantid.simpleapi as api |
---|
2 | from mantid.api import * |
---|
3 | from mantid.kernel import * |
---|
4 | |
---|
5 | class ScaleWrap(PythonAlgorithm): |
---|
6 | |
---|
7 | def PyInit(self): |
---|
8 | self.declareProperty(MatrixWorkspaceProperty("InputWorkspace", "", |
---|
9 | direction=Direction.Input)) |
---|
10 | self.declareProperty(MatrixWorkspaceProperty("OutputWorkspace", "", |
---|
11 | direction = Direction.Output)) |
---|
12 | |
---|
13 | def PyExec(self): |
---|
14 | inputWS = self.getPropertyValue("InputWorkspace") |
---|
15 | outputWS = api.Scale(InputWorkspace=inputWS, Factor=2.0) |
---|
16 | self.setProperty("OutputWorkspace", outputWS) |
---|
17 | |
---|
18 | ############################################################################################# |
---|
19 | registerAlgorithm(ScaleWrap) |
---|