Startup
This commit is contained in:
@@ -8,18 +8,18 @@ energy.setBlockingWrite(True)
|
||||
|
||||
|
||||
#The persistence strategy is overriden to adjust file names
|
||||
import ch.psi.pshell.data.ScanPersistenceStrategyTable
|
||||
class Strategy(ch.psi.pshell.data.ScanPersistenceStrategyTable):
|
||||
import ch.psi.pshell.data.LayoutTable
|
||||
class DataLayout( ch.psi.pshell.data.LayoutTable):
|
||||
def getLogFileName(self):
|
||||
return time.strftime('%Y%m%d%H%M%S') + '_' + controller.getExecutingContext() + '_logs'
|
||||
return time.strftime('%Y%m%d%H%M%S') + '_' + get_context().name + '_logs'
|
||||
|
||||
def getDatasetName(self, scan):
|
||||
global FILENAME, data_file
|
||||
name = controller.getExecutingContext() if FILENAME is None else FILENAME
|
||||
data_file = time.strftime('%Y%m%d_%H%M') + '_' + name + '_' + str(controller.dataManager.getScanIndex()).zfill(4)
|
||||
name = get_context().name if FILENAME is None else FILENAME
|
||||
data_file = time.strftime('%Y%m%d_%H%M') + '_' + name + '_' + str(get_context().index).zfill(4)
|
||||
print "Opened data file: " + str(controller.dataManager.output) + "/" + data_file
|
||||
return data_file
|
||||
controller.dataManager.setScanStrategy(Strategy())
|
||||
controller.dataManager.setLayout(DataLayout())
|
||||
|
||||
"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user