ibllib.io.extractors.training_trials
Functions
Extract trials and wheel data. |
Classes
|
Get the subject's choice in every trial. |
|
Get left and right contrasts from raw datafile. |
|
|
|
Get the times the water or error tone was delivered to the animal. |
|
Get the feedback that was delivered to subject. |
|
Get trigger times of goCue from state machine. |
|
Get trigger times of goCue from state machine. |
|
|
|
Trial start to trial end. |
|
Calculate duration of iti from state timestamps. |
|
|
|
Extracts stimulus phase, position and quiescence from Bpod data. |
|
|
|
Count the consecutive repeated trials. |
|
Time (in absolute seconds from session start) when a response was recorded. |
|
Load reward volume delivered for each trial. |
|
|
|
|
|
Extracts stim on / off and freeze times from Bpod BNC1 detected fronts |
|
|
|
|
|
|
|
Extracts the following into a table from Bpod raw data: |
- class TrainingTrials(session_path=None)[source]
Bases:
BaseBpodTrialsExtractor
- save_names = ('_ibl_trials.repNum.npy', '_ibl_trials.goCueTrigger_times.npy', '_ibl_trials.stimOnTrigger_times.npy', None, None, None, None, '_ibl_trials.table.pqt', None, None, '_ibl_wheel.timestamps.npy', '_ibl_wheel.position.npy', '_ibl_wheelMoves.intervals.npy', '_ibl_wheelMoves.peakAmplitude.npy', None, None, None, None, None)
- var_names = ('repNum', 'goCueTrigger_times', 'stimOnTrigger_times', 'itiIn_times', 'stimOffTrigger_times', 'stimFreezeTrigger_times', 'errorCueTrigger_times', 'table', 'stimOff_times', 'stimFreeze_times', 'wheel_timestamps', 'wheel_position', 'wheelMoves_intervals', 'wheelMoves_peakAmplitude', 'peakVelocity_times', 'is_final_movement', 'phase', 'position', 'quiescence')
- extract_all(session_path, save=False, bpod_trials=None, settings=None, task_collection='raw_behavior_data', save_path=None)[source]
Extract trials and wheel data.
For task versions >= 5.0.0, outputs wheel data and trials.table dataset (+ some extra datasets)
- Parameters:
session_path (str, pathlib.Path) – The path to the session
save (bool) – If true save the data files to ALF
bpod_trials (list of dicts) – The Bpod trial dicts loaded from the _iblrig_taskData.raw dataset
settings (dict) – The Bpod settings loaded from the _iblrig_taskSettings.raw dataset
- Return type:
A list of extracted data and a list of file paths if save is True (otherwise None)