Script execution
This commit is contained in:
@@ -19,8 +19,23 @@ class Strategy(ch.psi.pshell.data.ScanPersistenceStrategyTable):
|
||||
controller.dataManager.setScanStrategy(Strategy())
|
||||
|
||||
|
||||
#Reading Energy Scan configuration file
|
||||
def getPars(element):
|
||||
f = open(controller.setup.getConfigPath() + '/energy_scan.properties')
|
||||
try:
|
||||
for line in inputfile:
|
||||
tokens = line.split("=")
|
||||
if tokens[0] == str(element):
|
||||
tokens = tokens[1].split(";")
|
||||
for i in range[tokens.lenght]:
|
||||
tokens[i] = float(tokens[i])
|
||||
return tokens
|
||||
finally:
|
||||
f.close()
|
||||
raise Exception ("Invalid element: " + str(element))
|
||||
|
||||
|
||||
#Pseudo-devices
|
||||
energy = None
|
||||
class SimulatedEnergy(Writable):
|
||||
def write(self, value):
|
||||
|
||||
Reference in New Issue
Block a user