allensdk.brain_observatory.nwb.nwb_utils module

allensdk.brain_observatory.nwb.nwb_utils.get_column_name(table_cols: list, possible_names: set) → str[source]

This function returns a column name, given a table with unknown column names and a set of possible column names which are expected. The table column name returned should be the only name contained in the “expected” possible names. :param table_cols: the table columns to search for the possible name within :param possible_names: the names that could exist within the data columns :return: the first entry of the intersection between the possible names

and the names of the columns of the stimulus table
allensdk.brain_observatory.nwb.nwb_utils.set_omitted_stop_time(stimulus_table: pandas.core.frame.DataFrame, omitted_time_duration: float = 0.25) → None[source]

This function sets the stop time for a row that of a stimuli table that is a omitted stimuli. A omitted stimuli is a stimuli where a mouse is shown only a grey screen and these last for 250 milliseconds. These do not include a stop_time or end_frame as other stimuli in the stimulus table due to design choices. For these stimuli to be added they must have the stop_time calculated and put into the row as data before writing to NWB. :param stimulus_table: pd.DataFrame that contains the stimuli presented to

an experiment subject
Parameters:omitted_time_duration – The duration in seconds of the expected length of the omitted stimuli
Returns:
stimulus_table_row: returns the same dictionary as inputted but with
an additional entry for stop_time.