Skip to content

get_neuropixels_sample_shifts_from_probe does not work for NPX2 4sh with ONIX #4109

@alirezasaeedi1988

Description

@alirezasaeedi1988

Hi there,
I have been trying to estimate the sample shift using the function "get_neuropixels_sample_shifts_from_probe", but it throws the following error.

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[79], line 3
      1 from spikeinterface.extractors.neuropixels_utils import get_neuropixels_sample_shifts_from_probe
----> 3 sample_shifts = get_neuropixels_sample_shifts_from_probe(np2_config_b)

File [E:\py_script\spikeinterface\src\spikeinterface\extractors\neuropixels_utils.py:28](file:///E:/py_script/spikeinterface/src/spikeinterface/extractors/neuropixels_utils.py#line=27), in get_neuropixels_sample_shifts_from_probe(probe, stream_name)
     11 """
     12 Get the inter-sample shifts for Neuropixels probes based on the probe information.
     13 
   (...)
     25     Array of relative phase shifts for each channel.
     26 """
     27 # get inter-sample shifts based on the probe information and mux channels
---> 28 model_description = probe.annotations.get("description", None)
     29 num_channels_per_adc = probe.annotations.get("num_channels_per_adc", None)
     30 mux_channels = probe.contact_annotations.get("mux_channels", None)

AttributeError: 'ProbeGroup' object has no attribute 'annotations'`

The "np2_config_b" is loaded from a JSON file for a 4-shank NPX2 probe.

Metadata

Metadata

Assignees

No one assigned

    Labels

    extractorsRelated to extractors module

    Type

    No type
    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