Concatenate raws

Hi all,

I have data where my equipment stopped recording and I had to restart the recording while my experiment continued.

Is there a way to concatenate two raw objects into one while accounting for the meas_date (s). I.e. having blank data representing the period of missing data.

Thanks!

Hello and welcome to the forum!

Concatenating raw data can be done using mne.concatenate_raws()

Why would you even want that? I’d think that if anything, it will cause problems in processing down the road …

The easiest way to do it is probably to crop a copy of one raw to the correct duration, set all data to zeroes, and pass it to mne.concatenate_raws() together with the other two raws. But again, without a very good reason to do that, I wouldn’t recommend doing it.

Thanks for the very fast reply!

My experiments includes blocks and repetitions.

I need to add annotations from a csv file onto the raw object, but I would like to keep all annotations (also those with no data) so I later on can go a count the annotations and figure out the block and repetitions.

Ok, but I would suggest to add an annotation starting with BAD_ to the “empty” bit of raw data just to ensure you don’t accidentally end up including it in an ERP or TFR analysis or such :slight_smile:

1 Like