Skip to content

Commit a568e89

Browse files
committed
add assumption on table
1 parent 9e0f150 commit a568e89

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

src/probeinterface/neuropixels_tools.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,14 +491,21 @@ def _annotate_contacts_from_mux_table(probe: Probe, adc_groups_array: np.array):
491491
which describe how each contact maps to the ADCs during recording.
492492
The function annotates the probe in place.
493493
494+
This function assumes that contact index ``i`` in the probe corresponds to
495+
readout channel ``i``. This holds when the probe has been sliced in readout
496+
channel order, which is the case for both ``read_spikeglx`` (IMRO order) and
497+
``read_openephys`` (sorted by channel number).
498+
494499
Parameters
495500
----------
496501
probe : Probe
497-
The Probe object to annotate. Must have device_channel_indices set.
502+
The Probe object to annotate. Contacts must be in readout channel order.
498503
adc_groups_array : np.array
499504
The ADC groups array from the probe features, which describes how readout channels map to ADCs.
500505
"""
501-
# Map readout channels to ADC groups and sample order
506+
# Map readout channels to ADC groups and sample order.
507+
# The indices in adc_groups_array are readout channel numbers, and we
508+
# use them directly as contact indices into the probe.
502509
num_readout_channels = probe.get_contact_count()
503510
adc_groups = np.zeros(num_readout_channels, dtype="int64")
504511
adc_sample_order = np.zeros(num_readout_channels, dtype="int64")

0 commit comments

Comments
 (0)