spike_analysiscoreget_period_label_by_time

get_period_label_by_time

spike_analysis.core.get_period_label_by_time(periods, t)

Classifies timepoint based on whether it falls within a period.

Parameters:
  • periods (dict) – dictionary containing period label as key and (period_start, period_end) as value

  • t (float) – timepoint to classify

Returns:

label of period in which t is in. ‘undefined’ if t is in no defined period

Return type:

str