forked from npshub/mantid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
direct_command_interface.py
68 lines (44 loc) · 1.39 KB
/
direct_command_interface.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
#pylint: disable=invalid-name
"""
Command set for Direct Geometry reduction
"""
# Import the specific commands that we need
from mantid.api import AlgorithmManager
from reduction.command_interface import *
from inelastic_reducer import InelasticReducer
def ARCS():
Clear(InelasticReducer)
def CNCS():
Clear(InelasticReducer)
def HYSPEC():
Clear(InelasticReducer)
def LET():
Clear(InelasticReducer)
def MAPS():
Clear(InelasticReducer)
def MARI():
Clear(InelasticReducer)
def MERLIN():
Clear(InelasticReducer)
def SEQUOIA():
Clear(InelasticReducer)
def DefaultLoader():
step = InelasticLoader()
step.initialize()
ReductionSingleton().set_loader(step)
def FixEi(ei):
alg = AlgorithmManager.create("InelasticFixEi")
alg.setProperty("Ei", ei)
ReductionSingleton().set_ei_calculator(alg)
def CalculateEi(guess=None):
alg = AlgorithmManager.create("InelasticCalcEi")
alg.setProperty("EiGuess",guess)
ReductionSingleton().set_ei_calculator(alg)
def GetEiFromLog():
print("GetEiFromLog(): *** NOT IMPLEMENTED *** ")