allensdk.brain_observatory.behavior.stimulus_processing module

allensdk.brain_observatory.behavior.stimulus_processing.convert_filepath_caseinsensitive(filename_in)[source]
allensdk.brain_observatory.behavior.stimulus_processing.get_images_dict(pkl)[source]
allensdk.brain_observatory.behavior.stimulus_processing.get_stimulus_metadata(pkl)[source]
allensdk.brain_observatory.behavior.stimulus_processing.get_stimulus_presentations(data, stimulus_timestamps) → pandas.core.frame.DataFrame[source]

This function retrieves the stimulus presentation dataframe and renames the columns, adds a stop_time column, and set’s index to stimulus_presentation_id before sorting and returning the dataframe. :param data: stimulus file associated with experiment id :param stimulus_timestamps: timestamps indicating when stimuli switched

during experiment
Returns:stimulus_table: dataframe containing the stimuli metadata as well as what stimuli was presented
allensdk.brain_observatory.behavior.stimulus_processing.get_stimulus_templates(pkl)[source]
allensdk.brain_observatory.behavior.stimulus_processing.get_visual_stimuli_df(data, time) → pandas.core.frame.DataFrame[source]

This function loads the stimuli and the omitted stimuli into a dataframe. These stimuli are loaded from the input data, where the set_log and draw_log contained within are used to calculate the epochs. These epochs are used as start_frame and end_frame and converted to times by input stimulus timestamps. The omitted stimuli do not have a end_frame by design though there duration is always 250ms. :param data: the behavior data file :param time: the stimulus timestamps indicating when each stimuli is

displayed
Returns:df: a pandas dataframe containing the stimuli and omitted stimuli that were displayed with their frame, end_frame, start_time, and duration
allensdk.brain_observatory.behavior.stimulus_processing.load_pickle(pstream)[source]
allensdk.brain_observatory.behavior.stimulus_processing.unpack_change_log(change)[source]