I am working with 275 channels MEG system from CTF and I am running DICS for 
source localization comparing MEG with an external reference channel
(surface bipolar EMG).
As I ran the method I got curious results and therefore I was looking inside
the code for debugging.
I found a problem with which i am stuck in the forward solution with a
single sphere conductive model used in compute_leadfield.m 
By comparing the results with CTF's forward solution routine i simulated a
single dipole in a known position/orientation and i have got different
results for the lead field.
What could be the problem?
Maybe i am using bad settings...
I attach the code i am using for the lead field computation in Fieldtrip:
  
    % 1) Initialize the gradients' structure
    % ctf read in function - ds: ctf info struct
    position   = ctf_getSensPos(ds);
    grad.pnt   = [position(:,1:3);position(:,7:9)];
    grad.ori   = [position(:,4:6);position(:,10:12)];
    MEGlist    = strmatch('M',ds.res4.chanNames);
    for fkk=1:length(MEGlist)
        grad.label(fkk) = cellstr(ds.res4.chanNames(MEGlist(fkk),1:5));
    end
    grad.label = grad.label';
    grad.tra = [eye(275), -eye(275)];

    % 2) Initialize the grid structure
    grids.resolution = 0.5;
    grids.xgrid = 'auto';
    grids.ygrid = 'auto';
    grids.zgrid = 'auto';

   % prepare the head model
    cfg           = [];
    cfg.grad      = grad; 
    cfg.grid      = grids;
    cfg.hdmfile   = 'myhead.hdm';   
    [vol, sens, cfg] = prepare_headmodel(cfg, data);

   % compute the lead field (dipole_pos and dipole_mom are known and fixed)
    lf = compute_leadfield(dipole_pos, grad, vol,  
'singlesphere','yes')*dipole_mom';

   % compute lead field with ctf routine
   lf_ctf = ctf_leadField(ds,dipole_pos,dipole_mom);
<p>----------------------------------</p>
<p>The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.</p>
<p>  http://listserv.surfnet.nl/archives/fieldtrip.html</p>
<p>  http://www.ru.nl/fcdonders/fieldtrip/</p>