Skip to content

Commit 8caf7de

Browse files
authored
fix: postprocess probe features (#456)
1 parent 0c10fd3 commit 8caf7de

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

resources/postprocess_neuropixels_probe_features.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
def _parse_type_values_from_val_def(val_def: str) -> list[str]:
2727
"""Extract IMRO type code(s) from a val_def string.
2828
29-
Two patterns in ProbeTable:
29+
Two patterns in ProbeTable, each optionally prefixed with "pn|":
3030
type:{0,1020,1030,...} -> set of values
3131
type:1110 -> single value
3232
"""
33-
match = re.match(r"type:\{([^}]+)\}", val_def)
33+
match = re.match(r"type:(?:pn\|)?\{([^}]+)\}", val_def)
3434
if match:
3535
return [v.strip() for v in match.group(1).split(",")]
3636

37-
match = re.match(r"type:(\d+)", val_def)
37+
match = re.match(r"type:(?:pn\|)?(\d+)", val_def)
3838
if match:
3939
return [match.group(1)]
4040

0 commit comments

Comments
 (0)