File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 22
22
import sys
23
23
24
24
import labscript_utils .h5_lock , h5py
25
+ from labscript_utils .labconfig import LabConfig
25
26
import pandas
26
27
from numpy import array , ndarray
27
28
import types
46
47
# data to be sent back to the lyse GUI if running within lyse
47
48
_updated_data = {}
48
49
50
+ # get port that lyse is using for communication
51
+ try :
52
+ _labconfig = LabConfig (required_params = {"ports" : ["lyse" ]})
53
+ _lyse_port = int (_labconfig .get ('ports' , 'lyse' ))
54
+ except Exception :
55
+ _lyse_port = 42519
56
+
49
57
if len (sys .argv ) > 1 :
50
58
path = sys .argv [1 ]
51
59
else :
@@ -65,11 +73,10 @@ class _RoutineStorage(object):
65
73
routine_storage = _RoutineStorage ()
66
74
67
75
68
- def data (filepath = None , host = 'localhost' , timeout = 5 ):
76
+ def data (filepath = None , host = 'localhost' , port = _lyse_port , timeout = 5 ):
69
77
if filepath is not None :
70
78
return _get_singleshot (filepath )
71
79
else :
72
- port = 42519
73
80
df = zmq_get (port , host , 'get dataframe' , timeout )
74
81
try :
75
82
padding = ('' ,)* (df .columns .nlevels - 1 )
You can’t perform that action at this time.
0 commit comments