Skip to content

Commit 6dc1567

Browse files
committed
EphysCellsQC: bugfix create probe with sorter subfolder
1 parent 9f3186b commit 6dc1567

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ibllib/pipes/ephys_preprocessing.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,11 @@ def _label_probe_qc(self, folder_probe, df_units, drift):
344344
:return:
345345
"""
346346
eid = self.one.path2eid(self.session_path, query_type='remote')
347-
pdict = self.one.alyx.rest('insertions', 'list',
348-
session=eid, name=folder_probe.parts[-1], no_cache=True)
347+
# the probe name is the first folder after alf: {session_path}/alf/{probe_name}/{spike_sorter_name}
348+
probe_name = Path(folder_probe).relative_to(self.session_path.joinpath('alf')).parts[0]
349+
pdict = self.one.alyx.rest('insertions', 'list', session=eid, name=probe_name, no_cache=True)
349350
if len(pdict) != 1:
351+
_logger.warning(f'No probe found for probe name: {probe_name}')
350352
return
351353
isok = df_units['label'] == 1
352354
qcdict = {'n_units': int(df_units.shape[0]),

0 commit comments

Comments
 (0)