[FieldTrip] SAM option in ft_sourceanalysis

Elena Orekhova Elena.Orekhova at neuro.gu.se
Sun May 6 22:50:02 CEST 2012


>Dear Elena
>I used it recently with MEG data and local spheres model
>I don't think it could work with eeg but I don't know.
>Yuval

Hi again,
Theoretically SAM should work for EEG as well. Is there any particular reason it does not?

I have found a previous message by Don Rojas and introduced the lambda correction he suggested.
Now there is another error (see below).

Dear developers, what is wrong?  I would be very grateful for help!

Elena


***********************
sourcepst  = ft_sourceanalysis(cfg, tlckavgpst);
the input is timelock data with 30 channels and 1250 timebins
using headmodel specified in the configuration
using electrodes specified in the configuration
creating dipole grid based on user specified dipole positions
15156 dipoles inside, 11814 dipoles outside brain
the call to "ft_prepare_sourcemodel" took 0 seconds and an estimated 1 MB
scanning repetition 1
using precomputed leadfields
scanning grid
Undefined function 'SAM_costfun' for input arguments of type 'double'.

Error in fminsearch (line 191)
fv(:,1) = funfcn(x,varargin{:});

Error in beamformer_sam (line 157)
    [opt_angle, fval, exitflag, output] = fminsearch('SAM_costfun',
    all_angles(min_ind), optim_options, vox_pos, tanu, tanv, lf, all_cov,
    inv_cov, noise_cov);

Error in ft_sourceanalysis (line 849)
      dip(i) = beamformer_sam(grid, sens, vol, squeeze(avg(i,:,:)),
      squeeze(Cy(i,:,:)), optarg{:});
************************

________________________________
From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] on behalf of Yuval Harpaz [yuvharpaz at gmail.com]
Sent: Friday, May 04, 2012 8:56 PM
To: Email discussion list for the FieldTrip project
Subject: Re: [FieldTrip] SAM option in ft_sourceanalysis
Dear Elena
I used it recently with MEG data and local spheres model
I don't think it could work with eeg but I don't know.
Yuval

On 4 May 2012 09:50, Elena Orekhova <Elena.Orekhova at neuro.gu.se<mailto:Elena.Orekhova at neuro.gu.se>> wrote:
Dear fieldtrippers!

I tried to use SAM beamformer for the EEG analysis,
But I have got en error (see below).
I guess that there is a bug  in ‘beamformer_sam’at line 112.

I wonder if ‘SAM’ option works at all?  Did anybody used ‘SAM’ in ‘ft_sourceanalysis’?

Thanks,
Elena

***********************
Error using  *
Inner matrix dimensions must agree.

Error in beamformer_sam (line 112)
inv_cov = pinv(all_cov + lambda * eye(size(all_cov)));

Error in ft_sourceanalysis (line 849)
      dip(i) = beamformer_sam(grid, sens, vol, squeeze(avg(i,:,:)),
      squeeze(Cy(i,:,:)), optarg{:});



_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip



--

Y.Harpaz

a link to the BIU MEG lab:
http://faculty.biu.ac.il/~goldsa/index.html<http://faculty.biu.ac.il/%7Egoldsa/index.html>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120506/b228e1d3/attachment-0002.html>


More information about the fieldtrip mailing list