Back to the main page.
Bug 397 - move private/prepare_dipole_grid to ft_prepare_sourcemodel in main directory
Status | CLOSED FIXED |
Reported | 2011-01-13 10:49:00 +0100 |
Modified | 2011-01-14 13:29:58 +0100 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Mac OS |
Importance: | P1 normal |
Assigned to: | Robert Oostenveld |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Robert Oostenveld - 2011-01-13 10:49:10 +0100
this is for the MNE integration. Besides moving, the calling functions need to be changed: roboos@mentat001> grep prepare_dipole_grid *.m */*.m ft_dipolefitting.m: [grid, cfg] = prepare_dipole_grid(cfg, vol, sens); ft_headmodelplot.m: sourcegrid = prepare_dipole_grid(cfg, vol, sens); ft_megrealign.m:grid = prepare_dipole_grid(cfg, volold, data.grad); ft_prepare_leadfield.m:[grid, cfg] = prepare_dipole_grid(cfg, vol, sens); ft_sourceanalysis.m: [grid, cfg] = prepare_dipole_grid(cfg, vol, sens); I think that the best is to change those functions into using a tmpcfg and copy the relevant cfg fields into the tmpcfg. When Searching through the code of prepare_dipole_grid, it turns out that the following cfg fields are being used cfg.grid cfg.mri cfg.headshape cfg.tightgrid cfg.symmetry cfg.smooth cfg.threshold cfg.spheremesh cfg.inwardshift cfg.mriunits cfg.sourceunits Those fields are teh ones that have to be copied into the tmpcfg. The function now takes vol and sens as 2nd and 3rd argument, these should be specified as cfg.vol and cfg.sens (or cfg.grad/elec) for consistency with other functions
Robert Oostenveld - 2011-01-13 11:29:22 +0100
revision 2573 and 2574 (which I just committed) implement the required changes: there is now a function ft_prepare_sourcemodel in the main directory what still needs to be done is - clean documentation inside that function - implement a cfg.method for explicit specification on how the grid should be contstructed