diff --git a/script/local.py b/script/local.py index ddba574..e072147 100644 --- a/script/local.py +++ b/script/local.py @@ -2,6 +2,7 @@ # Deployment specific global definitions - executed after startup.py ################################################################################################### FILENAME = None +data_file = None #Uncomment this line to create the simulated devices needed to the tutorial scripts. #run("tutorial/devices") @@ -14,9 +15,10 @@ class Strategy(ch.psi.pshell.data.ScanPersistenceStrategyTable): return time.strftime('%Y%m%d%H%M%S') + '_' + controller.getExecutingContext() + '_logs' def getDatasetName(self, scan): - global FILENAME + global FILENAME, data_file name = controller.getExecutingContext() if FILENAME is None else FILENAME - return time.strftime('%Y%m%d_%H%M') + '_' + FILENAME + '_' + str(controller.dataManager.getScanIndex()).zfill(4) + data_file = time.strftime('%Y%m%d_%H%M') + '_' + FILENAME + '_' + str(controller.dataManager.getScanIndex()).zfill(4) + return data_file controller.dataManager.setScanStrategy(Strategy())