[FieldTrip] Question about Source reconstruction of EEG data
Jason Leung
j59leung at gmail.com
Wed Dec 23 02:08:22 CET 2020
Hello Fieldtrip community,
I'm trying to do source analysis on my EEG data and am following the Source
reconstruction of event-related fields using minimum-norm estimation
<https://www.fieldtriptoolbox.org/tutorial/minimumnormestimate/> tutorial.
Since the tutorial is for MEG data, I followed the Forward modeling for EEG
source reconstruction
<https://www.fieldtriptoolbox.org/workshop/oslo2019/forward_modeling/> tutorial
to compute my forward solution for EEG instead. As such, I wrote 2 MATLAB
scripts: one called forward_model_eeg_pilot.m to do the forward modelling,
and one called source_reconstruction_mne_pilot.m to do the inverse
solution. Please find my code and output here <https://justpaste.it/1nvqt>.
In the inverse solution section I used the pre-computed leadfield from the
other tutorial. The issue is that I get the following error once I call
the ft_sourceanalysis function in line 67:
Warning: the labels are missing for the precomputed leadfields, assuming
that they were computed with the same channel
selection
Index exceeds the number of array elements (2).
Error in getdimord (line 468)
if isequalwithoutnans(datsiz, [npos nchan nori]) || (isequal(datsiz([1
3]), [npos nori]) && isinf(nchan))
Error in ft_selectdata (line 188)
dimord{i} = getdimord(varargin{1}, datfield{i});
Error in ft_sourceanalysis (line 435)
sourcemodel = ft_selectdata(tmpcfg, sourcemodel);
Error in source_reconstruction_mne_pilot (line 67)
sourceL = ft_sourceanalysis(cfg, tlckL);
I also tried calculating the ft_sourceanalysis without the precomputed
leadfield, by passing it the source model and head model and having it
compute the forward solution on the fly. While no error is given when I did
that, the source output is still invalid, containing NaNs for all the
entries in the avg.pow field.
I was wondering if anyone could give me some pointers on how to fix this
issue. I've included the output of the source_reconstruction_mne_pilot.m
script in the link <https://justpaste.it/1nvqt>for your reference. Any help
is appreciated and thanks a lot in advance!
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20201222/381fe0b2/attachment.htm>
More information about the fieldtrip
mailing list