[FieldTrip] how to concatenate non-continuous data after artifact rejection?

Blume Christine christine.blume at sbg.ac.at
Mon Aug 3 13:07:42 CEST 2020


Dear Vera,

Could you perhaps outline why you wish to make your data continuous again after artifact rejection? There are probably good reasons why Fieldtrip does not allow it 'by default', the first I think of is that you usually will not want to lose the time information in your data, which would be the consequence.

Best,
Christine

-----Ursprüngliche Nachricht-----
Von: fieldtrip <fieldtrip-bounces at science.ru.nl> Im Auftrag von Vera Tsogli
Gesendet: Montag, 3. August 2020 12:24
An: fieldtrip at science.ru.nl
Betreff: [FieldTrip] how to concatenate non-continuous data after artifact rejection?

Hello,

I' m working on my first FieldTrip script to analyse continuous EEG data. I removed manually some muscular artifacts (ft_databrowser) and now when I display the data there are gaps and I haven't found a way to concatenate the non-continuous data. For your information here are the steps that I followed:
1. Check for bad channels and mark artifacts: artif = ft_databrowser(cfg, data_all); (continuous data) 2. Channel interpolation: data_fixed = ft_channelrepair(cfg,data_all); (continuous data) 3. Reject the artifacts: data_clear = ft_rejectartifact(cfg, data_fixed); After step 3 if I display the data using the databrowser and I can see that they are not continuous anymore because I have rejected the segments that contained the artifacts. So, my question is how can I make the data continuous again?
I tried the following but with no success:
(1) data_final = ft_appendata([], data_clear);
(2) cfg = [];
cfg.trl = [min(data_clear.sampleinfo(:,1))
max(data_clear.sampleinfo(:,2)) 0];
data_concat = ft_redefinetrial(cfg,data_clear);

Thank you in advance for your time.
Vera


_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202



More information about the fieldtrip mailing list