[FieldTrip] Trying to merge blocks of data using ft_appenddata

Eva Masson eva.masson at hotmail.fr
Thu Jan 26 22:49:07 CET 2023


Dear FieldTrip community,

I am trying to merge two blocks of (so far) continuous data. The recordings are the same in the sense that they have the same number of channels. The files contain events, but I have not defined trials yet. (as a side note, I tried merging with defined trials in both blocks, but the issue is the same)

To do so, after I transformed my .set files into a fieldtrip structure, I tried using ft_appenddata.
Even though the files are separated, they should contain the same events, so I kept the option cfg.keepsampleinfo = 'yes'.

In appearances, the obtained structure is what I expected (twice as much data as a single file). But when I try to visualize the raw data with ft_databrowser, I get the following error:


Error using ft_fetch_data
some of the requested samples occur twice in the data and have conflicting values

Error in ft_databrowser>redraw_cb (line 1807)
  dat = ft_fetch_data(opt.orgdata, 'header', opt.hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', chanindx, 'allowoverlap', cfg.allowoverlap, 'skipcheckdata', true);

Error in ft_databrowser (line 810)
redraw_cb(h);


>From my understanding ('the trials will be concatenated', from documentation), I expect ft_appenddata to merge the data as data1 followed by data2 as a big continuous data file. Is there a misunderstanding of how ft_appenddata actually works? Or is it a sign for a design issue of my experiment?

Thank you very much for your help.
Best regards,
Éva

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20230126/d9bfd0fb/attachment.htm>


More information about the fieldtrip mailing list