[FieldTrip] Mechanical localization

hiba fouani hibafouani123 at hotmail.com
Sun Mar 20 13:29:43 CET 2016


Dear Fieldtripper,


Is there a tool for localized the mechanical activity 
in another word does there is a mechanical forward problem
and mechanical inverse problem?

thank you
Hiba 

> From: fieldtrip-request at science.ru.nl
> Subject: fieldtrip Digest, Vol 64, Issue 25
> To: fieldtrip at science.ru.nl
> Date: Sat, 19 Mar 2016 12:00:02 +0100
> 
> Send fieldtrip mailing list submissions to
> 	fieldtrip at science.ru.nl
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> or, via email, send a message with subject or body 'help' to
> 	fieldtrip-request at science.ru.nl
> 
> You can reach the person managing the list at
> 	fieldtrip-owner at science.ru.nl
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of fieldtrip digest..."
> 
> 
> Today's Topics:
> 
>    1. Re: Epoching EEG data after downsampling (Gunnar Norrman)
>    2. Re: Problem with Template Model for Source	Reconstruction
>       (Paolo Belardinelli)
>    3. Re: EEG txt files conversion to .Edf (Federica Mauro)
>    4. source grand average problem (Olga Sysoeva)
>    5. Re: EEG txt files conversion to .Edf (Mait? Crespo Garc?a)
>    6. Error in ft_sourceinterpolate (fosco bernasconi)
>    7. Re: import own format (long trials) (gj)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Fri, 18 Mar 2016 14:17:51 +0000
> From: Gunnar Norrman <gunnar.norrman at biling.su.se>
> To: FieldTrip discussion list <fieldtrip at science.ru.nl>
> Subject: Re: [FieldTrip] Epoching EEG data after downsampling
> Message-ID: <1458310671610.29705 at biling.su.se>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Thank you, Robert, this looks like a nice solution, I will try it out!
> 
> 
> Best,
> 
> Gunnar
> 
> ---
> Gunnar Norrman
> Centre for Research on Bilingualism, Stockholm University
> +46 (0)8 16 3643 | gunnar.norrman at biling.su.se<mailto:gunnar.norrman at biling.su.se>
> ________________________________
> From: fieldtrip-bounces at science.ru.nl <fieldtrip-bounces at science.ru.nl> on behalf of Robert Oostenveld <r.oostenveld at donders.ru.nl>
> Sent: Friday, March 18, 2016 08:50
> To: FieldTrip discussion list
> Subject: Re: [FieldTrip] Epoching EEG data after downsampling
> 
> Hi Gunnar,
> 
> This is a known challenge, especially for large datasets. Your considerations for the filtering during preprocessing are well taken. Since different resampling methods can be used with either integer or fractional resamling ratio's, it is not completely straightforward for to specify how the old and new samples map to each other.
> 
> However, a trick is to add a channel to your original data that contains the sample indices of the original dataset. E.g.
> 
> cfg = []
> cfg = ...
> data_old = ft_preprocessing(cfg)
> 
> data_old.label{end+1} = 'sample';
> for i=1:size(data_old.sampleinfo,1)
>   % this works for one or more trials
>   data_old.trial{i}(end+1,:) = data_old.sampleinfo(i,1):data_old.sampleinfo(i,2);
> end
> 
> cfg = []
> cfg = ...
> data_new = ft_resampledata(cfg, data_old);
> 
> The effect is that the linearly increasing sample channel also gets downsampled. In data_new you can subsequently look up the mapping between the new (index) and the old (value) samples.
> 
> best regards,
> Robert
> 
> 
> 
> 
> On 17 Mar 2016, at 08:36, Gunnar Norrman <gunnar.norrman at biling.su.se<mailto:gunnar.norrman at biling.su.se>> wrote:
> 
> Hello,
> 
> I have a set of BioSemi EEG data that I want to import, downsample and high pass filter as continuous data before epoching. However, when I load the original triggers from the .bsd file they are still in the original sample frequency, and when I want to apply the trials (extracted using ft_definetrial) using ft_redefinetrial, I get the following error:
> 
> > In ft_redefinetrial (line 222)
> Subscripted assignment dimension mismatch.
> 
> Now, the obvious solution would be to downsample the data after epoching, of course, but then highpass filtering (in the original sample rate) takes a very long time to complete. I also want to save the continuous, filtered and downsampled data before epoching for plotting.
> 
> Any suggestions? Is there any way to change the sample rate of the trial definitions, or to load the continuous data including trial information prior to downsampling?
> 
> Thank you!
> 
> Best regards,
> Gunnar Norrman
> 
> ---
> Gunnar Norrman
> Centre for Research on Bilingualism, Stockholm University
> +46 (0)8 16 3643 | gunnar.norrman at biling.su.se<mailto:gunnar.norrman at biling.su.se>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160318/8d4213cf/attachment-0001.html>
> 
> ------------------------------
> 
> Message: 2
> Date: Fri, 18 Mar 2016 15:35:54 +0100
> From: Paolo Belardinelli <paolo.belardinelli at gmail.com>
> To: FieldTrip discussion list <fieldtrip at science.ru.nl>
> Subject: Re: [FieldTrip] Problem with Template Model for Source
> 	Reconstruction
> Message-ID:
> 	<CAMa54+NSpiiKHKZMTLfiU7Cyj2Yj1c-1mk84sw6K8SrO5vNggg at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
> 
> Dear Britta,
> I was deeply involved in the processing and I forgot to update this post.
> Thank you: it worked out!
> Eliminating the bias from MRI images (using light/very light
> regularization) leads to more accurate grids and correct results.
> 
> Best,
> 
> Paolo
> 
> 
> 
> On Thu, Feb 18, 2016 at 10:10 AM, Britta Westner <
> britta.westner at uni-konstanz.de> wrote:
> 
> > Dear Paolo,
> >
> > I experienced similar problems and found that correcting the field bias in
> > the participant's MRI (e.g. doing a "bias correction" with SPM) can help.
> > My explanation would be that the field bias either leads to small
> > inaccuracies in the segmentation and volume which then "get visible" when
> > warping the grid based on the non-segmented MRI, or that the warping
> > algorithm itself is affected by this bias. Maybe you can give that a try!
> >
> > Hope this helps,
> > Britta
> >
> >
> >
> >
> > Am 17.02.2016 um 20:20 schrieb Paolo Belardinelli:
> >
> > Dear Fieldtrippers,
> > we are encountering a problem with a template model for source
> > reconstruction. In particular, we are warping (non linearly) a template
> > grid to the individual subject's MRI.
> > Doing that, it appears that the very top of the brain is not fully covered
> > by dipole locations.
> > We found that this issue has been already reported:
> >
> >  http://www.fieldtriptoolbox.org/template/sourcemodel
> >
> > Apparently, since March 7th 2013, this issue has been fixed.
> > However we are using August 28th 2015 Fieldtrip version and we are still
> > dealing with the same issue.
> > Any suggestions?
> > Here are our code lines:
> >
> > cfg = [];
> > cfg.grid.warpmni = 'yes';
> > cfg.resolution = 6; % resolution of the template grid in mm
> > cfg.grid.nonlinear = 'yes'; % use non linear normalization
> > cfg.mri = mri_spm; % use subject's mri in mni coordinates
> > cfg.grid.unit = 'mm';
> > sourcemodel = ft_prepare_sourcemodel(cfg);
> >
> > Thank you in advance.
> >
> > Paolo
> >
> >
> >
> >
> > --
> > --
> > Paolo Belardinelli, PhD
> > Neurology Department
> > University Hospital Tuebingen
> > Eberhard Karls University Tuebingen
> > Hoppe-Seyler Str. 3
> > D-72076 Tuebingen
> > Tel: +49 7071 / 29 80478
> >
> >
> >
> > _______________________________________________
> > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> >
> >
> >
> > --
> > Britta Westner, M.Sc.
> > Neuroelectromagnetic Oscillations Laboratory
> >
> > Fachbereich Psychologie
> > Universit?t Konstanz
> > Postfach 905
> > 78457 Konstanz
> >
> > Telefon: +49-(0)7531-88-5703
> > Fax: +49-(0)7531-88-5709
> > www.psychologie.uni-konstanz.de/nemo-lab
> >
> >
> > _______________________________________________
> > fieldtrip mailing list
> > fieldtrip at donders.ru.nl
> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> >
> 
> 
> 
> -- 
> --
> Paolo Belardinelli, PhD
> Neurology Department
> University Hospital Tuebingen
> Eberhard Karls University Tuebingen
> Hoppe-Seyler Str. 3
> D-72076 Tuebingen
> Tel: +49 7071 / 29 80478
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160318/99cc65fc/attachment-0001.html>
> 
> ------------------------------
> 
> Message: 3
> Date: Fri, 18 Mar 2016 16:12:01 +0100
> From: Federica Mauro <federica.ma at gmail.com>
> To: FieldTrip discussion list <fieldtrip at science.ru.nl>
> Subject: Re: [FieldTrip] EEG txt files conversion to .Edf
> Message-ID:
> 	<CABX-y5BKuFuF9hgdqMWCV2T0S-XMyai2Ac0mJsoqiq56RFp34Q at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
> 
> Dear Sarang and Robert,
> 
> thank you for youe suggestions.
> 
> I've been working on them, but it seems that my main problem is I don't
> have an header for my data. And at the moment I don't have any clue on how
> to get it.
> 
> Basically, when I success in load the data matrix on Matlab, it has the
> dimensions of <5192001x5 double>, and this doesn't fit with any format
> recognized by Fieldtrip.
> Namely, when I try to construct the header with
> 
>  hdr = ft_fetch_header(data)
> 
> it says: Error using ft_checkdata (line 464)
> This function requires raw data as input.
> 
> Error in ft_fetch_header (line 32)
> data = ft_checkdata(data, 'datatype', 'raw', 'hassampleinfo',
> 'yes');
> 
> Thank you again for any suggestion.
> 
> Cheers,
> 
> Federica
> 
> 
> 2016-03-18 8:38 GMT+01:00 Robert Oostenveld <r.oostenveld at donders.ru.nl>:
> 
> > Hi Frederica,
> >
> > Please look at the FAQ How can I convert one dataformat into an other?
> > <http://www.fieldtriptoolbox.org/faq/how_can_i_convert_one_dataformat_into_an_other>
> >
> > best regards,
> > Robert
> >
> >
> > On 17 Mar 2016, at 15:55, Federica Mauro <federica.ma at gmail.com> wrote:
> >
> > Hi Mait?,
> >
> > thank you for the suggestion. I don't have the access to BESA now, so I
> > wished I could work it out with Matlab and related toolboxes.
> >
> > Best regards,
> > Federica
> >
> > 2016-03-16 19:55 GMT+01:00 Mait? Crespo Garc?a <maity_winky at yahoo.es>:
> >
> >> Hi Federica,
> >>
> >> If you have access to BESA, you could import txt files and export them as
> >> edf.
> >>
> >> Best,
> >> Maite
> >>
> >>
> >> El Mi?rcoles 16 de marzo de 2016 18:57, Federica Mauro <
> >> federica.ma at gmail.com> escribi?:
> >>
> >>
> >> Dear all,
> >> I'm trying to convert txt files of web recordings in the edf format, but
> >> I didn't find a any useful solution until now.
> >> Do you have any suggestion?
> >> Thank you very much in advance.
> >> Bests,
> >> Federica
> >>
> >> _______________________________________________
> >> fieldtrip mailing list
> >> fieldtrip at donders.ru.nl
> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> >>
> >>
> >> _______________________________________________
> >> fieldtrip mailing list
> >> fieldtrip at donders.ru.nl
> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> >>
> >
> > _______________________________________________
> > fieldtrip mailing list
> > fieldtrip at donders.ru.nl
> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> >
> >
> >
> > _______________________________________________
> > fieldtrip mailing list
> > fieldtrip at donders.ru.nl
> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160318/65931ce0/attachment-0001.html>
> 
> ------------------------------
> 
> Message: 4
> Date: Fri, 18 Mar 2016 18:29:10 +0300
> From: Olga Sysoeva <olga.v.sysoeva at gmail.com>
> To: FieldTrip discussion list <fieldtrip at science.ru.nl>
> Subject: [FieldTrip] source grand average problem
> Message-ID:
> 	<CADtsnVeQ_XBfiexLudtFAqfUHkp6sun8ErS1_=_XHguy+CyzYQ at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
> 
> Dear FieldTrippers,
> 
> I face the problem with source grand average. I use data after
> volumenormalization, but sourcegrandaverage function report that input
> files are vary in inside field? Why it might be the case?
> 
> Best Regards,
> Olga Sysoeva.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160318/28d41a5d/attachment-0001.html>
> 
> ------------------------------
> 
> Message: 5
> Date: Fri, 18 Mar 2016 15:48:33 +0000 (UTC)
> From: Mait? Crespo Garc?a <maity_winky at yahoo.es>
> To: FieldTrip discussion list <fieldtrip at science.ru.nl>
> Subject: Re: [FieldTrip] EEG txt files conversion to .Edf
> Message-ID:
> 	<484823217.1695076.1458316113761.JavaMail.yahoo at mail.yahoo.com>
> Content-Type: text/plain; charset="utf-8"
> 
> Hi Federica,
> when you open the .txt file in notepad, does it have any additional information apart from numeric values? If yes, then you should try another Matlab function for importing the data. If not, then you should find out relevant information, such as sampling rate, time, the labels of the channels, the number of trials, etc. Then, you could build your own data structure inside Matlab and save this file as edf with Fieldtrip.
>  
> 
>     El Viernes 18 de marzo de 2016 16:33, Federica Mauro <federica.ma at gmail.com> escribi?:
>  
> 
>  Dear Sarang and Robert,
> 
> thank you for youe suggestions.
> 
> I've been working on them, but it seems that my main problem is I don't have an header for my data. And at the moment I don't have any clue on how to get it.
> 
> Basically, when I success in load the data matrix on Matlab, it has the dimensions of <5192001x5 double>, and this doesn't fit with any format recognized by Fieldtrip.
> Namely, when I try to construct the header with 
>  hdr = ft_fetch_header(data)
> 
> it says: Error using ft_checkdata (line 464)
> This function requires raw data as input.
> 
> Error in ft_fetch_header (line 32)
> data = ft_checkdata(data, 'datatype', 'raw', 'hassampleinfo',
> 'yes');
> 
> Thank you again for any suggestion.
> 
> Cheers,
> Federica
> 
> 2016-03-18 8:38 GMT+01:00 Robert Oostenveld <r.oostenveld at donders.ru.nl>:
> 
> Hi Frederica,
> Please look at the FAQ?How can I convert one dataformat into an other?
> best regards,Robert
> 
> On 17 Mar 2016, at 15:55, Federica Mauro <federica.ma at gmail.com> wrote:
> 
> Hi Mait?,
> thank you for the suggestion. I don't have the access to BESA now, so I wished I could work it out with Matlab and related toolboxes.
> Best regards,Federica
> 2016-03-16 19:55 GMT+01:00 Mait? Crespo Garc?a <maity_winky at yahoo.es>:
> 
> Hi Federica,
> If you have access to BESA, you could import txt files and export them as edf.
> Best,Maite
>  
> 
>     El Mi?rcoles 16 de marzo de 2016 18:57, Federica Mauro <federica.ma at gmail.com> escribi?:
>  
> 
>  Dear all,I'm trying to convert txt files of web recordings in the edf format, but I didn't find a any useful solution until now.
> Do you have any suggestion?Thank you very much in advance.Bests,
> Federica
> 
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> 
>    
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> 
> 
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> 
> 
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> 
> 
> 
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> 
>   
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160318/36d3846d/attachment-0001.html>
> 
> ------------------------------
> 
> Message: 6
> Date: Fri, 18 Mar 2016 16:49:33 +0100
> From: fosco bernasconi <fosco.bernasconi at gmail.com>
> To: fieldtrip at science.ru.nl
> Subject: [FieldTrip] Error in ft_sourceinterpolate
> Message-ID:
> 	<CAJhG8dx4ymqjHoGMf5af3xtpa9F+6VC4uBk73aezkd789SRZ_Q at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
> 
> Dear all,
> 
> I'm trying to compute 'pcc' beamforming source analysis of eeg data, but I
> have an error when calling ft_sourceinterpolate:
> 
> 
> 
> 
> 
> * Reference to non-existent field 'avg'.Error in getsubfield (line 45)  s =
> s.(t{k});Error in ft_sourceinterpolate (line 209)  if
> ~iscell(getsubfield(functional, cfg.parameter{i}))*
> 
> 
> If I check my source structure I do have the avg field.
> 
> source =
> freq: 10
> cumtapcnt: [157x1 double]
> dim: [18 21 18]
> inside: [6804x1 logical]
> pos: [6804x3 double]
> method: 'average'
> avg: [1x1 struct]
> cfg: [1x1 struct]
> 
> 
> Any suggestion?
> 
> Thank you for your help!
> Best,
> fosco
> 
> 
> here the rest of my code:
> 
> 
> load('standard_bem.mat');
> load('standard_sourcemodel3d10mm.mat');
> 
> templatefile =
> '/home/sv/Matlabtoolboxes/fieldtrip-20160306/template/anatomy/single_subj_T1.nii';
> template_mri = ft_read_mri(templatefile);
> template_mri = ft_convert_units(template_mri,'mm');
> template_mri.coordsys = 'spm';
> 
> cfg = [];
> cfg.grid.warpmni = 'yes';
> cfg.grid.template  = sourcemodel;
> cfg.grid.nonlinear = 'yes'; % use non-linear normalization
> cfg.mri      = template_mri;
> sourcemodel  = ft_prepare_sourcemodel(cfg,freq);
> sourcemodel  = ft_convert_units(sourcemodel,'mm');
> 
> cfg         = [];
> cfg.elec    = sens;
> cfg.channel = sens.label;
> cfg.headmodel = vol;
> cfg.grid      = sourcemodel;
> cfg.grid.unit = 'mm';% same unit as above, i.e. in cm
> lf = ft_prepare_leadfield(cfg,freq);
> 
> cfg            = [];
> cfg.method     = 'mtmfft';
> cfg.output     = 'fourier';
> cfg.keeptrials = 'yes';
> cfg.tapsmofrq  = 2;
> cfg.foi        = 10;
> freq           = ft_freqanalysis(cfg,dataft{1,1});
> 
> % compute source reconstruction
> cfg   = [];
> cfg.frequency = freq.freq;
> cfg.method    = 'pcc';
> cfg.grid         = lf;
> cfg.headmodel         = vol;
> cfg.keeptrials        = 'yes';
> cfg.pcc.lambda        = '5%';
> cfg.pcc.projectnoise  = 'yes';
> source = ft_sourceanalysis(cfg,freq);
> 
> cfg = [];
> cfg.projectmom = 'yes';
> source_proj = ft_sourcedescriptives(cfg,source);
> 
> % and provide  mni template
> source_proj.dim = sourcemodel.dim;
> source_proj.pos = sourcemodel.pos;
> 
> cfg  = [];
> cfg.voxelcoord   = 'no';
> cfg.parameter    = 'avg.nai';
> source_int  = ft_sourceinterpolate(cfg,source,template_mri);
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160318/7add5a30/attachment-0001.html>
> 
> ------------------------------
> 
> Message: 7
> Date: Fri, 18 Mar 2016 19:08:42 +0100
> From: gj <gina.joue at univr.it>
> To: fieldtrip at science.ru.nl
> Subject: Re: [FieldTrip] import own format (long trials)
> Message-ID: <56EC442A.50605 at univr.it>
> Content-Type: text/plain; charset=utf-8; format=flowed
> 
> In case anyone else is having the same problem, my mistake was how I set 
> "data.time".
> 
> According to the FT Wiki, "data.time" should be a "cell-array containing 
> a time axis for each trial (1 X Ntrial), each time axis is a 1*Nsamples 
> vector"
> 
> but it should be in seconds and I had specified it in number of samples 
> instead, which triggered the error
> 
>             Error using ft_specest_mtmfft (line 96)
>             "the padding that you specified is shorter than the data
> 
> 
> On 16/03/16 19:07, gj wrote:
> > Hi,
> >
> > I am trying to import EEG data preprocessed and averaged in BrainVision
> > Analyzer. I have a 2-second segment of data per condition per subject
> > which corresponds to the averaged signal across all trials of each
> > condition for the subject.
> >
> > Is the following approach correct?
> >
> > Import the 4 conditions as 4 long trials (2 sec or 2000 samples with
> > sampling freq of 1000 Hz)
> > => data.trial is a 1x4 cell array
> >     and each cell array contains an nchan x 2000 matrix
> >
> > I am trying to fill in the other fields of the data structure to mimic
> > FieldTrip's raw data but I think I am having problems with
> >      data.sampleinfo
> > which, if I understand correctly, needs to be specified for long trials.
> >
> > According to the wiki, this should be an array containing [startsample
> > endsample] to specify the position of each trial, with info for each
> > trial on every row. However, it doesn't seem right to have
> > data.sampleinfo = repmat([1 2000],4,1)
> >
> > Thanks in advance for any help!
> > Gina
> 
> 
> ------------------------------
> 
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> 
> End of fieldtrip Digest, Vol 64, Issue 25
> *****************************************
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160320/0dca8b4f/attachment-0001.html>


More information about the fieldtrip mailing list