[FieldTrip] Warped Source plots and High Source Power Values

Alex Williams alexanderwil2024 at my.fit.edu
Fri May 17 17:08:44 CEST 2024


Hi Dr. Schofflen,

  Thanks so much for the response! I checked the metric units of the
source model, head model and the grad parameter. All of them are in 'mm'.
However, I ended up checking how SPM processed the meeg data and returned
its D structure. It seems as though the grad parameter within the datareg
subfield is in 'mm' but within the forward subfield of the SPM-processed
structure, the grad parameter is in 'm'. The same goes for the vol
parameter in the forward subfield (in 'm').

-Alex

On Fri, May 17, 2024 at 4:02 AM Schoffelen, J.M. (Jan Mathijs) via
fieldtrip <fieldtrip at science.ru.nl> wrote:

>  Hi Alex,
>
> The first thing I would check, is whether the metric units of the
> sourcemodel/grad are as implicitly expected by you. The cfg.resolution
> argument before calling ft_prepare_sourcemodel is interpreted by
> ‘FieldTrip’ in the metric units that the primary geometric object is
> expressed in. I don’t know by heart which one of the geometric objects (in
> this case headmodel and grad) is primary in determing this (you need to
> read the code for that), but things might become strange if it actually is
> the grad, and if the grad is expressed in ‘m’. Because this would result in
> a 3D-grid with a 1 meter spacing between dipoles.
>
> Best wishes,
> Jan-Mathijs
>
>
>
> On 14 May 2024, at 17:15, Alex Williams via fieldtrip <
> fieldtrip at science.ru.nl> wrote:
>
> Hello there FieldTrip Community,
>
>
>   I'm Alex Williams, a neuroengineering graduate student at Florida
> Institute of Technology. I'm relatively new to source reconstruction
> methods and was wondering if there may be any pointers or advice that may
> help guide me through the tutorials and documentation. I've been trying to
> resolve an issue with the beamformer for some time. Currently, I'm using an
> LCMV beamformer to source fit participant MEG data and compare those
> results to source results that were obtained in SPM12.  Though I'm trying
> to create a pipeline for analyzing this data set, the results I've obtained
> seem to have discrepancies in source variance and virtual channel signal
> alongside having warped sourceplots when plotting source variance.  The
> meeg data, D, I'm using has been converted from SPM to fieldtrip using the
> function. spm2fieldtrip(). The converted data itself has been defined, and
> has undergone pre-processing and time-locking in SPM.
>
> Steps I used:
>
> 1. The converted meeg data, D, I'm using has been converted from SPM to
> fieldtrip using the function. spm2fieldtrip(). The converted data itself
> has been defined, and has undergone pre-processing and epoching in SPM.
> Since I wasn't able to find the covariance matrix within the D structure I
> was using, I applied a time-lock analysis to the D structure I had and used
> only the covariance matrix from those results as the cfg.cov parameter
> within the D matrix pre-time lock.
>
> 2. ft_read_mri() used a .nifti MRI file and an empty configuration.
> Fiducials were taken and used in the configuration to realign the MRI using
> ft_volumerealign() with cfg.coordsys='neuromag'. After, segmentation was
> done using ft_volumesegment(), again with an empty configuration.
>
> 3. Headmodel computed using following parameters:
> cfg = [];
> cfg.method = 'singleshell';
> cfg.siunits = 'yes';
> cfg.feedback = 'yes';
> headmodel = ft_prepare_headmodel(cfg, seg);
> headmodel = ft_convert_units(headmodel, 'mm');
>
> 3. Gradiometer array was defined with ft_read_sens using the path of the
> meeg file. These were the parameters of the source model.
>
> cfg = [];
> cfg.grad = grad;
> cfg.headmodel = headmodel;
> cfg.resolution = 1;
> cfg.inwardshift = 0;
> sourcemodel = ft_prepare_sourcemodel(cfg);
>
> Plotting leads to this segmented mri figure (segmented mri) and
> headmodel-sensor model (headmodel, sourcemodel mesh and sensor array)
>
>
> <image.png>
>
> <Screenshot 2024-05-12 at 10.08.53 PM.png>
> 4. After the forward model was run with prepare_leadmatrix () with
> following parameters:
> cfg = [];
> cfg.grad = grad;
> cfg.headmodel = headmodel;
> cfg.sourcemodel = sourcemodel;
> cfg.channel = {'MEG'};
> cfg.singleshell.batchsize = 2000;
> lf = ft_prepare_leadfield(cfg,D);
> 5. And then the source model was run using an LCMV beamformer:
> if isfield(D,'cov')
> [~, sr, ~]=svd(D.cov);
> clif=-diff(log10(diag(sr)));
> kappa=find(clif==max(clif));
> end
> cfg = [];
> cfg.method = 'lcmv';
> cfg.headmodel = headmodel; % volume conduction model (headmodel)
> cfg.sourcemodel = lf; % leadfield
> cfg.lcmv.keepfilter = 'yes';
> cfg.grad=D.grad;
> cfg.keepleadfield = 'yes';
> cfg.lcmv.fixedori = 'yes'; % project on axis of most variance using SVD
> cfg.lcmv.kappa.      =kappa;
> Which returns a source structure that seems to produce warped source
> variance plots and blown-up source variance values after iusing source
> interpolation using:                 ft_sourceinterpolate(cfg, source,
> segmentedmri):
>
> <Screenshot 2024-05-12 at 10.37.15 PM.png>
>
> <Screenshot 2024-05-12 at 10.49.16 PM.png>
> I'm currently trying different parameters within the beamformer including
> using different weight normalization parameters to compensate for possible
> depth bias alongside using different lambda values. However, based on the
> final source plots, I wasn't too sure if there may have also been an issue
> with the coregistration of the mri or perhaps with the final source model.
>
> -Alex Williams
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> <https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C723d34ec28124c47add008dc76477258%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638515296429761701%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=j%2BqJFlpxJ08UEYDuPmuvguUyb1pyytDI5ZLwB5oghbI%3D&reserved=0>
> https://doi.org/10.1371/journal.pcbi.1002202
>
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20240517/99923c16/attachment.htm>


More information about the fieldtrip mailing list