diff --git a/script/local.py b/script/local.py index 248b60f..3f67080 100644 --- a/script/local.py +++ b/script/local.py @@ -10,10 +10,10 @@ energy.setBlockingWrite(True) import ch.psi.pshell.data.LayoutTable class DataLayout( ch.psi.pshell.data.LayoutTable): def getLogFileName(self): - return time.strftime('%Y%m%d_%H%M') + '_' + get_context().name + '_logs' + return time.strftime('%Y%m%d_%H%M') + '_' + get_context().script + '_logs' def getDatasetName(self, scan): - data_file = time.strftime('%Y%m%d_%H%M') + '_' + get_context().name + '_' + str(get_context().index).zfill(4) + data_file = time.strftime('%Y%m%d_%H%M') + '_' + get_context().name + '_' + str(get_context().count).zfill(4) print "Opened data file: " + get_context().path + "/" + data_file return data_file controller.dataManager.setLayout(DataLayout()) @@ -48,7 +48,10 @@ class SimulatedEnergy(Writable): global sim_energy sim_energy = value - def close(self): + def close(self): set_file("test 1") +a= lscan(ao1, (ai1,ai2), 0, 40, 200, 0.01) +set_file("test 2") +a= lscan(ao1, (ai1,ai2), 0, 40, 200, 0.01) pass @@ -127,9 +130,8 @@ def convert_file(input_file_name, output_file_name, pol = None): normdiode=repr(float(CADC3)/float(CADC2)) out.write(Ecrbk + s + CADC1 + s + CADC2 + s + CADC3 + s + CADC4 + s + CADC5 + s + MCurr + s + time + s + MAGX + s + MAGZ + s + str(pol) + s + EXPT + s + normtey + s + normdiode + line_sep) except: - traceback.print_exc() - - + traceback.print_exc() + def plot_file(file_name, title = None): """ """