Closedown

This commit is contained in:
x07maop
2015-09-24 10:39:41 +02:00
parent 757be26f2e
commit 06aa660886

View File

@@ -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())