diff --git a/script/local.py b/script/local.py index b249611..5873094 100644 --- a/script/local.py +++ b/script/local.py @@ -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):