[FieldTrip] Inquiry about Field-Trip usage for multi-channel sources

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Fri Apr 14 21:19:15 CEST 2017


Please read the documentation. I think it should be sufficiently clear.

Jan-Mathijs


function [simulated] = ft_dipolesimulation(cfg)

        % FT_DIPOLESIMULATION computes the field or potential of a simulated dipole
        % and returns a datastructure identical to the FT_PREPROCESSING function.
        %
        % Use as
        % data = ft_dipolesimulation(cfg)
        %
        % The dipoles position and orientation have to be specified with
        % cfg.dip.pos = [Rx Ry Rz] (size Nx3)
        % cfg.dip.mom = [Qx Qy Qz] (size 3xN)
        %
        % The timecourse of the dipole activity is given as a single vector or as a
        % cell-array with one vectors per trial
        % cfg.dip.signal
        % or by specifying a sine-wave signal
        % cfg.dip.frequency in Hz
        % cfg.dip.phase in radians
        % cfg.dip.amplitude per dipole
        % cfg.ntrials number of trials
        % cfg.triallength time in seconds
        % cfg.fsample sampling frequency in Hz
        %
        % Random white noise can be added to the data in each trial, either by
        % specifying an absolute or a relative noise level
        % cfg.relnoise = add noise with level relative to simulated signal
        % cfg.absnoise = add noise with absolute level
        % cfg.randomseed = 'yes' or a number or vector with the seed value (default = 'yes')
        %
        % Optional input arguments are
        % cfg.channel = Nx1 cell-array with selection of channels (default = 'all'),
        % see FT_CHANNELSELECTION for details
        % cfg.dipoleunit = units for dipole amplitude (default nA*m)
        % cfg.chanunit = units for the channel data
        %
        % The volume conduction model of the head should be specified as
        % cfg.headmodel = structure with volume conduction model, see FT_PREPARE_HEADMODEL
        %
        % The EEG or MEG sensor positions should be specified as
        % cfg.elec = structure with electrode positions, see FT_DATATYPE_SENS
        % cfg.grad = structure with gradiometer definition, see FT_DATATYPE_SENS
        % cfg.elecfile = name of file containing the electrode positions, see FT_READ_SENS
        % cfg.gradfile = name of file containing the gradiometer definition, see FT_READ_SENS
        %
        % See also FT_SOURCEANALYSIS, FT_DIPOLEFITTING, FT_TIMELOCKSIMULATION,
        % FT_FREQSIMULATION, FT_CONNECTIVITYSIMULATION




function [lf] = ft_compute_leadfield(dippos, sens, headmodel, varargin)

        % FT_COMPUTE_LEADFIELD computes a forward solution for a dipole in a a volume
        % conductor model. The forward solution is expressed as the leadfield
        % matrix (Nchan*3), where each column corresponds with the potential or field
        % distributions on all sensors for one of the x,y,z-orientations of the
        % dipole.
        %
        % Use as
        % [lf] = ft_compute_leadfield(dippos, sens, headmodel, ...)
        % with input arguments
        % dippos = position dipole (1*3 or Ndip*3)
        % sens = structure with gradiometer or electrode definition
        % headmodel = structure with volume conductor definition
        %
        % The headmodel represents a volume conductor model, its contents
        % depend on the type of model. The sens structure represents a sensor
        % array, i.e. EEG electrodes or MEG gradiometers.
        %
        % It is possible to compute a simultaneous forward solution for EEG and MEG
        % by specifying sens and grad as two cell-arrays, e.g.
        % sens = {senseeg, sensmeg}
        % headmodel = {voleeg, volmeg}
        % This results in the computation of the leadfield of the first element of
        % sens and headmodel, followed by the second, etc. The leadfields of the
        % different imaging modalities are subsequently concatenated.
        %
        % Additional input arguments can be specified as key-value pairs, supported
        % optional arguments are
        % 'reducerank' = 'no' or number
        % 'normalize' = 'no', 'yes' or 'column'
        % 'normalizeparam' = parameter for depth normalization (default = 0.5)
        % 'weight' = number or 1xN vector, weight for each dipole position (default = 1)
        % 'backproject' = 'yes' (default) or 'no', in the case of a rank reduction
        % this parameter determines whether the result will be
        % backprojected onto the original subspace
        %
        % The leadfield weight may be used to specify a (normalized)
        % corresponding surface area for each dipole, e.g. when the dipoles
        % represent a folded cortical surface with varying triangle size.
        %
        % Depending on the specific input arguments for the sensor and volume, this
        % function will select the appropriate low-level EEG or MEG forward model.
        % The leadfield matrix for EEG will have an average reference over all the
        % electrodes.
        %
        % The supported forward solutions for MEG are
        % single sphere (Cuffin and Cohen, 1977)
        % multiple spheres with one sphere per channel (Huang et al, 1999)
        % realistic single shell using superposition of basis functions (Nolte, 2003)
        % leadfield interpolation using a precomputed grid
        % boundary element method (BEM)
        %
        % The supported forward solutions for EEG are
        % single sphere
        % multiple concentric spheres (up to 4 spheres)
        % leadfield interpolation using a precomputed grid
        % boundary element method (BEM)
        %
        % See also FT_PREPARE_VOL_SENS, FT_HEADMODEL_ASA, FT_HEADMODEL_BEMCP,
        % FT_HEADMODEL_CONCENTRICSPHERES, FT_HEADMODEL_DIPOLI, FT_HEADMODEL_HALFSPACE,
        % FT_HEADMODEL_INFINITE, FT_HEADMODEL_LOCALSPHERES, FT_HEADMODEL_OPENMEEG,
        % FT_HEADMODEL_SINGLESHELL, FT_HEADMODEL_SINGLESPHERE,
        % FT_HEADMODEL_HALFSPACE





On 14 Apr 2017, at 19:48, Joseph Lee <joeboe at umich.edu<mailto:joeboe at umich.edu>> wrote:

Thank you for your reply Jan-Marthijs,

May I ask then what the main difference between using 'ft_compute_leadfield' to calculate leadfield and generate a signal vs using 'ft_dipole_simulation'.  Thanks!

-Joe

On Thu, Apr 13, 2017 at 3:24 AM, Schoffelen, J.M. (Jan Mathijs) <jan.schoffelen at donders.ru.nl<mailto:jan.schoffelen at donders.ru.nl>> wrote:
Joe,

You may want to have a look here: http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_dipole_fit?s[]=ft&s[]=dipolesimulation to get started.

Best wishes,
Jan-Mathijs



J.M.Schoffelen, MD PhD
Senior Researcher, VIDI-fellow - PI, language in interaction
Telephone: +31-24-3614793<tel:+31%2024%20361%204793>
Physical location: room 00.028
Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands



On 07 Apr 2017, at 20:23, Joseph Lee <joeboe at umich.edu<mailto:joeboe at umich.edu>> wrote:

Dear Field Trip Community

I am Joe from the Computational Unit of the Center for Consciousness Science, University of Michigan.

We are somewhat new to forward modelling and are currently undertaking a project to generate 128 scalp-level channel signals from the 78 source-level signals. We are using the "ft_compute_leadfield" function of FieldTrip in order to accomplish that goal.

Is this a valid approach for our goal or were those functions designed for a different purpose?

Any comments on this will be helpful for us. Thank you very much.

Best,

Joe

Research Assistant
Center for Consciousness Science,
University of Michigan Medical School,
Ann Arbor, USA
_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip





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

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

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


More information about the fieldtrip mailing list