[FieldTrip] beamformer_sam lambda

Rojas, Don Don.Rojas at ucdenver.edu
Fri Jan 6 22:12:15 CET 2012


To all,

I encountered a problem with the 'sam' method for ft_sourceanalysis. It looks to me that when specifying the configuration option:

cfg.sam.lambda = '5%';

i.e., lambda is a percentage, not an actual number, the beamformer_sam routine does not have comparable code as the beamformer_lcmv routine to handle that type of input. I'm wondering if simply inserting the following bit of code between lines 97 and 99 of beamformer_sam, borrowed and edited from beamformer_lcmv, will work:

if ~isempty(lambda) && ischar(lambda) && lambda(end)=='%'
  ratio = sscanf(lambda, '%f%%');
  ratio = ratio/100;
  lambda = ratio * trace(all_cov)/size(all_cov,1);
end

This seems to work okay in limited tests, but maybe I'm making a mistake here. I'm using a recent svn code version, revision 5097.

Best,

Don


-----------------------
Don Rojas, Ph.D.
Associate Professor of Psychiatry
U. of Colorado Denver Anschutz Medical Campus
Director, UCD Magnetoencephalography Lab
13001 E. 17th Pl F546
Aurora, CO 80045
303-724-4994

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120106/f2e5bd1f/attachment-0001.html>


More information about the fieldtrip mailing list