Skip to content

Correction of Baserecordingsnppets._set_probes #3684

Description

@OlivierPeron

Hello,

I noticed an issue in the _set_probes function.
To get the number of contacts of the probe-s, this operation is performed :

number_of_device_channel_indices = np.max(list(device_channel_indices) + [0])

This only works if the contacts range from 0 to max_nb_of_contacts, which is not necessarly the case. I suggest to do the following:

number_of_device_channel_indice = sum(len(sublist) if isinstance(sublist, np.ndarray) else 1 for sublist in device_channel_indices)

Unfortunatly I won't have time to do a PR, but I hope this will be usefull !

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreChanges to core modulequestionGeneral question regarding SI

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions