Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions brainbox/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""IBL shared data processing methods."""
import logging
try:
import one
Expand Down
1 change: 1 addition & 0 deletions ibllib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Library implementing the International Brain Laboratory data pipeline."""
__version__ = "2.13.6"
import warnings

Expand Down
2 changes: 1 addition & 1 deletion ibllib/io/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import spikeglx
import spikeglx # TODO Remove November 2022
1 change: 1 addition & 0 deletions ibllib/qc/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Data quality control calculation and aggregation."""
46 changes: 27 additions & 19 deletions ibllib/qc/camera.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,36 @@
"""Camera QC
"""Video quality control.

This module runs a list of quality control metrics on the camera and extracted video data.

Example - Run right camera QC, downloading all but video file
qc = CameraQC(eid, 'right', download_data=True, stream=True)
qc.run()
Examples
--------
Run right camera QC, downloading all but video file

>>> qc = CameraQC(eid, 'right', download_data=True, stream=True)
>>> qc.run()

Run left camera QC with session path, update QC field in Alyx

>>> qc = CameraQC(session_path, 'left')
>>> outcome, extended = qc.run(update=True) # Returns outcome of videoQC only
>>> print(f'video QC = {outcome}; overall session QC = {qc.outcome}') # NB difference outcomes

Run only video QC (no timestamp/alignment checks) on 20 frames for the body camera

>>> qc = CameraQC(eid, 'body', n_samples=20)
>>> qc.load_video_data() # Quicker than loading all data
>>> qc.run()

Example - Run left camera QC with session path, update QC field in Alyx
qc = CameraQC(session_path, 'left')
outcome, extended = qc.run(update=True) # Returns outcome of videoQC only
print(f'video QC = {outcome}; overall session QC = {qc.outcome}') # NB difference outcomes
Run specific video QC check and display the plots

Example - Run only video QC (no timestamp/alignment checks) on 20 frames for the body camera
qc = CameraQC(eid, 'body', n_samples=20)
qc.load_video_data() # Quicker than loading all data
qc.run()
>>> qc = CameraQC(eid, 'left')
>>> qc.load_data(download_data=True)
>>> qc.check_position(display=True) # NB: Not all checks make plots

Example - Run specific video QC check and display the plots
qc = CameraQC(eid, 'left;)
qc.load_data(download_data=True)
qc.check_position(display=True) # NB: Not all checks make plots
Run the QC for all cameras

Example - Run the QC for all cameras
qcs = run_all_qc(eid)
qcs['left'].metrics # Dict of checks and outcomes for left camera
>>> qcs = run_all_qc(eid)
>>> qcs['left'].metrics # Dict of checks and outcomes for left camera
"""
import logging
from inspect import getmembers, isfunction
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jupyter>=1.0
jupyterlab>=1.0
matplotlib>=3.0.3
mtscomp>=1.0.1
numba
numpy>=1.18,<=1.21
numba>=0.56
numpy>=1.18
opencv-python
pandas>=0.24.2
phylib>=2.4
Expand Down