Skip to content

Commit 6a9f510

Browse files
committed
memory usage logging; attempt at memory leak fix
1 parent 1ada073 commit 6a9f510

6 files changed

Lines changed: 3953 additions & 30 deletions

File tree

app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@
2020

2121
# port = int(os.environ.get("PORT", 80))
2222
# pn.serve(app, port=port, address="0.0.0.0", allow_websocket_origin="*", show=False)
23-
app.servable()
23+
app.servable(title="Neuropixels Channelmap Generator")

channelmap_generator/backend.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,11 @@ def format_imro_string(electrodes, wiring_df, probe_type, probe_subtype, referen
198198

199199
# Sort by channel and format
200200
entries.sort(key=lambda x: x[0])
201-
entries = [(e[0], e[1], e[2], ref, e[3]) for e, ref in zip(entries, ref_values)]
201+
202+
# Only apply ref_values formatting for 4-shank probes
203+
if probe_type in ["2.0-4shanks", "NXT"]:
204+
entries = [(e[0], e[1], e[2], ref, e[3]) for e, ref in zip(entries, ref_values)]
205+
202206
header = (probe_subtype, len(entries))
203207
imro_list = [header] + entries
204208

0 commit comments

Comments
 (0)