From 0efb0e636d69d34a2216ee1ffb3fbb8a5aec3fae Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Mon, 20 Jul 2026 10:55:12 +0200 Subject: [PATCH] fix: postprocess probe features --- resources/postprocess_neuropixels_probe_features.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/postprocess_neuropixels_probe_features.py b/resources/postprocess_neuropixels_probe_features.py index f3b6eeeb..944a5620 100644 --- a/resources/postprocess_neuropixels_probe_features.py +++ b/resources/postprocess_neuropixels_probe_features.py @@ -26,15 +26,15 @@ def _parse_type_values_from_val_def(val_def: str) -> list[str]: """Extract IMRO type code(s) from a val_def string. - Two patterns in ProbeTable: + Two patterns in ProbeTable, each optionally prefixed with "pn|": type:{0,1020,1030,...} -> set of values type:1110 -> single value """ - match = re.match(r"type:\{([^}]+)\}", val_def) + match = re.match(r"type:(?:pn\|)?\{([^}]+)\}", val_def) if match: return [v.strip() for v in match.group(1).split(",")] - match = re.match(r"type:(\d+)", val_def) + match = re.match(r"type:(?:pn\|)?(\d+)", val_def) if match: return [match.group(1)]