From fe21915e0d8ee3ee59bb7e36f0fb2151e4ea5b6c Mon Sep 17 00:00:00 2001 From: x07maop Date: Mon, 24 Aug 2015 12:06:28 +0200 Subject: [PATCH] Closedown --- script/local.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/script/local.py b/script/local.py index 951eac7..aeade35 100644 --- a/script/local.py +++ b/script/local.py @@ -6,6 +6,20 @@ #Uncomment this line to create the simulated devices needed to the tutorial scripts. #run("tutorial/devices") +#This procedude is used to emulate file names generated by FDA +import ch.psi.pshell.data.ScanPersistenceStrategyTable +class Strategy(ch.psi.pshell.data.ScanPersistenceStrategyTable): + def getLogFileName(self): + return time.strftime('%Y%m%d%H%M%S') + '_' + controller.getExecutingContext() + '_logs' + + def getDatasetName(self, scan): + return time.strftime('%Y%m%d%H%M%S') + '_' + controller.getExecutingContext() + '_' + str(controller.dataManager.getScanIndex()).zfill(4) + + +controller.dataManager.setScanStrategy(Strategy()) + + + energy = None class SimulatedEnergy(Writable):