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):