Closedown
This commit is contained in:
@@ -39,7 +39,7 @@ spectrum_series = plots[0].getSeries(0)
|
||||
def plot_cur_spectrum():
|
||||
global spectrum_series
|
||||
try:
|
||||
while controller.state.running:
|
||||
while context.state.running:
|
||||
y = Scienta.spectrum.take(100)
|
||||
x = Scienta.spectrumX
|
||||
spectrum_series.setData(x, y)
|
||||
|
||||
@@ -28,7 +28,7 @@ spectrum_series = plots[0].getSeries(0)
|
||||
def plot_cur_spectrum():
|
||||
global spectrum_series
|
||||
try:
|
||||
while controller.state.running:
|
||||
while context.state.running:
|
||||
y = Scienta.spectrum.take(100)
|
||||
x = Scienta.spectrumX
|
||||
spectrum_series.setData(x, y)
|
||||
|
||||
@@ -328,7 +328,7 @@ def elog(title, message, attachments = [], author = None, category = "Info", dom
|
||||
Add entry to ELOG.
|
||||
"""
|
||||
if author is None:
|
||||
author = "pshell" #controller.getUser().name
|
||||
author = "pshell" #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 = controller.setup.getContextPath()):
|
||||
def get_plot_snapshots(title = None, file_type = "jpg", temp_path = context.setup.getContextPath()):
|
||||
"""
|
||||
Returns list with file names of plots snapshots from a plotting context.
|
||||
"""
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
if controller.state == State.Ready:
|
||||
if context.state == State.Ready:
|
||||
print "Testing..."
|
||||
if not Scienta.state.isInitialized():
|
||||
print "Try initialize Scienta..."
|
||||
try:
|
||||
controller.evalLine("Scienta.initialize()")
|
||||
context.evalLine("Scienta.initialize()")
|
||||
print "Scienta reinit ok"
|
||||
except:
|
||||
print "Scienta reinit failure"
|
||||
@@ -17,7 +17,7 @@ if controller.state == State.Ready:
|
||||
if i >= retries-1:
|
||||
print "Scienta timeout, try initialize..."
|
||||
try:
|
||||
controller.evalLine("Scienta.initialize()")
|
||||
context.evalLine("Scienta.initialize()")
|
||||
print "Scienta reinit ok"
|
||||
except:
|
||||
print "Scienta reinit failure"
|
||||
|
||||
Reference in New Issue
Block a user