allensdk.brain_observatory.behavior.metadata_processing module

allensdk.brain_observatory.behavior.metadata_processing.get_expt_description(session_type: str) → str[source]

Determine a behavior ophys session’s experiment description based on session type. Matches the regex patterns defined as the keys in description_dict

Parameters:
session_type : str

A session description string (e.g. OPHYS_1_images_B )

Returns:
str

A description of the experiment based on the session_type.

Raises:
RuntimeError

Behavior ophys sessions should only have 6 different session types. Unknown session types (or malformed session_type strings) will raise an error.

allensdk.brain_observatory.behavior.metadata_processing.get_task_parameters(data: Dict) → Dict[source]

Read task_parameters metadata from the behavior stimulus pickle file.

Parameters:
data: dict

The nested dict read in from the behavior stimulus pickle file. All of the data expected by this method lives under data[‘items’][‘behavior’]

Returns:
dict

A dict containing the task_parameters associated with this session.