diff --git a/brainbox/__init__.py b/brainbox/__init__.py index 63fadc9ce..182674631 100644 --- a/brainbox/__init__.py +++ b/brainbox/__init__.py @@ -1,3 +1,4 @@ +"""IBL shared data processing methods.""" import logging try: import one diff --git a/ibllib/__init__.py b/ibllib/__init__.py index 808d183ab..722bf0cce 100644 --- a/ibllib/__init__.py +++ b/ibllib/__init__.py @@ -1,3 +1,4 @@ +"""Library implementing the International Brain Laboratory data pipeline.""" __version__ = "2.13.6" import warnings diff --git a/ibllib/io/__init__.py b/ibllib/io/__init__.py index 7d591fe51..386368f51 100644 --- a/ibllib/io/__init__.py +++ b/ibllib/io/__init__.py @@ -1 +1 @@ -import spikeglx +import spikeglx # TODO Remove November 2022 diff --git a/ibllib/qc/__init__.py b/ibllib/qc/__init__.py index e69de29bb..94fdabc45 100644 --- a/ibllib/qc/__init__.py +++ b/ibllib/qc/__init__.py @@ -0,0 +1 @@ +"""Data quality control calculation and aggregation.""" diff --git a/ibllib/qc/camera.py b/ibllib/qc/camera.py index 0eec07e40..3aaf8694e 100644 --- a/ibllib/qc/camera.py +++ b/ibllib/qc/camera.py @@ -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 diff --git a/requirements.txt b/requirements.txt index 688de3b1f..f5755094d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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