Skip to content

Commit ac33c58

Browse files
Merge pull request #84 from philipstarkey/philipstarkey/prawnblaster-fix
Fixed PrawnBlaster runviewer class
2 parents 141a299 + 0af6f83 commit ac33c58

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

labscript_devices/PrawnBlaster/runviewer_parsers.py

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,19 @@ def get_traces(self, add_trace, clock=None):
7171

7272
# Generate clocklines and triggers
7373
clocklines_and_triggers = {}
74-
for pulse_program in pulse_programs:
74+
75+
for pseudoclock_name, pseudoclock in self.device.child_list.items():
76+
# Get pseudoclock index
77+
connection_parts = pseudoclock.parent_port.split()
78+
# Skip if not one of the 4 possible pseudoclock outputs (there is one for
79+
# the wait monitor too potentially)
80+
if connection_parts[0] != "pseudoclock":
81+
continue
82+
83+
# Get the pulse program
84+
index = int(connection_parts[1])
85+
pulse_program = pulse_programs[index]
86+
7587
time = []
7688
states = []
7789
trigger_index = 0
@@ -102,15 +114,14 @@ def get_traces(self, add_trace, clock=None):
102114
states.append(j)
103115
t += row["half_period"] * clock_factor
104116

105-
clock = (np.array(time), np.array(states))
117+
pseudoclock_clock = (np.array(time), np.array(states))
106118

107-
for pseudoclock_name, pseudoclock in self.device.child_list.items():
108-
for clock_line_name, clock_line in pseudoclock.child_list.items():
109-
# Ignore the dummy internal wait monitor clockline
110-
if clock_line.parent_port.startswith("GPIO"):
111-
clocklines_and_triggers[clock_line_name] = clock
112-
add_trace(
113-
clock_line_name, clock, self.name, clock_line.parent_port
114-
)
119+
for clock_line_name, clock_line in pseudoclock.child_list.items():
120+
# Ignore the dummy internal wait monitor clockline
121+
if clock_line.parent_port.startswith("GPIO"):
122+
clocklines_and_triggers[clock_line_name] = pseudoclock_clock
123+
add_trace(
124+
clock_line_name, pseudoclock_clock, self.name, clock_line.parent_port
125+
)
115126

116127
return clocklines_and_triggers

0 commit comments

Comments
 (0)