Skip to content

Commit 67768f7

Browse files
committed
warning to error
1 parent 436edc2 commit 67768f7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/probeinterface/neuropixels_tools.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,11 +1575,11 @@ def _compute_device_channel_indices_from_oebin(
15751575
for i, contact_id in enumerate(probe.contact_ids):
15761576
electrode_index = _contact_id_to_global_electrode_index(contact_id, electrodes_per_shank)
15771577
if electrode_index not in electrode_index_to_column:
1578-
warnings.warn(
1579-
f"Contact {contact_id} has electrode_index {electrode_index} not found in oebin. "
1580-
f"Falling back to identity wiring."
1578+
raise ValueError(
1579+
f"Contact {contact_id} has global electrode_index {electrode_index} "
1580+
f"not found in oebin '{oebin_file}'. This indicates a mismatch between "
1581+
f"the probe configuration in settings and the recorded binary data."
15811582
)
1582-
return np.arange(num_contacts)
15831583
device_channel_indices[i] = electrode_index_to_column[electrode_index]
15841584
else:
15851585
# Fallback: identity wiring. The binary .dat file is written in channel-number order

0 commit comments

Comments
 (0)