[FieldTrip] SAM option in ft_sourceanalysis

Yuval Harpaz yuvharpaz at gmail.com
Mon May 7 07:52:29 CEST 2012


Hi
well, talking to Dr. Robinson he said he tried to make it work for EEG but
since the impedance is unknown and may change during the experiment the
forward solution wasn't stable enough.
I noticed the fieldtrip team followed up on Dr. Robinson's SAM on few
issues. since at the time it only worked with local spheres (or a single
sphere but not with Nolte) sam in fieldtrip does not allow single shell for
example. on the other hand, dipole orientation is not set according to Dr.
Robinson's method (there is "stephen's" method there but it doesn't work
now) so maybe fieldtrip went beyond Dr. Robinson and adjusted sam for EEG.
Yuval


On 6 May 2012 23:50, Elena Orekhova <Elena.Orekhova at neuro.gu.se> wrote:

>  >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> 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
>> 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
>
>
>
> _______________________________________________
> fieldtrip mailing list
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120507/c4ac5da0/attachment.html>


More information about the fieldtrip mailing list