Closedown

This commit is contained in:
x07maop
2015-08-24 18:14:34 +02:00
parent 50df26dc16
commit aeb7e39c24
6 changed files with 466 additions and 99 deletions

View File

@@ -1,7 +1,7 @@
###################################################################################################
# Deployment specific global definitions - executed after startup.py
###################################################################################################
MODE = None
FILENAME = None
#Uncomment this line to create the simulated devices needed to the tutorial scripts.
#run("tutorial/devices")
@@ -13,11 +13,9 @@ class Strategy(ch.psi.pshell.data.ScanPersistenceStrategyTable):
return time.strftime('%Y%m%d%H%M%S') + '_' + controller.getExecutingContext() + '_logs'
def getDatasetName(self, scan):
print scan
mode = None
if MODE is not None:
mode = "plus" if (MODE == "CIRC +") else "minus"
return time.strftime('%Y%m%d%H%M%S') + '_' + controller.getExecutingContext() +'_' + str(mode) + '_' + str(controller.dataManager.getScanIndex()).zfill(4)
global FILENAME
name = controller.getExecutingContext() if FILENAME is None else FILENAME
return time.strftime('%Y%m%d%H%M%S') + '_' + FILENAME + '_' + str(controller.dataManager.getScanIndex()).zfill(4)
controller.dataManager.setScanStrategy(Strategy())