ibllib.qc.task_qc_viewer.task_qc
Functions
Return the correct trials task for extracting only the Bpod trials. |
|
Run TaskQC viewer with wheel data. |
|
Displays the task QC for a given session. |
Classes
- class QcFrame(qc)[source]
Bases:
object
- qc = None
A TaskQC object containing extracted data
- frame = None
A table of failing trial-level QC metrics.
- Type:
pandas.DataFrame
- property n_trials
- create_plots(axes, wheel_axes=None, trial_events=None, color_map=None, linestyle=None)[source]
Plots the data for bnc1 (sound) and bnc2 (frame2ttl).
- Parameters:
axes – An axes handle on which to plot the TTL events
wheel_axes – An axes handle on which to plot the wheel trace
trial_events – A list of Bpod trial events to plot, e.g. [‘stimFreeze_times’],
if None, valve, sound and stimulus events are plotted :param color_map: A color map to use for the events, default is the tableau color map linestyle: A line style map to use for the events, default is random. :return: None
- get_bpod_trials_task(task)[source]
Return the correct trials task for extracting only the Bpod trials.
- Parameters:
task (ibllib.pipes.tasks.Task) – A pipeline task from which to derive the Bpod trials task.
- Returns:
A Bpod choice world trials task instance.
- Return type:
- show_session_task_qc(qc_or_session=None, bpod_only=False, local=False, one=None, protocol_number=None)[source]
Displays the task QC for a given session.
NB: For this to work, all behaviour trials task classes must implement a run_qc method.
- Parameters:
qc_or_session (str, pathlib.Path, ibllib.qc.task_metrics.TaskQC, QcFrame) – An experiment ID, session path, or TaskQC object.
bpod_only (bool) – If true, display Bpod extracted events instead of data from the DAQ.
local (bool) – If true, asserts all data local (i.e. do not attempt to download missing datasets).
one (one.api.One) – An instance of ONE.
protocol_number (int) – If not None, displays the QC for the protocol number provided. Argument is ignored if qc_or_session is a TaskQC object or QcFrame instance.
- Returns:
The QcFrame object.
- Return type:
- qc_gui_cli()[source]
Run TaskQC viewer with wheel data.
For information on the QC checks see the QC Flags & failures document: https://docs.google.com/document/d/1X-ypFEIxqwX6lU9pig4V_zrcR5lITpd8UJQWzW9I9zI/edit#
Examples
>>> ipython task_qc.py c9fec76e-7a20-4da4-93ad-04510a89473b >>> ipython task_qc.py ./KS022/2019-12-10/001 --local