[FieldTrip] ft_appenddata issue - "cannot append this data"
Schoffelen, J.M. (Jan Mathijs)
janmathijs.schoffelen at donders.ru.nl
Thu Mar 23 07:37:09 CET 2023
Hi Thilan,
Have you checked the code? The section in ft_appenddata between line 128-136 should give you pointers to what is going on.
My conclusion would be that the condition on line 131 is not met - specifically isequaltime=False - which causes the error.
I need to check the equality of the ’time’ field for the LFP_proc_ftdata and EEG_proc_ftdata variables. If this field numerically non-identical, the data cannot be appended.
Good luck,
Jan-Mathijs
On 22 Mar 2023, at 22:11, Thilan Tudor via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:
Hi,
Thanks in advance for the help.
I am trying to use ft_appenddata to merge EEG and iEEG (LFP) data as input to run connectivity analysis with ft_connectivity (after processing this merged data with ft_freqanalysis).
EEG data has the following channels: 'F3', 'C3', 'A2', 'O1', 'F4', 'A1', 'C4', 'O2'
LFP data has the following channels: 'LFP1-LFP2', 'LFP2-LFP3'
For my same-subject data, I have the following (output from ft_preprocessing):
LFP_proc_ftdata =
struct with fields:
trialinfo: [1332×1 double]
fsample: 100
sampleinfo: [1332×2 double]
trial: {1×1332 cell}
time: {1×1332 cell}
label: {2×1 cell}
cfg: [1×1 struct]
EEG_proc_ftdata =
struct with fields:
trialinfo: [1332×1 double]
fsample: 100
sampleinfo: [1332×2 double]
trial: {1×1332 cell}
time: {1×1332 cell}
label: {8×1 cell}
cfg: [1×1 struct]
I get the following error when I run
cfg = [];
data_merged = ft_appenddata(cfg, proc_ftdata, LFP_proc_ftdata);
Warning: the data has overlapping segments or originates from different recordings on disk
Warning: please consider specifying cfg.keepsampleinfo='no'
Error using ft_appenddata
cannot append this data
Even when I specify cfg.keepsampleinfo='no', I still get "cannot append this data". Is the issue is that there are no common channels between the datasets to run ft_appenddata?
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!7EgJtIjBH4urqXOsBt5AumsNVHmu3S-3OBeM3r5i7lv7AHktdaX0eNtbGne-Z8uDf5YfGcYGvHYdvhiSI1GkIpJaG9i2RSMNIwnbSw$
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20230323/e5d99297/attachment.htm>
More information about the fieldtrip
mailing list