Script execution
This commit is contained in:
+10
-7
@@ -154,14 +154,17 @@ def print_diag():
|
||||
for f in diag_channels:
|
||||
print "%-25s %s" % (f.getName() , str(f.read()))
|
||||
|
||||
def create_diag_datasets():
|
||||
group = get_current_group() + "attrs/"
|
||||
print group
|
||||
def create_diag_datasets(parent = None):
|
||||
if parent is None:
|
||||
parent = get_current_group()
|
||||
group = parent + "attrs/"
|
||||
for f in diag_channels:
|
||||
create_dataset(group+f.getName() , 's' if (type(f) is ch.psi.pshell.epics.ChannelString) else 'i')
|
||||
|
||||
def append_diag_datasets():
|
||||
group = get_current_group() + "attrs/"
|
||||
def append_diag_datasets(parent = None):
|
||||
if parent is None:
|
||||
parent = get_current_group()
|
||||
group = parent + "attrs/"
|
||||
for f in diag_channels:
|
||||
x = f.take()
|
||||
if x is None:
|
||||
@@ -170,9 +173,9 @@ def append_diag_datasets():
|
||||
|
||||
|
||||
SAVE_DIAGS = True
|
||||
def AfterReadout(rec = None):
|
||||
def AfterReadout(rec):
|
||||
if SAVE_DIAGS:
|
||||
if (rec is None) or (rec.index == 0):
|
||||
if rec.index == 0:
|
||||
create_diag_datasets()
|
||||
append_diag_datasets()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user