raw.add_channels 'buffer_size_sec' error
See original GitHub issueI’m trying to add a stim
channel (a clean combination of multiple already existing stim channels) to a raw object:
# read raw
raw = read_raw_edf(fname, preload=True)
# clean stim
raw_stim = raw.pick_channels(chs_stim, copy=True)
data = clean_stim(raw_stim._data)
# append data
info = create_info(ch_names=['stim_clean'], sfreq=raw.info['sfreq'], ch_types=['stim'])
raw_stim = RawArray(data, info=info, first_samp=raw._first_samps[0])
raw.add_channels([raw_stim])
But I get the following error:
RuntimeError: Don't know how to merge 'buffer_size_sec'. Make sure values are compatible.
What shall I do?
Issue Analytics
- State:
- Created 8 years ago
- Comments:28 (28 by maintainers)
Top Results From Across the Web
mne.io.Raw — MNE 1.2.2 documentation - MNE-Python
Can be 'raise' (default) to raise an error, 'warn' to emit a warning, or 'ignore' to ignore when split file is missing. New...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It works with
I’m keeping the issue opened. I think we should have a less hacky way. WDYT?
I would expect to be able to do
Raw.add_channels(data=np.array, ch_type=['stim', 'misc'], ch_names=['foo', 'bar'])
Would this work?