Dear Alexandre,
I probably do something wrong but it does not seem to work. In the final step of preprocessing I interpolate channels like this
epochs.interpolate_bads(reset_bads=True, mode ='accurate?) and then save them as a -epo.fif file
When I try to combine multiple sessions, I read in the different files and store them in a list, which I try to concatenate with the following code:
mne.concatenate_epochs(all_epochs) #where all_epochs is a list of epoched data data. However, this does seem to work and gives me the following error:
/Users/dirk/mne-python/mne/epochs.py in concatenate_epochs(epochs_list)
2737 .. versionadded:: 0.9.0
2738 """
-> 2739 return _finish_concat(*_concatenate_epochs(epochs_list))
2740
2741
/Users/dirk/mne-python/mne/epochs.py in _finish_concat(info, data, events, event_id, tmin, tmax, baseline, selection, drop_log, verbose)
2716 selection=selection, drop_log=drop_log, proj=False,
2717 on_missing='ignore', verbose=verbose)
-> 2718 out.drop_bad()
2719 return out
2720
/Users/dirk/mne-python/mne/epochs.py in drop_bad(self, reject, flat, verbose)
/Users/dirk/mne-python/mne/utils.py in verbose(function, *args, **kwargs)
724 with use_log_level(verbose_level):
725 return function(*args, **kwargs)
--> 726 return function(*args, **kwargs)
727
728
/Users/dirk/mne-python/mne/epochs.py in drop_bad(self, reject, flat, verbose)
964 raise ValueError('reject and flat, if strings, must be "existing"')
965 self._reject_setup(reject, flat)
--> 966 self._get_data(out=False)
967 return self
968
/Users/dirk/mne-python/mne/epochs.py in _get_data(self, out, verbose)
/Users/dirk/mne-python/mne/utils.py in verbose(function, *args, **kwargs)
724 with use_log_level(verbose_level):
725 return function(*args, **kwargs)
--> 726 return function(*args, **kwargs)
727
728
/Users/dirk/mne-python/mne/epochs.py in _get_data(self, out, verbose)
1129 good_idx = []
1130 n_out = 0
-> 1131 assert n_events == len(self.selection)
1132 for idx, sel in enumerate(self.selection):
1133 if self.preload: # from memory
AssertionError:
I checked and in both epoch objects self.info <http://self.info/>[?bads?] = [].
Hope that this is helpful,
Dirk