From 43fad1766c740d8c8f579e1e4063db0428f92dcc Mon Sep 17 00:00:00 2001 From: gobbo_a Date: Mon, 9 Jan 2017 18:43:42 +0100 Subject: [PATCH] Closedown --- script/OPD_accurracy_check_scan.py | 2 +- script/jitter_scan.py | 6 +++--- script/jitter_vs_avggatelength_scan.py | 6 +++--- script/local.py | 4 ++-- script/phase_scan.py | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/script/OPD_accurracy_check_scan.py b/script/OPD_accurracy_check_scan.py index 40052d3..38143ec 100644 --- a/script/OPD_accurracy_check_scan.py +++ b/script/OPD_accurracy_check_scan.py @@ -29,7 +29,7 @@ latency = 10 # re-define filename, such that the SECTION is also in the filename -set_context(path = "{data}/{year}_{month}/{date}/{date}_{time}_" + str(SECTION) + "_{name}") +set_exec_pars(path = "{data}/{year}_{month}/{date}/{date}_{time}_" + str(SECTION) + "_{name}") ################################################################################# diff --git a/script/jitter_scan.py b/script/jitter_scan.py index c5a8e97..8879bb4 100644 --- a/script/jitter_scan.py +++ b/script/jitter_scan.py @@ -47,7 +47,7 @@ else: # re-define filename, such that the SECTION is also in the filename -set_context(path = "{data}/{year}_{month}/{date}/{date}_{time}_" + str(SECTION) + "_{name}") +set_exec_pars(path = "{data}/{year}_{month}/{date}/{date}_{time}_" + str(SECTION) + "_{name}") ################################################################################# @@ -244,7 +244,7 @@ vsum_jit_phase = all_statistics_calc(scan_result.getReadable(9)) #Setting attributes to the scan group -path = get_context().group +path = get_exec_pars().group set_attribute(path, "SECTION", SECTION) """ set_attribute(path, "ref_jit_amplt", ref_jit_amplt) @@ -382,7 +382,7 @@ msg = msg + "\n\nVSUM phase\n" + vsum_jit_phase.return_string_phase() msg = msg + "\n---------------------------------------------------------" msg = msg + "\n\nPlots axis: X-axis = Three amplitude setpoints from left to right: 10% below sat / 5% below sat / sat" msg = msg + "\nY-axis = Readback phase (with feedback closed = setpoint phase)" -msg = msg + "\n\nData file: " + get_context().path +msg = msg + "\n\nData file: " + get_exec_pars().path print msg diff --git a/script/jitter_vs_avggatelength_scan.py b/script/jitter_vs_avggatelength_scan.py index 9aa45d7..9b48548 100644 --- a/script/jitter_vs_avggatelength_scan.py +++ b/script/jitter_vs_avggatelength_scan.py @@ -18,7 +18,7 @@ REFxx = "REF10" # re-define filename, such that the SECTION is also in the filename -set_context(path = "{data}/{year}_{month}/{date}/{date}_{time}_" + str(SECTION) + "_{name}") +set_exec_pars(path = "{data}/{year}_{month}/{date}/{date}_{time}_" + str(SECTION) + "_{name}") ################################################################################# @@ -91,7 +91,7 @@ auxv_rfrate.close() #Setting attributes to the scan group -path = get_context().group +path = get_exec_pars().group set_attribute(path, "SECTION", SECTION) """ set_attribute(path, "ref_jit_amplt", ref_jit_amplt) @@ -110,7 +110,7 @@ set_attribute(path, "P2PCOUNT", p2pcount) msg = "RF rep rate = " + str(rfrate)[:6] + "Hz" msg = msg + "\nP2PCOUNT = " + str(p2pcount)[:6] msg = msg + "\n---------------------------------------------------------" -msg = msg + "\n\nData file: " + get_context().path +msg = msg + "\n\nData file: " + get_exec_pars().path print msg diff --git a/script/local.py b/script/local.py index 7674a72..c7db06f 100755 --- a/script/local.py +++ b/script/local.py @@ -121,7 +121,7 @@ def elogllrf(subject, message, system, subsystem, section, attachments = []): print out -def get_plot_snapshots(title = None, file_type = "png", temp_path = context.setup.getContextPath()): +def get_plot_snapshots(title = None, file_type = "png", temp_path = get_context().setup.getContextPath()): """ Returns list with file names of plots snapshots from a plotting context. """ @@ -184,7 +184,7 @@ scan_start.write(-10.0) scan_stop.write(10.0) scan_step.write(1.0) -if not context.localMode: +if not get_context().localMode: CAS.setServerPort(12345) cas1=CAS("PSHELL:scanpos",scan_pos, "double") cas2=CAS("PSHELL:scanval",scan_val, "double") diff --git a/script/phase_scan.py b/script/phase_scan.py index 1a462e7..4e544e3 100755 --- a/script/phase_scan.py +++ b/script/phase_scan.py @@ -8,7 +8,7 @@ import ch.psi.pshell.epics.ControlledVariable as ControlledVariable latency = 0.3 -if get_context().source == CommandSource.ui: +if get_exec_pars().source == CommandSource.ui: prefix = "MINSB03-RSYS" start = -170.0 stop = 180.0