AllenInstitute / npc_sessions

Tools for accessing and packaging data from behavior and epyhys sessions from the Mindscope Neuropixels team, in the cloud.
1 stars 1 forks source link

Error getting units for `668755_2023-08-28` #127

Open bjhardcastle opened 2 months ago

bjhardcastle commented 2 months ago

Might be related to #126

Traceback (most recent call last):
  File "/opt/conda/lib/python3.9/site-packages/npc_ephys/units.py", line 269, in make_units_table_from_spike_interface_ks25
    _ = future.result()
  File "/opt/conda/lib/python3.9/concurrent/futures/_base.py", line 439, in result
    return self.__get_result()
  File "/opt/conda/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result
    raise self._exception
  File "/opt/conda/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/opt/conda/lib/python3.9/site-packages/npc_ephys/units.py", line 177, in _device_helper
    awc = get_amplitudes_waveforms_channels_ks25(
  File "/opt/conda/lib/python3.9/site-packages/npc_ephys/units.py", line 77, in get_amplitudes_waveforms_channels_ks25
    _templates_mean = spike_interface_data.get_nwb_units_device_property(
  File "/opt/conda/lib/python3.9/site-packages/npc_ephys/spikeinterface.py", line 363, in get_nwb_units_device_property
    self.device_indices_in_nwb_units(probe)
  File "/opt/conda/lib/python3.9/site-packages/npc_ephys/spikeinterface.py", line 353, in device_indices_in_nwb_units
    [
  File "/opt/conda/lib/python3.9/site-packages/npc_ephys/spikeinterface.py", line 354, in <listcomp>
    npc_session.ProbeRecord(device)
  File "/opt/conda/lib/python3.9/site-packages/npc_session/records.py", line 135, in __new__
    return super().__new__(cls, cls.parse_id(content))
  File "/opt/conda/lib/python3.9/site-packages/npc_session/records.py", line 213, in parse_id
    raise ValueError(
ValueError: ProbeRecord requires a string containing `probe` followed by a letter A-F, or a single capital A-F alone, not 'Neuropixels 1.0'
bjhardcastle commented 2 months ago

This seems to be a badly-named device in the NWB from the sorting pipeline.. must be fixed now as no other sessions had this.

Re-sorting...

Edit: This was caused by the upload pipeline, not sorting: spikeinterface gave bad device names. Will be fixed, then re-sorted