From e49c86034624095e329a48a5b5f542df4dab9b1f Mon Sep 17 00:00:00 2001 From: x03daop Date: Mon, 2 Nov 2015 14:35:18 +0100 Subject: [PATCH] Closedown --- script/ManipulatorScan.py | 5 ++++- script/local.py | 10 ++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/script/ManipulatorScan.py b/script/ManipulatorScan.py index e5f2e07b..5f380629 100644 --- a/script/ManipulatorScan.py +++ b/script/ManipulatorScan.py @@ -9,6 +9,9 @@ LATENCY (double) RELATIVE (BOOLEAN) """ +def AfterReadout(rec): + append_diag_datasets() set_preference(Preference.PLOT_TYPES,{'Integration':1}); -lscan(MOTOR, SENSORS, RANGE[0], RANGE[1], STEPS, LATENCY, RELATIVE, before_read=trig_scienta) \ No newline at end of file +create_diag_datasets() +lscan(MOTOR, SENSORS, RANGE[0], RANGE[1], STEPS, LATENCY, RELATIVE, before_read=trig_scienta, after_read = AfterReadout) \ No newline at end of file diff --git a/script/local.py b/script/local.py index 17b7414a..a3463cc6 100644 --- a/script/local.py +++ b/script/local.py @@ -154,5 +154,15 @@ 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 + 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+"/" + for f in diag_channels: + append_dataset(group+f.getName(), f.take()) \ No newline at end of file