Skip to content

Commit 8015105

Browse files
committed
Fix dlc qc
1 parent 977c58b commit 8015105

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ibllib/qc/dlc.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,17 @@ class DlcQC(base.QC):
4242
def __init__(self, session_path_or_eid, side, **kwargs):
4343
"""
4444
:param session_path_or_eid: A session eid or path
45+
:param side: The camera to run QC on
4546
:param log: A logging.Logger instance, if None the 'ibllib' logger is used
4647
:param one: An ONE instance for fetching and setting the QC on Alyx
47-
:param camera: The camera to run QC on, if None QC is run for all three cameras.
4848
"""
49+
# Make sure the type of camera is chosen
50+
self.side = side
4951
# When an eid is provided, we will download the required data by default (if necessary)
5052
download_data = not is_session_path(session_path_or_eid)
5153
self.download_data = kwargs.pop('download_data', download_data)
5254
super().__init__(session_path_or_eid, **kwargs)
5355
self.data = Bunch()
54-
self.side = side
5556

5657
# QC outcomes map
5758
self.metrics = None
@@ -101,7 +102,7 @@ def _ensure_required_data(self):
101102
present = (
102103
self.one._download_datasets(dataset)
103104
if self.download_data
104-
else (next(self.session_path.rglob(d), None) for d in dataset['rel_path'])
105+
else (next(self.session_path.rglob(d), None) for d in dataset['rel_path'] if self.side in d)
105106
)
106107
assert (not dataset.empty and all(present)), f'Dataset {dstype} not found'
107108

0 commit comments

Comments
 (0)