ibllib.pipes.behavior_tasks
Standard task protocol extractor dynamic pipeline tasks.
Classes
Behaviour task extractor with DAQdata.raw NPY datasets. |
|
TODO should be mesoscope invariant, using wiring file |
|
- class HabituationRegisterRaw(session_path, **kwargs)[source]
Bases:
RegisterRawDataTask
,BehaviourTask
- priority = 100
- job_size = 'small'
- property signature
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
- class HabituationTrialsBpod(session_path, **kwargs)[source]
Bases:
BehaviourTask
- priority = 90
- job_size = 'small'
- property signature
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
- extract_behaviour(**kwargs)[source]
Extract trials data.
This is an abstract method called by _run and run_qc methods. Subclasses should return the extracted trials data and a list of output files. This method should also save the trials extractor object to the :prop:`extractor` property for use by run_qc.
- Parameters:
save (bool) – Whether to save the extracted data as ALF datasets.
- Returns:
dict – A dictionary of trials data.
list of pathlib.Path – A list of output file paths if save == true.
- run_qc(trials_data=None, update=True)[source]
Run task QC.
Subclass method should return the QC object. This just validates the trials_data is not None.
- Parameters:
trials_data (dict) – A dictionary of extracted trials data. The output of
extract_behaviour()
.update (bool) – If true, update Alyx with the QC outcome.
- Returns:
A TaskQC object replete with task data and computed metrics.
- Return type:
- class HabituationTrialsNidq(session_path, **kwargs)[source]
Bases:
HabituationTrialsBpod
- priority = 90
- job_size = 'small'
- property signature
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
- class TrialRegisterRaw(session_path, **kwargs)[source]
Bases:
RegisterRawDataTask
,BehaviourTask
- priority = 100
- job_size = 'small'
- property signature
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
- class PassiveRegisterRaw(session_path, **kwargs)[source]
Bases:
RegisterRawDataTask
,BehaviourTask
- priority = 100
- job_size = 'small'
- property signature
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
- class PassiveTaskNidq(session_path, **kwargs)[source]
Bases:
BehaviourTask
- priority = 90
- job_size = 'small'
- property signature
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
- class PassiveTaskTimeline(session_path, **kwargs)[source]
Bases:
BehaviourTask
,MesoscopeTask
TODO should be mesoscope invariant, using wiring file
- priority = 90
- job_size = 'small'
- property signature
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
- class ChoiceWorldTrialsBpod(session_path, **kwargs)[source]
Bases:
BehaviourTask
- priority = 90
- job_size = 'small'
- extractor = None
An instance of the Bpod trials extractor.
- property signature
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
- extract_behaviour(**kwargs)[source]
Extract trials data.
This is an abstract method called by _run and run_qc methods. Subclasses should return the extracted trials data and a list of output files. This method should also save the trials extractor object to the :prop:`extractor` property for use by run_qc.
- Parameters:
save (bool) – Whether to save the extracted data as ALF datasets.
- Returns:
dict – A dictionary of trials data.
list of pathlib.Path – A list of output file paths if save == true.
- run_qc(trials_data=None, update=True, QC=None)[source]
Run the task QC.
- Parameters:
trials_data (dict) – The complete extracted task data.
update (bool) – If True, updates the session QC fields on Alyx.
QC (ibllib.qc.task_metrics.TaskQC) – An optional QC class to instantiate.
- Returns:
The task QC object.
- Return type:
- class ChoiceWorldTrialsNidq(session_path, **kwargs)[source]
Bases:
ChoiceWorldTrialsBpod
- priority = 90
- job_size = 'small'
- property signature
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
- extract_behaviour(save=True, **kwargs)[source]
Extract trials data.
This is an abstract method called by _run and run_qc methods. Subclasses should return the extracted trials data and a list of output files. This method should also save the trials extractor object to the :prop:`extractor` property for use by run_qc.
- Parameters:
save (bool) – Whether to save the extracted data as ALF datasets.
- Returns:
dict – A dictionary of trials data.
list of pathlib.Path – A list of output file paths if save == true.
- run_qc(trials_data=None, update=False, plot_qc=False, QC=None)[source]
Run the task QC.
- Parameters:
trials_data (dict) – The complete extracted task data.
update (bool) – If True, updates the session QC fields on Alyx.
QC (ibllib.qc.task_metrics.TaskQC) – An optional QC class to instantiate.
- Returns:
The task QC object.
- Return type:
- class ChoiceWorldTrialsTimeline(session_path, **kwargs)[source]
Bases:
ChoiceWorldTrialsNidq
Behaviour task extractor with DAQdata.raw NPY datasets.
- property signature
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
- class TrainingStatus(session_path, **kwargs)[source]
Bases:
BehaviourTask
- priority = 90
- job_size = 'small'
- property signature
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)