<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Thilan,
<div class=""><br class="">
</div>
<div class="">Have you checked the code? The section in ft_appenddata between line 128-136 should give you pointers to what is going on. </div>
<div class=""><br class="">
</div>
<div class="">My conclusion would be that the condition on line 131 is not met - specifically isequaltime=False - which causes the error.</div>
<div class=""><br class="">
</div>
<div class="">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.</div>
<div class=""><br class="">
</div>
<div class="">Good luck,</div>
<div class=""><br class="">
</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 22 Mar 2023, at 22:11, Thilan Tudor via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Hi,
<div class=""><br class="">
</div>
<div class="">Thanks in advance for the help.</div>
<div class=""><br class="">
</div>
<div class="">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).</div>
<div class=""><br class="">
</div>
<div class="">EEG data has the following channels: 'F3', 'C3', 'A2', 'O1', 'F4', 'A1', 'C4', 'O2'</div>
<div class="">LFP data has the following channels: 'LFP1-LFP2', 'LFP2-LFP3'</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">For my same-subject data, I have the following (output from ft_preprocessing):</div>
<div class=""><br class="">
</div>
LFP_proc_ftdata =<br class="">
<br class="">
struct with fields:<br class="">
<br class="">
trialinfo: [1332×1 double]<br class="">
fsample: 100<br class="">
sampleinfo: [1332×2 double]<br class="">
trial: {1×1332 cell}<br class="">
time: {1×1332 cell}<br class="">
label: {2×1 cell}<br class="">
<div class=""> cfg: [1×1 struct]</div>
<div class=""><br class="">
</div>
<div class=""> EEG_proc_ftdata =</div>
<br class="">
struct with fields:<br class="">
<br class="">
trialinfo: [1332×1 double]<br class="">
fsample: 100<br class="">
sampleinfo: [1332×2 double]<br class="">
trial: {1×1332 cell}<br class="">
time: {1×1332 cell}<br class="">
label: {8×1 cell}<br class="">
cfg: [1×1 struct]<br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">I get the following error when I run <br class="">
</div>
<div class=""><span style="white-space:pre;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:10pt" class=""><br class="">
</span></div>
<div class=""><span style="white-space:pre;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:10pt" class="">cfg = [];</span></div>
<div class=""><span style="white-space:pre;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:10pt" class="">data_merged = ft_appenddata(cfg, proc_ftdata, LFP_proc_ftdata);</span></div>
<div class=""><br class="">
</div>
<div class="">Warning: the data has overlapping segments or originates from different recordings on disk
<br class="">
Warning: please consider specifying cfg.keepsampleinfo='no'<br class="">
</div>
<div class="">Error using ft_appenddata<br class="">
cannot append this data<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">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?</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!7EgJtIjBH4urqXOsBt5AumsNVHmu3S-3OBeM3r5i7lv7AHktdaX0eNtbGne-Z8uDf5YfGcYGvHYdvhiSI1GkIpJaG9i2RSMNIwnbSw$
<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>