<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt">Thank you Eelke.<br><br>I found out that the problem was before calling the combine planar function. <br>The original script read in 5 files of raw data (which I could not upload in dropbox, due to dimensions issues). These have the .grad field, but when I appenddata() the data structure looses its grad field.<br><br>I managed to artificially attach it again, but I don't understand why the function ft_appenddata() does this<br>Any idea? <br><br>I will try to send you the files in a way or the other<br><br>Best<br><br>Nic<br><br><br><div><br></div> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1"> <b><span style="font-weight:bold;">Da:</span></b> Eelke
Spaak <eelke.spaak@donders.ru.nl><br> <b><span style="font-weight: bold;">A:</span></b> FieldTrip discussion list <fieldtrip@science.ru.nl> <br> <b><span style="font-weight: bold;">Inviato:</span></b> Martedì 9 Aprile 2013 11:50<br> <b><span style="font-weight: bold;">Oggetto:</span></b> Re: [FieldTrip] Issues with ft_combineplanar(cfg, data)<br> </font> </div> <br>Dear Nic,<br><br>That is very weird. The fact that a grad seems to be created out of<br>thin air by ft_combineplanar suggests to me that there might be an<br>error in your script. (However, of course it could also be a bug in<br>fieldtrip.) Could you perhaps send a functional (small) piece of data,<br>along with a script, that reproduces the error? Your e-mail currently<br>does not have enough information to judge what's truly going on. If<br>your data is >1MB, please use one of the file sharing services listed<br>here: <a
href="http://fieldtrip.fcdonders.nl/faq/how_should_i_send_example_data_to_the_developers" target="_blank">http://fieldtrip.fcdonders.nl/faq/how_should_i_send_example_data_to_the_developers</a><br><br>Best,<br>Eelke<br><br>On 9 April 2013 10:33, Niccolò Pescetelli <<a ymailto="mailto:niccol000@yahoo.it" href="mailto:niccol000@yahoo.it">niccol000@yahoo.it</a>> wrote:<br>> Dear all,<br>><br>> I am new to fieldtrip and I would like to have your opinion about a bizarre<br>> error that I find trying to execute the function ft_combineplanar(). What am<br>> I trying to do is to obtain the planar gradient from raw data. I use a<br>> neuromag306 Elekta MEG system.<br>> I tried to dig deeper into the scripts and I notice some quirks the error<br>> could derive from:<br>><br>> 1. as soon as I call ft_combineplanar(cfg, data) , data.trials switches from<br>> 840 trials to 192 trials, without any command being provided
that is BEFORE<br>> the first line of ft_combineplanar(cfg, data) being executed! At the same<br>> time all data.trials becomes empty arrays<br>><br>> 2. my data structure does not contain the fields 'grad' before<br>> ft_combineplanar(cfg, data) has been called but it does afterwards . Again<br>> this happen without any command having been given<br>><br>> 3. The error finally occurs in line 210 of the ft_combineplanar function<br>> (indexing error) and it's due to the data.trial array being empty<br>><br>> What do you think?<br>><br>> Best<br>><br>> Nic<br>><br>> _______________________________________________<br>> fieldtrip mailing list<br>> <a ymailto="mailto:fieldtrip@donders.ru.nl" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip"
target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br><br>_______________________________________________<br>fieldtrip mailing list<br><a ymailto="mailto:fieldtrip@donders.ru.nl" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br><br><br> </div> </div> </div></body></html>