Closedown

This commit is contained in:
x07maop
2015-08-24 18:15:23 +02:00
parent aeb7e39c24
commit 951c97fb5b

View File

@@ -6,7 +6,7 @@ FILENAME = None
#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
#The persistence strategy is overriden to adjust file names
import ch.psi.pshell.data.ScanPersistenceStrategyTable
class Strategy(ch.psi.pshell.data.ScanPersistenceStrategyTable):
def getLogFileName(self):
@@ -15,9 +15,7 @@ class Strategy(ch.psi.pshell.data.ScanPersistenceStrategyTable):
def getDatasetName(self, scan):
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)
return time.strftime('%Y%m%d%H%M%S') + '_' + FILENAME + '_' + str(controller.dataManager.getScanIndex()).zfill(4)
controller.dataManager.setScanStrategy(Strategy())