[FieldTrip] ft_sourceanalysis, reshape error

Azeez Adebimpe azeez.adebimpe5 at gmail.com
Wed Feb 10 16:01:09 CET 2016


Hi David,
I think it can cause it. I hope you can compute the leadfield again with
the order in the data or you can rearrange it.

Best,

Azeez

On Wed, Feb 10, 2016 at 3:54 PM, David Pedrosa <david.pedrosa at ndcn.ox.ac.uk>
wrote:

> Hi Azeez,
>
> I have been checking leadfields and data labels and they are actually the
> same. But the order is slightly different. Do you think this may cause the
> problems?
>
> Thanks for your help.
>
> Best,
> David
>
> ------------------------------
> Dr. David Pedrosa
>
> Clinical Research Fellow
> Medical Research Council Brain Network Dynamics Unit at the University of
> Oxford
> Nuffield Department of Clinical Neurosciences
> University of Oxford
> Level 6, West Wing
> John Radcliffe Hospital, OX3 9DU
> *Tel:* +44 (0)1865 572490
> *E-Mail:* david.pedrosa at ndcn.ox.ac.uk
>
> http://www.mrcbndu.ox.ac.uk/
> <https://owa.nexus.ox.ac.uk/owa/redir.aspx?C=E40BwPuNq0uXQGSOPDW39AmtYlwBR9IIjsI0PRu9uuTE46jeZnqjmG6XP02rBAUiF1EnCJtn3UU.&URL=http%3a%2f%2fwww.mrcbndu.ox.ac.uk%2f>
> ------------------------------
> *Von:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]"
> im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com]
> *Gesendet:* Freitag, 5. Februar 2016 22:44
> *An:* FieldTrip discussion list
> *Betreff:* Re: [FieldTrip] ft_sourceanalysis, reshape error
>
> Hi David,
>
> Sorry for late reply, I was on the journey.
> The same issue happened to me before when the labels in the leadfield and
> data were not the same.
> if you have 'Fp1' in leadfield and 'FP1' in data, it will view as
> different channels.
>
>
> Azeez
>
>
>
>
> On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa <david.pedrosa at ndcn.ox.ac.uk
> > wrote:
>
>> Hi Azeez,
>>
>> thank you for the fast reply!
>> I hadn't considered that but I have checked and I use the same labels for
>> both leadfield and data.
>>
>> I mean it makes kind of sense that the reshape doesn't work as it is now,
>> but I don't know where the problem is before.
>>
>> Can you think of anything else?
>>
>> Best,
>> David
>>
>> ------------------------------
>> Dr. David Pedrosa
>>
>> Clinical Research Fellow
>> Medical Research Council Brain Network Dynamics Unit at the University of
>> Oxford
>> Nuffield Department of Clinical Neurosciences
>> University of Oxford
>> Level 6, West Wing
>> John Radcliffe Hospital, OX3 9DU
>> *Tel:* +44 (0)1865 572490
>> *E-Mail:* david.pedrosa at ndcn.ox.ac.uk
>>
>> http://www.mrcbndu.ox.ac.uk/
>> <https://owa.nexus.ox.ac.uk/owa/redir.aspx?C=E40BwPuNq0uXQGSOPDW39AmtYlwBR9IIjsI0PRu9uuTE46jeZnqjmG6XP02rBAUiF1EnCJtn3UU.&URL=http%3a%2f%2fwww.mrcbndu.ox.ac.uk%2f>
>> ------------------------------
>> *Von:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]"
>> im Auftrag von "Azeez Adebimpe [azeez.adebimpe5 at gmail.com]
>> *Gesendet:* Freitag, 5. Februar 2016 13:56
>> *An:* FieldTrip discussion list
>> *Betreff:* Re: [FieldTrip] ft_sourceanalysis, reshape error
>>
>> Hi David,
>>
>> Probably the channels' labels in leadfield and data are not the same.
>>
>> check it and try again.
>>
>> Azeez
>>
>> On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa <
>> david.pedrosa at ndcn.ox.ac.uk> wrote:
>>
>>> Dear list,
>>>
>>> after installing the newest version of Fieldtrip today, I have
>>> encountered a rather strange error . I am tying to compute corticomuscular
>>> coherence for an EEG/EMG dataset and it worked well so far. With the new
>>> version however, I get a reshape error I find fard to understand. This is
>>> the code:
>>>
>>>     cfg              = [];
>>>     cfg.frequency    = 20;;
>>>     cfg.grid        = leadfield;
>>>     cfg.method       = 'dics';
>>>     cfg.refchan      = 'ExtR1';
>>>     cfg.channel         = {'EEG' 'ExtR1'};
>>>     cfg.vol          = hdm;
>>>     cfg.dics.projectnoise = 'no';
>>>     cfg.dics.lambda       = '1%';
>>>     cfg.dics.keepfilter   = 'yes';
>>>     cfg.dics.keeptrials   = 'yes';
>>>     cfg.dics.realfilter   = 'yes';
>>>     sourceAll = ft_sourceanalysis(cfg, freqAll);
>>>
>>> but this hasn't changed. The error pops up at lines 619/620 of
>>> ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);),
>>> where it supposedly just averages the CSD matrix over trials.  And it makes
>>> kind of sense as the line says to reshape the CSDs from a 1xNchans matrix
>>> into a [Nchans Nchans] one. But why is it poppin up now as nothing has
>>> changed in my analyses? I have checked the updates of the last months and I
>>> couldn't find anything related to this. So has any one an idea why the
>>> analysis crashes at this point.
>>>
>>> Thanks in advance
>>> Best,
>>> David
>>>
>>> ------------------------------
>>> Dr. David Pedrosa
>>>
>>> Clinical Research Fellow
>>> Medical Research Council Brain Network Dynamics Unit at the University
>>> of Oxford
>>> Nuffield Department of Clinical Neurosciences
>>> University of Oxford
>>> Level 6, West Wing
>>> John Radcliffe Hospital, OX3 9DU
>>> *Tel:* +44 (0)1865 572490
>>> *E-Mail:* david.pedrosa at ndcn.ox.ac.uk
>>>
>>> http://www.mrcbndu.ox.ac.uk/
>>> <https://owa.nexus.ox.ac.uk/owa/redir.aspx?C=E40BwPuNq0uXQGSOPDW39AmtYlwBR9IIjsI0PRu9uuTE46jeZnqjmG6XP02rBAUiF1EnCJtn3UU.&URL=http%3a%2f%2fwww.mrcbndu.ox.ac.uk%2f>
>>>
>>> _______________________________________________
>>> fieldtrip mailing list
>>> fieldtrip at donders.ru.nl
>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>>
>>
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160210/0fa04817/attachment.html>


More information about the fieldtrip mailing list