Skip to content

Load SpikeGLX lf data when meta for ap is not available #3921

@h-mayorquin

Description

@h-mayorquin

This comes from a discussion with @rly.

Currently, when loading LF, we load the probe from the AP meta:

if "nidq" not in self.stream_id and not load_sync_channel:
signals_info_dict = {e["stream_name"]: e for e in self.neo_reader.signals_info_list}
meta_filename = signals_info_dict[self.stream_id]["meta_file"]
# Load probe geometry if available
if "lf" in self.stream_id:
meta_filename = meta_filename.replace(".lf", ".ap")
probe = probeinterface.read_spikeglx(meta_filename)

The reason is that the shank map is only available in the AP meta, and that is needed to load the probe:

#596 (comment)

I propose that if the AP meta is not present for any reason, we load the data without the probe so users can at least access it. I think this might prevent loading the inter_sample_shift property?

But maybe with all the new metadata changes in Neuropixels, we can retrieve the probe information and the inter-sample shift in a simpler way.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    extractorsRelated to extractors module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions