Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion synapse-api
23 changes: 23 additions & 0 deletions synapse/cli/device_info_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,29 @@ def visualize_configuration(info_dict, status):
node_tree.add(
f"Electrodes ({len(channels)}): {', '.join(electrode_ids)}"
)
elif node_type == "OpticalStimulation":
source = node.get("optical_stimulation", {})
# Get the peripheral id and name
peripheral_id = source.get("peripheral_id", "Unknown")
peripherals = info_dict.get("peripherals", [])
peripheral_name = next(
(
p.get("name", "Unknown")
for p in peripherals
if p.get("peripheral_id") == peripheral_id
),
"Unknown",
)
node_tree.add(f"Connected to: {peripheral_name} (id: {peripheral_id})")

frame_rate = source.get("frame_rate", "Unknown")
node_tree.add(f"Frame Rate: {frame_rate} hz")

optical_stim_status = nodes_status[index].get(
"optical_stimulation", None
)
frames_written = optical_stim_status.get("frames_written", "None")
node_tree.add(f"Frames Written: {frames_written}")

return tree

Expand Down