ibllib.pipes

IBL preprocessing pipeline.

This module concerns the data extraction and preprocessing for IBL data. The lab servers routinely call local_server.job_creator() to search for new sessions to extract. The job creator registers the new session to Alyx (i.e. creates a new session record on the database), if required, then deduces a set of tasks (a.k.a. the pipeline[*]_) from the ‘experiment.description’ file at the root of the session (see dynamic_pipeline.make_pipeline()). If no file exists one is created, inferring the acquisition hardware from the task protocol. The new session’s pipeline tasks are then registered for another process (or server) to query.

Another process calls local_server.task_queue() to get a list of queued tasks from Alyx, then local_server.tasks_runner() to loop through tasks. Each task is run by calling tasks.run_alyx_task() with a dictionary of task information, including the Task class and its parameters.

Notes

All new tasks are subclasses of the base_tasks.DynamicTask class. All others are defunct and shall be removed in the future.

Functions

assign_task

Assigns a task to a task deck with the task name as key.

assign_task(task_deck, session_path, task, **kwargs)[source]

Assigns a task to a task deck with the task name as key.

This is a convenience function when creating a large task deck.

Parameters:
  • task_deck (dict) – A dictionary of tasks to add to.

  • session_path (str, pathlib.Path) – A session path to pass to the task.

  • task (ibllib.pipes.tasks.Task) – A task class to instantiate and assign.

  • **kwargs – Optional keyword arguments to pass to the task.

Examples

>>> from ibllib.pipes.video_tasks import VideoCompress
>>> task_deck = {}
>>> session_path = './subject/2023-01-01/001'
>>> assign_task(task_deck, session_path, VideoCompress, cameras=('left',))
{'VideoCompress': <ibllib.pipes.video_tasks.VideoCompress object at 0x0000020461E762D0>}

Using partial for convenience

>>> from functools import partial
>>> assign = partial(assign_task, task_deck, session_path)
>>> assign(VideoCompress, cameras=('left',))

audio_tasks

base_tasks

Abstract base classes for dynamic pipeline tasks.

behavior_tasks

Standard task protocol extractor dynamic pipeline tasks.

dynamic_pipeline

Task pipeline creation from an acquisition description.

ephys_alignment

ephys_tasks

histology

local_server

Lab server pipeline construction and task runner.

mesoscope_tasks

The mesoscope data extraction pipeline.

misc

Miscellaneous pipeline utility functions.

neurophotometrics

Extraction tasks for fibrephotometry

scan_fix_passive_files

sync_tasks

tasks

The abstract Pipeline and Task superclasses and concrete task runner.

training_status

video_tasks

widefield_tasks

The widefield data extraction pipeline.