Closedown

This commit is contained in:
x03daop
2017-01-10 09:34:41 +01:00
parent ebe69be1f0
commit 0de937d812
5 changed files with 14 additions and 14 deletions
+6 -6
View File
@@ -202,14 +202,14 @@ def print_diag():
def create_diag_datasets(parent = None):
if parent is None:
parent = get_context().group
parent = get_exec_pars().group
group = parent + "attrs/"
for f in diag_channels:
create_dataset(group+get_diag_name(f) , 's' if (type(f) is ch.psi.pshell.epics.ChannelString) else 'd')
def append_diag_datasets(parent = None):
if parent is None:
parent = get_context().group
parent = get_exec_pars().group
group = parent + "attrs/"
for f in diag_channels:
x = f.read()
@@ -241,7 +241,7 @@ def before_readout():
def after_readout(rec):
if get_context().persist:
if get_exec_pars().persist:
if rec.index == 0:
create_diag_datasets()
append_diag_datasets()
@@ -273,7 +273,7 @@ def adjust_sensors():
SENSORS=[SENSORS.pop(SENSORS.index(dev))] + SENSORS
if "Scienta.dataMatrix" in SENSORS or Scienta.dataMatrix in SENSORS:
print "Not ACC"
set_context(accumulate = False)
set_exec_pars(accumulate = False)
#Device aliases for data files
set_device_alias(Scienta.dataMatrix, "ScientaImage")
@@ -328,7 +328,7 @@ def elog(title, message, attachments = [], author = None, category = "Info", dom
Add entry to ELOG.
"""
if author is None:
author = "pshell" #context.getUser().name
author = "pshell" #get_context().getUser().name
typ = "pshell"
entry = ""
@@ -353,7 +353,7 @@ def elog(title, message, attachments = [], author = None, category = "Info", dom
raise Exception(err)
print out
def get_plot_snapshots(title = None, file_type = "jpg", temp_path = context.setup.getContextPath()):
def get_plot_snapshots(title = None, file_type = "jpg", temp_path = get_context().setup.getContextPath()):
"""
Returns list with file names of plots snapshots from a plotting context.
"""