iblrig.path_helper.iterate_previous_sessions

iblrig.path_helper.iterate_previous_sessions(subject_name, task_name, n=1, **kwargs)[source]

Iterate over the sessions of a given subject in both the remote and local path and search for a given protocol name. Return the information of the last n found matching protocols in the form of a dictionary.

Parameters:
  • subject_name (str) – Name of the subject.

  • task_name (str) – Name of the protocol to look for in experiment description.

  • n (int, optional) – maximum number of protocols to return

  • **kwargs – Optional arguments to be passed to iblrig.path_helper.get_local_and_remote_paths If not used, will use the arguments from iblrig/settings/iblrig_settings.yaml

Returns:

List of dictionaries with keys: session_path, experiment_description, task_settings, file_task_data

Return type:

list[dict]

Parameters: