ibllib.io.extractors.biased_trials

Functions

extract_all

Same as training_trials.extract_all except...

Classes

BiasedTrials

Same as training_trials.TrainingTrials except...

ContrastLR

Get left and right contrasts from raw datafile.

EphysTrials

Same as BiasedTrials except...

ProbaContrasts

Bpod pre-generated values for probabilityLeft, contrastLR, phase, quiescence.

TrialsTableBiased

Extracts the following into a table from Bpod raw data:

TrialsTableEphys

Extracts the following into a table from Bpod raw data:

extract_all(session_path, save=False, bpod_trials=False, settings=False, extra_classes=None, task_collection='raw_behavior_data', save_path=None)[source]
Same as training_trials.extract_all except…
  • there is no RepNum

  • ContrastLR is extracted differently

  • IncludedTrials is only extracted for 5.0.0 or greater

Parameters:
  • session_path

  • save

  • bpod_trials

  • settings

  • extra_classes – additional BaseBpodTrialsExtractor subclasses for custom extractions

Returns:

class BiasedTrials(session_path=None)[source]

Bases: BaseBpodTrialsExtractor

Same as training_trials.TrainingTrials except…
  • there is no RepNum

  • ContrastLR is extracted differently

  • IncludedTrials is only extracted for 5.0.0 or greater

save_names = ('_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, '_ibl_trials.included.npy', None, None, '_ibl_trials.quiescencePeriod.npy')

The filenames of each extracted dataset, or None if array should not be saved.

Type:

tuple of str

var_names = ('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', 'included', 'phase', 'position', 'quiescence')

A list of names for the extracted variables. These become the returned output keys.

Type:

tuple of str

class EphysTrials(session_path=None)[source]

Bases: BaseBpodTrialsExtractor

Same as BiasedTrials except…
  • Contrast, phase, position, probabilityLeft and quiescence is extracted differently

save_names = ('_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, '_ibl_trials.included.npy', None, None, '_ibl_trials.quiescencePeriod.npy')

The filenames of each extracted dataset, or None if array should not be saved.

Type:

tuple of str

var_names = ('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', 'included', 'phase', 'position', 'quiescence')

A list of names for the extracted variables. These become the returned output keys.

Type:

tuple of str