AllenSDK
AllenSDK copied to clipboard
Epoch Separation Exception
Describe the bug the get_stimulus_epoch() function doesn't work for all experiments. We've known about this bug for years and we really need to fix it!
To Reproduce
EpochSeparationException Traceback (most recent call last)
/Applications/anaconda2/envs/py3/lib/python3.7/site-packages/allensdk/core/brain_observatory_nwb_data_set.py in get_stimulus_epoch_table(self) 192 interval_stimulus_dict = {} 193 for stimulus in self.list_stimuli(): --> 194 stimulus_interval_list = get_epoch_mask_list(stimulus_table_dict[stimulus], threshold=threshold_dict.get(self.get_session_type(), None)) 195 for stimulus_interval in stimulus_interval_list: 196 interval_stimulus_dict[stimulus_interval] = stimulus
/Applications/anaconda2/envs/py3/lib/python3.7/site-packages/allensdk/core/brain_observatory_nwb_data_set.py in get_epoch_mask_list(st, threshold, max_cuts) 84 # See: https://gist.github.com/nicain/bce66cd073e422f07cf337b476c63be7 85 # https://github.com/AllenInstitute/AllenSDK/issues/66 ---> 86 raise EpochSeparationException('more than 2 epochs cut', delta=delta) 87 88 for ii in range(len(cut_inds)+1):
EpochSeparationException: more than 2 epochs cut
Expected behavior I expect to get a dataframe of the stimulus epochs
Actual Behavior see above