From eelke.spaak at donders.ru.nl Wed May 1 09:40:01 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 1 May 2013 09:40:01 +0200 Subject: [FieldTrip] beggining Help In-Reply-To: References: Message-ID: Dear Gabriel, Since you indicate that you are "completely new to fieldtrip and almost new to EEG analysis", I would recommend you get started by going through some of our tutorials: http://fieldtrip.fcdonders.nl/tutorial These will help get you acquainted with FieldTrip's work style, as well as teach you some basics of EEG analysis. Understanding of the basics is vital if you want to (sensibly) do connectivity analysis later on. There are also some tutorials on connectivity, which you will find on the same page. As for getting your data into FieldTrip, all FT data is encapsulated in a Matlab structure. Once your data is in Matlab, you can make a FT structure out of it by creating a structure that resembles the output of ft_preprocessing. Refer to the documentation for ft_datatype_raw for details on this (http://fieldtrip.fcdonders.nl/reference/ft_datatype_raw or "edit ft_datatype_raw" in matlab). Best, and good luck, Eelke On 29 April 2013 23:58, Gabriel Gonzalez Escamilla wrote: > Dear fieldtrip experts, > > > I'm completely new to fieldtrip and almost new to the EEG analysis, I have > resting-state EEG registers for my subjects in txt format, that I can load > into matlab into something like: #timeSamples x #sensors. And I know the > name and order of all sensors > > I want to calculate the imaginary coherence, the PPC, the PLI and WPLI from > my data, but I couldn't find how to do so in the manual. Can anyone help me > with the steps to achieve that goal? > I want to get those indices between all pairs of sensors, and chosen pairs > (sensors manually selected according to my hypothesis), I hope it be > posssible. > > Many thanks in advanced, > Gabriel. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jose.herrero66 at gmail.com Wed May 1 12:08:19 2013 From: jose.herrero66 at gmail.com (Jose Herrero) Date: Wed, 1 May 2013 06:08:19 -0400 Subject: [FieldTrip] ft_mvaranalysis with unequal length trials Message-ID: Hi, using ft_mvaranalysis with unequal length trials, i encountering the following error (see below). This error does not occur after commenting out line 241 where the data gets preprocessed. Is this ok? mdata = ft_mvaranalysis(cfg, trials) the input is raw data with 25 channels and 237 trials removing 234 trials in which no data was selected the call to "ft_redefinetrial" took 0 seconds preprocessing preprocessing trial 3 from 3 the call to "ft_preprocessing" took 0 seconds ??? Index exceeds matrix dimensions. Error in ==> ft_mvaranalysis at 293 maxtim = max(maxtim, data.time{k}(end)); -- Jose L Herrero, PhD Department of Psychiatry Columbia University College of Physicians and Surgeons Cognitive Neuroscience and Schizophrenia Program Nathan S. Kline Institute for Psychiatric Research -------------- next part -------------- An HTML attachment was scrubbed... URL: From robince at gmail.com Wed May 1 18:41:37 2013 From: robince at gmail.com (Robin) Date: Wed, 1 May 2013 17:41:37 +0100 Subject: [FieldTrip] MNE tutorial Message-ID: I am trying to run through the MNE tutorial here: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate Unfortunately after the volumetric processing in freesurfer my intermediate result looks wrong. I have followed the steps (including interactive alignment to Talairach) according to the tutorial. I wondered if anyone has any idea what could be wrong, or could point to some more possible diagnostic commands to run? The original Subject01.mgz file seems to have been saved correctly. But if I load the orig.mgz created with: mri_convert -c -oc 0 0 0 Subject01masked.mgz orig.mgz and plot it with ft_sourceplot it has the same offset and upside down position as the final incorrectly segments freesurfer image. Could this indicate a problem? Thanks for any help, Cheers Robin -------------- next part -------------- A non-text attachment was scrubbed... Name: freesurfer.png Type: image/png Size: 7963 bytes Desc: not available URL: From joerg.neuberg at tu-ilmenau.de Wed May 1 20:42:25 2013 From: joerg.neuberg at tu-ilmenau.de (=?utf-8?Q?J=C3=B6rg_Neuberg?=) Date: Wed, 1 May 2013 20:42:25 +0200 Subject: [FieldTrip] Error: requested samples occur twice in the data Message-ID: <27F2D05FEDC14EF9839BD48C5B218D24@JoergPC> Hi FieldTrippers, we are students using fieldtrip for a project at our university. Now, we have some trouble. We want to search for muscle artifacts and we receive an error message. We started our signal processing with “ft_definetrial” to define the trials and “ft_preprocessing” to become our data. Then we cut out the stimulus artifact and interpolated the gaps. The data is saved as mat-file. Now, we are looking for muscle artifacts with the following code: ---------- begin code -------- % channel selection, cutoff and padding cfg.artfctdef.zvalue.channel = 'MEG*'; cfg.artfctdef.zvalue.cutoff = 0.5; cfg.artfctdef.zvalue.trlpadding = 0; cfg.artfctdef.zvalue.fltpadding = 0; cfg.artfctdef.zvalue.artpadding = 0.1; cfg.artfctdef.muscle.bpfilter = 'yes'; cfg.artfctdef.muscle.bpfreq = [110 140]; cfg.artfctdef.muscle.bpfiltord = 2; cfg.artfctdef.muscle.bpfilttype = 'but'; cfg.artfctdef.muscle.hilbert = 'yes'; cfg.artfctdef.muscle.boxcar = 0.2; % make the process interactive cfg.artfctdef.zvalue.interactive = 'yes'; [cfg, artifact_muscle] = ft_artifact_zvalue(cfg, data); ---------- end code -------- Unfortunately there is an error and we haven’t an idea where is the problem. Maybe the overlap of the trials is a reason for this. But we can’t change this for our data because we need this trial length. Example: trial 1 from 100 to 120, trial 2 from 115 to 135. ---------- begin error -------- searching for artifacts in 306 channel searching trials.Error using ft_fetch_data (line 123) some of the requested samples occur twice in the data Error in ft_artifact_zvalue (line 260) dat{trlop} = ft_fetch_data(data, 'header', hdr, 'begsample', trl(trlop,1)-fltpadding, 'endsample', trl(trlop,2)+fltpadding, 'chanindx', sgnind, 'checkboundary', strcmp(cfg.continuous,'no Error in muscle_artifacts (line 53) [cfg, artifact_muscle] = ft_artifact_zvalue(cfg, data);” ---------- end error -------- Do you have any idea to help us? We would be grateful for any help. Greetings, Joerg -------------- next part -------------- An HTML attachment was scrubbed... URL: From robince at gmail.com Thu May 2 14:04:03 2013 From: robince at gmail.com (Robin) Date: Thu, 2 May 2013 13:04:03 +0100 Subject: [FieldTrip] MNE tutorial In-Reply-To: References: Message-ID: Running the full Freesurfer reconstruction pipeline (without the hybrid skull stripping and Talaraich alignment on the fieldtrip side) appears to have been successful. However, when I try to continue with the tutorial I find that my volume and source grid don't line up (even before any issues converting to sensor space): Figure: http://imgur.com/uo9uPUc (code below) Does anyone have any idea what could be wrong? What coordinate system is the sub-oct-6-src.fif file in (created by MNE suite)? If it is in talairach coordinates, how do I load the Talairach aligned image from the Freesurfer pipeline? (is it orig.mgz? I also tried nu.mgz) Do I need to manually include the transform from transform/talairach.xfm? To include that can I use it directly as mri.transform in fieldtrip or do I need to multiply it by the existing mri.transform which is there when loading the raw anatomy scan (.img)? Come to think of it what does that transform represent? Sorry if these are not fieldtrip questions but I am trying to follow the fieldtrip MNE tutorial so I was hoping someone might know. Thanks Robin % load freesurfer image mri_fs_tal = ft_read_mri(fullfile(fs_dir, sub.code, 'mri', 'orig.mgz')); mri_fs_tal = ft_convert_units(mri_fs_tal, 'cm'); % load MNE grid% computed with mne_setup_source_space --ico -6 bnd = ft_read_headshape(fullfile(fs_dir, sub.code, 'bem', [sub.code '-oct-6-src.fif']), 'format', 'mne_source'); sourcespace = ft_convert_units(bnd, 'cm'); % Volume conduction model cfg = [];cfg.coordsys = 'spm';cfg.output = {'brain'}; seg = ft_volumesegment(cfg, mri_fs_tal); cfg = [];cfg.method = 'singleshell'; vol = ft_prepare_headmodel(cfg, seg); % Check volume conduction figure; hold on ft_plot_vol(vol, 'facecolor', 'none'); alpha 0.5; ft_plot_mesh(sourcespace, 'edgecolor', 'none'); camlight On Wed, May 1, 2013 at 5:41 PM, Robin robince at gmail.com wrote: I am trying to run through the MNE tutorial here: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate Unfortunately after the volumetric processing in freesurfer my intermediate result looks wrong. I have followed the steps (including interactive alignment to Talairach) according to the tutorial. I wondered if anyone has any idea what could be wrong, or could point to some more possible diagnostic commands to run? The original Subject01.mgz file seems to have been saved correctly. But if I load the orig.mgz created with: mri_convert -c -oc 0 0 0 Subject01masked.mgz orig.mgz and plot it with ft_sourceplot it has the same offset and upside down position as the final incorrectly segments freesurfer image. Could this indicate a problem? Thanks for any help, Cheers Robin -------------- next part -------------- An HTML attachment was scrubbed... URL: From brungio at gmail.com Thu May 2 14:26:10 2013 From: brungio at gmail.com (Bruno L. Giordano) Date: Thu, 2 May 2013 08:26:10 -0400 Subject: [FieldTrip] MNE tutorial In-Reply-To: References: Message-ID: Hi Robin, I had a similar problem during the field trip course. In my case I found out that one set of coordinates was in mm and then other in m, so I just had to multiply one set of coordinates. Another thing you should be aware of is that you can segment your anatomical using procedures other than the default ones. For example, Spm12 has new, better procedures. Importing an already prepared segmentation in ft requires some hacking, but if you are interested I can tell you how as soon as I get a decent internet connection. Finally, remember that the single shell model is not that great. You should prepare a better volume conduction model. Bruno On May 2, 2013 8:05 AM, "Robin" wrote: > Running the full Freesurfer reconstruction pipeline (without the hybrid > skull stripping and Talaraich alignment on the fieldtrip side) appears to > have been successful. > > However, when I try to continue with the tutorial I find that my volume > and source grid don't line up (even before any issues converting to sensor > space): > > Figure: http://imgur.com/uo9uPUc (code below) > > Does anyone have any idea what could be wrong? > > What coordinate system is the sub-oct-6-src.fif file in (created by MNE > suite)? > If it is in talairach coordinates, how do I load the Talairach aligned > image from the Freesurfer pipeline? (is it orig.mgz? I also tried nu.mgz) > > Do I need to manually include the transform from transform/talairach.xfm? > To include that can I use it directly as mri.transform in fieldtrip or do I > need to multiply it by the existing mri.transform which is there when > loading the raw anatomy scan (.img)? Come to think of it what does that > transform represent? > > Sorry if these are not fieldtrip questions but I am trying to follow the > fieldtrip MNE tutorial so I was hoping someone might know. > > Thanks > > Robin > > % load freesurfer image > mri_fs_tal = ft_read_mri(fullfile(fs_dir, sub.code, 'mri', 'orig.mgz')); > mri_fs_tal = ft_convert_units(mri_fs_tal, 'cm'); > % load MNE grid% computed with mne_setup_source_space --ico -6 > bnd = ft_read_headshape(fullfile(fs_dir, sub.code, 'bem', [sub.code '-oct-6-src.fif']), 'format', 'mne_source'); > sourcespace = ft_convert_units(bnd, 'cm'); > % Volume conduction model > cfg = [];cfg.coordsys = 'spm';cfg.output = {'brain'}; > seg = ft_volumesegment(cfg, mri_fs_tal); > cfg = [];cfg.method = 'singleshell'; > vol = ft_prepare_headmodel(cfg, seg); > % Check volume conduction > figure; hold on > ft_plot_vol(vol, 'facecolor', 'none'); alpha 0.5; > ft_plot_mesh(sourcespace, 'edgecolor', 'none'); camlight > > On Wed, May 1, 2013 at 5:41 PM, Robin robince at gmail.com wrote: > > I am trying to run through the MNE tutorial here: > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate > > Unfortunately after the volumetric processing in freesurfer my > intermediate result looks wrong. > > I have followed the steps (including interactive alignment to > Talairach) according to the tutorial. I wondered if anyone has any > idea what could be wrong, or could point to some more possible > diagnostic commands to run? > > The original Subject01.mgz file seems to have been saved correctly. > But if I load the orig.mgz created with: > mri_convert -c -oc 0 0 0 Subject01masked.mgz orig.mgz > and plot it with ft_sourceplot it has the same offset and upside down > position as the final incorrectly segments freesurfer image. Could > this indicate a problem? > > Thanks for any help, > > Cheers > > Robin > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brungio at gmail.com Thu May 2 14:28:16 2013 From: brungio at gmail.com (Bruno L. Giordano) Date: Thu, 2 May 2013 08:28:16 -0400 Subject: [FieldTrip] MNE tutorial In-Reply-To: References: Message-ID: Ah, I just saw that your problem might be with the origin of the anatomical space. Have you tried to see what happens if you set its origin to the anterior commissure before giving it in input to field trip? On May 2, 2013 8:05 AM, "Robin" wrote: > Running the full Freesurfer reconstruction pipeline (without the hybrid > skull stripping and Talaraich alignment on the fieldtrip side) appears to > have been successful. > > However, when I try to continue with the tutorial I find that my volume > and source grid don't line up (even before any issues converting to sensor > space): > > Figure: http://imgur.com/uo9uPUc (code below) > > Does anyone have any idea what could be wrong? > > What coordinate system is the sub-oct-6-src.fif file in (created by MNE > suite)? > If it is in talairach coordinates, how do I load the Talairach aligned > image from the Freesurfer pipeline? (is it orig.mgz? I also tried nu.mgz) > > Do I need to manually include the transform from transform/talairach.xfm? > To include that can I use it directly as mri.transform in fieldtrip or do I > need to multiply it by the existing mri.transform which is there when > loading the raw anatomy scan (.img)? Come to think of it what does that > transform represent? > > Sorry if these are not fieldtrip questions but I am trying to follow the > fieldtrip MNE tutorial so I was hoping someone might know. > > Thanks > > Robin > > % load freesurfer image > mri_fs_tal = ft_read_mri(fullfile(fs_dir, sub.code, 'mri', 'orig.mgz')); > mri_fs_tal = ft_convert_units(mri_fs_tal, 'cm'); > % load MNE grid% computed with mne_setup_source_space --ico -6 > bnd = ft_read_headshape(fullfile(fs_dir, sub.code, 'bem', [sub.code '-oct-6-src.fif']), 'format', 'mne_source'); > sourcespace = ft_convert_units(bnd, 'cm'); > % Volume conduction model > cfg = [];cfg.coordsys = 'spm';cfg.output = {'brain'}; > seg = ft_volumesegment(cfg, mri_fs_tal); > cfg = [];cfg.method = 'singleshell'; > vol = ft_prepare_headmodel(cfg, seg); > % Check volume conduction > figure; hold on > ft_plot_vol(vol, 'facecolor', 'none'); alpha 0.5; > ft_plot_mesh(sourcespace, 'edgecolor', 'none'); camlight > > On Wed, May 1, 2013 at 5:41 PM, Robin robince at gmail.com wrote: > > I am trying to run through the MNE tutorial here: > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate > > Unfortunately after the volumetric processing in freesurfer my > intermediate result looks wrong. > > I have followed the steps (including interactive alignment to > Talairach) according to the tutorial. I wondered if anyone has any > idea what could be wrong, or could point to some more possible > diagnostic commands to run? > > The original Subject01.mgz file seems to have been saved correctly. > But if I load the orig.mgz created with: > mri_convert -c -oc 0 0 0 Subject01masked.mgz orig.mgz > and plot it with ft_sourceplot it has the same offset and upside down > position as the final incorrectly segments freesurfer image. Could > this indicate a problem? > > Thanks for any help, > > Cheers > > Robin > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brungio at gmail.com Thu May 2 14:42:08 2013 From: brungio at gmail.com (Bruno L. Giordano) Date: Thu, 2 May 2013 08:42:08 -0400 Subject: [FieldTrip] MNE tutorial In-Reply-To: References: Message-ID: Sorry, my replies were not meant for the list. On May 2, 2013 8:28 AM, "Bruno L. Giordano" wrote: > Ah, I just saw that your problem might be with the origin of the > anatomical space. Have you tried to see what happens if you set its origin > to the anterior commissure before giving it in input to field trip? > On May 2, 2013 8:05 AM, "Robin" wrote: > >> Running the full Freesurfer reconstruction pipeline (without the hybrid >> skull stripping and Talaraich alignment on the fieldtrip side) appears to >> have been successful. >> >> However, when I try to continue with the tutorial I find that my volume >> and source grid don't line up (even before any issues converting to sensor >> space): >> >> Figure: http://imgur.com/uo9uPUc (code below) >> >> Does anyone have any idea what could be wrong? >> >> What coordinate system is the sub-oct-6-src.fif file in (created by MNE >> suite)? >> If it is in talairach coordinates, how do I load the Talairach aligned >> image from the Freesurfer pipeline? (is it orig.mgz? I also tried nu.mgz) >> >> Do I need to manually include the transform from transform/talairach.xfm? >> To include that can I use it directly as mri.transform in fieldtrip or do I >> need to multiply it by the existing mri.transform which is there when >> loading the raw anatomy scan (.img)? Come to think of it what does that >> transform represent? >> >> Sorry if these are not fieldtrip questions but I am trying to follow the >> fieldtrip MNE tutorial so I was hoping someone might know. >> >> Thanks >> >> Robin >> >> % load freesurfer image >> mri_fs_tal = ft_read_mri(fullfile(fs_dir, sub.code, 'mri', 'orig.mgz')); >> mri_fs_tal = ft_convert_units(mri_fs_tal, 'cm'); >> % load MNE grid% computed with mne_setup_source_space --ico -6 >> bnd = ft_read_headshape(fullfile(fs_dir, sub.code, 'bem', [sub.code '-oct-6-src.fif']), 'format', 'mne_source'); >> sourcespace = ft_convert_units(bnd, 'cm'); >> % Volume conduction model >> cfg = [];cfg.coordsys = 'spm';cfg.output = {'brain'}; >> seg = ft_volumesegment(cfg, mri_fs_tal); >> cfg = [];cfg.method = 'singleshell'; >> vol = ft_prepare_headmodel(cfg, seg); >> % Check volume conduction >> figure; hold on >> ft_plot_vol(vol, 'facecolor', 'none'); alpha 0.5; >> ft_plot_mesh(sourcespace, 'edgecolor', 'none'); camlight >> >> On Wed, May 1, 2013 at 5:41 PM, Robin robince at gmail.com wrote: >> >> I am trying to run through the MNE tutorial here: >> >> http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate >> >> Unfortunately after the volumetric processing in freesurfer my >> intermediate result looks wrong. >> >> I have followed the steps (including interactive alignment to >> Talairach) according to the tutorial. I wondered if anyone has any >> idea what could be wrong, or could point to some more possible >> diagnostic commands to run? >> >> The original Subject01.mgz file seems to have been saved correctly. >> But if I load the orig.mgz created with: >> mri_convert -c -oc 0 0 0 Subject01masked.mgz orig.mgz >> and plot it with ft_sourceplot it has the same offset and upside down >> position as the final incorrectly segments freesurfer image. Could >> this indicate a problem? >> >> Thanks for any help, >> >> Cheers >> >> Robin >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From robince at gmail.com Thu May 2 15:46:22 2013 From: robince at gmail.com (Robin) Date: Thu, 2 May 2013 14:46:22 +0100 Subject: [FieldTrip] MNE tutorial In-Reply-To: References: Message-ID: By running from MNE suite: mne_setup_mri --subject BON02 --mri T1 to create a COR.fif image from the Freesurfer output (including Talaraich transformation) at least that COR.fir and the oct-6-src.fif mesh seem to line up. But now I am not sure which coordinate system they are in? (cordsys is 'neuromag' in fieldtrip) nor how to obtain the necessary inverse transform from this space to the raw anatomy voxel space (so I can build the transform from oct-6-src mesh to sensor space; I already have the transform to take the original raw anatomy .img to the sensor coordinate system). Thanks, Robin On Thu, May 2, 2013 at 1:04 PM, Robin wrote: > Running the full Freesurfer reconstruction pipeline (without the hybrid > skull stripping and Talaraich alignment on the fieldtrip side) appears to > have been successful. > > However, when I try to continue with the tutorial I find that my volume > and source grid don't line up (even before any issues converting to sensor > space): > > Figure: http://imgur.com/uo9uPUc (code below) > > Does anyone have any idea what could be wrong? > > What coordinate system is the sub-oct-6-src.fif file in (created by MNE > suite)? > If it is in talairach coordinates, how do I load the Talairach aligned > image from the Freesurfer pipeline? (is it orig.mgz? I also tried nu.mgz) > > Do I need to manually include the transform from transform/talairach.xfm? > To include that can I use it directly as mri.transform in fieldtrip or do I > need to multiply it by the existing mri.transform which is there when > loading the raw anatomy scan (.img)? Come to think of it what does that > transform represent? > > Sorry if these are not fieldtrip questions but I am trying to follow the > fieldtrip MNE tutorial so I was hoping someone might know. > > Thanks > > Robin > > % load freesurfer image > mri_fs_tal = ft_read_mri(fullfile(fs_dir, sub.code, 'mri', 'orig.mgz')); > mri_fs_tal = ft_convert_units(mri_fs_tal, 'cm'); > % load MNE grid% computed with mne_setup_source_space --ico -6 > bnd = ft_read_headshape(fullfile(fs_dir, sub.code, 'bem', [sub.code '-oct-6-src.fif']), 'format', 'mne_source'); > sourcespace = ft_convert_units(bnd, 'cm'); > % Volume conduction model > cfg = [];cfg.coordsys = 'spm';cfg.output = {'brain'}; > seg = ft_volumesegment(cfg, mri_fs_tal); > cfg = [];cfg.method = 'singleshell'; > vol = ft_prepare_headmodel(cfg, seg); > % Check volume conduction > figure; hold on > ft_plot_vol(vol, 'facecolor', 'none'); alpha 0.5; > ft_plot_mesh(sourcespace, 'edgecolor', 'none'); camlight > > On Wed, May 1, 2013 at 5:41 PM, Robin robince at gmail.com wrote: > > I am trying to run through the MNE tutorial here: > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate > > Unfortunately after the volumetric processing in freesurfer my > intermediate result looks wrong. > > I have followed the steps (including interactive alignment to > Talairach) according to the tutorial. I wondered if anyone has any > idea what could be wrong, or could point to some more possible > diagnostic commands to run? > > The original Subject01.mgz file seems to have been saved correctly. > But if I load the orig.mgz created with: > mri_convert -c -oc 0 0 0 Subject01masked.mgz orig.mgz > and plot it with ft_sourceplot it has the same offset and upside down > position as the final incorrectly segments freesurfer image. Could > this indicate a problem? > > Thanks for any help, > > Cheers > > Robin > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu May 2 15:57:00 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 2 May 2013 15:57:00 +0200 Subject: [FieldTrip] Only 1 and Inf as output of ft_connectivityanalysis In-Reply-To: References: Message-ID: <9A3D199E-0816-4CBC-AE43-65F768C84EA6@donders.ru.nl> Hi Lucia, Could you remove cfg.removemean = 'yes' and try again? Best, Jan-Mathijs On Apr 29, 2013, at 2:38 AM, Lucia Melloni wrote: > Hi! > I am trying to calculate coherence using ft_connectivityanalysis, but > I am getting only ones and infinity as output in cohspctrm with all of > my data sets. > > I first run ft_freqanalysis with > cfg.method = 'mtmfft'; > cfg.taper = 'dpss'; > cfg.output = 'fourier'; > cfg.foilim = [1 45]; > cfg.tapsmofrq = 1; > cfg.keeptrials = 'yes'; > cfg.keeptapers = 'yes'; > freq = ft_freqanalysis(cfg, data); > > Whether I do or I do not specify cfg.channel and cfg.channelcmb here > does not seem to make a difference for my problem later on. The > spectra look absolutely fine. > > I then run ft_connectivityanalysis with > cfg.method = 'coh'; > cfg.removemean= 'yes'; > cfg.trials = 'all'; > cfg.feedback = 'yes'; > cfg.complex = 'abs'; > coh = ft_connectivityanalysis(cfg, freq); > > The cohspctrm looks like this: > val(:,:,1,1) = > > 1 Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf > Inf Inf Inf (etc.) > > I get the following warning during ft_connectivityanalysis > > Warning: Divide by zero. >> In ft_connectivity_corr at 103 > In ft_connectivityanalysis at 524 > Warning: Divide by zero. >> In ft_connectivity_corr at 104 > In ft_connectivityanalysis at 524 > > The same happens if I try to calculate PLV through ft_connectivityanalysis. > This is with Fieldtrip version 20130422 and 20130427, Matlab R2009a, > Windows 7 (64bit). > > Any advice? > Thanks! > Lucia > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From lmelloni at gmail.com Thu May 2 18:56:19 2013 From: lmelloni at gmail.com (Lucia Melloni) Date: Thu, 2 May 2013 12:56:19 -0400 Subject: [FieldTrip] Only 1 and Inf as output of ft_connectivityanalysis In-Reply-To: <9A3D199E-0816-4CBC-AE43-65F768C84EA6@donders.ru.nl> References: <9A3D199E-0816-4CBC-AE43-65F768C84EA6@donders.ru.nl> Message-ID: <-7204743264059944684@unknownmsgid> Hi jan-mathijs Unfortunately I get the same result whether or not I remove the mean. Best, -- Lucía On May 2, 2013, at 9:57 AM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: Hi Lucia, Could you remove cfg.removemean = 'yes' and try again? Best, Jan-Mathijs On Apr 29, 2013, at 2:38 AM, Lucia Melloni wrote: Hi! I am trying to calculate coherence using ft_connectivityanalysis, but I am getting only ones and infinity as output in cohspctrm with all of my data sets. I first run ft_freqanalysis with cfg.method = 'mtmfft'; cfg.taper = 'dpss'; cfg.output = 'fourier'; cfg.foilim = [1 45]; cfg.tapsmofrq = 1; cfg.keeptrials = 'yes'; cfg.keeptapers = 'yes'; freq = ft_freqanalysis(cfg, data); Whether I do or I do not specify cfg.channel and cfg.channelcmb here does not seem to make a difference for my problem later on. The spectra look absolutely fine. I then run ft_connectivityanalysis with cfg.method = 'coh'; cfg.removemean= 'yes'; cfg.trials = 'all'; cfg.feedback = 'yes'; cfg.complex = 'abs'; coh = ft_connectivityanalysis(cfg, freq); The cohspctrm looks like this: val(:,:,1,1) = 1 Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf (etc.) I get the following warning during ft_connectivityanalysis Warning: Divide by zero. In ft_connectivity_corr at 103 In ft_connectivityanalysis at 524 Warning: Divide by zero. In ft_connectivity_corr at 104 In ft_connectivityanalysis at 524 The same happens if I try to calculate PLV through ft_connectivityanalysis. This is with Fieldtrip version 20130422 and 20130427, Matlab R2009a, Windows 7 (64bit). Any advice? Thanks! Lucia _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu May 2 21:12:22 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 2 May 2013 21:12:22 +0200 Subject: [FieldTrip] Only 1 and Inf as output of ft_connectivityanalysis In-Reply-To: <-7204743264059944684@unknownmsgid> References: <9A3D199E-0816-4CBC-AE43-65F768C84EA6@donders.ru.nl> <-7204743264059944684@unknownmsgid> Message-ID: <4B415E50-71DE-42C8-893D-54F991DC616A@donders.ru.nl> Hi Lucia, The warnings indicate that you are dividing by zero. Are you sure that your cfg is correct? Please try cfg = []; cfg.method = 'coh'; coh = ft_connectivityanalysis(cfg, freq); This should work. Best, Jan-Mathijs On May 2, 2013, at 6:56 PM, Lucia Melloni wrote: > Hi jan-mathijs > > Unfortunately I get the same result whether or not I remove the mean. > Best, > -- Lucía > > On May 2, 2013, at 9:57 AM, jan-mathijs schoffelen wrote: > >> Hi Lucia, >> >> Could you remove cfg.removemean = 'yes' and try again? >> >> Best, >> >> Jan-Mathijs >> >> On Apr 29, 2013, at 2:38 AM, Lucia Melloni wrote: >> >>> Hi! >>> I am trying to calculate coherence using ft_connectivityanalysis, but >>> I am getting only ones and infinity as output in cohspctrm with all of >>> my data sets. >>> >>> I first run ft_freqanalysis with >>> cfg.method = 'mtmfft'; >>> cfg.taper = 'dpss'; >>> cfg.output = 'fourier'; >>> cfg.foilim = [1 45]; >>> cfg.tapsmofrq = 1; >>> cfg.keeptrials = 'yes'; >>> cfg.keeptapers = 'yes'; >>> freq = ft_freqanalysis(cfg, data); >>> >>> Whether I do or I do not specify cfg.channel and cfg.channelcmb here >>> does not seem to make a difference for my problem later on. The >>> spectra look absolutely fine. >>> >>> I then run ft_connectivityanalysis with >>> cfg.method = 'coh'; >>> cfg.removemean= 'yes'; >>> cfg.trials = 'all'; >>> cfg.feedback = 'yes'; >>> cfg.complex = 'abs'; >>> coh = ft_connectivityanalysis(cfg, freq); >>> >>> The cohspctrm looks like this: >>> val(:,:,1,1) = >>> >>> 1 Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf >>> Inf Inf Inf (etc.) >>> >>> I get the following warning during ft_connectivityanalysis >>> >>> Warning: Divide by zero. >>>> In ft_connectivity_corr at 103 >>> In ft_connectivityanalysis at 524 >>> Warning: Divide by zero. >>>> In ft_connectivity_corr at 104 >>> In ft_connectivityanalysis at 524 >>> >>> The same happens if I try to calculate PLV through ft_connectivityanalysis. >>> This is with Fieldtrip version 20130422 and 20130427, Matlab R2009a, >>> Windows 7 (64bit). >>> >>> Any advice? >>> Thanks! >>> Lucia >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> _______________________________________________ >> 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 Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From evaladez at psych.udel.edu Thu May 2 23:07:51 2013 From: evaladez at psych.udel.edu (Emilio Valadez) Date: Thu, 2 May 2013 17:07:51 -0400 Subject: [FieldTrip] Phase-amplitude coupling (PAC) Message-ID: <10DBEA48DAE8BB4F8F588B1254C0D92E01B8763E014C@razor.psych.udel.edu> Dear FieldTrippers, I am trying to compute phase-amplitude coupling (PAC) between the phase of theta activity at one channel and the amplitude of gamma activity at another channel over a specific time window within trials. I have read that PAC is captured with a phase-locking value (PLV), which leads me to think that this might be computed with ft_connectivityanalysis. If this is true, what would the configuration structure and input data need to look like? Or, is there an alternative way to compute PAC using FieldTrip? Thank you in advance! All the best, Emilio -------------- next part -------------- An HTML attachment was scrubbed... URL: From lmelloni at gmail.com Fri May 3 00:56:30 2013 From: lmelloni at gmail.com (Lucia Melloni) Date: Thu, 2 May 2013 18:56:30 -0400 Subject: [FieldTrip] Only 1 and Inf as output of ft_connectivityanalysis In-Reply-To: <4B415E50-71DE-42C8-893D-54F991DC616A@donders.ru.nl> References: <9A3D199E-0816-4CBC-AE43-65F768C84EA6@donders.ru.nl> <-7204743264059944684@unknownmsgid> <4B415E50-71DE-42C8-893D-54F991DC616A@donders.ru.nl> Message-ID: Hi Jan-Mathijs, still the same result with the code that you suggested. selection fourierspctrm along dimension 2 averaging crsspctrm over rpt removing dimension rpt from crsspctrm Warning: PROGRESS is only a compatibility wrapper, which will soon be removed. Please instead call FT_PROGRESS. > In progress at 16 In ft_connectivity_corr at 87 In ft_connectivityanalysis at 524 Warning: PROGRESS is only a compatibility wrapper, which will soon be removed. Please instead call FT_PROGRESS. > In progress at 16 In ft_connectivity_corr at 89 In ft_connectivityanalysis at 524 Warning: PROGRESS is only a compatibility wrapper, which will soon be removed. Please instead call FT_PROGRESS. > In progress at 16 In ft_connectivity_corr at 106 In ft_connectivityanalysis at 524 the call to "ft_connectivityanalysis" took 0 seconds Lucia -- Lucia. On Thu, May 2, 2013 at 3:12 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Lucia, > > The warnings indicate that you are dividing by zero. Are you sure that > your cfg is correct? > > Please try > > cfg = []; > cfg.method = 'coh'; > coh = ft_connectivityanalysis(cfg, freq); > > This should work. > > Best, > Jan-Mathijs > > On May 2, 2013, at 6:56 PM, Lucia Melloni wrote: > > Hi jan-mathijs > > Unfortunately I get the same result whether or not I remove the mean. > Best, > -- Lucía > > On May 2, 2013, at 9:57 AM, jan-mathijs schoffelen < > jan.schoffelen at donders.ru.nl> wrote: > > Hi Lucia, > > Could you remove cfg.removemean = 'yes' and try again? > > Best, > > Jan-Mathijs > > On Apr 29, 2013, at 2:38 AM, Lucia Melloni wrote: > > Hi! > I am trying to calculate coherence using ft_connectivityanalysis, but > I am getting only ones and infinity as output in cohspctrm with all of > my data sets. > > I first run ft_freqanalysis with > cfg.method = 'mtmfft'; > cfg.taper = 'dpss'; > cfg.output = 'fourier'; > cfg.foilim = [1 45]; > cfg.tapsmofrq = 1; > cfg.keeptrials = 'yes'; > cfg.keeptapers = 'yes'; > freq = ft_freqanalysis(cfg, data); > > Whether I do or I do not specify cfg.channel and cfg.channelcmb here > does not seem to make a difference for my problem later on. The > spectra look absolutely fine. > > I then run ft_connectivityanalysis with > cfg.method = 'coh'; > cfg.removemean= 'yes'; > cfg.trials = 'all'; > cfg.feedback = 'yes'; > cfg.complex = 'abs'; > coh = ft_connectivityanalysis(cfg, freq); > > The cohspctrm looks like this: > val(:,:,1,1) = > > 1 Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf > Inf Inf Inf (etc.) > > I get the following warning during ft_connectivityanalysis > > Warning: Divide by zero. > > In ft_connectivity_corr at 103 > > In ft_connectivityanalysis at 524 > Warning: Divide by zero. > > In ft_connectivity_corr at 104 > > In ft_connectivityanalysis at 524 > > The same happens if I try to calculate PLV through ft_connectivityanalysis. > This is with Fieldtrip version 20130422 and 20130427, Matlab R2009a, > Windows 7 (64bit). > > Any advice? > Thanks! > Lucia > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > _______________________________________________ > 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 > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri May 3 08:32:30 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 03 May 2013 08:32:30 +0200 Subject: [FieldTrip] Only 1 and Inf as output of ft_connectivityanalysis In-Reply-To: References: <9A3D199E-0816-4CBC-AE43-65F768C84EA6@donders.ru.nl> <-7204743264059944684@unknownmsgid> <4B415E50-71DE-42C8-893D-54F991DC616A@donders.ru.nl> Message-ID: <518359FE.4070207@donders.ru.nl> Dear Lucia, could you try whether the error persists with a recent version? If it does, could you go test whether this code gives the same error: / % ************* code starts here / /%dummy data cfg = []; cfg.ntrials = 500; cfg.triallength = 1; cfg.fsample = 200; cfg.nsignal = 3; cfg.method = 'ar'; cfg.params(:,:,1) = [ 0.8 0 0; 0 0.9 0.5; 0.4 0 0.5]; cfg.params(:,:,2) = [-0.5 0 0; 0 -0.8 0; 0 0 -0.2]; cfg.noisecov = [0.3 0 0; 0 1 0; 0 0 0.2]; data = ft_connectivitysimulation(cfg); % freqanalysis cfgf = []; cfgf.method = 'mtmfft'; cfgf.output = 'fourier'; cfgf.tapsmofrq = 2; freq = ft_freqanalysis(cfgf, data); % connectivityanalysis cfgc = []; cfgc.method = 'coh'; c1 = ft_connectivityanalysis(cfgc, freq); c1.cohspctrm// % ************* code ends here / The code snippet above is part of our test suite for making sure that everything works fine. If it does work for you, but does not with your own data instead of simulated data, the error must be somewhere in your data, e.g. powspctrm consists of nans or 0s etc. Anyway, I assume that it will all work fine if you use an updated version of FieldTrip. Best, Jörn On 5/3/2013 12:56 AM, Lucia Melloni wrote: > Hi Jan-Mathijs, > still the same result with the code that you suggested. > > selection fourierspctrm along dimension 2 > averaging crsspctrm over rpt > removing dimension rpt from crsspctrm > Warning: PROGRESS is only a compatibility wrapper, which will soon be > removed. Please instead call FT_PROGRESS. > > In progress at 16 > In ft_connectivity_corr at 87 > In ft_connectivityanalysis at 524 > Warning: PROGRESS is only a compatibility wrapper, which will soon be > removed. Please instead call FT_PROGRESS. > > In progress at 16 > In ft_connectivity_corr at 89 > In ft_connectivityanalysis at 524 > Warning: PROGRESS is only a compatibility wrapper, which will soon be > removed. Please instead call FT_PROGRESS. > > In progress at 16 > In ft_connectivity_corr at 106 > In ft_connectivityanalysis at 524 > the call to "ft_connectivityanalysis" took 0 seconds > > > Lucia > > -- > Lucia. > > > On Thu, May 2, 2013 at 3:12 PM, jan-mathijs schoffelen > > > wrote: > > Hi Lucia, > > The warnings indicate that you are dividing by zero. Are you sure > that your cfg is correct? > > Please try > > cfg = []; > cfg.method = 'coh'; > coh = ft_connectivityanalysis(cfg, freq); > > This should work. > > Best, > Jan-Mathijs > > On May 2, 2013, at 6:56 PM, Lucia Melloni wrote: > >> Hi jan-mathijs >> >> Unfortunately I get the same result whether or not I remove the >> mean. >> Best, >> -- Lucía >> >> On May 2, 2013, at 9:57 AM, jan-mathijs schoffelen >> > > wrote: >> >>> Hi Lucia, >>> >>> Could you remove cfg.removemean = 'yes' and try again? >>> >>> Best, >>> >>> Jan-Mathijs >>> >>> On Apr 29, 2013, at 2:38 AM, Lucia Melloni wrote: >>> >>>> Hi! >>>> I am trying to calculate coherence using >>>> ft_connectivityanalysis, but >>>> I am getting only ones and infinity as output in cohspctrm with >>>> all of >>>> my data sets. >>>> >>>> I first run ft_freqanalysis with >>>> cfg.method = 'mtmfft'; >>>> cfg.taper = 'dpss'; >>>> cfg.output = 'fourier'; >>>> cfg.foilim = [1 45]; >>>> cfg.tapsmofrq = 1; >>>> cfg.keeptrials = 'yes'; >>>> cfg.keeptapers = 'yes'; >>>> freq = ft_freqanalysis(cfg, data); >>>> >>>> Whether I do or I do not specify cfg.channel and cfg.channelcmb >>>> here >>>> does not seem to make a difference for my problem later on. The >>>> spectra look absolutely fine. >>>> >>>> I then run ft_connectivityanalysis with >>>> cfg.method = 'coh'; >>>> cfg.removemean= 'yes'; >>>> cfg.trials = 'all'; >>>> cfg.feedback = 'yes'; >>>> cfg.complex = 'abs'; >>>> coh = ft_connectivityanalysis(cfg, freq); >>>> >>>> The cohspctrm looks like this: >>>> val(:,:,1,1) = >>>> >>>> 1 Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf >>>> Inf Inf Inf (etc.) >>>> >>>> I get the following warning during ft_connectivityanalysis >>>> >>>> Warning: Divide by zero. >>>>> In ft_connectivity_corr at 103 >>>> In ft_connectivityanalysis at 524 >>>> Warning: Divide by zero. >>>>> In ft_connectivity_corr at 104 >>>> In ft_connectivityanalysis at 524 >>>> >>>> The same happens if I try to calculate PLV through >>>> ft_connectivityanalysis. >>>> This is with Fieldtrip version 20130422 and 20130427, Matlab >>>> R2009a, >>>> Windows 7 (64bit). >>>> >>>> Any advice? >>>> Thanks! >>>> Lucia >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> _______________________________________________ >>> 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 > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > _______________________________________________ > 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 -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From gregor.volberg at psychologie.uni-regensburg.de Fri May 3 09:35:40 2013 From: gregor.volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Fri, 03 May 2013 09:35:40 +0200 Subject: [FieldTrip] Phase-amplitude coupling (PAC) In-Reply-To: <10DBEA48DAE8BB4F8F588B1254C0D92E01B8763E014C@razor.psych.udel.edu> References: <10DBEA48DAE8BB4F8F588B1254C0D92E01B8763E014C@razor.psych.udel.edu> Message-ID: <518368CC.9030102@psychologie.uni-regensburg.de> Dear Emilio, I might not be fully up to date with the functionality of ft_connectivityanalysis, but as much as I know there is some preprocessing necessary to get a phase-to-amplitude coupling. A common strategy is to compute a Hilbert transform on the upper frequency band. This can be used to get the 'analytic amplitude', which is essentially a waveform that connects the amplitude peaks of the higher frequency. If the gamma amplitude is driven by the theta phase, then the analytic waveform should be phase-locked with the theta cycle. The latter part of the analysis could be performed with the option 'plv' in ft_connectivityanalysis. For the processing steps you might want to have a look at an example script at http://fieldtrip.fcdonders.nl/example/crossfreq/phalow_amphigh. Best regards, Gregor Am 02.05.2013 23:07, schrieb Emilio Valadez: > Dear FieldTrippers, > > I am trying to compute phase-amplitude coupling (PAC) between the phase > of theta activity at one channel and the amplitude of gamma activity at > another channel over a specific time window within trials. I have read > that PAC is captured with a phase-locking value (PLV), which leads me to > think that this might be computed with ft_connectivityanalysis. If this > is true, what would the configuration structure and input data need to > look like? Or, is there an alternative way to compute PAC using > FieldTrip? Thank you in advance! > > All the best, > > Emilio > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Dr. rer. nat. Gregor Volberg Institut für Psychologie Universität Regensburg Universitätsstraße 31 D-93053 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 From lmelloni at gmail.com Fri May 3 14:48:01 2013 From: lmelloni at gmail.com (Lucia Melloni) Date: Fri, 3 May 2013 08:48:01 -0400 Subject: [FieldTrip] Only 1 and Inf as output of ft_connectivityanalysis In-Reply-To: <518359FE.4070207@donders.ru.nl> References: <9A3D199E-0816-4CBC-AE43-65F768C84EA6@donders.ru.nl> <-7204743264059944684@unknownmsgid> <4B415E50-71DE-42C8-893D-54F991DC616A@donders.ru.nl> <518359FE.4070207@donders.ru.nl> Message-ID: Hi Jörn, I downloaded version 20130502 and ran both my code and the test code that you had emailed. I get 1 and inf with both. The freq input seems to be ok, so ist must be an issue with ft_connectivityanalysis. Lucia -- Lucia. On Fri, May 3, 2013 at 2:32 AM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Lucia, > > could you try whether the error persists with a recent version? If it > does, could you go test whether this code gives the same error: > > * > % ************* code starts here * > *%dummy data > cfg = []; > cfg.ntrials = 500; > cfg.triallength = 1; > cfg.fsample = 200; > cfg.nsignal = 3; > cfg.method = 'ar'; > cfg.params(:,:,1) = [ 0.8 0 0; > 0 0.9 0.5; > 0.4 0 0.5]; > cfg.params(:,:,2) = [-0.5 0 0; > 0 -0.8 0; > 0 0 -0.2]; > cfg.noisecov = [0.3 0 0; > 0 1 0; > 0 0 0.2]; > > data = ft_connectivitysimulation(cfg); > > > % freqanalysis > cfgf = []; > cfgf.method = 'mtmfft'; > cfgf.output = 'fourier'; > cfgf.tapsmofrq = 2; > freq = ft_freqanalysis(cfgf, data); > > % connectivityanalysis > cfgc = []; > cfgc.method = 'coh'; > c1 = ft_connectivityanalysis(cfgc, freq); > > c1.cohspctrm** > % ************* code ends here > * > The code snippet above is part of our test suite for making sure that > everything works fine. If it does work for you, but does not with your own > data instead of simulated data, the error must be somewhere in your data, > e.g. powspctrm consists of nans or 0s etc. Anyway, I assume that it will > all work fine if you use an updated version of FieldTrip. > > Best, > Jörn > > > > On 5/3/2013 12:56 AM, Lucia Melloni wrote: > > Hi Jan-Mathijs, > still the same result with the code that you suggested. > > selection fourierspctrm along dimension 2 > averaging crsspctrm over rpt > removing dimension rpt from crsspctrm > Warning: PROGRESS is only a compatibility wrapper, which will soon be > removed. Please instead call FT_PROGRESS. > > In progress at 16 > In ft_connectivity_corr at 87 > In ft_connectivityanalysis at 524 > Warning: PROGRESS is only a compatibility wrapper, which will soon be > removed. Please instead call FT_PROGRESS. > > In progress at 16 > In ft_connectivity_corr at 89 > In ft_connectivityanalysis at 524 > Warning: PROGRESS is only a compatibility wrapper, which will soon be > removed. Please instead call FT_PROGRESS. > > In progress at 16 > In ft_connectivity_corr at 106 > In ft_connectivityanalysis at 524 > the call to "ft_connectivityanalysis" took 0 seconds > > > Lucia > > -- > Lucia. > > > On Thu, May 2, 2013 at 3:12 PM, jan-mathijs schoffelen < > jan.schoffelen at donders.ru.nl> wrote: > >> Hi Lucia, >> >> The warnings indicate that you are dividing by zero. Are you sure that >> your cfg is correct? >> >> Please try >> >> cfg = []; >> cfg.method = 'coh'; >> coh = ft_connectivityanalysis(cfg, freq); >> >> This should work. >> >> Best, >> Jan-Mathijs >> >> On May 2, 2013, at 6:56 PM, Lucia Melloni wrote: >> >> Hi jan-mathijs >> >> Unfortunately I get the same result whether or not I remove the mean. >> Best, >> -- Lucía >> >> On May 2, 2013, at 9:57 AM, jan-mathijs schoffelen < >> jan.schoffelen at donders.ru.nl> wrote: >> >> Hi Lucia, >> >> Could you remove cfg.removemean = 'yes' and try again? >> >> Best, >> >> Jan-Mathijs >> >> On Apr 29, 2013, at 2:38 AM, Lucia Melloni wrote: >> >> Hi! >> I am trying to calculate coherence using ft_connectivityanalysis, but >> I am getting only ones and infinity as output in cohspctrm with all of >> my data sets. >> >> I first run ft_freqanalysis with >> cfg.method = 'mtmfft'; >> cfg.taper = 'dpss'; >> cfg.output = 'fourier'; >> cfg.foilim = [1 45]; >> cfg.tapsmofrq = 1; >> cfg.keeptrials = 'yes'; >> cfg.keeptapers = 'yes'; >> freq = ft_freqanalysis(cfg, data); >> >> Whether I do or I do not specify cfg.channel and cfg.channelcmb here >> does not seem to make a difference for my problem later on. The >> spectra look absolutely fine. >> >> I then run ft_connectivityanalysis with >> cfg.method = 'coh'; >> cfg.removemean= 'yes'; >> cfg.trials = 'all'; >> cfg.feedback = 'yes'; >> cfg.complex = 'abs'; >> coh = ft_connectivityanalysis(cfg, freq); >> >> The cohspctrm looks like this: >> val(:,:,1,1) = >> >> 1 Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf >> Inf Inf Inf (etc.) >> >> I get the following warning during ft_connectivityanalysis >> >> Warning: Divide by zero. >> >> In ft_connectivity_corr at 103 >> >> In ft_connectivityanalysis at 524 >> Warning: Divide by zero. >> >> In ft_connectivity_corr at 104 >> >> In ft_connectivityanalysis at 524 >> >> The same happens if I try to calculate PLV through >> ft_connectivityanalysis. >> This is with Fieldtrip version 20130422 and 20130427, Matlab R2009a, >> Windows 7 (64bit). >> >> Any advice? >> Thanks! >> Lucia >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> _______________________________________________ >> 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 >> >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vale.niccolai at gmail.com Fri May 3 15:09:58 2013 From: vale.niccolai at gmail.com (Valentina Niccolai) Date: Fri, 3 May 2013 15:09:58 +0200 Subject: [FieldTrip] neuromag122_neighb Message-ID: Hallo! I would like to use the template neuromag122_neighb.mat to repair channels, but it seems to me that this template contains labels form the neuromag306 system. Is it right? And can I find the template somewhere? Best, Valentina -------------- next part -------------- An HTML attachment was scrubbed... URL: From Markus.Butz at uni-duesseldorf.de Fri May 3 16:06:24 2013 From: Markus.Butz at uni-duesseldorf.de (Markus Butz) Date: Fri, 03 May 2013 15:06:24 +0100 Subject: [FieldTrip] Problems reading in DICOM Message-ID: <75e09cb13160d.5183d270@uni-duesseldorf.de> Thanks for your replies and help Robert, Jörn, and Eelke! Finally it worked out, but the problem was rather on my side, as there where several series of different MRTs scans in one folder of which some did not work, some worked out strange as they had just some files (16-26), and some worked fine. Unfortunately I tried most intensively on the subject who came with no correct series at all. :-( To be fair, all the files appeared exactlty the same, but ft_read_mri is luckily mentioning which series it works on and how many files it include, which finally made me wonder. ;-) Thanks again and have a good weekend Markus ps: Sorry for the belated thanks! Am 13.03.13, schrieb Robert Oostenveld : > > > > > > > > > > > > Hi > > > DICOM files come with different extensions. I guess it depends on the scanner (Siemens/Philips/...). But the file format should be the same as it is a standard format, so the extension should not matter. The fileio/ft_filetype.m function detects both dcm and ima files as dicom. > > > > if the files have no extension, the autodetection fails and you should explicitly specify the format as > mri = ft_read_mri('single_file_of_DICOM_series', 'format', 'dicom'); > I now realize that to be a hidden option. I'll get that fixed in the function documentation. > > > > > > > I recommend that you specify a filename from somewhere in the middle of the stack of files. There are often a few localizer scans in the same directory, and these (due to the sorting of the file names) tend to end up at the beginning or end of the (alphabetical) directory listing. > > > cheers > Robert > > > > > > > > > > > On 13 Mar 2013, at 14:22, Jörn M. Horschig wrote: > > > > > > > > > Hi Markus, > > > > I kept on avoiding these errors by using MRIcron's dcm2nii functionality: http://www.mccauslandcenter.sc.edu/mricro/mricron/index.html > > But pay attention to the coordinate system when importing it into FieldTrip afterwards, it can be quite a hassle... > > > > Maybe Robert or JM know whether reading in .dcm files is possible, but I have to admit that I never tried ;) > > > > Best, > > Jörn > > > > On 3/13/2013 12:11 PM, Markus Butz wrote: > > > > > > > > > > > > > > > > Dear list, > > > > > > > > > I am experiencing problems reading in external MRI in DICOM format from a CD (doing it the first time though). > > > I wanted to do it the new and easy way as described here: > > > http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_an_anatomical_mri_from_dicom_into_ctf_format?s[]=dicom > > > > > > > > > % read the DICOM files > > > mri = ft_read_mri('single_file_of_DICOM_series.IMA'); > > > > > > > > > However, I have no single slices with extension *.ima but one dataset with the extension *.dcm and the other dataset with no extension for the single slice files. I am also not sure where to copy the DICOMDIR file. > > > > > > > > > When I try to open a single file of the *.dcm series I get: > > > > > > > > > mri = ft_read_mri('508652C3.dcm'); > > > > > > > > > ??? Undefined function or variable "hdr". > > > > > > > > > Error in ==> ft_read_mri at 216 > > > hdr = hdr(keep); > > > > > > > > > Trying to read in a single file of the no extension series I get: > > > > > > > > > mri = ft_read_mri('73850486'); > > > > > > > > > ??? Error using ==> dicominfo at 41 > > > The specified file is not in DICOM format > > > > > > > > > The Image Processing toolbox V 7.2 is installed and this is fieldtrip-20111101. > > > > > > > > > Any help appreciated! > > > > > > > > > Markus > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > > -- > > Jörn M. Horschig > > PhD Student > > Donders Institute for Brain, Cognition and Behaviour > > Centre for Cognitive Neuroimaging > > Radboud University Nijmegen > > Neuronal Oscillations Group > > FieldTrip Development Team > > > > P.O. Box 9101 > > NL-6500 HB Nijmegen > > The Netherlands > > > > Contact: > > E-Mail: jm.horschig at donders.ru.nl > > Tel: +31-(0)24-36-68493 > > Web: http://www.ru.nl/donders > > > > Visiting address: > > Trigon, room 2.30 > > Kapittelweg 29 > > NL-6525 EN Nijmegen > > The Netherlands > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jimparkinson at me.com Fri May 3 22:57:26 2013 From: jimparkinson at me.com (Jim Parkinson) Date: Fri, 03 May 2013 21:57:26 +0100 Subject: [FieldTrip] 2x2x3 Repeated Measures ANOVA in FT Message-ID: Hi All Sorry for the very simplistic question here but I am finding it difficult to construct an answer - if indeed there is one - from previous posts. I have a study which is a 2x2x3 repeated measures design, event-related using 64 channel EEG. The design is a culmination of a number of previous studies, so in that sense is justified, and eyeballing the data suggests that the effects are pulling in the directions we have hypothesised. I would really like to attempt to pull interaction effects, main effects and then specified (a priori and justified) contrasts from my EEG data. So, is it even possible using cluster permutation methods to report 3-way, 2-way and main effect stats from such a design, and if so, what is the best/most justifiable method? Secondly, considering the amount of *possible*n simple contrasts available in a 2x2x3 design - even if I don;t run them all because it is not meaningful to do so - what is the best method to correct for multiple comparisons in the simpel contrasts I do end up running? Thans for any help in this confusing matter! best, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: From chadwick.boulay at gmail.com Mon May 6 07:36:18 2013 From: chadwick.boulay at gmail.com (Chadwick Boulay) Date: Mon, 06 May 2013 14:36:18 +0900 Subject: [FieldTrip] Please help me get component dipole fitting results using custom anatomy into normalized template for EEGLAB clustering. Message-ID: <51874152.9090903@gmail.com> Dear Fieldtrip users, Using the subject's MRI and recorded EEG electrode locations, I've managed to segment the MRI, create the volume conduction model, align the electrodes, create a sourcemodel using a grid warped from the MNI template, create the leadfield, and perform ft_dipolefitting on IC weights (imported from EEGLAB). The geometry, electrode positions, and mri all line up (coordsys='ctf', unit='cm') and the calculated dipole positions are what I would expect. [Aside: All of my topoplots have the electrodes positioned correctly relative to each other but the nose and ears are 90 degrees from where I would expect them. Do the topoplot functions not know how to deal with ctf coordsys?] How can I normalize these dipole locations into the template brain so that I may perform component clustering in EEGLAB? I have some ideas but I don't know how to implement them. 1) Calculate the transformation matrix to normalize the original MRI to the template MRI, then apply that transformation to the dipole positions and momentums. I'm guessing I need to use mri_norm = ft_volumenormalize(cfg, mri); but then I don't know how to use mri_norm.transform and mri_norm.initial. Further, the output of ft_dipolefitting doesn't seem to be suitable for ft_transform_geometry. 2) Since the sourcemodel grid is warped from the template brain, I can find the sourcemodel grid index closest to the dipole location then set the new dipole location to be the location of the template grid at the same index. I don't know how to do this for the momentum but I probably don't need the momentum for clustering. 3) Start over from the beginning, normalizing the MRI and the electrode locations as soon as possible then performing all subsequent calculations using the normalized geometry. I searched the documentation and the list archives but I could not find an answer. I am surprised because I expected dipole normalisation to be a common requirement. Maybe I am missing something simple. Thank you in advance for any help. -Chad -- Chadwick Boulay JSPS Postdoctoral Fellow Keio University Yokohama Japan boulay at brain.bio.keio.ac.jp From mushfa.yousuf at googlemail.com Mon May 6 14:47:44 2013 From: mushfa.yousuf at googlemail.com (Mushfa Yousuf) Date: Mon, 6 May 2013 14:47:44 +0200 Subject: [FieldTrip] Source Reconstruction using Openmeeg method In-Reply-To: References: Message-ID: Hello; Yes you were right. I have defined the wrong sensors i.e 'grad' instead of 'elec' while calculating the Leadfield. Actually I am trying to calculate Combined source reconstruction from both EEG and MEG sensors. Do you have any idea, how to define both elec and grad definition while calculating first forward then inverse solution. Because in a fieldtrip either you can defined elec or grad at one time. Regards; Mushfa Yousuf Neurozentrum, Universitätsklinikum Schleswig-Holstein, Campus Kiel (UKSH), Deutschland On Tue, Apr 30, 2013 at 6:23 PM, Johanna Zumer wrote: > Hi Mushfa, > > My guess is that the channels that have you used to compute .csdspctrm are > not the same as the channels in cfg.elec. If you set cfg.channel = > freqPost.label, does that solve it? > > Cheers, > Johanna > > > 2013/4/30 Mushfa Yousuf > >> Hello Fieldtrippers, >> >> I am doing source reconstruction using EEG channels on a fieldtrip. >> >> I have computed Forward solution i.e head model using 'Openmeeg' and >> lead field successfully. >> >> For the inverse solution using 'dics' method, I wrote the following >> syntax >> >> >> >> >> >> cfg = []; >> cfg.method = 'dics'; >> cfg.frequency = 130; >> cfg.elec = dataFIC12.hdr.elec; >> cfg.grid = grid; >> cfg.vol = vol; >> >> sourcePost = ft_sourceanalysis(cfg, freqPost); >> >> >> and I have received the following error: >> >> >> ??? Error using ==> mtimes >> Inner matrix dimensions must agree. >> >> Error in ==> beamformer_dics at 314 >> filt = pinv(lf' * invCf * lf) * lf' * invCf; % >> Gross eqn. 3, use PINV/SVD to cover rank deficient >> leadfield >> >> Error in ==> ft_sourceanalysis at 595 >> dip(i) = beamformer_dics(grid, sens, vol, [], >> squeeze(Cf(i,:,:)), optarg{:}); >> >> Error in ==> newCode at 214 >> sourcePost = ft_sourceanalysis(cfg, freqPost); >> >> >> >> >> Any help would be appreciated. >> >> >> Regards; >> >> >> Mushfa Yousuf >> >> Neurozentrum, >> Universitätsklinikum Schleswig-Holstein, >> Campus Kiel (UKSH), Deutschland >> >> >> _______________________________________________ >> 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: From chaowang0704 at gmail.com Tue May 7 13:35:20 2013 From: chaowang0704 at gmail.com (Chao Wang) Date: Tue, 7 May 2013 14:35:20 +0300 Subject: [FieldTrip] Some Questions on the resample design Message-ID: I have been using field-trip. Recently, I tried to use it for statistic test by non-parametric method, e.g. bootstrap and permutation. As usual, the two method involve resample original data with or without replacement. I carefully inspected the code in the function *resampledesign* but I was quite confused by the method in the bootstrap section: 254resample = zeros(cfg.numrandomization, Nrepl); -------------- next part -------------- An HTML attachment was scrubbed... URL: From chaowang0704 at gmail.com Tue May 7 14:08:57 2013 From: chaowang0704 at gmail.com (Chao Wang) Date: Tue, 7 May 2013 15:08:57 +0300 Subject: [FieldTrip] Some Questions on the resample design In-Reply-To: References: Message-ID: I'm sorry to make a mistake just now. The previous message sent didn't fullfill my meaning. I carefully inspected the code in the function *resampledesign* but I was quite confused by the codes in the bootstrap section (For paired design, the design matrix should be like this, design(1,:)=[1:N 1:N], design(2,1:N)=1 and design(2,N+1:2*N)=2 and N is for example the subject number; and cfg.uvar=2): 91 Nvar = size(design,1); % number of factors or regressors 92 Nrepl = size(design,2); % number of replications ... ... 248 units = design(cfg.uvar,:); 249 for k = 1:length(unique(units)) 250 sel = find(units==k); 251 indx(:,k) = sel; 252 Nrep(k) = length(sel); 253 end 254 resample = zeros(cfg.numrandomization, Nrepl); ... ... 274 tmp = zeros(cfg.numrandomization*10, Nrepl/Nrep(1)); 275 for i=1:cfg.numrandomization*10 276 tmp(i,:) = *sort*(randsample(1:Nrepl/Nrep(1), Nrepl/Nrep(1))); 277 end 278 tmp = unique(tmp, 'rows'); 279 fprintf('found %d unique rows in bootstrap matrix of %d bootstraps', size(tmp,1), cfg.numrandomization*10); ... ... 292 for i=1:cfg.numrandomization 293 for k=1:size(indx,1) 294 resample(i,indx(k,:)) = indx(k,tmp(i,:)); 295 end 296 end My question was on the code in 276 line. These code was to generate a number of rand numbers (about cfg.numrandomization lines) in the range of 1 to Nrepl/Nrep(1), in which Nrepl is the number of replications in the design and Nrep is the number of repetition (Nrep(:)=2 for paired design). If the function '*sort*' is used, then every row of matrix tmp is the same, which will be 1,2,..., Nrepl/Nrep(1). And this will lead the 278 line to the result: temp=1:Nrepl/Nrep(1) (because of the function unique). This result is by no means what we want, I think. What we do want is several rows numbers with same range but with distinct orders. Only in this way, can we guarantee that each resample is not the same. On Tue, May 7, 2013 at 2:35 PM, Chao Wang wrote: > I > have been using field-trip. Recently, I tried to use it for statistic test > by non-parametric method, e.g. bootstrap and permutation. As usual, the two > method involve resample original data with or without replacement. I > carefully inspected the code in the function *resampledesign* but I was > quite confused by the method in the bootstrap section: > > 254resample = zeros(cfg.numrandomization, Nrepl); > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zriouil.imane at gmail.com Tue May 7 14:48:24 2013 From: zriouil.imane at gmail.com (z.imane) Date: Tue, 7 May 2013 14:48:24 +0200 Subject: [FieldTrip] convert .plx to .nex ? Message-ID: Hi i have a problem to read data with extension .plx and i want to convert this to .nex. it's possible or no? please respond me -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Tue May 7 14:53:40 2013 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Tue, 7 May 2013 14:53:40 +0200 Subject: [FieldTrip] Some Questions on the resample design In-Reply-To: References: Message-ID: Dear Chao, I'm not familiar with this piece of code, but I had a quick look. Line 276, with the 'sort' command, is testing for the number of unique 'rows' (line 278). It then uses this information to modify the value of cfg.numrandomization (line 283 which you have not displayed), which is reduced if not enough unique information to do the requested number of randomizations. Then (I think) the actual randomization should be occuring in subsequent lines of code (292-296). Note also that this part of code is only reached if max(design(cfg.uvar,:)) < 20. Does that help? Maybe someone else with more experience in this section of code can comment as well? Or if you still find that it indeed is not randomizing, you can file a bug here (http://bugzilla.fcdonders.nl/), ideally with a small test script. Cheers, Johanna 2013/5/7 Chao Wang > I'm sorry to make a mistake just now. The previous message sent didn't > fullfill my meaning. > > I carefully inspected the code in the function *resampledesign* but I was > quite confused by the codes in the bootstrap section (For paired design, > the design matrix should be like this, design(1,:)=[1:N 1:N], design(2,1:N)=1 > and design(2,N+1:2*N)=2 and N is for example the subject number; and > cfg.uvar=2): > 91 Nvar = size(design,1); % number of factors or regressors > 92 Nrepl = size(design,2); % number of replications > ... > ... > 248 units = design(cfg.uvar,:); > 249 for k = 1:length(unique(units)) > 250 sel = find(units==k); > 251 indx(:,k) = sel; > 252 Nrep(k) = length(sel); > 253 end > 254 resample = zeros(cfg.numrandomization, Nrepl); > ... > ... > 274 tmp = zeros(cfg.numrandomization*10, Nrepl/Nrep(1)); > 275 for i=1:cfg.numrandomization*10 > 276 tmp(i,:) = *sort*(randsample(1:Nrepl/Nrep(1), Nrepl/Nrep(1))); > 277 end > > 278 tmp = unique(tmp, 'rows'); > 279 fprintf('found %d unique rows in bootstrap matrix of %d bootstraps', > size(tmp,1), cfg.numrandomization*10); > ... > ... > 292 for i=1:cfg.numrandomization > 293 for k=1:size(indx,1) > 294 resample(i,indx(k,:)) = indx(k,tmp(i,:)); > 295 end > 296 end > > My question was on the code in 276 line. These code was to generate a > number of rand numbers (about cfg.numrandomization lines) in the range of 1 > to Nrepl/Nrep(1), in which Nrepl is the number of replications in the > design and Nrep is the number of repetition (Nrep(:)=2 for paired design). > If the function '*sort*' is used, then every row of matrix tmp is the > same, which will be 1,2,..., Nrepl/Nrep(1). And this will lead the 278 line > to the result: temp=1:Nrepl/Nrep(1) (because of the function unique). This > result is by no means what we want, I think. What we do want is several > rows numbers with same range but with distinct orders. Only in this way, > can we guarantee that each resample is not the same. > > > > On Tue, May 7, 2013 at 2:35 PM, Chao Wang wrote: > >> I >> have been using field-trip. Recently, I tried to use it for statistic >> test by non-parametric method, e.g. bootstrap and permutation. As usual, >> the two method involve resample original data with or without replacement. >> I carefully inspected the code in the function *resampledesign* but I >> was quite confused by the method in the bootstrap section: >> >> 254resample = zeros(cfg.numrandomization, Nrepl); >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From antony.passaro at gmail.com Wed May 8 23:17:21 2013 From: antony.passaro at gmail.com (Antony Passaro) Date: Wed, 8 May 2013 17:17:21 -0400 Subject: [FieldTrip] Clustering channel dimension of DTF Connectivity In-Reply-To: References: Message-ID: Hi Fieldtrippers, I am trying to perform a group-level comparison of 2 conditions across 10 subjects based on the DTF connectivity. For the time being, we are looking at the DTF for a subset of frequencies (alpha) and choosing the avgoverfreq option which gives us a 4096 x 1 matrix since we are looking at 64 x 64 channels. Using ft_freqstatistics, I noticed that it will throw an error explaining that there is not yet an implementation for data with channelcmb for a cluster analysis so I took it upon myself to identify channel pairs which should be considered neighbors and build a new neighbor structure prior to running ft_freqstatistics. To do that, I took the basic neighbor structure for 64 channels and then created a new neighbor structure of 4096 channel pairs based on the code below: for i=1:4096 label{i,1} = [dtf.labelcmb{i,1},'_',dtf.labelcmb{i,2}]; end labelcmb = dtf.labelcmb; chans=64; %Identify the channel pairs which are neighbors with the target channel NBtarget = {}; for ch=1:chans^2 NBtarget(ch).label = label{ch}; target = find(cellfun(@(x) strcmp(labelcmb{ch,1},x),{neighbours(:).label}) ==1) ; tempnb = cellfun(@(x) strcat(x,['_' labelcmb{ch,2}]),{neighbours( 1,target).neighblabel},'UniformOutput',0); NBtarget(ch).neighblabel = tempnb{:}; end %Identify the channel pairs which are neighbors with the reference channel NBref = {}; for ch=1:chans^2 NBref(ch).label = label{ch}; target = find(cellfun(@(x) strcmp(labelcmb{ch,2},x),{neighbours(:).label}) ==1) ; tempnb = cellfun(@(x) strcat([labelcmb{ch,1} '_'],x),{neighbours(1,target).neighblabel},'UniformOutput',0); NBref(ch).neighblabel = tempnb{:}; end %Append both sets of neighbors (ref and target) NBboth= {}; for ch=1:chans^2 NBboth(ch).label = label{ch}; NBboth(ch).neighblabel = [NBref(ch).neighblabel; NBtarget(ch).neighblabel]; end This seems to work and the clustering method proceeds without error. My question is the following: is this the proper way to utilize the clustering method using ft_freqstatistics on connectivity data or am I missing something? Thanks, -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From chaowang0704 at gmail.com Thu May 9 10:51:37 2013 From: chaowang0704 at gmail.com (Chao Wang) Date: Thu, 9 May 2013 11:51:37 +0300 Subject: [FieldTrip] Some Questions on the resample design (Johanna Zumer) Message-ID: Dear Johanna, Thank you! I understand your meaning and that's right that this part of code is only reached if max(design(cfg.uvar,:)) < 20, but what I do not understand is that for what reason, the '20' is set to test the max(design(cfg.uvar,:)). And besides, by using 'sort', each row of tmp will be the same, in ascending order, which will lead the 278 line using 'unique' to have tmp only one row. That is size(tmp,1)=1; this will lead to cfg.numrandomization=1 in 284 line. > 274 tmp = zeros(cfg.numrandomization*10, Nrepl/Nrep(1)); > 275 for i=1:cfg.numrandomization*10 > 276 tmp(i,:) = *sort*(randsample(1:Nrepl/Nrep(1), Nrepl/Nrep(1))); > 277 end > > 278 tmp = unique(tmp, 'rows'); Best regards! Chao Message: 4 > Date: Tue, 7 May 2013 14:53:40 +0200 > From: Johanna Zumer > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Some Questions on the resample design > Message-ID: > < > CAL4kA6d-WLuip_tUvBRbQr2JiYQ9vr0rb_FnOe18aK8tqEmadA at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Dear Chao, > > I'm not familiar with this piece of code, but I had a quick look. Line > 276, with the 'sort' command, is testing for the number of unique 'rows' > (line 278). It then uses this information to modify the value of > cfg.numrandomization (line 283 which you have not displayed), which is > reduced if not enough unique information to do the requested number of > randomizations. Then (I think) the actual randomization should be > occuring in subsequent lines of code (292-296). Note also that > > this part > of code is only reached if > > max(design(cfg.uvar,:)) < 20. > > Does that help? Maybe someone else with more experience in this section > of code can comment as well? > > Or if you still find that it indeed is not randomizing, you can file a bug > here (http://bugzilla.fcdonders.nl/), ideally with a small test script. > > Cheers, > > Johanna > > > > > 2013/5/7 Chao Wang > > > I'm sorry to make a mistake just now. The previous message sent didn't > > fullfill my meaning. > > > > I carefully inspected the code in the function *resampledesign* but I was > > quite confused by the codes in the bootstrap section (For paired design, > > the design matrix should be like this, design(1,:)=[1:N 1:N], > design(2,1:N)=1 > > and design(2,N+1:2*N)=2 and N is for example the subject number; and > > cfg.uvar=2): > > 91 Nvar = size(design,1); % number of factors or regressors > > 92 Nrepl = size(design,2); % number of replications > > ... > > ... > > 248 units = design(cfg.uvar,:); > > 249 for k = 1:length(unique(units)) > > 250 sel = find(units==k); > > 251 indx(:,k) = sel; > > 252 Nrep(k) = length(sel); > > 253 end > > 254 resample = zeros(cfg.numrandomization, Nrepl); > > ... > > ... > > 274 tmp = zeros(cfg.numrandomization*10, Nrepl/Nrep(1)); > > 275 for i=1:cfg.numrandomization*10 > > 276 tmp(i,:) = *sort*(randsample(1:Nrepl/Nrep(1), Nrepl/Nrep(1))); > > 277 end > > > > 278 tmp = unique(tmp, 'rows'); > > 279 fprintf('found %d unique rows in bootstrap matrix of %d > bootstraps', > > size(tmp,1), cfg.numrandomization*10); > > ... > > ... > > 292 for i=1:cfg.numrandomization > > 293 for k=1:size(indx,1) > > 294 resample(i,indx(k,:)) = indx(k,tmp(i,:)); > > 295 end > > 296 end > > > > My question was on the code in 276 line. These code was to generate a > > number of rand numbers (about cfg.numrandomization lines) in the range > of 1 > > to Nrepl/Nrep(1), in which Nrepl is the number of replications in the > > design and Nrep is the number of repetition (Nrep(:)=2 for paired > design). > > If the function '*sort*' is used, then every row of matrix tmp is the > > same, which will be 1,2,..., Nrepl/Nrep(1). And this will lead the 278 > line > > to the result: temp=1:Nrepl/Nrep(1) (because of the function unique). > This > > result is by no means what we want, I think. What we do want is several > > rows numbers with same range but with distinct orders. Only in this way, > > can we guarantee that each resample is not the same. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marianapbranco1 at gmail.com Fri May 10 10:08:41 2013 From: marianapbranco1 at gmail.com (Mariana Branco) Date: Fri, 10 May 2013 10:08:41 +0200 Subject: [FieldTrip] Real-time processing References: <9B1A8EA6-CCDE-4CED-83FD-C5D2F21607F5@student.tudelft.nl> Message-ID: <31275A3B-B8D6-4C46-8B30-5EF745AD13BA@gmail.com> Hello, I am new in the BCI research field, and I am starting to implement an online BCI system using the Fieldtrip toolbox to detect ERD/ERS features. I already did two offline experiments using this toolbox, but now I am having some doubts about how to adapt the offline signal processing functions into real-time; I started by simulating real-time data from a file. My questions are: 1) To process the data real-time using ft_preprocessing is it first necessary to define trials (with ft_definetrial)? If so, how can I define the trial if it is real-time? 2) Is it possible to still use the function ft_preprocessing and ft_resampledata in real-time with the same specifications of offline procedure? 3) When simulating data stream (with two matlab sessions) the function ft_realtime_powerestimate(cfg) reports an error related to the "arg 3 (overlap)" on the welch's method. How can I correct this? 4) Also, for synchronous/triggered data analysis it is available the function ft_realtime_average. Is it possible to explain how can this example function be used for implementation of my own feature processing and extraction function. Does it preprocess the data in an alternative way to ft_preprocessing? I am sorry for all the questions. Regards, Mariana Branco From mengtongxiao at gmail.com Fri May 10 11:39:29 2013 From: mengtongxiao at gmail.com (=?GB2312?B?s8LRqQ==?=) Date: Fri, 10 May 2013 17:39:29 +0800 Subject: [FieldTrip] cooradinate Message-ID: Dear all, I got some ROIs from MNE. But in MNE it use brain template that is *MNI152 . * I want use fieldtrip compute the spatial filter for ROIs. For this reason ,I want got the position in sourcemodel from template in fieldtrip. I see the fieldtrip seem to use *MNI305 ,*isn,t it? If fieldtrip use *MNI305 ,* this problem is making me question whether a transformation is really necessary ? The both "MNI" space cooradation * x ,y,z axis *represent right,anterior, superior.(+x=right,+y=anterior,+z=superior)?(MNI cooradation from http://imaging.mrc-cbu.cam.ac.uk/imaging/MniTalairach) I find infieldtrip (http://fieldtrip.fcdonders.nl/tutorial/connectivity) sourcemodel is that *x ,y,z axis *represent anterior, right,superior? If a transformation is really necessary ,how should I do? Then I am puzzed what do *x ,y,z axis *represent in stanard_1020.elc Thanks for your help, best, xiao -------------- next part -------------- An HTML attachment was scrubbed... URL: From mengtongxiao at gmail.com Mon May 13 03:30:06 2013 From: mengtongxiao at gmail.com (=?GB2312?B?s8LRqQ==?=) Date: Mon, 13 May 2013 09:30:06 +0800 Subject: [FieldTrip] grid-template Message-ID: Dear all, I want to konw what is the MNI-template that constructed 3D-grids in the fieldtrip (Template sourcemodels ) ? is it MNI305 ,clin27 ,MNI125 or something else? thanks, xiao -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon May 13 11:13:14 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 13 May 2013 11:13:14 +0200 Subject: [FieldTrip] Source Reconstruction using Openmeeg method In-Reply-To: References: Message-ID: <5190AEAA.3020301@donders.ru.nl> Dear Mushfa, I think you have to compute two leadfield matrices, one for EEG (elec) and one for MEG (grad), and then concatenate these (and make sure that the order of sensors won't get mixed up anywhere, because sourceanalysis just expects the leadfield matrix to be ordered like your data. If that's not the case, you either encounter the previous error you described or (if the number of channels matches, but order is mixed up) it will just return wrong source estimated activity. Best, Jörn On 5/6/2013 2:47 PM, Mushfa Yousuf wrote: > Hello; > > Yes you were right. I have defined the wrong sensors i.e 'grad' > instead of 'elec' while calculating the Leadfield. > > Actually I am trying to calculate Combined source reconstruction from > both EEG and MEG sensors. > > Do you have any idea, how to define both elec and grad definition > while calculating first forward then inverse solution. > > Because in a fieldtrip either you can defined elec or grad at one time. > > > Regards; > > > Mushfa Yousuf > > Neurozentrum, > Universitätsklinikum Schleswig-Holstein, > Campus Kiel (UKSH), Deutschland > > > On Tue, Apr 30, 2013 at 6:23 PM, Johanna Zumer > > wrote: > > Hi Mushfa, > > My guess is that the channels that have you used to compute > .csdspctrm are not the same as the channels in cfg.elec. If you > set cfg.channel = freqPost.label, does that solve it? > > Cheers, > Johanna > > > 2013/4/30 Mushfa Yousuf > > > Hello Fieldtrippers, > > I am doing source reconstruction using EEG channels on a > fieldtrip. > > I have computed Forward solution i.e head model using > 'Openmeeg' and lead field successfully. > > For the inverse solution using 'dics' method, I wrote the > following syntax > > > > > > cfg = []; > cfg.method = 'dics'; > cfg.frequency = 130; > cfg.elec = dataFIC12.hdr.elec; > cfg.grid = grid; > cfg.vol = vol; > > sourcePost = ft_sourceanalysis(cfg, freqPost); > > > and I have received the following error: > > > ??? Error using ==> mtimes > Inner matrix dimensions must agree. > > Error in ==> beamformer_dics at 314 > filt = pinv(lf' * invCf * lf) * lf' * invCf; % > Gross eqn. 3, use PINV/SVD to cover rank deficient > leadfield > > Error in ==> ft_sourceanalysis at 595 > dip(i) = beamformer_dics(grid, sens, vol, [], > squeeze(Cf(i,:,:)), optarg{:}); > > Error in ==> newCode at 214 > sourcePost = ft_sourceanalysis(cfg, freqPost); > > > > > Any help would be appreciated. > > > Regards; > > > Mushfa Yousuf > > Neurozentrum, > Universitätsklinikum Schleswig-Holstein, > Campus Kiel (UKSH), Deutschland > > > _______________________________________________ > 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 -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From naran.kutt at gmail.com Mon May 13 11:48:17 2013 From: naran.kutt at gmail.com (Narayanan Kutty) Date: Mon, 13 May 2013 05:48:17 -0400 Subject: [FieldTrip] Mutual Information Message-ID: Hello All, Are there any functions within fieldtrip to calculate mutual information between channels at the sensor level. I remember that eeglab used to have a plugin for that. Couldn't find anything in fieldtrip. Thank you, Naran. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon May 13 14:14:44 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 13 May 2013 14:14:44 +0200 Subject: [FieldTrip] Clustering channel dimension of DTF Connectivity In-Reply-To: References: Message-ID: <5190D934.5020407@donders.ru.nl> Dear Tony, I had a quick look at your code, and I think it is fine. However, I would define neighbours purely based on the target sensor, not on the reference, e.g. when computing cortico-muscular coherence on channel level, you are interested in spatial clusters near the cortex and not in cluster on the arm where the reference sensor is. Also check out this: data = ft_checkdata(data, 'cmbrepresentation', 'full'); This will turn chancmb (Nx1) into chan X chan (RxS, where R*S = N). Best, Jörn On 5/8/2013 11:17 PM, Antony Passaro wrote: > Hi Fieldtrippers, > I am trying to perform a group-level comparison of 2 conditions across > 10 subjects based on the DTF connectivity. For the time being, we are > looking at the DTF for a subset of frequencies (alpha) and choosing > the avgoverfreq option which gives us a 4096 x 1 matrix since we are > looking at 64 x 64 channels. Using ft_freqstatistics, I noticed that > it will throw an error explaining that there is not yet an > implementation for data with channelcmb for a cluster analysis so I > took it upon myself to identify channel pairs which should be > considered neighbors and build a new neighbor structure prior to > running ft_freqstatistics. To do that, I took the basic neighbor > structure for 64 channels and then created a new neighbor structure of > 4096 channel pairs based on the code below: > for i=1:4096 > label{i,1} = [dtf.labelcmb{i,1},'_',dtf.labelcmb{i,2}]; > end > labelcmb = dtf.labelcmb; > > chans=64; > %Identify the channel pairs which are neighbors with the target channel > NBtarget = {}; > for ch=1:chans^2 > NBtarget(ch).label = label{ch}; > target = find(cellfun(@(x) > strcmp(labelcmb{ch,1},x),{neighbours(:).label}) ==1) ; > tempnb = cellfun(@(x) strcat(x,['_' > labelcmb{ch,2}]),{neighbours(1,target).neighblabel},'UniformOutput',0); > NBtarget(ch).neighblabel = tempnb{:}; > end > > %Identify the channel pairs which are neighbors with the reference channel > NBref = {}; > for ch=1:chans^2 > NBref(ch).label = label{ch}; > target = find(cellfun(@(x) > strcmp(labelcmb{ch,2},x),{neighbours(:).label}) ==1) ; > tempnb = cellfun(@(x) strcat([labelcmb{ch,1} > '_'],x),{neighbours(1,target).neighblabel},'UniformOutput',0); > NBref(ch).neighblabel = tempnb{:}; > end > > > %Append both sets of neighbors (ref and target) > NBboth= {}; > for ch=1:chans^2 > NBboth(ch).label = label{ch}; > NBboth(ch).neighblabel = [NBref(ch).neighblabel; > NBtarget(ch).neighblabel]; > end > This seems to work and the clustering method proceeds without error. > My question is the following: is this the proper way to utilize the > clustering method using ft_freqstatistics on connectivity data or am I > missing something? > Thanks, > -Tony > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanbelluzo at gmail.com Mon May 13 21:13:08 2013 From: sanbelluzo at gmail.com (Santiago Belluzo) Date: Mon, 13 May 2013 16:13:08 -0300 Subject: [FieldTrip] Emotiv + FieldTrip + Matlab In-Reply-To: References: Message-ID: Hi, i´m trying to use emotiv2ft in a windows machine and Matlab return this message "Waiting for the device to become ready - press [Escape] to quit EDK: User added, will now start acquisition. Streaming 16 out of 22 channels Could not connect to buffer server at localhost:1972." In http://fieldtrip.fcdonders.nl/development/realtime/emotiv?s[]=emotiv said that "If port 1972 cannot be accessed on a Windows machine it may help to first initialize the port from matlab, e.g., via ft_realtime_fileproxy". But i´m not sure how to do it.... Someone can help me?. Santiago. 2013/3/4 Santiago Belluzo > *Hi, I'm new to FieldTrip and I'm interested in using it to capture **realtime data from the Emotiv headset using the function emotiv2ft.I`ve tried some examples like signalviewer andpowerviewer with random signal from signalproxy to check that the FieldTripBuffer works fine. Then i`ve tried to use emotiv2ft and have problems. * > > *I'm not sure about how to call to this interface from within **Matlab.* > > *I`ve read some messages from the mailinglist with similar problem but in there is not clear for me how they solve it. * > > *I´ll be waiting for any help!.* > > *Thanks.* > > -- > Santiago > -- Santiago Belluzo -------------- next part -------------- An HTML attachment was scrubbed... URL: From chenxiaogang1986 at 163.com Tue May 14 03:37:29 2013 From: chenxiaogang1986 at 163.com (Xiaogang Chen) Date: Tue, 14 May 2013 09:37:29 +0800 (CST) Subject: [FieldTrip] ft_topoplotCC of vector Message-ID: <5ef5e6c2.25f7.13ea0af63fd.Coremail.chenxiaogang1986@163.com> Hi all, I am trying to plot some results that are not the output from a ft function, using a ft_topoplotCC function. However, I don’t know how to use it. Would you send me some simple examples? Thanks very much. Best, Xiaogang Chen -------------- next part -------------- An HTML attachment was scrubbed... URL: From yoel.sher at mail.huji.ac.il Tue May 14 18:09:37 2013 From: yoel.sher at mail.huji.ac.il (Yoel Sher) Date: Tue, 14 May 2013 19:09:37 +0300 Subject: [FieldTrip] EEG -> Topographic Matrix Message-ID: <519261C1.3020002@mail.huji.ac.il> Dear FieldTrippers, I would like to know if there is an option to extract the Topographic map (Such as the scalp in ft_topoplotER) to a matrix. I've searched around the functions in fieldtrip and couldn't find any.. Many Thanks, Yoel From eelke.spaak at donders.ru.nl Tue May 14 19:25:40 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 14 May 2013 19:25:40 +0200 Subject: [FieldTrip] EEG -> Topographic Matrix In-Reply-To: <519261C1.3020002@mail.huji.ac.il> References: <519261C1.3020002@mail.huji.ac.il> Message-ID: Dear Yoel, I'm not sure if I understand what you mean exactly, but do you simply want the values plotted by ft_topoplotER in case of plotting the results of ft_timelockanalysis? In that case, you can look at the tl.avg field (if tl = ft_timelockanalysis(cfg, data)). But that seems rather trivial, so I think you must mean something else. Best, Eelke On 14 May 2013 18:09, Yoel Sher wrote: > Dear FieldTrippers, > > I would like to know if there is an option to extract the Topographic map > (Such as the scalp in ft_topoplotER) to a matrix. I've searched around the > functions in fieldtrip and couldn't find any.. > > Many Thanks, > Yoel > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From yoel.sher at mail.huji.ac.il Wed May 15 12:08:20 2013 From: yoel.sher at mail.huji.ac.il (Yoel Sher) Date: Wed, 15 May 2013 13:08:20 +0300 Subject: [FieldTrip] EEG -> Topographic Matrix In-Reply-To: References: <519261C1.3020002@mail.huji.ac.il> Message-ID: <51935E94.7090605@mail.huji.ac.il> Dear Eelke, First, thanks for you fast replay. Second, let me clarify my question. I'm looking for other result than the average ERP/ERF. I'm looking for a matrix that output the EEG value per each location (not just the electrodes) on the scalp. Of course that every location other than the electrode is an interpolated value. The plot of ft_topoplotER shows that matrix (but does not output, as far as I know). Regards, Yoel On 05/14/2013 08:25 PM, Eelke Spaak wrote: > Dear Yoel, > > I'm not sure if I understand what you mean exactly, but do you simply > want the values plotted by ft_topoplotER in case of plotting the > results of ft_timelockanalysis? In that case, you can look at the > tl.avg field (if tl = ft_timelockanalysis(cfg, data)). But that seems > rather trivial, so I think you must mean something else. > > Best, > Eelke > > On 14 May 2013 18:09, Yoel Sher wrote: >> Dear FieldTrippers, >> >> I would like to know if there is an option to extract the Topographic map >> (Such as the scalp in ft_topoplotER) to a matrix. I've searched around the >> functions in fieldtrip and couldn't find any.. >> >> Many Thanks, >> Yoel >> _______________________________________________ >> 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 > From eelke.spaak at donders.ru.nl Wed May 15 12:22:21 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 15 May 2013 12:22:21 +0200 Subject: [FieldTrip] EEG -> Topographic Matrix In-Reply-To: <51935E94.7090605@mail.huji.ac.il> References: <519261C1.3020002@mail.huji.ac.il> <51935E94.7090605@mail.huji.ac.il> Message-ID: Dear Yoel, Ah, I understand now; you want the interpolated matrix. This is not possible with standard FieldTrip code. However, it should not be very difficult to get this. I would recommend to set a breakpoint in plotting/ft_plot_topo.m, at line 220. Then, when the code breaks at that point, you can type in the command window assignin('base','Xi',Xi) and the same for Yi and Zi, that way you have the x and y coordinates and the data (z) in variables in your base workspace. Getting this matrix programmatically in a script should also be possible, but that would require custom hacks of ft_plot_topo (e.g. you could put this assignin call in your local copy of the function, or add Xi,Yi,Zi as output arguments, etc.) Good luck, best, Eelke On 15 May 2013 12:08, Yoel Sher wrote: > Dear Eelke, > > First, thanks for you fast replay. Second, let me clarify my question. I'm > looking for other result than the average ERP/ERF. I'm looking for a matrix > that output the EEG value per each location (not just the electrodes) on the > scalp. Of course that every location other than the electrode is an > interpolated value. The plot of ft_topoplotER shows that matrix (but does > not output, as far as I know). > > Regards, > Yoel > > > On 05/14/2013 08:25 PM, Eelke Spaak wrote: >> >> Dear Yoel, >> >> I'm not sure if I understand what you mean exactly, but do you simply >> want the values plotted by ft_topoplotER in case of plotting the >> results of ft_timelockanalysis? In that case, you can look at the >> tl.avg field (if tl = ft_timelockanalysis(cfg, data)). But that seems >> rather trivial, so I think you must mean something else. >> >> Best, >> Eelke >> >> On 14 May 2013 18:09, Yoel Sher wrote: >>> >>> Dear FieldTrippers, >>> >>> I would like to know if there is an option to extract the Topographic map >>> (Such as the scalp in ft_topoplotER) to a matrix. I've searched around >>> the >>> functions in fieldtrip and couldn't find any.. >>> >>> Many Thanks, >>> Yoel >>> _______________________________________________ >>> 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 >> > From yoel.sher at mail.huji.ac.il Wed May 15 12:47:06 2013 From: yoel.sher at mail.huji.ac.il (Yoel Sher) Date: Wed, 15 May 2013 13:47:06 +0300 Subject: [FieldTrip] EEG -> Topographic Matrix In-Reply-To: References: <519261C1.3020002@mail.huji.ac.il> <51935E94.7090605@mail.huji.ac.il> Message-ID: <519367AA.60204@mail.huji.ac.il> Dear Eelke, Many thanks, I'll try it out. Best, - Yoel On 05/15/2013 01:22 PM, Eelke Spaak wrote: > Dear Yoel, > > Ah, I understand now; you want the interpolated matrix. This is not > possible with standard FieldTrip code. > > However, it should not be very difficult to get this. I would > recommend to set a breakpoint in plotting/ft_plot_topo.m, at line 220. > Then, when the code breaks at that point, you can type in the command > window assignin('base','Xi',Xi) and the same for Yi and Zi, that way > you have the x and y coordinates and the data (z) in variables in your > base workspace. > > Getting this matrix programmatically in a script should also be > possible, but that would require custom hacks of ft_plot_topo (e.g. > you could put this assignin call in your local copy of the function, > or add Xi,Yi,Zi as output arguments, etc.) > > Good luck, > best, > > Eelke > > On 15 May 2013 12:08, Yoel Sher wrote: >> Dear Eelke, >> >> First, thanks for you fast replay. Second, let me clarify my question. I'm >> looking for other result than the average ERP/ERF. I'm looking for a matrix >> that output the EEG value per each location (not just the electrodes) on the >> scalp. Of course that every location other than the electrode is an >> interpolated value. The plot of ft_topoplotER shows that matrix (but does >> not output, as far as I know). >> >> Regards, >> Yoel >> >> >> On 05/14/2013 08:25 PM, Eelke Spaak wrote: >>> Dear Yoel, >>> >>> I'm not sure if I understand what you mean exactly, but do you simply >>> want the values plotted by ft_topoplotER in case of plotting the >>> results of ft_timelockanalysis? In that case, you can look at the >>> tl.avg field (if tl = ft_timelockanalysis(cfg, data)). But that seems >>> rather trivial, so I think you must mean something else. >>> >>> Best, >>> Eelke >>> >>> On 14 May 2013 18:09, Yoel Sher wrote: >>>> Dear FieldTrippers, >>>> >>>> I would like to know if there is an option to extract the Topographic map >>>> (Such as the scalp in ft_topoplotER) to a matrix. I've searched around >>>> the >>>> functions in fieldtrip and couldn't find any.. >>>> >>>> Many Thanks, >>>> Yoel >>>> _______________________________________________ >>>> 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 > From ggonesc at upo.es Wed May 15 19:37:11 2013 From: ggonesc at upo.es (Gabriel Gonzalez Escamilla) Date: Wed, 15 May 2013 19:37:11 +0200 Subject: [FieldTrip] PLV and ImC computation Message-ID: <8d77945c28ba0f58.5193e3e7@upo.es> An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: SpamAssassinReport.txt URL: From mbj0310 at gmail.com Thu May 16 08:28:13 2013 From: mbj0310 at gmail.com (Beom Jun Min) Date: Thu, 16 May 2013 15:28:13 +0900 Subject: [FieldTrip] About preprocessing and define trial Message-ID: <9F7D3012-ADFE-40C4-AC5F-AA3F320348AD@gmail.com> Dear all, Hello, my name is BJ Min from Korea. I am just a beginner in the Fieldtrip. Anyway, with the help of tutorials, I could make grand average ERP of my data finally. However, my question is about the order of preprocessing. According to the tutorials, and examples, it looks the ft_definetrial step is the first, then ft_preprocessing step is followed. But, is there any method to flip these two steps? What I want to do is preprocessing (filtering, notch filtering) first then to use ft_definetrial sequentially. Best regards BeomJun Min, M.D. Ph. D. student, Department of Medical System Engineering (DMSE) Gwangju Institute of Science and Technology (GIST) 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju 500-712, Republic of Korea (South) Phone: +82-62-715-3266 / Fax: +82-62-715-3244 E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu May 16 08:52:02 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 16 May 2013 08:52:02 +0200 Subject: [FieldTrip] About preprocessing and define trial In-Reply-To: <9F7D3012-ADFE-40C4-AC5F-AA3F320348AD@gmail.com> References: <9F7D3012-ADFE-40C4-AC5F-AA3F320348AD@gmail.com> Message-ID: Dear BeomJun, What you describe is definitely possible. If you specify: cfg = []; cfg.dataset = 'dataset'; data = ft_preprocessing(cfg); you will get one very big 'trial' in the data structure, representing just all your data. In the step above, you can also specify filter options. After this step, you can segment your data into trials by using ft_redefinetrial (rather than ft_definetrial). However, you still need a trl matrix containing the trial definition. The easiest way to obtain this is to still call ft_definetrial as you used to do: cfg = []; cfg.dataset = 'dataset'; cfg.trialdef..... % all the trial definition options go here cfgout = ft_definetrial(cfg); and then just save the output trl matrix: trl = cfgout.trl; now you can call ft_redefinetrial: cfg = []; cfg.trl = trl; data = ft_redefinetrial(cfg, data); and your data will be segmented. Hope this helps, Best, Eelke On 16 May 2013 08:28, Beom Jun Min wrote: > > Dear all, > > Hello, my name is BJ Min from Korea. > > I am just a beginner in the Fieldtrip. > Anyway, with the help of tutorials, I could make grand average ERP of my > data finally. > > However, my question is about the order of preprocessing. According to the > tutorials, and examples, it looks the ft_definetrial step is the first, then > ft_preprocessing step is followed. But, is there any method to flip these > two steps? What I want to do is preprocessing (filtering, notch filtering) > first then to use ft_definetrial sequentially. > > Best regards > > > BeomJun Min, M.D. > > Ph. D. student, Department of Medical System Engineering (DMSE) > Gwangju Institute of Science and Technology (GIST) > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > 500-712, Republic of Korea (South) > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From mbj0310 at gmail.com Thu May 16 10:06:51 2013 From: mbj0310 at gmail.com (Beom Jun Min) Date: Thu, 16 May 2013 17:06:51 +0900 Subject: [FieldTrip] About preprocessing and define trial In-Reply-To: References: <9F7D3012-ADFE-40C4-AC5F-AA3F320348AD@gmail.com> Message-ID: Dear Eelke Spaak Thank you very much. It works perfect! Best regards. 2013/5/16 Eelke Spaak > Dear BeomJun, > > What you describe is definitely possible. If you specify: > > cfg = []; > cfg.dataset = 'dataset'; > data = ft_preprocessing(cfg); > > you will get one very big 'trial' in the data structure, representing > just all your data. In the step above, you can also specify filter > options. > > After this step, you can segment your data into trials by using > ft_redefinetrial (rather than ft_definetrial). However, you still need > a trl matrix containing the trial definition. The easiest way to > obtain this is to still call ft_definetrial as you used to do: > > cfg = []; > cfg.dataset = 'dataset'; > cfg.trialdef..... > % all the trial definition options go here > cfgout = ft_definetrial(cfg); > > and then just save the output trl matrix: > > trl = cfgout.trl; > > now you can call ft_redefinetrial: > > cfg = []; > cfg.trl = trl; > data = ft_redefinetrial(cfg, data); > > and your data will be segmented. > > Hope this helps, > Best, > > Eelke > > > On 16 May 2013 08:28, Beom Jun Min wrote: > > > > Dear all, > > > > Hello, my name is BJ Min from Korea. > > > > I am just a beginner in the Fieldtrip. > > Anyway, with the help of tutorials, I could make grand average ERP of my > > data finally. > > > > However, my question is about the order of preprocessing. According to > the > > tutorials, and examples, it looks the ft_definetrial step is the first, > then > > ft_preprocessing step is followed. But, is there any method to flip > these > > two steps? What I want to do is preprocessing (filtering, notch > filtering) > > first then to use ft_definetrial sequentially. > > > > Best regards > > > > > > BeomJun Min, M.D. > > > > Ph. D. student, Department of Medical System Engineering (DMSE) > > Gwangju Institute of Science and Technology (GIST) > > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > > 500-712, Republic of Korea (South) > > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > > E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr > > > > > > _______________________________________________ > > 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 > -- BeomJun Min, M.D. Department of Medical System Engineering (DMSE) Gwangju Institute of Science and Technology (GIST) 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju 500-712, Republic of Korea (South) Phone: +82-62-715-3266 / Fax: +82-62-715-3244 E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu May 16 10:07:47 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 16 May 2013 10:07:47 +0200 Subject: [FieldTrip] Second-level one-sample t test with clustering Message-ID: Dear fellow FieldTrippers, At the moment, I want to do second-level source statistics on my data (but the question is the same for sensor statistics). I have computed two-sample t-scores for each subject, between the trials in conditions A and B. Now, the appropriate per-voxel test to do across subjects would be a one-sample t-test. This is rather easy to do, but I would like to use cluster permutations to correct for multiple comparisons. My idea is to generate fake data of all zeroes, the same size as my t-score descriptive data per subject, and then do a paired-samples t test between the real data and these zeroes (using ft_statfun_depsamplesT). The voxel-level t statistic of data vs 0 should be the same as a one-sample test of course. However, I am not sure the permutations of the data would give me a valid distribution of the cluster statistic. The test for the real data would be (comparing column 1 to column 2): dataA 0 dataB 0 dataC 0 dataD 0 whereas a permutation might look like so: 0 dataA dataB 0 dataC 0 0 dataD Intuitively, I think this makes sense, as the t score of 0 vs data will be the negative of t(data vs 0), I should get an appropriate randomization distribution. But I'm not completely sure of this. So, my question: does anyone see a problem with my approach? Or is this a valid way of cluster-correcting a one-sample T test? If not, what would be the right way to proceed? Many thanks, best, Eelke From e.maris at psych.ru.nl Thu May 16 16:31:15 2013 From: e.maris at psych.ru.nl (Eric Maris) Date: Thu, 16 May 2013 16:31:15 +0200 (CEST) Subject: [FieldTrip] fieldtrip Digest, Vol 30, Issue 20 In-Reply-To: Message-ID: <245706559.668339.1368714675557.JavaMail.root@draco.zimbra.ru.nl> Hi Eelke, This not valid. At the second level, you must use the condition means (per subject) as the observations about which you have a hypothesis and which therefore have to be permuted. Eric http://www.nphyscog.com/contact ----- fieldtrip-request at science.ru.nl schreef: > 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..." From eelke.spaak at donders.ru.nl Thu May 16 16:43:32 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 16 May 2013 16:43:32 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 30, Issue 20 In-Reply-To: <245706559.668339.1368714675557.JavaMail.root@draco.zimbra.ru.nl> References: <245706559.668339.1368714675557.JavaMail.root@draco.zimbra.ru.nl> Message-ID: Hi Eric, Thanks, that's what I expected. However, that approach does not take into account the different between-trial variances in the different subjects. What would you recommend to take those into account? Best, Eelke On 16 May 2013 16:31, Eric Maris wrote: > Hi Eelke, > > This not valid. At the second level, you must use the condition means (per subject) as the observations about which you have a hypothesis and which therefore have to be permuted. > > Eric > > > http://www.nphyscog.com/contact > ----- fieldtrip-request at science.ru.nl schreef: >> 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..." > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From e.maris at psych.ru.nl Thu May 16 17:28:36 2013 From: e.maris at psych.ru.nl (Eric Maris) Date: Thu, 16 May 2013 17:28:36 +0200 (CEST) Subject: [FieldTrip] fieldtrip Digest, Vol 30, Issue 20 In-Reply-To: References: <245706559.668339.1368714675557.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <022601ce524a$0c47c250$24d746f0$@maris@psych.ru.nl> Hi Eelke, It all depends on the null hypothesis that you want to test. It's better to discuss this with you in person or at some meeting with other colleagues (for non-Donders Discussion List readers, Eelke and I work at the same institute), because at the end it is a matter of deciding on what is an interesting null hypothesis (both for you and the reviewers of your paper). I remember a discussion with a colleague about the same issue (using first-level t-statistics at the second level), and he was quite unhappy when I questioned this approach (by asking whether this is really the null hypothesis he was interested in). At the end, it turned out that he also had tried the standard approach (using only condition means) but this did not result in a significant p-value. Best, Eric > -----Original Message----- > From: eelke.spaak at gmail.com [mailto:eelke.spaak at gmail.com] On Behalf Of > Eelke Spaak > Sent: donderdag 16 mei 2013 16:44 > To: Eric Maris; FieldTrip discussion list > Subject: Re: [FieldTrip] fieldtrip Digest, Vol 30, Issue 20 > > Hi Eric, > > Thanks, that's what I expected. However, that approach does not take > into account the different between-trial variances in the different > subjects. What would you recommend to take those into account? > > Best, > Eelke > > On 16 May 2013 16:31, Eric Maris wrote: > > Hi Eelke, > > > > This not valid. At the second level, you must use the condition means > (per subject) as the observations about which you have a hypothesis and > which therefore have to be permuted. > > > > Eric > > > > > > http://www.nphyscog.com/contact > > ----- fieldtrip-request at science.ru.nl schreef: > >> 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..." > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tim.curran at Colorado.EDU Fri May 17 14:36:54 2013 From: tim.curran at Colorado.EDU (Tim Curran) Date: Fri, 17 May 2013 06:36:54 -0600 Subject: [FieldTrip] Postdoctoral Position, Curran Lab, University of Colorado Boulder In-Reply-To: <022601ce524a$0c47c250$24d746f0$@maris@psych.ru.nl> References: <245706559.668339.1368714675557.JavaMail.root@draco.zimbra.ru.nl> <022601ce524a$0c47c250$24d746f0$@maris@psych.ru.nl> Message-ID: Postdoctoral Position Curran Lab, University of Colorado Boulder Postdoctoral research position available in the lab of Tim Curran at the Department of Psychology & Neuroscience, University of Colorado Boulder to work on NIH-funded ERP studies of memory and perceptual expertise. Desirable qualifications include research experience related to memory, perceptual expertise, ERP/EEG, and/or related domains. Anticipated start date is summer or fall of 2013. The University of Colorado is an Equal Opportunity/Affirmative Action employer. For further information contact, tim.curran at colorado.edu. Applicants must submit a CV, a statement of research experience/interests, and a cover letter including email addresses for at least three referees to contact for recommendation letters if needed. Applications will be accepted electronically at https://www.jobsatcu.com/postings/63602 http://psych.colorado.edu/~tcurran/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ggonesc at upo.es Fri May 17 17:45:40 2013 From: ggonesc at upo.es (Gabriel Gonzalez Escamilla) Date: Fri, 17 May 2013 17:45:40 +0200 Subject: [FieldTrip] problem in connectivityanalysis Message-ID: <9f89709b303dae2.51966cc4@upo.es> An HTML attachment was scrubbed... URL: From jessetinker at gmail.com Fri May 17 21:36:12 2013 From: jessetinker at gmail.com (Jesse Tinker) Date: Fri, 17 May 2013 12:36:12 -0700 Subject: [FieldTrip] Segmentation Memory Issue Message-ID: Hello Fieldtrippers! This is my first post ever and I just want to say thank you to everyone for promoting such a vibrant and supportive intellectual community. I have an issue which seems so simple but I am somewhat stymied by: using fieldtrip to accomplish the coregistration. The main points of my code are: mri = ft_read_mri( ); mri = ft_volumerealign(cfg, mri); % Mark fiducials mrireslice = ft_volumereslice(cfg,mri); %To apply the resultant transformation matrix segmentedmri = ft_volumesegment(cfg, mrireslice); First, if I skip the reslice step, everything works fine. However, if I do the reslice and then try to segment, spm_preproc tries to create a 1.8 Tb array. Although it bravely tries, my 24 Gb of RAM inevitably fails. The analogous array for the unsliced mri is 2Mb. I found this confusing as the quantity of information in the resliced image is the exact same. I traced through all the coding and the computation that fails is based on the transformation matrix of the MRI which, of course, changes with the reslicing. I am happy to provide details of that but won't at the moment. My question, has anyone else encountered this or developed a workaround? Very much appreciated, Jesse British Columbia Mental Health and Research Institute -------------- next part -------------- An HTML attachment was scrubbed... URL: From mengtongxiao at gmail.com Sat May 18 16:06:20 2013 From: mengtongxiao at gmail.com (=?GB2312?B?s8LRqQ==?=) Date: Sat, 18 May 2013 22:06:20 +0800 Subject: [FieldTrip] a .mat file about meg data do preprocessing Message-ID: Dear all, I have a .mat file about meg data(102*98800,channel*time,channel is 'MEG0111','MEG0121'.....'M*1' ); Then I use eeglab read it,got .set file;I want use ft_timelockanalysis then *cfg = []; cfg.dataset = 'megalpha.set'; cfg.grad=grad; data_org = ft_preprocessing(cfg)* >grad = chanori: [102x3 double] chanpos: [102x3 double] chantype: {102x1 cell} chanunit: {102x1 cell} coilori: [510x3 double] coilpos: [510x3 double] label: {102x1 cell} tra: [102x510 double] unit: 'cm' Warning: creating default channel names > In fileio\private\read_eeglabheader at 53 In ft_read_header at 572 In ft_preprocessing at 343 processing channel { 'chan001' 'chan002' 'chan003' 'chan004' 'chan005' 'chan006' 'chan007' 'chan008' 'chan009' 'chan010' 'chan011' 'chan012' 'chan013' 'chan014' 'chan015' 'chan016' 'chan017' 'chan018' 'chan019' 'chan020' 'chan021' 'chan022' 'chan023' 'chan024' 'chan025' 'chan026' 'chan027' 'chan028' 'chan029' 'chan030' 'chan031' 'chan032' 'chan033' 'chan034' 'chan035' 'chan036' 'chan037' 'chan038' 'chan039' 'chan040' 'chan041' 'chan042' 'chan043' 'chan044' 'chan045' 'chan046' 'chan047' 'chan048' 'chan049' 'chan050' 'chan051' 'chan052' 'chan053' 'chan054' 'chan055' 'chan056' 'chan057' 'chan058' 'chan059' 'chan060' 'chan061' 'chan062' 'chan063' 'chan064' 'chan065' 'chan066' 'chan067' 'chan068' 'chan069' 'chan070' 'chan071' 'chan072' 'chan073' 'chan074' 'chan075' 'chan076' 'chan077' 'chan078' 'chan079' 'chan080' 'chan081' 'chan082' 'chan083' 'chan084' 'chan085' 'chan086' 'chan087' 'chan088' 'chan089' 'chan090' 'chan091' 'chan092' 'chan093' 'chan094' 'chan095' 'chan096' 'chan097' 'chan098' 'chan099' 'chan100' 'chan101' 'chan102' } reading and preprocessing reading and preprocessing trial 1 from 1 data_org = hdr: [1x1 struct] label: {102x1 cell} time: {[1x98800 double]} trial: {[102x98800 double]} fsample: 1037 sampleinfo: [1 98800] cfg: [1x1 struct] *cfg = []; cfg.covariance = 'yes'; cfg.channel = 'M*1'; cfg.vartrllength = 2; cfg.covariancewindow = 'all'; timelock = ft_timelockanalysis(cfg, data_org);* timelock = avg: [0x98800 double] var: [0x98800 double] time: [1x98800 double] dof: [0x98800 double] label: {0x1 cell} dimord: 'chan_time' cov: [] cfg: [1x1 struct] there is no error displyed in command window but the timlock is empty,why? thanks for you help, best, xiao -------------- next part -------------- An HTML attachment was scrubbed... URL: From eeguser at hotmail.com Sat May 18 18:21:48 2013 From: eeguser at hotmail.com (Subramaniam Iyer) Date: Sat, 18 May 2013 19:21:48 +0300 Subject: [FieldTrip] computing threshold for PLV Message-ID: Dear FT Experts, I have calculated PLV for a set of EEG data from 5 different patients. Now I want to convert the PLV matrix of each patient into a binary matrix. For this I need a threshold PLV value below which I can assume the phase locking is zero. My question is, how do I compute this threshold. I know hard thresholding is one option ( for ex setting 0.1 or 0.2 as threshold), but I guess it is not a very good option. Can somebody suggest a better and robust (statistical) way of determining the threshold ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sherrykhan78 at gmail.com Sat May 18 18:37:28 2013 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Sat, 18 May 2013 12:37:28 -0400 Subject: [FieldTrip] computing threshold for PLV In-Reply-To: References: Message-ID: You can randomly shift in time the epochs, to compute null-distribution, and then threshold at some p-value say p < 0.01, you can even correct for multiple comparison in space and time using this principle. On Sat, May 18, 2013 at 12:21 PM, Subramaniam Iyer wrote: > Dear FT Experts, > > I have calculated PLV for a set of EEG data from 5 different patients. Now > I want to convert the PLV matrix of each patient into a binary matrix. For > this I need a threshold PLV value below which I can assume the phase > locking is zero. > My question is, how do I compute this threshold. I know hard thresholding > is one option ( for ex setting 0.1 or 0.2 as threshold), but I guess it is > not a very good option. > > Can somebody suggest a better and robust (statistical) way of determining > the threshold ? > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sat May 18 19:25:50 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 18 May 2013 19:25:50 +0200 Subject: [FieldTrip] computing threshold for PLV In-Reply-To: References: Message-ID: <4EDB7A1D-4484-454B-A9CE-5AE826E2AE98@donders.ru.nl> Dear all, Note that shuffling the epochs with respect to one another (where for one of the channels in the pair the epoch order stays fixed) usually yields a too liberal null-distribution. The reason is that the shuffling also destroys all structure in the data that is due to electromagnetic field spread. So, even if an observed pattern of PLV is caused by a single underlying neural generator, shuffling the epochs most likely makes this pattern 'significant'. However, it still does not reflect physiological interaction between sources. Best, Jan-Mathijs On May 18, 2013, at 6:37 PM, Sheraz Khan wrote: > You can randomly shift in time the epochs, to compute null-distribution, and then threshold at some p-value say p < 0.01, you can even correct for multiple comparison in space and time using this principle. > > > > On Sat, May 18, 2013 at 12:21 PM, Subramaniam Iyer wrote: > Dear FT Experts, > > I have calculated PLV for a set of EEG data from 5 different patients. Now I want to convert the PLV matrix of each patient into a binary matrix. For this I need a threshold PLV value below which I can assume the phase locking is zero. > My question is, how do I compute this threshold. I know hard thresholding is one option ( for ex setting 0.1 or 0.2 as threshold), but I guess it is not a very good option. > > Can somebody suggest a better and robust (statistical) way of determining the threshold ? > > _______________________________________________ > 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 Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From smoratti at psi.ucm.es Sat May 18 20:11:11 2013 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Sat, 18 May 2013 20:11:11 +0200 Subject: [FieldTrip] computing threshold for PLV In-Reply-To: References: Message-ID: Dear Sheraz, You might consult the following article: Lachaux, J. P. et al. 1999. Measuring Phase Synchrony in Brain Signal. Human Brain Mapping 8: 194-208. In principle you have to create surrogate data that represent the null hypothesis that there is no phase locking between your electrodes, sources, etc. Then you create hundreds or thousands of surrogate data sets and calculate each time you PLV. That way you create a distribution of your PLV values under the Null hypothesis. Then you check in what percentile your observed PLV lies (e. g. if its beyond the 95% percentile you would reject the Null hypothesis). Hope that helps, Stephan ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Universidad Complutense de Madrid Facultad de Psicología Departamento de Psicología Básica I Campus de Somosaguas 28223 Pozuelo de Alarcón (Madrid) Spain and Center for Biomedical Technology Laboratory for Cognitive and Computational Neuroscience Parque Científico y Tecnológico de la Universidad Politecnica de Madrid Campus Montegancedo 28223 Pozuelo de Alarcón (Madrid) Spain email: smoratti at psi.ucm.es Tel.: +34 679219982 El 18/05/2013, a las 18:21, Subramaniam Iyer escribió: > Dear FT Experts, > > I have calculated PLV for a set of EEG data from 5 different patients. Now I want to convert the PLV matrix of each patient into a binary matrix. For this I need a threshold PLV value below which I can assume the phase locking is zero. > My question is, how do I compute this threshold. I know hard thresholding is one option ( for ex setting 0.1 or 0.2 as threshold), but I guess it is not a very good option. > > Can somebody suggest a better and robust (statistical) way of determining the threshold ? > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From eeguser at hotmail.com Sat May 18 21:42:05 2013 From: eeguser at hotmail.com (Subramaniam Iyer) Date: Sat, 18 May 2013 22:42:05 +0300 Subject: [FieldTrip] computing threshold for PLV In-Reply-To: References: , Message-ID: Dear FT Experts Thank you for your inputs. I should add here that I have continuous EEG data (so effectively single trial). The way I am computing PLV is by dividing my data into windows of 2 seconds each and computing PLV for each window and then I finally average the PLV values of all the windows. So when we talk of shuffling trials, in my case should i consider each of 2 second window as a trial ? Sorry if this sounds stupid as I am new to this kind of analysis. From: smoratti at psi.ucm.es Date: Sat, 18 May 2013 20:11:11 +0200 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] computing threshold for PLV Dear Sheraz, You might consult the following article: Lachaux, J. P. et al. 1999. Measuring Phase Synchrony in Brain Signal. Human Brain Mapping 8: 194-208. In principle you have to create surrogate data that represent the null hypothesis that there is no phase locking between your electrodes, sources, etc. Then you create hundreds or thousands of surrogate data sets and calculate each time you PLV. That way you create a distribution of your PLV values under the Null hypothesis. Then you check in what percentile your observed PLV lies (e. g. if its beyond the 95% percentile you would reject the Null hypothesis). Hope that helps, Stephan ________________________________________________________Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Universidad Complutense de MadridFacultad de PsicologíaDepartamento de Psicología Básica ICampus de Somosaguas28223 Pozuelo de Alarcón (Madrid)Spain and Center for Biomedical TechnologyLaboratory for Cognitive and Computational NeuroscienceParque Científico y Tecnológico de la Universidad Politecnica de Madrid Campus Montegancedo28223 Pozuelo de Alarcón (Madrid)Spain email: smoratti at psi.ucm.es Tel.: +34 679219982 El 18/05/2013, a las 18:21, Subramaniam Iyer escribió:Dear FT Experts, I have calculated PLV for a set of EEG data from 5 different patients. Now I want to convert the PLV matrix of each patient into a binary matrix. For this I need a threshold PLV value below which I can assume the phase locking is zero. My question is, how do I compute this threshold. I know hard thresholding is one option ( for ex setting 0.1 or 0.2 as threshold), but I guess it is not a very good option. Can somebody suggest a better and robust (statistical) way of determining the threshold ? _______________________________________________ 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: From sherrykhan78 at gmail.com Sun May 19 01:55:07 2013 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Sat, 18 May 2013 19:55:07 -0400 Subject: [FieldTrip] computing threshold for PLV In-Reply-To: References: Message-ID: Most of the previois discussion targeted toward event related plv for continous data may be look at Hipp 2012 Nature Neuroscience orthogonal correlation paper On May 18, 2013 3:42 PM, "Subramaniam Iyer" wrote: > Dear FT Experts > > Thank you for your inputs. I should add here that I have continuous EEG > data (so effectively single trial). The way I am computing PLV is by > dividing my data into windows of 2 seconds each and computing PLV for each > window and then I finally average the PLV values of all the windows. > > So when we talk of shuffling trials, in my case should i consider each of > 2 second window as a trial ? Sorry if this sounds stupid as I am new to > this kind of analysis. > > ------------------------------ > From: smoratti at psi.ucm.es > Date: Sat, 18 May 2013 20:11:11 +0200 > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] computing threshold for PLV > > Dear Sheraz, > > You might consult the following article: Lachaux, J. P. et al. 1999. > Measuring Phase Synchrony in Brain Signal. Human Brain Mapping 8: 194-208. > In principle you have to create surrogate data that represent the null > hypothesis that there is no phase locking between your electrodes, sources, > etc. Then you create hundreds or thousands of surrogate data sets and > calculate each time you PLV. That way you create a distribution of your PLV > values under the Null hypothesis. Then you check in what percentile your > observed PLV lies (e. g. if its beyond the 95% percentile you would reject > the Null hypothesis). > > Hope that helps, > > Stephan > > > > ________________________________________________________ > Stephan Moratti, PhD > > see also: http://web.me.com/smoratti/ > > Universidad Complutense de Madrid > Facultad de Psicología > Departamento de Psicología Básica I > Campus de Somosaguas > 28223 Pozuelo de Alarcón (Madrid) > Spain > > and > > Center for Biomedical Technology > Laboratory for Cognitive and Computational Neuroscience > Parque Científico y Tecnológico de la Universidad Politecnica de Madrid > Campus Montegancedo > 28223 Pozuelo de Alarcón (Madrid) > Spain > > > email: smoratti at psi.ucm.es > Tel.: +34 679219982 > > El 18/05/2013, a las 18:21, Subramaniam Iyer escribió: > > Dear FT Experts, > > I have calculated PLV for a set of EEG data from 5 different patients. Now > I want to convert the PLV matrix of each patient into a binary matrix. For > this I need a threshold PLV value below which I can assume the phase > locking is zero. > My question is, how do I compute this threshold. I know hard thresholding > is one option ( for ex setting 0.1 or 0.2 as threshold), but I guess it is > not a very good option. > > Can somebody suggest a better and robust (statistical) way of determining > the threshold ? > _______________________________________________ > 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: From mengtongxiao at gmail.com Sun May 19 09:32:37 2013 From: mengtongxiao at gmail.com (=?GB2312?B?s8LRqQ==?=) Date: Sun, 19 May 2013 15:32:37 +0800 Subject: [FieldTrip] help about ft_timelockanalysis Message-ID: Dear all, when I use ft_timelockanalysis like follow,there are some mistake. cfg = []; cfg.covariance = 'yes'; cfg.channel = 'all'; cfg.vartrllength = 2; cfg.covariancewindow = 'all'; timelock = ft_timelockanalysis(cfg, data_org); the input is raw data with 102 channels and 1 trials averaging trials averaging trial 1 of 1 the call to "ft_timelockanalysis" took 5 seconds ??? Error using ==> mxSerialize Error during serialization of (null) Error in ==> ft_postamble_provenance at 76 cfg.callinfo.outputhash = cellfun(@CalcMD5, cellfun(@mxSerialize, cellfun(@eval, ft_default.postamble, 'UniformOutput', false), 'UniformOutput', false), 'UniformOutput', false); Error in ==> ft_postamble at 55 evalin('caller', ['ft_postamble_' cmd]); Error in ==> ft_timelockanalysis at 401 ft_postamble provenance timelock Thank you so much for your help!! xiao -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: SpamAssassinReport.txt URL: From eeguser at hotmail.com Sun May 19 09:54:21 2013 From: eeguser at hotmail.com (Subramaniam Iyer) Date: Sun, 19 May 2013 10:54:21 +0300 Subject: [FieldTrip] computing threshold for PLV In-Reply-To: References: , , , Message-ID: So, does it mean that PLV method does not make much sense for continuous data ? To be more specific, I am trying to investigate synchrony from epileptic EEG recordings. Date: Sat, 18 May 2013 19:55:07 -0400 From: sherrykhan78 at gmail.com To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] computing threshold for PLV Most of the previois discussion targeted toward event related plv for continous data may be look at Hipp 2012 Nature Neuroscience orthogonal correlation paper On May 18, 2013 3:42 PM, "Subramaniam Iyer" wrote: Dear FT Experts Thank you for your inputs. I should add here that I have continuous EEG data (so effectively single trial). The way I am computing PLV is by dividing my data into windows of 2 seconds each and computing PLV for each window and then I finally average the PLV values of all the windows. So when we talk of shuffling trials, in my case should i consider each of 2 second window as a trial ? Sorry if this sounds stupid as I am new to this kind of analysis. From: smoratti at psi.ucm.es Date: Sat, 18 May 2013 20:11:11 +0200 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] computing threshold for PLV Dear Sheraz, You might consult the following article: Lachaux, J. P. et al. 1999. Measuring Phase Synchrony in Brain Signal. Human Brain Mapping 8: 194-208. In principle you have to create surrogate data that represent the null hypothesis that there is no phase locking between your electrodes, sources, etc. Then you create hundreds or thousands of surrogate data sets and calculate each time you PLV. That way you create a distribution of your PLV values under the Null hypothesis. Then you check in what percentile your observed PLV lies (e. g. if its beyond the 95% percentile you would reject the Null hypothesis). Hope that helps, Stephan ________________________________________________________Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Universidad Complutense de MadridFacultad de PsicologíaDepartamento de Psicología Básica ICampus de Somosaguas28223 Pozuelo de Alarcón (Madrid)Spain and Center for Biomedical TechnologyLaboratory for Cognitive and Computational NeuroscienceParque Científico y Tecnológico de la Universidad Politecnica de Madrid Campus Montegancedo 28223 Pozuelo de Alarcón (Madrid)Spain email: smoratti at psi.ucm.es Tel.: +34 679219982 El 18/05/2013, a las 18:21, Subramaniam Iyer escribió: Dear FT Experts, I have calculated PLV for a set of EEG data from 5 different patients. Now I want to convert the PLV matrix of each patient into a binary matrix. For this I need a threshold PLV value below which I can assume the phase locking is zero. My question is, how do I compute this threshold. I know hard thresholding is one option ( for ex setting 0.1 or 0.2 as threshold), but I guess it is not a very good option. Can somebody suggest a better and robust (statistical) way of determining the threshold ? _______________________________________________ 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: From politzerahless at gmail.com Sun May 19 14:27:37 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sun, 19 May 2013 07:27:37 -0500 Subject: [FieldTrip] help about ft_timelockanalysis Message-ID: Hello Xiao, I don't know if this is what is causing the error, but I did notice that your dataset apparently only has one trial. Usually ft_timelockanalysis() would take a dataset consisting of multiple trials and average them; you may need to run ft_preprocessing() to divide your dataset into trials. Best, Steve > > Message: 1 > Date: Sun, 19 May 2013 15:32:37 +0800 > From: ?? > To: fieldtrip > Subject: [FieldTrip] help about ft_timelockanalysis > Message-ID: > < CADiddyWhMO7vgM2ZjV8xABCVe8WS4d2eXNwvY92hcj2oA0piFQ at mail.gmail.com> > Content-Type: text/plain; charset="gb2312" > > Dear all? > when I use ft_timelockanalysis like follow,there are some mistake. > > cfg = []; > cfg.covariance = 'yes'; > cfg.channel = 'all'; > cfg.vartrllength = 2; > cfg.covariancewindow = 'all'; > timelock = ft_timelockanalysis(cfg, data_org); > the input is raw data with 102 channels and 1 trials > averaging trials > averaging trial 1 of 1 > > the call to "ft_timelockanalysis" took 5 seconds > ??? Error using ==> mxSerialize > Error during serialization of (null) > > Error in ==> ft_postamble_provenance at 76 > cfg.callinfo.outputhash = cellfun(@CalcMD5, cellfun(@mxSerialize, > cellfun(@eval, ft_default.postamble, 'UniformOutput', false), > 'UniformOutput', false), 'UniformOutput', false); > > Error in ==> ft_postamble at 55 > evalin('caller', ['ft_postamble_' cmd]); > Error in ==> ft_timelockanalysis at 401 > ft_postamble provenance timelock > > Thank you so much for your help!! > xiao > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130519/5cd3ca08/attachment-0001.html > > -------------- next part -------------- > An embedded and charset-unspecified text was scrubbed... > Name: SpamAssassinReport.txt > URL: < http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130519/5cd3ca08/attachment-0001.txt > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://people.ku.edu/~sjpa/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephanie.ries at berkeley.edu Mon May 20 06:32:49 2013 From: stephanie.ries at berkeley.edu (Stephanie Kathleen Ries-cornou) Date: Sun, 19 May 2013 21:32:49 -0700 Subject: [FieldTrip] dipole modeling using field trip Message-ID: Hi, I would like to know if it possible to reject horizontal eye movements from scalp EEG signal using equivalent dipole modeling in Fieldtrip. I have tried doing this using ICA but it was not possible to identify a component reflecting saccades for all subjects. Has anyone ever done this? If yes, any suggestion would be great! I am trying to learn about source reconstruction using two dipoles thinking this might be a good start and have started going through the tutorial. I got the following error messages: >> data = ft_dipolesimulation(cfg); using headmodel specified in the configuration using gradiometers specified in the configuration computing simulated data Error using .* Matrix dimensions must agree. Error in ft_dipolesimulation (line 203) simulated.trial{trial} = simulated.trial{trial} + lf(:,i:3:end) * ... This was fixed when I removed the "..." but then I got this message: Error using ft_fetch_vol (line 76) no headmodel specified Error in prepare_headmodel (line 51) vol = ft_fetch_vol(cfg, data); Error in ft_dipolesimulation (line 106) [vol, sens, cfg] = prepare_headmodel(cfg, []); The "vol" parameter is defined, so I do not know where the error is coming from. Best, Stephanie Stephanie Ries, PhD Knight Lab - Helen Wills Neuroscience Institute University of California at Berkeley -------------- next part -------------- An HTML attachment was scrubbed... URL: From ggonesc at upo.es Mon May 20 09:28:55 2013 From: ggonesc at upo.es (Gabriel Gonzalez Escamilla) Date: Mon, 20 May 2013 09:28:55 +0200 Subject: [FieldTrip] problem with PLV and ImC computing Message-ID: <1115d37d2b1643b.5199ecd7@upo.es> I'm re-sending this, becasue searching at the fieldtrip archives, I've notice that my message was scrubbed... Dear Fieltrip experts, I have my continuous data imported to fieldtrip with matlab, I'm looking for performing connectivity analysis between pairs of sensors, I have succed as: data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels and 2000 samples data.label {59x1}; data.time {1xNepochs}; then, calculate only the FFT of all sensors as: cfg=[]; cfg.output='fourier'; cfg.method='mtmfft'; cfg.taper='hanning'; cfg.foilim=[8.5 9.5]; cfg.tapsmofrq=0; cfg.trials='all'; cfg.keeptrials='yes'; cfg.channel='all'; fourier=ft_freqanalysis(cfg, data) as output I get: dimord = 'rpttap_chan_freq' freq= [1x9] fourierspctrm=[7x59x9 double] Then compute the imaginary part of coherency as: cfg=[]; cfg.method ='cohe'; cfg.complex='imag'; cfg.channelcbm={'all' 'all'}; coher = ft_connectivityanalysis (cfg, fourier) as output get: dimord='chan_chan_freq'; cohspctrm=[59x59x9 double]; dof=7; I have two main questions: A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? Many thanks in advanced, Gabriel. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue May 21 08:24:48 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 21 May 2013 08:24:48 +0200 Subject: [FieldTrip] computing threshold for PLV In-Reply-To: References: Message-ID: Hi all, PLV is in principle a perfectly valid method to investigate synchrony, also in continuous data. Jörg (Hipp)'s paper introduces a connectivity metric that is insensitive to the effects of electromagnetic field spread, but it is a measure whose relationship to synchrony is hard to interpret; it quantifies amplitude envelope correlations after explicit removal of the instantaneous mixing, and does not quantify the consistency of phase relationships, as does PLV. If you are after interpreting the connectivity in terms of synchrony, you could look into using the imaginary part of coherency, or the weighted phase lag index, although neither of these methods are easy in their interpretation, either. Best, Jan-Mathijs On May 19, 2013, at 1:55 AM, Sheraz Khan wrote: > Most of the previois discussion targeted toward event related plv for continous data may be look at Hipp 2012 Nature Neuroscience orthogonal correlation paper > > On May 18, 2013 3:42 PM, "Subramaniam Iyer" wrote: > Dear FT Experts > > Thank you for your inputs. I should add here that I have continuous EEG data (so effectively single trial). The way I am computing PLV is by dividing my data into windows of 2 seconds each and computing PLV for each window and then I finally average the PLV values of all the windows. > > So when we talk of shuffling trials, in my case should i consider each of 2 second window as a trial ? Sorry if this sounds stupid as I am new to this kind of analysis. > > From: smoratti at psi.ucm.es > Date: Sat, 18 May 2013 20:11:11 +0200 > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] computing threshold for PLV > > Dear Sheraz, > > You might consult the following article: Lachaux, J. P. et al. 1999. Measuring Phase Synchrony in Brain Signal. Human Brain Mapping 8: 194-208. In principle you have to create surrogate data that represent the null hypothesis that there is no phase locking between your electrodes, sources, etc. Then you create hundreds or thousands of surrogate data sets and calculate each time you PLV. That way you create a distribution of your PLV values under the Null hypothesis. Then you check in what percentile your observed PLV lies (e. g. if its beyond the 95% percentile you would reject the Null hypothesis). > > Hope that helps, > > Stephan > > > > ________________________________________________________ > Stephan Moratti, PhD > > see also: http://web.me.com/smoratti/ > > Universidad Complutense de Madrid > Facultad de Psicología > Departamento de Psicología Básica I > Campus de Somosaguas > 28223 Pozuelo de Alarcón (Madrid) > Spain > > and > > Center for Biomedical Technology > Laboratory for Cognitive and Computational Neuroscience > Parque Científico y Tecnológico de la Universidad Politecnica de Madrid > Campus Montegancedo > 28223 Pozuelo de Alarcón (Madrid) > Spain > > > email: smoratti at psi.ucm.es > Tel.: +34 679219982 > > El 18/05/2013, a las 18:21, Subramaniam Iyer escribió: > > Dear FT Experts, > > I have calculated PLV for a set of EEG data from 5 different patients. Now I want to convert the PLV matrix of each patient into a binary matrix. For this I need a threshold PLV value below which I can assume the phase locking is zero. > My question is, how do I compute this threshold. I know hard thresholding is one option ( for ex setting 0.1 or 0.2 as threshold), but I guess it is not a very good option. > > Can somebody suggest a better and robust (statistical) way of determining the threshold ? > _______________________________________________ > 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 Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue May 21 08:31:22 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 21 May 2013 08:31:22 +0200 Subject: [FieldTrip] problem in connectivityanalysis In-Reply-To: <9f89709b303dae2.51966cc4@upo.es> References: <9f89709b303dae2.51966cc4@upo.es> Message-ID: <519B14BA.9030908@donders.ru.nl> Dear Gabriel, > A) As you see, this makes an average over the epochs of each channel, > and not over the samples (which in this case are the 9 frequencies of > the FFT), And I would like to have the opposite, this is, to get the > imaginary part of coherence for each epoch (repetition) on all my > channels and not for each frequency, something like: chan_chan_rpt or > chancbm_rpt, Is this possible? No. You should think of coherence more as a measure for the consistency of the phase relation between channels across trials, so coherence is just not defined per trial,neither would it make sense to compute coherence for a single trial. > B) Another question I have is: for the Imaginary part of Coherence is > not necessary to compute the cross-spectrum with 'powandcsd', only the > FFT, but for the PLV, PPC or WPLI is that way too? I see some terminology issues here. Let me try to explain in a simple (aka least-mathematical I can think of) way: For all these connectivity measures, we need the phase information from the Fourier transform (FFT) to compute the cross-spectral density matrix (CSD). The CSD can be regarded as the equivalent in the frequency domain to the covariance matrix in the time domain, thus it is a measures how a certain channels activity is co-modulated with another channels activity (for a particular frequency) - makes pretty much sense to make use of this when computing connectivity, right? :) As you might know, a Fourier transform returns complex numbers, where the imaginary part of this number contains phase information. When calling ft_freqanalysis, you can decide if it shall only return the (squared) real part of the frequency spectrum (cfg.output='pow'), or instead the full CSD (cfg.output = 'powandcsd'). Alternatively, you can also let ft_freqanalysis return the raw Fourier coefficients (cfg.output='fourier'). From the Fourier coefficients, however, you can easily obtain the CSD or the power spectrum basically by multiplication the Fourier matrix with itself (transposed). All of these measures quantify the phase relation between channels across trials, and as phase information is coded in the imaginary part of the fourier output, thus for connectivityanalysis you need the CSD which can be obtained either by 'powandcsd' or by 'fourier'. I hope that somehow clarifies your questions. Best, Jörn On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote: > Dear Fieltrip experts, > > I have my continuous data imported to fieldtrip with matlab, I'm > looking for performing connectivity analysis between pairs of sensors, > I have succed as: > data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels > and 2000 samples > data.label {59x1}; > data.time {1xNepochs}; > > then, calculate only the FFT of all sensors as: > cfg=[]; > cfg.output='fourier'; > cfg.method='mtmfft'; > cfg.taper='hanning'; > cfg.foilim=[8.5 9.5]; > cfg.tapsmofrq=0; > cfg.trials='all'; > cfg.keeptrials='yes'; > cfg.channel='all'; > fourier=ft_freqanalysis(cfg, data) > as output I get: > dimord = 'rpttap_chan_freq' > freq= [1x9] > fourierspctrm=[7x59x9 double] > > Then compute the imaginary part of coherency as: > cfg=[]; > cfg.method ='cohe'; > cfg.complex='imag'; > cfg.channelcbm={'all' 'all'}; > coher = ft_connectivityanalysis (cfg, fourier) > as output get: > dimord='chan_chan_freq'; > cohspctrm=[59x59x9 double]; > dof=7; > > I have two main questions: > > A) As you see, this makes an average over the epochs of each channel, > and not over the samples (which in this case are the 9 frequencies of > the FFT), And I would like to have the opposite, this is, to get the > imaginary part of coherence for each epoch (repetition) on all my > channels and not for each frequency, something like: chan_chan_rpt or > chancbm_rpt, Is this possible? > > > > B) Another question I have is: for the Imaginary part of Coherence is > not necessary to compute the cross-spectrum with 'powandcsd', only the > FFT, but for the PLV, PPC or WPLI is that way too? > > > > > Many thanks in advanced, > Gabriel. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue May 21 08:39:14 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 21 May 2013 08:39:14 +0200 Subject: [FieldTrip] a .mat file about meg data do preprocessing In-Reply-To: References: Message-ID: <519B1692.3080101@donders.ru.nl> Dear Xiao, Somehow your channel names seem to not be recognized by FieldTrip, and then it reverts to default channel names (chan001, chan002, ...). You will see that data_org.label will have those channel labels. Subsequently, you define in the cfg for timelockanalysis channel names that are not in your data (your channels are called chanXXX, not MEGXXXX now), and FieldTrip thus does not perform the operation on any channel. I don't know much about EEGLAB and how it is integrated with FieldTrip - there should be an eeglab2fieldtrip function though in fieldtrip/external/eeglab. Maybe you can try this, or maybe someone else here knows why your channel labels do not get copied over to FieldTrip correctly. Good luck :) Best, Jörn On 5/18/2013 4:06 PM, ?? wrote: > Dear all, > I have a .mat file about meg data(102*98800,channel*time,channel is > 'MEG0111','MEG0121'.....'M*1' ); > Then I use eeglab read it,got .set file;I want use ft_timelockanalysis > then > /cfg = []; > cfg.dataset = 'megalpha.set'; > cfg.grad=grad; > data_org = ft_preprocessing(cfg)/ > >grad = > chanori: [102x3 double] > chanpos: [102x3 double] > chantype: {102x1 cell} > chanunit: {102x1 cell} > coilori: [510x3 double] > coilpos: [510x3 double] > label: {102x1 cell} > tra: [102x510 double] > unit: 'cm' > Warning: creating default channel names > > In fileio\private\read_eeglabheader at 53 > In ft_read_header at 572 > In ft_preprocessing at 343 > processing channel { 'chan001' 'chan002' 'chan003' 'chan004' 'chan005' > 'chan006' 'chan007' 'chan008' 'chan009' 'chan010' 'chan011' 'chan012' > 'chan013' 'chan014' 'chan015' 'chan016' 'chan017' 'chan018' 'chan019' > 'chan020' 'chan021' 'chan022' 'chan023' 'chan024' 'chan025' 'chan026' > 'chan027' 'chan028' 'chan029' 'chan030' 'chan031' 'chan032' 'chan033' > 'chan034' 'chan035' 'chan036' 'chan037' 'chan038' 'chan039' 'chan040' > 'chan041' 'chan042' 'chan043' 'chan044' 'chan045' 'chan046' 'chan047' > 'chan048' 'chan049' 'chan050' 'chan051' 'chan052' 'chan053' 'chan054' > 'chan055' 'chan056' 'chan057' 'chan058' 'chan059' 'chan060' 'chan061' > 'chan062' 'chan063' 'chan064' 'chan065' 'chan066' 'chan067' 'chan068' > 'chan069' 'chan070' 'chan071' 'chan072' 'chan073' 'chan074' 'chan075' > 'chan076' 'chan077' 'chan078' 'chan079' 'chan080' 'chan081' 'chan082' > 'chan083' 'chan084' 'chan085' 'chan086' 'chan087' 'chan088' 'chan089' > 'chan090' 'chan091' 'chan092' 'chan093' 'chan094' 'chan095' 'chan096' > 'chan097' 'chan098' 'chan099' 'chan100' 'chan101' 'chan102' } > reading and preprocessing > reading and preprocessing trial 1 from 1 > data_org = > hdr: [1x1 struct] > label: {102x1 cell} > time: {[1x98800 double]} > trial: {[102x98800 double]} > fsample: 1037 > sampleinfo: [1 98800] > cfg: [1x1 struct] > /cfg = []; > cfg.covariance = 'yes'; > cfg.channel = 'M*1'; > cfg.vartrllength = 2; > cfg.covariancewindow = 'all'; > timelock = ft_timelockanalysis(cfg, data_org);/ > timelock = > avg: [0x98800 double] > var: [0x98800 double] > time: [1x98800 double] > dof: [0x98800 double] > label: {0x1 cell} > dimord: 'chan_time' > cov: [] > cfg: [1x1 struct] > there is no error displyed in command window but the timlock is empty,why? > thanks for you help, > best, > xiao > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From zriouil.imane at gmail.com Tue May 21 10:18:58 2013 From: zriouil.imane at gmail.com (z.imane) Date: Tue, 21 May 2013 10:18:58 +0200 Subject: [FieldTrip] ft_read_event Message-ID: Hello, i have a problems in ft_read_event. if you help me please I try to follow all instructions on the tutorial: 'Preprocessing and analysis of spike and local field potential data' >> spike=ft_read_spike(filename) spike = label: {'Elec_1_Neuron_1' 'Elec_2_Neuron_1' 'Elec_3_Neuron_1'} timestamp: {[1x20246 int32] [1x9126 int32] [1x74291 int32]} waveform: {[0x20246 double] [0x9126 double] [0x74291 double]} unit: {[1x20246 double] [1x9126 double] [1x74291 double]} hdr: [1x1 struct] dimord: '{chan}_lead_time_spike' >> header=ft_read_header(filename) header = nChans: 94 Fs: 781.2500 nSamples: 862310 nTrials: 1 nSamplesPre: 0 label: {94x1 cell} FirstTimeStamp: 70433310 TimeStampPerSample: 32 orig: [1x1 struct] chantype: {94x1 cell} chanunit: {94x1 cell} >>cfg=[]; cfg.dataset=filename; cfg.trialfun='trialfun_stimon_samples'; cfg=ft_definetrial(cfg) evaluating trialfunction 'trialfun_stimon_samples' ??? Error using ==> fseek Not enough input arguments. Error in ==> read_nex_event at 49 status = fseek(fid,hdr.varheader(mrkvarnum).offset,'bof'); Error in ==> ft_read_event at 1528 event = read_nex_event(filename); Error in ==> trialfun_stimon_samples at 3 event = ft_read_event(cfg.dataset); Error in ==> ft_definetrial at 157 trl = feval(cfg.trialfun, cfg); -------------- next part -------------- An HTML attachment was scrubbed... URL: From ggonesc at upo.es Tue May 21 17:52:21 2013 From: ggonesc at upo.es (Gabriel Gonzalez Escamilla) Date: Tue, 21 May 2013 17:52:21 +0200 Subject: [FieldTrip] problem in connectivityanalysis In-Reply-To: <519B14BA.9030908@donders.ru.nl> References: <9f89709b303dae2.51966cc4@upo.es> <519B14BA.9030908@donders.ru.nl> Message-ID: <1348f6433edc26f9.519bb455@upo.es> Thank you so much for your answer Jörn, Now I got it, so, I will let the 'fourier' as input to ft_connectivityanalysis, because for some indices I will need the auto-spectrum, and if I fully undertood what you said, it will be the same, as they always take the phase information from the fourier transform. And fieltrip will automatically compute the csd if the input is the frequency data. Nevertheless, it give me some error when I tried to use the output from 'powandcsd' of freqanalysis, always gives me a matrix dimensions error, and when I use the output 'fourier' from connectivityanalysis, it computes almost all indices to ok, raging from  -1 to 1 (I'm saw that they are signed, so this is ok), the problem are the ImC ranging from -inf to inf, and the PLV values ranging from 0 to inf, but when I use the 'fourier' the values are. Which for me is really weird. I have checked internally, and even when I always use the 'fourier' as input, when it internally calculates cross-spectrum for the ImC and PLV, the data.crsspctrm is different, e.g: data.dimord = 'rpt_rpt_chan_chan_freq' ans size(data.crsspctrm) = [1 7 59 59]; So, both are apparently the same, but the data inside this matrices is different, for example, when calculating the ImC the first 7 columns for the first two rows are: val(:,:,1,1)  [0.9323  0.3679  0.8629  1.6436  0.6404  1.8782  0.1139] val(:,:,1,2)  [0.8509-0.1555i  0.2507-0.1066i  0.8173-0.0290i  1.4328-0.2427i  0.5457-0.0500i  1.6505-0.0161i  0.0993+0.0016i] while when calculating the PLV are: val(:,:,1,1)  [1  1  1  1  1  1  1] val(:,:,1,2)  [0.9694-0.2133i  0.7011-0.3564i  0.9951-0.0104i  0.9014-0.3481i  0.9781-0.0819i  0.9982-0.0046i  0.9507-0.0483i] I'm pretty sure I'm doing something wrong here, but I don't really have a clue, If I use the fourier transform to calculate the 'csd' in ft_connectivity analysis and use this csd as input to all other ft_connectivityanalysis indices all of them are set to NaN or 1, not ranging between any numbers. On the other hand, I have seen searching on the net, that fieltrip is capable of create surrogate data, by shifting the phase information on every trial for only one electrode of each pair while using the original samples of each trials on the second channel, but I couldn't find on the manual how to do such a thing. Is there any way to compute this kind of surrogates for every sensor? or was it something that some one suggest to somebody? Many thanks in advanced, Gabriel. ----- Mensaje original ----- De: "Jörn M. Horschig" Fecha: Martes, 21 de Mayo de 2013, 9:03 am Asunto: Re: [FieldTrip] problem in connectivityanalysis A: FieldTrip discussion list > Dear Gabriel, > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > No. You should think of coherence more as a measure for the consistency of the phase relation between channels across trials, so coherence is just not defined per trial,neither would it make sense to compute coherence for a single trial. > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? I see some terminology issues here. Let me try to explain in a simple (aka least-mathematical I can think of) way: > > For all these connectivity measures, we need the phase information from the Fourier transform (FFT) to compute the cross-spectral density matrix (CSD). The CSD can be regarded as the equivalent in the frequency domain to the covariance matrix in the time domain, thus it is a measures how a certain channels activity is co-modulated with another channels activity (for a particular frequency) - makes pretty much sense to make use of this when computing connectivity, right? :) > As you might know, a Fourier transform returns complex numbers, where the imaginary part of this number contains phase information. When calling ft_freqanalysis, you can decide if it shall only return the (squared) real part of the frequency spectrum (cfg.output='pow'), or instead the full CSD (cfg.output = 'powandcsd'). Alternatively, you can also let ft_freqanalysis return the raw Fourier coefficients (cfg.output='fourier'). From the Fourier coefficients, however, you can easily obtain the CSD or the power spectrum basically by multiplication the Fourier matrix with itself (transposed). All of these measures quantify the phase relation between channels across trials, and as phase information is coded in the imaginary part of the fourier output, thus for connectivityanalysis you need the CSD which can be obtained either by 'powandcsd' or by 'fourier'. > > I hope that somehow clarifies your questions. > > Best, > Jörn > > On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote: > Dear Fieltrip experts, > > I have my continuous data imported to fieldtrip with matlab, I'm looking for performing connectivity analysis between pairs of sensors, I have succed as: > data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels and 2000 samples > data.label {59x1}; > data.time {1xNepochs}; > > then, calculate only the FFT of all sensors as: > cfg=[]; > cfg.output='fourier'; > cfg.method='mtmfft'; > cfg.taper='hanning'; > cfg.foilim=[8.5 9.5]; > cfg.tapsmofrq=0; > cfg.trials='all'; > cfg.keeptrials='yes'; > cfg.channel='all'; > fourier=ft_freqanalysis(cfg, data) > as output I get: > dimord = 'rpttap_chan_freq' > freq= [1x9] > fourierspctrm=[7x59x9 double] > > Then compute the imaginary part of coherency as: > cfg=[]; > cfg.method ='cohe'; > cfg.complex='imag'; > cfg.channelcbm={'all' 'all'}; > coher = ft_connectivityanalysis (cfg, fourier) > as output get: > dimord='chan_chan_freq'; > cohspctrm=[59x59x9 double]; > dof=7; > > I have two main questions: > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? > > > > > Many thanks in advanced, > Gabriel. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip --------------------------
PhD. student Gabriel González-Escamilla
Laboratory of Functional Neuroscience
Department of Physiology, Anatomy, and Cell Biology
University Pablo de Olavide
Ctra. de Utrera, Km.1
41013 - Seville
- Spain -

Email: ggonesc at upo.es
http://www.upo.es/neuroaging/es/
-------------- next part -------------- An HTML attachment was scrubbed... URL: From antony.passaro at gmail.com Tue May 21 18:13:28 2013 From: antony.passaro at gmail.com (Antony Passaro) Date: Tue, 21 May 2013 12:13:28 -0400 Subject: [FieldTrip] Subject-level Statistics on mvar connectivity measures Message-ID: Hi everyone, I have had some success processing the subject-level differences between two conditions for phase-based measures such as coherence and plv but I was wondering what the approach would be for the directed or mvar-based measures such as dtf, granger, or pdc? Since there are no trials to shuffle as you normally would for the phase-based connectivity measures, what would be the optimal statistical approach? I thought about shuffling the trials and recomputing the mvar over and over again for each condition as a simulation but this doesn't seem practical as it would be too computationally intensive. Thank you, -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From 13681530640 at 139.com Wed May 22 04:20:45 2013 From: 13681530640 at 139.com (WangJing) Date: Wed, 22 May 2013 10:20:45 +0800 (CST) Subject: [FieldTrip] question About head model References: Message-ID: <2b26519c1b85ee0-0001c.Richmail.00022806623245833658@139.com> Hi I am a freshman about field trip. I am trying to build the forward model. but my mri data is different from the data in the tutorial. So I don't know how to bulid the head model. I use the date which is from the paper "Open Database of Epileptic EEG with MRI and Postoperational Assessment of Foci—a Real World Verification for the EEG Inverse Solutions",http://eeg.pl/epi. MRI recordings containing a T1, T2 or fluid attenuated inversion recovery (FLAIR) weighted brain scans with morphologic substrate of the epilepsy (mostly cortical dysplasias, dysplastic tumors etc.). In some cases there is also a scan with the gadolinium (GAD) contrast. The images were collected by Siemens Sonata 1.5T scanner. The data is stored in the Digital Imaging and Communications in Medicine (DICOM) format. The name of the scan’s folder indicates its weighting.The scans have the following resolutions: T1: 512 × 512 pixels, pixel spacing 0.4687 mm, slice thickness 1.2 mm, T2: 256 × 256 pixels, pixel spacing 0.9375 mm,slice thickness 2.5 mm. In the tutorial,the mri data stored in only one file, while the data which I used have many files, I don't know how to process. who can help me,Thanks1 Thanks very much! Best Reagards Jing Wang -------------------------------------------------------------------------------- ----The following is the content of the forwarded email---- From:fieldtrip-request To:fieldtrip Date:2013-05-21 23:59:18 Subject:fieldtrip Digest, Vol 30, Issue 29 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: problem in connectivityanalysis (Gabriel Gonzalez Escamilla) ---------------------------------------------------------------------- Message: 1 Date: Tue, 21 May 2013 17:52:21 +0200 From: Gabriel Gonzalez Escamilla To: FieldTrip discussion list Subject: Re: [FieldTrip] problem in connectivityanalysis Message-ID: <1348f6433edc26f9.519bb455 at upo.es> Content-Type: text/plain; charset="iso-8859-1" Thank you so much for your answer J?rn, Now I got it, so, I will let the 'fourier' as input to ft_connectivityanalysis, because for some indices I will need the auto-spectrum, and if I fully undertood what you said, it will be the same, as they always take the phase information from the fourier transform. And fieltrip will automatically compute the csd if the input is the frequency data. Nevertheless, it give me some error when I tried to use the output from 'powandcsd' of freqanalysis, always gives me a matrix dimensions error, and when I use the output 'fourier' from connectivityanalysis, it computes almost all indices to ok, raging from? -1 to 1 (I'm saw that they are signed, so this is ok), the problem are the ImC ranging from -inf to inf, and the PLV values ranging from 0 to inf, but when I use the 'fourier' the values are. Which for me is really weird. I have checked internally, and even when I always use the 'fourier' as input, when it internally calculates cross-spectrum for the ImC and PLV, the data.crsspctrm is different, e.g: data.dimord = 'rpt_rpt_chan_chan_freq' ans size(data.crsspctrm) = [1 7 59 59]; So, both are apparently the same, but the data inside this matrices is different, for example, when calculating the ImC the first 7 columns for the first two rows are: val(:,:,1,1) ?[0.9323? 0.3679? 0.8629? 1.6436? 0.6404? 1.8782? 0.1139] val(:,:,1,2) ?[0.8509-0.1555i? 0.2507-0.1066i? 0.8173-0.0290i? 1.4328-0.2427i? 0.5457-0.0500i? 1.6505-0.0161i? 0.0993+0.0016i] while when calculating the PLV are: val(:,:,1,1) ?[1? 1? 1? 1? 1? 1? 1] val(:,:,1,2) ?[0.9694-0.2133i? 0.7011-0.3564i? 0.9951-0.0104i? 0.9014-0.3481i? 0.9781-0.0819i? 0.9982-0.0046i? 0.9507-0.0483i] I'm pretty sure I'm doing something wrong here, but I don't really have a clue, If I use the fourier transform to calculate the 'csd' in ft_connectivity analysis and use this csd as input to all other ft_connectivityanalysis indices all of them are set to NaN or 1, not ranging between any numbers. On the other hand, I have seen searching on the net, that fieltrip is capable of create surrogate data, by shifting the phase information on every trial for only one electrode of each pair while using the original samples of each trials on the second channel, but I couldn't find on the manual how to do such a thing. Is there any way to compute this kind of surrogates for every sensor? or was it something that some one suggest to somebody? Many thanks in advanced, Gabriel. ----- Mensaje original ----- De: "J?rn M. Horschig" Fecha: Martes, 21 de Mayo de 2013, 9:03 am Asunto: Re: [FieldTrip] problem in connectivityanalysis A: FieldTrip discussion list > Dear Gabriel, > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > No. You should think of coherence more as a measure for the consistency of the phase relation between channels across trials, so coherence is just not defined per trial,neither would it make sense to compute coherence for a single trial. > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? I see some terminology issues here. Let me try to explain in a simple (aka least-mathematical I can think of) way: > > For all these connectivity measures, we need the phase information from the Fourier transform (FFT) to compute the cross-spectral density matrix (CSD). The CSD can be regarded as the equivalent in the frequency domain to the covariance matrix in the time domain, thus it is a measures how a certain channels activity is co-modulated with another channels activity (for a particular frequency) - makes pretty much sense to make use of this when computing connectivity, right? :) > As you might know, a Fourier transform returns complex numbers, where the imaginary part of this number contains phase information. When calling ft_freqanalysis, you can decide if it shall only return the (squared) real part of the frequency spectrum (cfg.output='pow'), or instead the full CSD (cfg.output = 'powandcsd'). Alternatively, you can also let ft_freqanalysis return the raw Fourier coefficients (cfg.output='fourier'). From the Fourier coefficients, however, you can easily obtain the CSD or the power spectrum basically by multiplication the Fourier matrix with itself (transposed). All of these measures quantify the phase relation between channels across trials, and as phase information is coded in the imaginary part of the fourier output, thus for connectivityanalysis you need the CSD which can be obtained either by 'powandcsd' or by 'fourier'. > > I hope that somehow clarifies your questions. > > Best, > J?rn > > On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote: > Dear Fieltrip experts, > > I have my continuous data imported to fieldtrip with matlab, I'm looking for performing connectivity analysis between pairs of sensors, I have succed as: > data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels and 2000 samples > data.label {59x1}; > data.time {1xNepochs}; > > then, calculate only the FFT of all sensors as: > cfg=[]; > cfg.output='fourier'; > cfg.method='mtmfft'; > cfg.taper='hanning'; > cfg.foilim=[8.5 9.5]; > cfg.tapsmofrq=0; > cfg.trials='all'; > cfg.keeptrials='yes'; > cfg.channel='all'; > fourier=ft_freqanalysis(cfg, data) > as output I get: > dimord = 'rpttap_chan_freq' > freq= [1x9] > fourierspctrm=[7x59x9 double] > > Then compute the imaginary part of coherency as: > cfg=[]; > cfg.method ='cohe'; > cfg.complex='imag'; > cfg.channelcbm={'all' 'all'}; > coher = ft_connectivityanalysis (cfg, fourier) > as output get: > dimord='chan_chan_freq'; > cohspctrm=[59x59x9 double]; > dof=7; > > I have two main questions: > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? > > > > > Many thanks in advanced, > Gabriel. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip --------------------------
PhD. student Gabriel Gonz?lez-Escamilla
Laboratory of Functional Neuroscience
Department of Physiology, Anatomy, and Cell Biology
University Pablo de Olavide
Ctra. de Utrera, Km.1
41013 - Seville
- Spain -

Email: ggonesc at upo.es
http://www.upo.es/neuroaging/es/
-------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 30, Issue 29 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Wed May 22 09:30:17 2013 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Wed, 22 May 2013 09:30:17 +0200 Subject: [FieldTrip] question About head model In-Reply-To: <2b26519c1b85ee0-0001c.Richmail.00022806623245833658@139.com> References: <2b26519c1b85ee0-0001c.Richmail.00022806623245833658@139.com> Message-ID: Dear Jing, It is best to use the T1 MRI rather than the other scans. To open a DICOM format file, you can try one of these options: % read the DICOM files mri = ft_read_mri('single_file_of_DICOM_series.IMA'); % or use a graphical file selection[f, p] = uigetfile ('*'); mri = ft_read_mri(fullfile (p, f)); I copied the above from documentation on the FieldTrip wiki: http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_an_anatomical_mri_from_dicom_into_ctf_format Then you can save the 'mri' into a *.mat file for future use with FieldTrip. Best regards, Johanna 2013/5/22 WangJing <13681530640 at 139.com> > Hi > I am a freshman about field trip. > I am trying to build the forward model. but my mri data is different from > the data in the tutorial. So I don't know how to bulid the head model. I > use the date which is from the paper "Open Database of Epileptic EEG with > MRI and Postoperational Assessment of Foci—a Real World Verification for > the EEG Inverse Solutions",http://eeg.pl/epi. MRI recordings containing a > T1, T2 or fluid attenuated inversion recovery (FLAIR) weighted brain scans > with morphologic substrate of the epilepsy (mostly cortical dysplasias, > dysplastic tumors etc.). In some cases there is also a scan with the > gadolinium (GAD) contrast. The images were collected by Siemens Sonata 1.5T > scanner. The data is stored in the Digital Imaging and Communications in > Medicine (DICOM) format. The name of the scan’s folder indicates its > weighting.The scans have the following resolutions: T1: 512 × 512 pixels, > pixel spacing 0.4687 mm, slice thickness 1.2 mm, T2: 256 × 256 pixels, > pixel spacing 0.9375 mm,slice thickness 2.5 mm. > In the tutorial,the mri data stored in only one file, while the data which > I used have many files, I don't know how to process. who can help me,Thanks1 > Thanks very much! > Best Reagards > Jing Wang > > > > > > ------------------------------ > ----The following is the content of the forwarded email---- > From:fieldtrip-request > To:fieldtrip > Date:2013-05-21 23:59:18 > Subject:fieldtrip Digest, Vol 30, Issue 29 > > 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: problem in connectivityanalysis (Gabriel Gonzalez Escamilla) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 21 May 2013 17:52:21 +0200 > From: Gabriel Gonzalez Escamilla > To: FieldTrip discussion list > Subject: Re: [FieldTrip] problem in connectivityanalysis > Message-ID: <1348f6433edc26f9.519bb455 at upo.es> > Content-Type: text/plain; charset="iso-8859-1" > > Thank you so much for your answer J?rn, > > > Now I got it, so, I will let the 'fourier' as input to ft_connectivityanalysis, because for some indices I will need the auto-spectrum, and if I fully undertood what you said, it will be the same, as they always take the phase information from the fourier transform. And fieltrip will automatically compute the csd if the input is the frequency data. > > > Nevertheless, it give me some error when I tried to use the output from 'powandcsd' of freqanalysis, always gives me a matrix dimensions error, and when I use the output 'fourier' from connectivityanalysis, it computes almost all indices to ok, raging from? -1 to 1 (I'm saw that they are signed, so this is ok), the problem are the ImC ranging from -inf to inf, and the PLV values ranging from 0 to inf, but when I use the 'fourier' the values are. Which for me is really weird. > > > > I have checked internally, and even when I always use the 'fourier' as input, when it internally calculates cross-spectrum for the ImC and PLV, the data.crsspctrm is different, e.g: > data.dimord = 'rpt_rpt_chan_chan_freq' > ans size(data.crsspctrm) = [1 7 59 59]; > > So, both are apparently the same, but the data inside this matrices is different, > > > for example, when calculating the ImC the first 7 columns for the first two rows are: > val(:,:,1,1) > ?[0.9323? 0.3679? 0.8629? 1.6436? 0.6404? 1.8782? 0.1139] > val(:,:,1,2) > > ?[0.8509-0.1555i? 0.2507-0.1066i? 0.8173-0.0290i? 1.4328-0.2427i? 0.5457-0.0500i? 1.6505-0.0161i? 0.0993+0.0016i] > > while when calculating the PLV are: > val(:,:,1,1) > ?[1? 1? 1? 1? 1? 1? 1] > val(:,:,1,2) > > ?[0.9694-0.2133i? 0.7011-0.3564i? 0.9951-0.0104i? 0.9014-0.3481i? 0.9781-0.0819i? 0.9982-0.0046i? 0.9507-0.0483i] > > > > I'm pretty sure I'm doing something wrong here, but I don't really have a clue, > > > If I use the fourier transform to calculate the 'csd' in ft_connectivity analysis and use this csd as input to all other ft_connectivityanalysis indices all of them are set to NaN or 1, not ranging between any numbers. > > > > > > On the other hand, I have seen searching on the net, that fieltrip is capable of create surrogate data, by shifting the phase information on every trial for only one electrode of each pair while using the original samples of each trials on the second channel, but I couldn't find on the manual how to do such a thing. Is there any way to compute this kind of surrogates for every sensor? or was it something that some one suggest to somebody? > > > Many thanks in advanced, > Gabriel. > > > > > ----- Mensaje original ----- > De: "J?rn M. Horschig" > Fecha: Martes, 21 de Mayo de 2013, 9:03 am > Asunto: Re: [FieldTrip] problem in connectivityanalysis > A: FieldTrip discussion list > > > > > > > Dear Gabriel, > > > > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > > No. You should think of coherence more as a measure for the consistency of the phase relation between channels across trials, so coherence is just not defined per trial,neither would it make sense to compute coherence for a single trial. > > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? I see some terminology issues here. Let me try to explain in a simple (aka least-mathematical I can think of) way: > > > > > For all these connectivity measures, we need the phase information from the Fourier transform (FFT) to compute the cross-spectral density matrix (CSD). The CSD can be regarded as the equivalent in the frequency domain to the covariance matrix in the time domain, thus it is a measures how a certain channels activity is co-modulated with another channels activity (for a particular frequency) - makes pretty much sense to make use of this when computing connectivity, right? :) > > > As you might know, a Fourier transform returns complex numbers, where the imaginary part of this number contains phase information. When calling ft_freqanalysis, you can decide if it shall only return the (squared) real part of the frequency spectrum (cfg.output='pow'), or instead the full CSD (cfg.output = 'powandcsd'). Alternatively, you can also let ft_freqanalysis return the raw Fourier coefficients (cfg.output='fourier'). From the Fourier coefficients, however, you can easily obtain the CSD or the power spectrum basically by multiplication the Fourier matrix with itself (transposed). All of these measures quantify the phase relation between channels across trials, and as phase information is coded in the imaginary part of the fourier output, thus for connectivityanalysis you need the CSD which can be obtained either by 'powandcsd' or by 'fourier'. > > > > I hope that somehow clarifies your questions. > > > > Best, > > J?rn > > > > On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote: > > Dear Fieltrip experts, > > > > > I have my continuous data imported to fieldtrip with matlab, I'm looking for performing connectivity analysis between pairs of sensors, I have succed as: > > > data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels and 2000 samples > > data.label {59x1}; > > data.time {1xNepochs}; > > > > then, calculate only the FFT of all sensors as: > > cfg=[]; > > cfg.output='fourier'; > > cfg.method='mtmfft'; > > cfg.taper='hanning'; > > cfg.foilim=[8.5 9.5]; > > cfg.tapsmofrq=0; > > cfg.trials='all'; > > cfg.keeptrials='yes'; > > cfg.channel='all'; > > fourier=ft_freqanalysis(cfg, data) > > as output I get: > > dimord = 'rpttap_chan_freq' > > freq= [1x9] > > fourierspctrm=[7x59x9 double] > > > > Then compute the imaginary part of coherency as: > > cfg=[]; > > cfg.method ='cohe'; > > cfg.complex='imag'; > > cfg.channelcbm={'all' 'all'}; > > coher = ft_connectivityanalysis (cfg, fourier) > > as output get: > > dimord='chan_chan_freq'; > > cohspctrm=[59x59x9 double]; > > dof=7; > > > > I have two main questions: > > > > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > > > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? > > > > > > > > > > Many thanks in advanced, > > Gabriel. > > > > > > > > > _______________________________________________ > fieldtrip mailing list > > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: > jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: > http://www.ru.nl/donders > > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > --------------------------
PhD. student Gabriel Gonz?lez-Escamilla
Laboratory of Functional Neuroscience
Department of Physiology, Anatomy, and Cell Biology
University Pablo de Olavide
Ctra. de Utrera, Km.1
41013 - Seville
- Spain -

Email: > ggonesc at upo.es
http://www.upo.es/neuroaging/es/
> > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130521/0886ac06/attachment.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 30, Issue 29 > ***************************************** > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mushfa.yousuf at googlemail.com Wed May 22 12:13:56 2013 From: mushfa.yousuf at googlemail.com (Mushfa Yousuf) Date: Wed, 22 May 2013 12:13:56 +0200 Subject: [FieldTrip] Source Reconstruction using Openmeeg method In-Reply-To: <5190AEAA.3020301@donders.ru.nl> References: <5190AEAA.3020301@donders.ru.nl> Message-ID: Hello Jörn; I have calculated an indiviual leadfield for both EEG and MEG. The structure of EEg and MEG shows the following variable grid_meg = xgrid: [1x20 double] ygrid: [-8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8] zgrid: [-2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13] dim: [20 17 16] pos: [5440x3 double] unit: 'cm' inside: [1x3177 double] outside: [1x2263 double] cfg: [1x1 struct] leadfield: {1x5440 cell} grid_eeg = xgrid: [-6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9] ygrid: [-6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6] zgrid: [2 3 4 5 6 7 8 9 10 11] dim: [16 13 10] pos: [2080x3 double] unit: 'cm' inside: [1x1331 double] outside: [1x749 double] cfg: [1x1 struct] leadfield: {1x2080 cell} Can you please give me a rough idea that how to concatenate the variables from both structure ? Thank you Regards ; Mushfa Yousuf On Mon, May 13, 2013 at 11:13 AM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Mushfa, > > I think you have to compute two leadfield matrices, one for EEG (elec) and > one for MEG (grad), and then concatenate these (and make sure that the > order of sensors won't get mixed up anywhere, because sourceanalysis just > expects the leadfield matrix to be ordered like your data. If that's not > the case, you either encounter the previous error you described or (if the > number of channels matches, but order is mixed up) it will just return > wrong source estimated activity. > > Best, > Jörn > > > On 5/6/2013 2:47 PM, Mushfa Yousuf wrote: > > Hello; > > Yes you were right. I have defined the wrong sensors i.e 'grad' instead > of 'elec' while calculating the Leadfield. > > Actually I am trying to calculate Combined source reconstruction from > both EEG and MEG sensors. > > Do you have any idea, how to define both elec and grad definition while > calculating first forward then inverse solution. > > Because in a fieldtrip either you can defined elec or grad at one time. > > > Regards; > > > Mushfa Yousuf > > Neurozentrum, > Universitätsklinikum Schleswig-Holstein, > Campus Kiel (UKSH), Deutschland > > > On Tue, Apr 30, 2013 at 6:23 PM, Johanna Zumer wrote: > >> Hi Mushfa, >> >> My guess is that the channels that have you used to compute .csdspctrm >> are not the same as the channels in cfg.elec. If you set cfg.channel = >> freqPost.label, does that solve it? >> >> Cheers, >> Johanna >> >> >> 2013/4/30 Mushfa Yousuf >> >>> Hello Fieldtrippers, >>> >>> I am doing source reconstruction using EEG channels on a fieldtrip. >>> >>> I have computed Forward solution i.e head model using 'Openmeeg' and >>> lead field successfully. >>> >>> For the inverse solution using 'dics' method, I wrote the following >>> syntax >>> >>> >>> >>> >>> >>> cfg = []; >>> cfg.method = 'dics'; >>> cfg.frequency = 130; >>> cfg.elec = dataFIC12.hdr.elec; >>> cfg.grid = grid; >>> cfg.vol = vol; >>> >>> sourcePost = ft_sourceanalysis(cfg, freqPost); >>> >>> >>> and I have received the following error: >>> >>> >>> ??? Error using ==> mtimes >>> Inner matrix dimensions must agree. >>> >>> Error in ==> beamformer_dics at 314 >>> filt = pinv(lf' * invCf * lf) * lf' * invCf; % >>> Gross eqn. 3, use PINV/SVD to cover rank deficient >>> leadfield >>> >>> Error in ==> ft_sourceanalysis at 595 >>> dip(i) = beamformer_dics(grid, sens, vol, [], >>> squeeze(Cf(i,:,:)), optarg{:}); >>> >>> Error in ==> newCode at 214 >>> sourcePost = ft_sourceanalysis(cfg, freqPost); >>> >>> >>> >>> >>> Any help would be appreciated. >>> >>> >>> Regards; >>> >>> >>> Mushfa Yousuf >>> >>> Neurozentrum, >>> Universitätsklinikum Schleswig-Holstein, >>> Campus Kiel (UKSH), Deutschland >>> >>> >>> _______________________________________________ >>> 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 listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ggonesc at upo.es Wed May 22 19:36:08 2013 From: ggonesc at upo.es (Gabriel Gonzalez Escamilla) Date: Wed, 22 May 2013 19:36:08 +0200 Subject: [FieldTrip] connectivity problem Message-ID: <596f90904ed40d3b.519d1e28@upo.es> Dear Fieldtrip experts, I finally understood how fieltrip computes the plv, so, my last e-mail has no sense now. Given say this, I have one question: I've followed the fieltrip implementation to compute the PLV, and found that it takes the CSD, and normalizes it for the amplitude of the replicates, this is to divide the csd by the absolute of the same csd, then makes an average of the normalized csd's, to finally take the absolute of the average-normalized-csd as the PLV.  I think it can be summarized to something like, PLV = |E( csd/abs(csd) )| I do not see the similarity with the clasical formula that appears in the papers PLV=| E{exp(i*I{X})} |, where I{X} is the imaginary of the cross-spectrum, and E|.| is the expected value; I cannot find the relationship between the implementation on fieltrip of the PLV and the formula on the papers. Can anyone explain to me the relationship between the two approaches? or tell me the paper where it is explained? Many thanks in advanced, Gabriel -------------- next part -------------- An HTML attachment was scrubbed... URL: From 13681530640 at 139.com Thu May 23 03:38:08 2013 From: 13681530640 at 139.com (WangJing) Date: Thu, 23 May 2013 09:38:08 +0800 (CST) Subject: [FieldTrip] fieldtrip Digest, Vol 30, Issue 31 References: Message-ID: <2b26519d65c97b6-0000c.Richmail.00022826124215434628@139.com> Dear Johanna, Thank you for your suggestion. 1.I have two folder of T1 MRI, one is t1_vibe_tra_4,and another is t1_vibe_traGAD-5. which one is best? 2.when I convert MRI from DICOM into CTF format,the vitamin E marker didn't be found. what can I do? Best Regards, Jing Wang -------------------------------------------------------------------------------- ----The following is the content of the forwarded email---- From:fieldtrip-request To:fieldtrip Date:2013-05-22 15:33:13 Subject:fieldtrip Digest, Vol 30, Issue 31 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: question About head model (Johanna Zumer) ---------------------------------------------------------------------- Message: 1 Date: Wed, 22 May 2013 09:30:17 +0200 From: Johanna Zumer To: FieldTrip discussion list Subject: Re: [FieldTrip] question About head model Message-ID: Content-Type: text/plain; charset="utf-8" Dear Jing, It is best to use the T1 MRI rather than the other scans. To open a DICOM format file, you can try one of these options: % read the DICOM files mri = ft_read_mri('single_file_of_DICOM_series.IMA'); % or use a graphical file selection[f, p] = uigetfile ('*'); mri = ft_read_mri(fullfile (p, f)); I copied the above from documentation on the FieldTrip wiki: http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_an_anatomical_mri_from_dicom_into_ctf_format Then you can save the 'mri' into a *.mat file for future use with FieldTrip. Best regards, Johanna 2013/5/22 WangJing <13681530640 at 139.com> > Hi > I am a freshman about field trip. > I am trying to build the forward model. but my mri data is different from > the data in the tutorial. So I don't know how to bulid the head model. I > use the date which is from the paper "Open Database of Epileptic EEG with > MRI and Postoperational Assessment of Foci?a Real World Verification for > the EEG Inverse Solutions",http://eeg.pl/epi. MRI recordings containing a > T1, T2 or fluid attenuated inversion recovery (FLAIR) weighted brain scans > with morphologic substrate of the epilepsy (mostly cortical dysplasias, > dysplastic tumors etc.). In some cases there is also a scan with the > gadolinium (GAD) contrast. The images were collected by Siemens Sonata 1.5T > scanner. The data is stored in the Digital Imaging and Communications in > Medicine (DICOM) format. The name of the scan?s folder indicates its > weighting.The scans have the following resolutions: T1: 512 ? 512 pixels, > pixel spacing 0.4687 mm, slice thickness 1.2 mm, T2: 256 ? 256 pixels, > pixel spacing 0.9375 mm,slice thickness 2.5 mm. > In the tutorial,the mri data stored in only one file, while the data which > I used have many files, I don't know how to process. who can help me,Thanks1 > Thanks very much! > Best Reagards > Jing Wang > > > > > > ------------------------------ > ----The following is the content of the forwarded email---- > From?fieldtrip-request > To?fieldtrip > Date?2013-05-21 23:59:18 > Subject?fieldtrip Digest, Vol 30, Issue 29 > > 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: problem in connectivityanalysis (Gabriel Gonzalez Escamilla) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 21 May 2013 17:52:21 +0200 > From: Gabriel Gonzalez Escamilla > To: FieldTrip discussion list > Subject: Re: [FieldTrip] problem in connectivityanalysis > Message-ID: <1348f6433edc26f9.519bb455 at upo.es> > Content-Type: text/plain; charset="iso-8859-1" > > Thank you so much for your answer J?rn, > > > Now I got it, so, I will let the 'fourier' as input to ft_connectivityanalysis, because for some indices I will need the auto-spectrum, and if I fully undertood what you said, it will be the same, as they always take the phase information from the fourier transform. And fieltrip will automatically compute the csd if the input is the frequency data. > > > Nevertheless, it give me some error when I tried to use the output from 'powandcsd' of freqanalysis, always gives me a matrix dimensions error, and when I use the output 'fourier' from connectivityanalysis, it computes almost all indices to ok, raging from? -1 to 1 (I'm saw that they are signed, so this is ok), the problem are the ImC ranging from -inf to inf, and the PLV values ranging from 0 to inf, but when I use the 'fourier' the values are. Which for me is really weird. > > > > I have checked internally, and even when I always use the 'fourier' as input, when it internally calculates cross-spectrum for the ImC and PLV, the data.crsspctrm is different, e.g: > data.dimord = 'rpt_rpt_chan_chan_freq' > ans size(data.crsspctrm) = [1 7 59 59]; > > So, both are apparently the same, but the data inside this matrices is different, > > > for example, when calculating the ImC the first 7 columns for the first two rows are: > val(:,:,1,1) > ?[0.9323? 0.3679? 0.8629? 1.6436? 0.6404? 1.8782? 0.1139] > val(:,:,1,2) > > ?[0.8509-0.1555i? 0.2507-0.1066i? 0.8173-0.0290i? 1.4328-0.2427i? 0.5457-0.0500i? 1.6505-0.0161i? 0.0993+0.0016i] > > while when calculating the PLV are: > val(:,:,1,1) > ?[1? 1? 1? 1? 1? 1? 1] > val(:,:,1,2) > > ?[0.9694-0.2133i? 0.7011-0.3564i? 0.9951-0.0104i? 0.9014-0.3481i? 0.9781-0.0819i? 0.9982-0.0046i? 0.9507-0.0483i] > > > > I'm pretty sure I'm doing something wrong here, but I don't really have a clue, > > > If I use the fourier transform to calculate the 'csd' in ft_connectivity analysis and use this csd as input to all other ft_connectivityanalysis indices all of them are set to NaN or 1, not ranging between any numbers. > > > > > > On the other hand, I have seen searching on the net, that fieltrip is capable of create surrogate data, by shifting the phase information on every trial for only one electrode of each pair while using the original samples of each trials on the second channel, but I couldn't find on the manual how to do such a thing. Is there any way to compute this kind of surrogates for every sensor? or was it something that some one suggest to somebody? > > > Many thanks in advanced, > Gabriel. > > > > > ----- Mensaje original ----- > De: "J?rn M. Horschig" > Fecha: Martes, 21 de Mayo de 2013, 9:03 am > Asunto: Re: [FieldTrip] problem in connectivityanalysis > A: FieldTrip discussion list > > > > > > > Dear Gabriel, > > > > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > > No. You should think of coherence more as a measure for the consistency of the phase relation between channels across trials, so coherence is just not defined per trial,neither would it make sense to compute coherence for a single trial. > > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? I see some terminology issues here. Let me try to explain in a simple (aka least-mathematical I can think of) way: > > > > > For all these connectivity measures, we need the phase information from the Fourier transform (FFT) to compute the cross-spectral density matrix (CSD). The CSD can be regarded as the equivalent in the frequency domain to the covariance matrix in the time domain, thus it is a measures how a certain channels activity is co-modulated with another channels activity (for a particular frequency) - makes pretty much sense to make use of this when computing connectivity, right? :) > > > As you might know, a Fourier transform returns complex numbers, where the imaginary part of this number contains phase information. When calling ft_freqanalysis, you can decide if it shall only return the (squared) real part of the frequency spectrum (cfg.output='pow'), or instead the full CSD (cfg.output = 'powandcsd'). Alternatively, you can also let ft_freqanalysis return the raw Fourier coefficients (cfg.output='fourier'). From the Fourier coefficients, however, you can easily obtain the CSD or the power spectrum basically by multiplication the Fourier matrix with itself (transposed). All of these measures quantify the phase relation between channels across trials, and as phase information is coded in the imaginary part of the fourier output, thus for connectivityanalysis you need the CSD which can be obtained either by 'powandcsd' or by 'fourier'. > > > > I hope that somehow clarifies your questions. > > > > Best, > > J?rn > > > > On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote: > > Dear Fieltrip experts, > > > > > I have my continuous data imported to fieldtrip with matlab, I'm looking for performing connectivity analysis between pairs of sensors, I have succed as: > > > data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels and 2000 samples > > data.label {59x1}; > > data.time {1xNepochs}; > > > > then, calculate only the FFT of all sensors as: > > cfg=[]; > > cfg.output='fourier'; > > cfg.method='mtmfft'; > > cfg.taper='hanning'; > > cfg.foilim=[8.5 9.5]; > > cfg.tapsmofrq=0; > > cfg.trials='all'; > > cfg.keeptrials='yes'; > > cfg.channel='all'; > > fourier=ft_freqanalysis(cfg, data) > > as output I get: > > dimord = 'rpttap_chan_freq' > > freq= [1x9] > > fourierspctrm=[7x59x9 double] > > > > Then compute the imaginary part of coherency as: > > cfg=[]; > > cfg.method ='cohe'; > > cfg.complex='imag'; > > cfg.channelcbm={'all' 'all'}; > > coher = ft_connectivityanalysis (cfg, fourier) > > as output get: > > dimord='chan_chan_freq'; > > cohspctrm=[59x59x9 double]; > > dof=7; > > > > I have two main questions: > > > > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > > > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? > > > > > > > > > > Many thanks in advanced, > > Gabriel. > > > > > > > > > _______________________________________________ > fieldtrip mailing list > > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: > jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: > http://www.ru.nl/donders > > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > --------------------------
PhD. student Gabriel Gonz?lez-Escamilla
Laboratory of Functional Neuroscience
Department of Physiology, Anatomy, and Cell Biology
University Pablo de Olavide
Ctra. de Utrera, Km.1
41013 - Seville
- Spain -

Email: > ggonesc at upo.es
http://www.upo.es/neuroaging/es/
> > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130521/0886ac06/attachment.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 30, Issue 29 > ***************************************** > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 30, Issue 31 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu May 23 10:09:17 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 23 May 2013 10:09:17 +0200 Subject: [FieldTrip] connectivity problem In-Reply-To: <596f90904ed40d3b.519d1e28@upo.es> References: <596f90904ed40d3b.519d1e28@upo.es> Message-ID: Dear Gabriel, If I am not mistaken, the classical formula in Lachaux et al. (1999) Human Brain Mapping is PLV = 1/N * | sum(exp(i * theta(t,n))) | . This is almost the same as the formula you mention, except, importantly, that theta is the phase difference between two signals, so the angle of the CSD, and *not* the imaginary part. Note furthermore that 1 * exp(i*angle(z)) is equal to z/abs(z) for any complex z, and you see that the implementation computes the classical formula. Hope this helps, Best, Eelke On 22 May 2013 19:36, Gabriel Gonzalez Escamilla wrote: > Dear Fieldtrip experts, > > I finally understood how fieltrip computes the plv, so, my last e-mail has > no sense now. Given say this, I have one question: > > I've followed the fieltrip implementation to compute the PLV, and found that > it takes the CSD, and normalizes it for the amplitude of the replicates, > this is to divide the csd by the absolute of the same csd, then makes an > average of the normalized csd's, to finally take the absolute of the > average-normalized-csd as the PLV. I think it can be summarized to > something like, PLV = |E( csd/abs(csd) )| > > I do not see the similarity with the clasical formula that appears in the > papers PLV=| E{exp(i*I{X})} |, where I{X} is the imaginary of the > cross-spectrum, and E|.| is the expected value; I cannot find the > relationship between the implementation on fieltrip of the PLV and the > formula on the papers. > > Can anyone explain to me the relationship between the two approaches? or > tell me the paper where it is explained? > > Many thanks in advanced, > Gabriel > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jeremiemattout at yahoo.fr Thu May 23 10:19:09 2013 From: jeremiemattout at yahoo.fr (Jeremie MATTOUT) Date: Thu, 23 May 2013 09:19:09 +0100 (BST) Subject: [FieldTrip] DCM for fMRI and EEG/MEG course - Seattle June 2013 Message-ID: <1369297149.1995.YahooMailNeo@web133005.mail.ir2.yahoo.com> Dear Colleagues, We are pleased to announce DCM for fMRI and MEG/EEG, an intermediate-level, 3-day workshop designed for investigators having familiarity with the fundamental principles of fMRI or MEG/EEG data acquisition and analysis.. It will be held at the University of Washington in Seattle, WA from JUN 21-23, 2013, immediately following the OHBM 2013 meeting. This course will bring together investigators interested in using quantitative biophysical models to identify brain connectivity and dynamics using the tools of imaging neuroscience, including fMRI, EEG/MEG, and LFP. Presentations will include: overviews of brain connectivity methods and models descriptions of specifics of DCM for fMRI, EEG/MEG and LFP data explanations of Bayesian analysis at both single-subject and group levels explorations of DCM experimental design and other advanced issues Each afternoon will include a laboratory session, in which participants will gather in small groups to work with the faculty through the stages of analyzing data from example experiments. Further details can be found at: http://www.neurometrika.org/DCM2013 Kind Regards, Tom Zeffiro, Jean Daunizeau & Jeremie Mattout -------------- next part -------------- An HTML attachment was scrubbed... URL: From marianapbranco1 at gmail.com Thu May 23 10:25:45 2013 From: marianapbranco1 at gmail.com (Mariana Branco) Date: Thu, 23 May 2013 10:25:45 +0200 Subject: [FieldTrip] Online preprocessing Message-ID: <1FDFE75C-E4A5-4F6D-B860-76647C558465@gmail.com> Hello, I am new in the BCI research field, and I am starting to implement an online BCI system using the Fieldtrip toolbox to detect ERD/ERS features. I already did two offline experiments using this toolbox, but now I am having some doubts about how to adapt the offline signal processing functions into real-time; I started by simulating real-time data from a file. My questions are: 1) To process the data real-time using ft_preprocessing is it first necessary to define trials (with ft_definetrial)? If so, how can I define the trial if it is real-time? 2) Is it possible to still use the function ft_preprocessing and ft_resampledata in real-time with the same specifications of offline procedure? 3) When simulating data stream (with two matlab sessions) the function ft_realtime_powerestimate(cfg) reports an error related to the "arg 3 (overlap)" on the welch's method. How can I correct this? 4) Also, for synchronous/triggered data analysis it is available the function ft_realtime_average. Is it possible to explain how can this example function be used for implementation of my own feature processing and extraction function. Does it preprocess the data in an alternative way to ft_preprocessing? I am sorry for all the questions. Regards, Mariana Branco From jm.horschig at donders.ru.nl Thu May 23 11:37:59 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 23 May 2013 11:37:59 +0200 Subject: [FieldTrip] Online preprocessing In-Reply-To: <1FDFE75C-E4A5-4F6D-B860-76647C558465@gmail.com> References: <1FDFE75C-E4A5-4F6D-B860-76647C558465@gmail.com> Message-ID: <519DE377.1020805@donders.ru.nl> Hi Mariana, On 5/23/2013 10:25 AM, Mariana Branco wrote: > Hello, > > I am new in the BCI research field, and I am starting to implement an online BCI system using the Fieldtrip toolbox to detect ERD/ERS features. I already did two offline experiments using this toolbox, but now I am having some doubts about how to adapt the offline signal processing functions into real-time; I started by simulating real-time data from a file. > My questions are: > 1) To process the data real-time using ft_preprocessing is it first necessary to define trials (with ft_definetrial)? If so, how can I define the trial if it is real-time? no, you should use ft_read_data directly. The way to go is to check the header of your buffer for new events using ft_read_event. Upon detection of a relevant trigger, you need to use the returned event sample to compute your beginning and endsample manually (this is what ft_definetrial, or more precisely, your trialfun, usually does). Then you can use ft_read_data to read data from the buffer into memory. ft_read_data returns a datamatrix that can be used to create your data.trial field. Also, you need to manually create the rest of the data-structure. > 2) Is it possible to still use the function ft_preprocessing and ft_resampledata in real-time with the same specifications of offline procedure? It is definitely possible, once you converted the matrix to a regular fieldtrip structure. However, since it is about speed in online processing, you can think about using low-level functions of FieldTrip directly. Note that for resampling, you can also set up the shared memory (eg. acq2ftx) such that is downsamples right from the start. > 3) When simulating data stream (with two matlab sessions) the function ft_realtime_powerestimate(cfg) reports an error related to the "arg 3 (overlap)" on the welch's method. How can I correct this? Do not use Welch's method, use another function. I don't know about this particular example function, but I think you would greatly benefit from finding out where the error is yourself. Note that online streaming od data *is* complicated and requires *you* to have knowledge about this. > 4) Also, for synchronous/triggered data analysis it is available the function ft_realtime_average. Is it possible to explain how can this example function be used for implementation of my own feature processing and extraction function. Does it preprocess the data in an alternative way to ft_preprocessing? It should be an example, yes. Usually, there should be, as explained above, some ft_read_event statement to read the trigger value(s). In that particular example, the trialfun is used rather than ft_read_data directly, but trialfun is basically a wrapper around ft_read_data. Also, in that example a bunch of trials is read in, not just one. The thing you need to do to adjust this is to filter out the event structure such that only in case of the trigger of interest some data processing is done (you can use ft_filter_event for this). My best advise for you is to read all (most) example functions and adjust them so that they run in your lab. Then sketch a flow diagram how triggers/data will be sent and read, try to implement this yourself (by copy&pasting relevant parts out of the example functions). If you have specific questions, feel free to always ask, but as this stage (please excuse my bluntnessI think you do not really know what needs to be done. I could write a lot about this, but I think you will benefit more if you first try yourself (especially because I do not know how your lab is set up and how things needs to be adjusted). But, as just said, feel free to write again when you have other questions. Good luck! Best, Jörn > > I am sorry for all the questions. No problem, no way to know everything :) > Regards, > > Mariana Branco > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From marianapbranco1 at gmail.com Thu May 23 11:57:27 2013 From: marianapbranco1 at gmail.com (Mariana Branco) Date: Thu, 23 May 2013 11:57:27 +0200 Subject: [FieldTrip] Online preprocessing In-Reply-To: <519DE377.1020805@donders.ru.nl> References: <1FDFE75C-E4A5-4F6D-B860-76647C558465@gmail.com> <519DE377.1020805@donders.ru.nl> Message-ID: Hi Jörn, Thank you very much for answering. I definitely still have a lot to understand about online implementation, which I will do. Another specific doubt came up when I was trying to understand the function ft_preprocessing. My offline data is composed of 40 trials of approx. 9-10s paradigms. I have a cued motor task at 3s (lasting 5s) and I use 0s until 3s as baseline to each trial. In the examples used in fieldtrip it is possible to chose the 'demean' option and specify the baseline period in seconds. My question is how exactly does the ft_preprocessing function corrects the baseline? Also, the examples define the baseline window with negative time, but I defined the baselinewindow=[0 3]. Is it wrong? Thank you again for all the advices, I will definitely pose more question in the future. Mariana Branco On 23 May 2013, at 11:37, "Jörn M. Horschig" wrote: > Hi Mariana, > > On 5/23/2013 10:25 AM, Mariana Branco wrote: >> Hello, >> >> I am new in the BCI research field, and I am starting to implement an online BCI system using the Fieldtrip toolbox to detect ERD/ERS features. I already did two offline experiments using this toolbox, but now I am having some doubts about how to adapt the offline signal processing functions into real-time; I started by simulating real-time data from a file. >> My questions are: >> 1) To process the data real-time using ft_preprocessing is it first necessary to define trials (with ft_definetrial)? If so, how can I define the trial if it is real-time? > > no, you should use ft_read_data directly. The way to go is to check the header of your buffer for new events using ft_read_event. Upon detection of a relevant trigger, you need to use the returned event sample to compute your beginning and endsample manually (this is what ft_definetrial, or more precisely, your trialfun, usually does). Then you can use ft_read_data to read data from the buffer into memory. ft_read_data returns a datamatrix that can be used to create your data.trial field. Also, you need to manually create the rest of the data-structure. >> 2) Is it possible to still use the function ft_preprocessing and ft_resampledata in real-time with the same specifications of offline procedure? > It is definitely possible, once you converted the matrix to a regular fieldtrip structure. However, since it is about speed in online processing, you can think about using low-level functions of FieldTrip directly. Note that for resampling, you can also set up the shared memory (eg. acq2ftx) such that is downsamples right from the start. > >> 3) When simulating data stream (with two matlab sessions) the function ft_realtime_powerestimate(cfg) reports an error related to the "arg 3 (overlap)" on the welch's method. How can I correct this? > Do not use Welch's method, use another function. I don't know about this particular example function, but I think you would greatly benefit from finding out where the error is yourself. Note that online streaming od data *is* complicated and requires *you* to have knowledge about this. >> 4) Also, for synchronous/triggered data analysis it is available the function ft_realtime_average. Is it possible to explain how can this example function be used for implementation of my own feature processing and extraction function. Does it preprocess the data in an alternative way to ft_preprocessing? > It should be an example, yes. Usually, there should be, as explained above, some ft_read_event statement to read the trigger value(s). In that particular example, the trialfun is used rather than ft_read_data directly, but trialfun is basically a wrapper around ft_read_data. Also, in that example a bunch of trials is read in, not just one. The thing you need to do to adjust this is to filter out the event structure such that only in case of the trigger of interest some data processing is done (you can use ft_filter_event for this). > > My best advise for you is to read all (most) example functions and adjust them so that they run in your lab. Then sketch a flow diagram how triggers/data will be sent and read, try to implement this yourself (by copy&pasting relevant parts out of the example functions). If you have specific questions, feel free to always ask, but as this stage (please excuse my bluntnessI think you do not really know what needs to be done. I could write a lot about this, but I think you will benefit more if you first try yourself (especially because I do not know how your lab is set up and how things needs to be adjusted). But, as just said, feel free to write again when you have other questions. > > Good luck! > Best, > Jörn > >> >> I am sorry for all the questions. > > No problem, no way to know everything :) > >> Regards, >> >> Mariana Branco >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Thu May 23 12:08:33 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 23 May 2013 12:08:33 +0200 Subject: [FieldTrip] Online preprocessing In-Reply-To: References: <1FDFE75C-E4A5-4F6D-B860-76647C558465@gmail.com> <519DE377.1020805@donders.ru.nl> Message-ID: <519DEAA1.5030402@donders.ru.nl> Hi Mariana, ft_preprocessing demeans by the whole time window, in your 0s to 5s. The baseline window you specify depends on the time axis itself, if it goes from 0s to 5s, then defining [0 3] is fine. If it goes from -3 to 2s, then you need to define [-3 0]. Time is relative :) Also, please check ft_timelockbaseline. But such a simple thing as subtracting a number from a matrix can also easily be done without relying on a fieldtrip function :) Best, Jörn On 5/23/2013 11:57 AM, Mariana Branco wrote: > Hi Jörn, > > Thank you very much for answering. I definitely still have a lot to understand about online implementation, which I will do. > > Another specific doubt came up when I was trying to understand the function ft_preprocessing. My offline data is composed of 40 trials of approx. 9-10s paradigms. I have a cued motor task at 3s (lasting 5s) and I use 0s until 3s as baseline to each trial. > In the examples used in fieldtrip it is possible to chose the 'demean' option and specify the baseline period in seconds. My question is how exactly does the ft_preprocessing function corrects the baseline? Also, the examples define the baseline window with negative time, but I defined the baselinewindow=[0 3]. Is it wrong? > > Thank you again for all the advices, I will definitely pose more question in the future. > > Mariana Branco > > On 23 May 2013, at 11:37, "Jörn M. Horschig" wrote: > >> Hi Mariana, >> >> On 5/23/2013 10:25 AM, Mariana Branco wrote: >>> Hello, >>> >>> I am new in the BCI research field, and I am starting to implement an online BCI system using the Fieldtrip toolbox to detect ERD/ERS features. I already did two offline experiments using this toolbox, but now I am having some doubts about how to adapt the offline signal processing functions into real-time; I started by simulating real-time data from a file. >>> My questions are: >>> 1) To process the data real-time using ft_preprocessing is it first necessary to define trials (with ft_definetrial)? If so, how can I define the trial if it is real-time? >> no, you should use ft_read_data directly. The way to go is to check the header of your buffer for new events using ft_read_event. Upon detection of a relevant trigger, you need to use the returned event sample to compute your beginning and endsample manually (this is what ft_definetrial, or more precisely, your trialfun, usually does). Then you can use ft_read_data to read data from the buffer into memory. ft_read_data returns a datamatrix that can be used to create your data.trial field. Also, you need to manually create the rest of the data-structure. >>> 2) Is it possible to still use the function ft_preprocessing and ft_resampledata in real-time with the same specifications of offline procedure? >> It is definitely possible, once you converted the matrix to a regular fieldtrip structure. However, since it is about speed in online processing, you can think about using low-level functions of FieldTrip directly. Note that for resampling, you can also set up the shared memory (eg. acq2ftx) such that is downsamples right from the start. >> >>> 3) When simulating data stream (with two matlab sessions) the function ft_realtime_powerestimate(cfg) reports an error related to the "arg 3 (overlap)" on the welch's method. How can I correct this? >> Do not use Welch's method, use another function. I don't know about this particular example function, but I think you would greatly benefit from finding out where the error is yourself. Note that online streaming od data *is* complicated and requires *you* to have knowledge about this. >>> 4) Also, for synchronous/triggered data analysis it is available the function ft_realtime_average. Is it possible to explain how can this example function be used for implementation of my own feature processing and extraction function. Does it preprocess the data in an alternative way to ft_preprocessing? >> It should be an example, yes. Usually, there should be, as explained above, some ft_read_event statement to read the trigger value(s). In that particular example, the trialfun is used rather than ft_read_data directly, but trialfun is basically a wrapper around ft_read_data. Also, in that example a bunch of trials is read in, not just one. The thing you need to do to adjust this is to filter out the event structure such that only in case of the trigger of interest some data processing is done (you can use ft_filter_event for this). >> >> My best advise for you is to read all (most) example functions and adjust them so that they run in your lab. Then sketch a flow diagram how triggers/data will be sent and read, try to implement this yourself (by copy&pasting relevant parts out of the example functions). If you have specific questions, feel free to always ask, but as this stage (please excuse my bluntnessI think you do not really know what needs to be done. I could write a lot about this, but I think you will benefit more if you first try yourself (especially because I do not know how your lab is set up and how things needs to be adjusted). But, as just said, feel free to write again when you have other questions. >> >> Good luck! >> Best, >> Jörn >> >>> I am sorry for all the questions. >> No problem, no way to know everything :) >> >>> Regards, >>> >>> Mariana Branco >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> 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 -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From andmib at gmail.com Thu May 23 16:29:07 2013 From: andmib at gmail.com (Andrew Brooks) Date: Thu, 23 May 2013 10:29:07 -0400 Subject: [FieldTrip] Format for ft_volumewrite? Message-ID: Hello all, I am new to FieldTrip, so this is a very basic question I was hoping someone might know an answer to. I am using ft_read_data to read the first EPI volume after dummy scans are thrown out. I want to write this volume to a .nii file to my disk. For some reason, I am unable to figure out the correct structure that ft_volumewrite wants. Using the output from ft_read_data ('dat') does not seem to work. Does anybody have any suggestions? [ For a longer explanation of exactly what I am aiming to do, in case you have any suggestions: I have ROI that is defined in Talairach space. This is the ROI I would like to pull my real-time data from for each subject in my study. To do this, I plan to register a talairach template brain to individual subject-space, and then apply that transformation to my ROI so that it is in subject space. I was going to simply write out the subject's EPI to an .nii file, and then run SPM's co-registration step which allows for a 'child dataset' to be set (my ROI), with the source file being the template, and the reference being the individual ROI]. Thanks Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: From ggonesc at upo.es Thu May 23 16:46:53 2013 From: ggonesc at upo.es (Gabriel Gonzalez Escamilla) Date: Thu, 23 May 2013 16:46:53 +0200 Subject: [FieldTrip] connectivity problem Message-ID: An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Fri May 24 10:21:24 2013 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Fri, 24 May 2013 10:21:24 +0200 Subject: [FieldTrip] Format for ft_volumewrite? In-Reply-To: References: Message-ID: Dear Andrew, To read EPI (MRI) data, you should use ft_read_mri instead. Then hopefully the format will match what ft_volumewrite wants. Cheers, Johanna 2013/5/23 Andrew Brooks > Hello all, > > I am new to FieldTrip, so this is a very basic question I was hoping > someone might know an answer to. > > I am using ft_read_data to read the first EPI volume after dummy scans are > thrown out. I want to write this volume to a .nii file to my disk. For some > reason, I am unable to figure out the correct structure that ft_volumewrite > wants. Using the output from ft_read_data ('dat') does not seem to work. > Does anybody have any suggestions? > > [ For a longer explanation of exactly what I am aiming to do, in case you > have any suggestions: I have ROI that is defined in Talairach space. This > is the ROI I would like to pull my real-time data from for each subject in > my study. To do this, I plan to register a talairach template brain to > individual subject-space, and then apply that transformation to my ROI so > that it is in subject space. I was going to simply write out the subject's > EPI to an .nii file, and then run SPM's co-registration step which allows > for a 'child dataset' to be set (my ROI), with the source file being the > template, and the reference being the individual ROI]. > > Thanks > Andrew > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andmib at gmail.com Fri May 24 15:15:09 2013 From: andmib at gmail.com (Andrew Brooks) Date: Fri, 24 May 2013 09:15:09 -0400 Subject: [FieldTrip] Format for ft_volumewrite? In-Reply-To: References: Message-ID: Thanks Johanna. Ft_read_mri only pulls from a file, correct? I'm trying to pull a single volume from the buffer using ft_read_data, and then write it out to a nifti file using ft_volumewrite, but ft_read_data does not output the volume in a structure that ft_volumewrite wants. On Fri, May 24, 2013 at 4:21 AM, Johanna Zumer wrote: > Dear Andrew, > > To read EPI (MRI) data, you should use ft_read_mri instead. Then > hopefully the format will match what ft_volumewrite wants. > > Cheers, > Johanna > > > 2013/5/23 Andrew Brooks > >> Hello all, >> >> I am new to FieldTrip, so this is a very basic question I was hoping >> someone might know an answer to. >> >> I am using ft_read_data to read the first EPI volume after dummy scans >> are thrown out. I want to write this volume to a .nii file to my disk. For >> some reason, I am unable to figure out the correct structure that >> ft_volumewrite wants. Using the output from ft_read_data ('dat') does not >> seem to work. Does anybody have any suggestions? >> >> [ For a longer explanation of exactly what I am aiming to do, in case you >> have any suggestions: I have ROI that is defined in Talairach space. This >> is the ROI I would like to pull my real-time data from for each subject in >> my study. To do this, I plan to register a talairach template brain to >> individual subject-space, and then apply that transformation to my ROI so >> that it is in subject space. I was going to simply write out the subject's >> EPI to an .nii file, and then run SPM's co-registration step which allows >> for a 'child dataset' to be set (my ROI), with the source file being the >> template, and the reference being the individual ROI]. >> >> Thanks >> Andrew >> >> _______________________________________________ >> 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: From johanna.zumer at gmail.com Fri May 24 16:29:00 2013 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Fri, 24 May 2013 16:29:00 +0200 Subject: [FieldTrip] Format for ft_volumewrite? In-Reply-To: References: Message-ID: I'm not familiar with the buffer, but if you can read in your data successfully, then to convert it to the structure that ft_volumewrite wants, you can get some information inside ft_datatype_volume for what are required or optional fields. 2013/5/24 Andrew Brooks > Thanks Johanna. Ft_read_mri only pulls from a file, correct? I'm trying to > pull a single volume from the buffer using ft_read_data, and then write it > out to a nifti file using ft_volumewrite, but ft_read_data does not output > the volume in a structure that ft_volumewrite wants. > > > On Fri, May 24, 2013 at 4:21 AM, Johanna Zumer < > johanna.zumer at donders.ru.nl> wrote: > >> Dear Andrew, >> >> To read EPI (MRI) data, you should use ft_read_mri instead. Then >> hopefully the format will match what ft_volumewrite wants. >> >> Cheers, >> Johanna >> >> >> 2013/5/23 Andrew Brooks >> >>> Hello all, >>> >>> I am new to FieldTrip, so this is a very basic question I was hoping >>> someone might know an answer to. >>> >>> I am using ft_read_data to read the first EPI volume after dummy scans >>> are thrown out. I want to write this volume to a .nii file to my disk. For >>> some reason, I am unable to figure out the correct structure that >>> ft_volumewrite wants. Using the output from ft_read_data ('dat') does not >>> seem to work. Does anybody have any suggestions? >>> >>> [ For a longer explanation of exactly what I am aiming to do, in case >>> you have any suggestions: I have ROI that is defined in Talairach space. >>> This is the ROI I would like to pull my real-time data from for each >>> subject in my study. To do this, I plan to register a talairach template >>> brain to individual subject-space, and then apply that transformation to my >>> ROI so that it is in subject space. I was going to simply write out the >>> subject's EPI to an .nii file, and then run SPM's co-registration step >>> which allows for a 'child dataset' to be set (my ROI), with the source file >>> being the template, and the reference being the individual ROI]. >>> >>> Thanks >>> Andrew >>> >>> _______________________________________________ >>> 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: From politzerahless at gmail.com Sat May 25 15:11:18 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 25 May 2013 08:11:18 -0500 Subject: [FieldTrip] Sourcespace and volume conductor misaligned Message-ID: Hello all, I am going through the workflow at http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate. After making the volume conduction model using ft_prepare_headmodel(), I noticed that although the volume conduction model and sourcespace have the same orientation and overall size/shape (after I converted the volume conduction model to cm, which wasn't in the tutorial but my original model came out in mm), they don't quite line up, as you can see in this figure: http://i.imgur.com/mGEtLOa.png I did interactively re-align the data to CTF (twice--in step 2 of "Preprocessing of the anatomical MRI" and in step 4 of "Source model") using fiducials, and to Talairach (step 5 of "Preprocessing of the anatomical data"), so I'm not sure how it ended up this way. The code I've used at each step is basically the same as that in the tutorial. Is there any way to line up my volume conduction model and sourcespace now, without going back and re-running most of the workflow? Best, Steve -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://people.ku.edu/~sjpa/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Sat May 25 20:54:59 2013 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Sat, 25 May 2013 20:54:59 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 30, Issue 31 In-Reply-To: <2b26519d65c97b6-0000c.Richmail.00022826124215434628@139.com> References: <2b26519d65c97b6-0000c.Richmail.00022826124215434628@139.com> Message-ID: Dear Jing, 1. Every MRI scanner is different, so I'm not familiar with that naming scheme, but it seems the 'GAD' at the end of the file name indicates that was with the Gadolinium contrast agent, so I would suggest to not use that, but instead use the first (plain) T1. 2. I'm not sure what to suggest. I assume you can see the vitamin E marker clearly when viewing the DICOM file? Is the issue that some slices are missing in the conversion, or that the contrast on the image is not the same? or right/left flipped? Best, Johanna 2013/5/23 WangJing <13681530640 at 139.com> > Dear Johanna, > > Thank you for your suggestion. > 1.I have two folder of T1 MRI, one is t1_vibe_tra_4,and another is > t1_vibe_traGAD-5. which one is best? > 2.when I convert MRI from DICOM into CTF format,the vitamin E marker > didn't be found. what can I do? > > Best Regards, > Jing Wang > > > > > ------------------------------ > ----The following is the content of the forwarded email---- > From:fieldtrip-request > To:fieldtrip > Date:2013-05-22 15:33:13 > Subject:fieldtrip Digest, Vol 30, Issue 31 > > 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: question About head model (Johanna Zumer) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 22 May 2013 09:30:17 +0200 > From: Johanna Zumer > To: FieldTrip discussion list > Subject: Re: [FieldTrip] question About head model > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Dear Jing, > > It is best to use the T1 MRI rather than the other scans. To open a DICOM > format file, you can try one of these options: > > % read the DICOM files > mri = ft_read_mri('single_file_of_DICOM_series.IMA'); > % or use a graphical file selection[f, p] = uigetfile > >('*'); > mri = ft_read_mri(fullfile > >(p, > f)); > > > I copied the above from documentation on the FieldTrip wiki: > > http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_an_anatomical_mri_from_dicom_into_ctf_format > > > Then you can save the 'mri' into a *.mat file for future use with FieldTrip. > > Best regards, > Johanna > > > 2013/5/22 WangJing <13681530640 at 139.com> > > > Hi > > I am a freshman about field trip. > > I am trying to build the forward model. but my mri data is different from > > the data in the tutorial. So I don't know how to bulid the head model. I > > use the date which is from the paper "Open Database of Epileptic EEG with > > MRI and Postoperational Assessment of Foci?a Real World Verification for > > the EEG Inverse Solutions",http://eeg.pl/epi > . MRI recordings containing a > > > T1, T2 or fluid attenuated inversion recovery (FLAIR) weighted brain scans > > with morphologic substrate of the epilepsy (mostly cortical dysplasias, > > dysplastic tumors etc.). In some cases there is also a scan with the > > > gadolinium (GAD) contrast. The images were collected by Siemens Sonata 1.5T > > scanner. The data is stored in the Digital Imaging and Communications in > > Medicine (DICOM) format. The name of the scan?s folder indicates its > > weighting.The scans have the following resolutions: T1: 512 ? 512 pixels, > > pixel spacing 0.4687 mm, slice thickness 1.2 mm, T2: 256 ? 256 pixels, > > pixel spacing 0.9375 mm,slice thickness 2.5 mm. > > > In the tutorial,the mri data stored in only one file, while the data which > > > I used have many files, I don't know how to process. who can help me,Thanks1 > > Thanks very much! > > Best Reagards > > Jing Wang > > > > > > > > > > > > ------------------------------ > > ----The following is the content of the forwarded email---- > > From?fieldtrip-request > > To?fieldtrip > > Date?2013-05-21 23:59:18 > > Subject?fieldtrip Digest, Vol 30, Issue 29 > > > > 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: problem in connectivityanalysis (Gabriel Gonzalez Escamilla) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Tue, 21 May 2013 17:52:21 +0200 > > From: Gabriel Gonzalez Escamilla > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] problem in connectivityanalysis > > Message-ID: <1348f6433edc26f9.519bb455 at upo.es> > > Content-Type: text/plain; charset="iso-8859-1" > > > > Thank you so much for your answer J?rn, > > > > > > > Now I got it, so, I will let the 'fourier' as input to ft_connectivityanalysis, because for some indices I will need the auto-spectrum, and if I fully undertood what you said, it will be the same, as they always take the phase information from the fourier transform. And fieltrip will automatically compute the csd if the input is the frequency data. > > > > > > > Nevertheless, it give me some error when I tried to use the output from 'powandcsd' of freqanalysis, always gives me a matrix dimensions error, and when I use the output 'fourier' from connectivityanalysis, it computes almost all indices to ok, raging from? -1 to 1 (I'm saw that they are signed, so this is ok), the problem are the ImC ranging from -inf to inf, and the PLV values ranging from 0 to inf, but when I use the 'fourier' the values are. Which for me is really weird. > > > > > > > > > I have checked internally, and even when I always use the 'fourier' as input, when it internally calculates cross-spectrum for the ImC and PLV, the data.crsspctrm is different, e.g: > > data.dimord = 'rpt_rpt_chan_chan_freq' > > ans size(data.crsspctrm) = [1 7 59 59]; > > > > > So, both are apparently the same, but the data inside this matrices is different, > > > > > > > for example, when calculating the ImC the first 7 columns for the first two rows are: > > val(:,:,1,1) > > ?[0.9323? 0.3679? 0.8629? 1.6436? 0.6404? 1.8782? 0.1139] > > val(:,:,1,2) > > > > > ?[0.8509-0.1555i? 0.2507-0.1066i? 0.8173-0.0290i? 1.4328-0.2427i? 0.5457-0.0500i? 1.6505-0.0161i? 0.0993+0.0016i] > > > > while when calculating the PLV are: > > val(:,:,1,1) > > ?[1? 1? 1? 1? 1? 1? 1] > > val(:,:,1,2) > > > > > ?[0.9694-0.2133i? 0.7011-0.3564i? 0.9951-0.0104i? 0.9014-0.3481i? 0.9781-0.0819i? 0.9982-0.0046i? 0.9507-0.0483i] > > > > > > > > > I'm pretty sure I'm doing something wrong here, but I don't really have a clue, > > > > > > > If I use the fourier transform to calculate the 'csd' in ft_connectivity analysis and use this csd as input to all other ft_connectivityanalysis indices all of them are set to NaN or 1, not ranging between any numbers. > > > > > > > > > > > > > On the other hand, I have seen searching on the net, that fieltrip is capable of create surrogate data, by shifting the phase information on every trial for only one electrode of each pair while using the original samples of each trials on the second channel, but I couldn't find on the manual how to do such a thing. Is there any way to compute this kind of surrogates for every sensor? or was it something that some one suggest to somebody? > > > > > > Many thanks in advanced, > > Gabriel. > > > > > > > > > > ----- Mensaje original ----- > > De: "J?rn M. Horschig" > > Fecha: Martes, 21 de Mayo de 2013, 9:03 am > > Asunto: Re: [FieldTrip] problem in connectivityanalysis > > A: FieldTrip discussion list > > > > > > > > > > > > > Dear Gabriel, > > > > > > > > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > > > > > > No. You should think of coherence more as a measure for the consistency of the phase relation between channels across trials, so coherence is just not defined per trial,neither would it make sense to compute coherence for a single trial. > > > > > > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? I see some terminology issues here. Let me try to explain in a simple (aka least-mathematical I can think of) way: > > > > > > > > > For all these connectivity measures, we need the phase information from the Fourier transform (FFT) to compute the cross-spectral density matrix (CSD). The CSD can be regarded as the equivalent in the frequency domain to the covariance matrix in the time domain, thus it is a measures how a certain channels activity is co-modulated with another channels activity (for a particular frequency) - makes pretty much sense to make use of this when computing connectivity, right? :) > > > > > > As you might know, a Fourier transform returns complex numbers, where the imaginary part of this number contains phase information. When calling ft_freqanalysis, you can decide if it shall only return the (squared) real part of the frequency spectrum (cfg.output='pow'), or instead the full CSD (cfg.output = 'powandcsd'). Alternatively, you can also let ft_freqanalysis return the raw Fourier coefficients (cfg.output='fourier'). From the Fourier coefficients, however, you can easily obtain the CSD or the power spectrum basically by multiplication the Fourier matrix with itself (transposed). All of these measures quantify the phase relation between channels across trials, and as phase information is coded in the imaginary part of the fourier output, thus for connectivityanalysis you need the CSD which can be obtained either by 'powandcsd' or by 'fourier'. > > > > > > I hope that somehow clarifies your questions. > > > > > > Best, > > > J?rn > > > > > > On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote: > > > Dear Fieltrip experts, > > > > > > > > > I have my continuous data imported to fieldtrip with matlab, I'm looking for performing connectivity analysis between pairs of sensors, I have succed as: > > > > > > data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels and 2000 samples > > > data.label {59x1}; > > > data.time {1xNepochs}; > > > > > > then, calculate only the FFT of all sensors as: > > > cfg=[]; > > > cfg.output='fourier'; > > > cfg.method='mtmfft'; > > > cfg.taper='hanning'; > > > cfg.foilim=[8.5 9.5]; > > > cfg.tapsmofrq=0; > > > cfg.trials='all'; > > > cfg.keeptrials='yes'; > > > cfg.channel='all'; > > > fourier=ft_freqanalysis(cfg, data) > > > as output I get: > > > dimord = 'rpttap_chan_freq' > > > freq= [1x9] > > > fourierspctrm=[7x59x9 double] > > > > > > Then compute the imaginary part of coherency as: > > > cfg=[]; > > > cfg.method ='cohe'; > > > cfg.complex='imag'; > > > cfg.channelcbm={'all' 'all'}; > > > coher = ft_connectivityanalysis (cfg, fourier) > > > as output get: > > > dimord='chan_chan_freq'; > > > cohspctrm=[59x59x9 double]; > > > dof=7; > > > > > > I have two main questions: > > > > > > > > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > > > > > > > > > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? > > > > > > > > > > > > > > > Many thanks in advanced, > > > Gabriel. > > > > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: > > jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: > > http://www.ru.nl/donders > > > > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > --------------------------
PhD. student Gabriel Gonz?lez-Escamilla
Laboratory of Functional Neuroscience
Department of Physiology, Anatomy, and Cell Biology
University Pablo de Olavide
Ctra. de Utrera, Km.1
41013 - Seville
- Spain -

Email: > > ggonesc at upo.es
http://www.upo.es/neuroaging/es/
> > > > > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130521/0886ac06/attachment.html > > > > > > > ------------------------------ > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > End of fieldtrip Digest, Vol 30, Issue 29 > > ***************************************** > > > > _______________________________________________ > > 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/20130522/190aa246/attachment.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 30, Issue 31 > ***************************************** > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From 13681530640 at 139.com Sun May 26 11:26:07 2013 From: 13681530640 at 139.com (WangJing) Date: Sun, 26 May 2013 17:26:07 +0800 (CST) Subject: [FieldTrip] Question about Memory requirement Of Head model References: Message-ID: <2b1851a17ca79ab-00017.Richmail.00027836529255037638@139.com> Hello Everyone, I want to know what's the requiement of fieldtrip to hardware and software. My computer 's CPU is 3GHz, and RAM is 8GB. the OS is windows sever 2003, and the matlab is 2011a(32bit).I often encounter the problem of out of Memery. for example 1: > mri = ft_read_mri('IM-0001-0001.dcm'); % the dim of data is [512 512 144] cfg = []; ft_sourceplot(cfg,mri); the result is: ??? Out of memory. Type HELP MEMORY for your options. Error in ==> ft_sourceplot at 368 ana = (ana-dmin)./(dmax-dmin); example 2: clear all mri = ft_read_mri('IM-0001-0001.dcm'); cfg = []; cfg.method = 'interactive'; cfg.coordsys = 'ctf'; mri_realigned = ft_volumerealign(cfg,mri); clear mri cfg=[]; mrirs = ft_volumereslice(cfg,mri_realigned); when run to the last code, I face the same problem. Thank you! Best Regards! Jing Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Sun May 26 12:23:34 2013 From: julian.keil at gmail.com (Julian Keil) Date: Sun, 26 May 2013 12:23:34 +0200 Subject: [FieldTrip] Question about Memory requirement Of Head model In-Reply-To: <2b1851a17ca79ab-00017.Richmail.00027836529255037638@139.com> References: <2b1851a17ca79ab-00017.Richmail.00027836529255037638@139.com> Message-ID: <95C94C42-6516-4536-AD5A-66FA5041E3F3@gmail.com> Dear Jing Wang, this might be due to you using a 32bit System. As far as I know, 32bit Windows can only use ~3 GB of Memory. At least that's what I experienced using Win XP, maybe it's different for the server. However, I'd advise you to switch to a 64bit System and try again. Best, Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum E 307 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 26.05.2013 um 11:26 schrieb WangJing: > Hello Everyone, > I want to know what's the requiement of fieldtrip to hardware and software. My computer 's CPU is 3GHz, and RAM is 8GB. the OS is windows sever 2003, and the matlab is 2011a(32bit).I often encounter the problem of out of Memery. > for example 1: > > mri = ft_read_mri('IM-0001-0001.dcm'); % the dim of data is [512 512 144] > cfg = []; > ft_sourceplot(cfg,mri); > > the result is: > ??? Out of memory. Type HELP MEMORY for your options. > Error in ==> ft_sourceplot at 368 > ana = (ana-dmin)./(dmax-dmin); > > example 2: > clear all > mri = ft_read_mri('IM-0001-0001.dcm'); > cfg = []; > cfg.method = 'interactive'; > cfg.coordsys = 'ctf'; > mri_realigned = ft_volumerealign(cfg,mri); > clear mri > cfg=[]; > mrirs = ft_volumereslice(cfg,mri_realigned); > > when run to the last code, I face the same problem. > > Thank you! > Best Regards! > Jing Wang > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From 13681530640 at 139.com Sun May 26 17:01:10 2013 From: 13681530640 at 139.com (WangJing) Date: Sun, 26 May 2013 23:01:10 +0800 (CST) Subject: [FieldTrip] fieldtrip Digest, Vol 30, Issue 37 References: Message-ID: <2b1851a22104e22-00005.Richmail.00025896525295133618@139.com> Hello Everyone, I have resolved the problem when I ran it in computer with 64 bit OS, thanks. Best Regards, Jing Wang -------------------------------------------------------------------------------- ----The following is the content of the forwarded email---- From:fieldtrip-request To:fieldtrip Date:2013-05-26 18:00:05 Subject:fieldtrip Digest, Vol 30, Issue 37 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. Question about Memory requirement Of Head model (WangJing) ---------------------------------------------------------------------- Message: 1 Date: Sun, 26 May 2013 17:26:07 +0800 (CST) From: WangJing <13681530640 at 139.com> To: fieldtrip Subject: [FieldTrip] Question about Memory requirement Of Head model Message-ID: <2b1851a17ca79ab-00017.Richmail.00027836529255037638 at 139.com> Content-Type: text/plain; charset="utf-8" Hello Everyone, I want to know what's the requiement of fieldtrip to hardware and software. My computer 's CPU is 3GHz, and RAM is 8GB. the OS is windows sever 2003, and the matlab is 2011a(32bit).I often encounter the problem of out of Memery. for example 1: > mri = ft_read_mri('IM-0001-0001.dcm'); % the dim of data is [512 512 144] cfg = []; ft_sourceplot(cfg,mri); the result is: ??? Out of memory. Type HELP MEMORY for your options. Error in ==> ft_sourceplot at 368 ana = (ana-dmin)./(dmax-dmin); example 2: clear all mri = ft_read_mri('IM-0001-0001.dcm'); cfg = []; cfg.method = 'interactive'; cfg.coordsys = 'ctf'; mri_realigned = ft_volumerealign(cfg,mri); clear mri cfg=[]; mrirs = ft_volumereslice(cfg,mri_realigned); when run to the last code, I face the same problem. Thank you! Best Regards! Jing Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 30, Issue 37 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon May 27 11:54:00 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 27 May 2013 11:54:00 +0200 Subject: [FieldTrip] Question about Memory requirement Of Head model In-Reply-To: <95C94C42-6516-4536-AD5A-66FA5041E3F3@gmail.com> References: <2b1851a17ca79ab-00017.Richmail.00027836529255037638@139.com> <95C94C42-6516-4536-AD5A-66FA5041E3F3@gmail.com> Message-ID: <51A32D38.3060908@donders.ru.nl> Hi all, Julian is right, that's a limit of the 32bit system (the OS does not matter, just the number of bits). FieldTrip itself does not have any requirements other than Matlab does, however the size of your data matters. If you want to put data with more than 3gigs into memory, it's just not possible with a 32bit OS or Matlab (note that even if you have a 64bit OS but 32bit Matlab then the 3GB limit hold). So the only way for you to go is to clear variables from memory or reduce the size of the data you want to read it (or, go to 64bit). Maybe closing background tasks or other programs that are running will help as well. Best, Jörn On 5/26/2013 12:23 PM, Julian Keil wrote: > Dear Jing Wang, > > this might be due to you using a 32bit System. > As far as I know, 32bit Windows can only use ~3 GB of Memory. At least > that's what I experienced using Win XP, maybe it's different for the > server. > However, I'd advise you to switch to a 64bit System and try again. > > Best, > > Julian > > ******************** > *Dr. Julian Keil* > * > * > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum E 307 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 26.05.2013 um 11:26 schrieb WangJing: > >> Hello Everyone, >> I want to know what's the requiement of fieldtrip to hardware >> and software. My computer 's CPU is 3GHz, and RAM is 8GB. the OS is >> windows sever 2003, and the matlab is 2011a(32bit).I often encounter >> the problem of out of Memery. >> for example 1: >> > mri = ft_read_mri('IM-0001-0001.dcm'); % the dim of data is [512 >> 512 144] >> cfg = []; >> ft_sourceplot(cfg,mri); >> the result is: >> ??? Out of memory. Type HELP MEMORY for your options. >> Error in ==> ft_sourceplot at 368 >> ana = (ana-dmin)./(dmax-dmin); >> example 2: >> clear all >> mri = ft_read_mri('IM-0001-0001.dcm'); >> cfg = []; >> cfg.method = 'interactive'; >> cfg.coordsys = 'ctf'; >> mri_realigned = ft_volumerealign(cfg,mri); >> clear mri >> cfg=[]; >> mrirs = ft_volumereslice(cfg,mri_realigned); >> when run to the last code, I face the same problem. >> Thank you! >> Best Regards! >> Jing Wang >> _______________________________________________ >> 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 -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From member at linkedin.com Mon May 27 14:14:43 2013 From: member at linkedin.com (Stavros Dimitriadis) Date: Mon, 27 May 2013 12:14:43 +0000 (UTC) Subject: [FieldTrip] Invitation to connect on LinkedIn Message-ID: <1730678420.35398857.1369656883124.JavaMail.app@ela4-app0128.prod> LinkedIn ------------ Stavros Dimitriadis requested to add you as a connection on LinkedIn: ------------------------------------------ Diego, I'd like to add you to my professional network on LinkedIn. - Stavros Accept invitation from Stavros Dimitriadis http://www.linkedin.com/e/-kyqm8y-hh7mceqk-4t/o2zr3wMN-KUziWnbF0JpKw1y-MN7WW_ZDEc0/blk/I248853902_185/e39SrCAJoS5vrCAJoyRJtCVFnSRJrScJr6RBfnhv9ClRsDgZp6lQs6lzoQ5AomZIpn8_djwNnP8MejcRe3wQcAALhmRzm4IQqQALdzcNcj0Scj8ScP4LrCBxbOYWrSlI/eml-comm_invm-b-in_ac-inv28/?hs=false&tok=2VrJfyqClukBM1 View profile of Stavros Dimitriadis http://www.linkedin.com/e/-kyqm8y-hh7mceqk-4t/rso/258301386/VLXI/name/188663824_I248853902_185/?hs=false&tok=09C8hmgc9ukBM1 ------------------------------------------ You are receiving Invitation emails. This email was intended for Diego Lozano-Soldevilla. Learn why this is included: http://www.linkedin.com/e/-kyqm8y-hh7mceqk-4t/plh/http%3A%2F%2Fhelp%2Elinkedin%2Ecom%2Fapp%2Fanswers%2Fdetail%2Fa_id%2F4788/-GXI/?hs=false&tok=11g45aA75ukBM1 (c) 2012, LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA. -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at gmail.com Mon May 27 15:12:27 2013 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Mon, 27 May 2013 15:12:27 +0200 Subject: [FieldTrip] Source Reconstruction using Openmeeg method In-Reply-To: References: <5190AEAA.3020301@donders.ru.nl> Message-ID: Hi Mushfa, The values inside grid_*.leadfield are the ones that need to be concatenated, per grid position. So the first thing to do is figure out which rows in grid_eeg.pos match up with which rows in grid_meg.pos, and then only for those that match, concatenate so that the *.leadfield is of size [(number of eeg channels + number of meg channels) X 3]. It might be easier to first ensure that the grid used to create these leadfields have the same 'inside' positions (inside the volume conductor). Best, Johanna 2013/5/22 Mushfa Yousuf > Hello Jörn; > > I have calculated an indiviual leadfield for both EEG and MEG. The > structure of EEg and MEG shows the following variable > > grid_meg = > > xgrid: [1x20 double] > ygrid: [-8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8] > zgrid: [-2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13] > dim: [20 17 16] > pos: [5440x3 double] > unit: 'cm' > inside: [1x3177 double] > outside: [1x2263 double] > cfg: [1x1 struct] > leadfield: {1x5440 cell} > > > grid_eeg = > > xgrid: [-6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9] > ygrid: [-6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6] > zgrid: [2 3 4 5 6 7 8 9 10 11] > dim: [16 13 10] > pos: [2080x3 double] > unit: 'cm' > inside: [1x1331 double] > outside: [1x749 double] > cfg: [1x1 struct] > leadfield: {1x2080 cell} > > > Can you please give me a rough idea that how to concatenate the variables > from both structure ? > > > Thank you > > Regards ; > > Mushfa Yousuf > > > On Mon, May 13, 2013 at 11:13 AM, "Jörn M. Horschig" < > jm.horschig at donders.ru.nl> wrote: > >> Dear Mushfa, >> >> I think you have to compute two leadfield matrices, one for EEG (elec) >> and one for MEG (grad), and then concatenate these (and make sure that the >> order of sensors won't get mixed up anywhere, because sourceanalysis just >> expects the leadfield matrix to be ordered like your data. If that's not >> the case, you either encounter the previous error you described or (if the >> number of channels matches, but order is mixed up) it will just return >> wrong source estimated activity. >> >> Best, >> Jörn >> >> >> On 5/6/2013 2:47 PM, Mushfa Yousuf wrote: >> >> Hello; >> >> Yes you were right. I have defined the wrong sensors i.e 'grad' instead >> of 'elec' while calculating the Leadfield. >> >> Actually I am trying to calculate Combined source reconstruction from >> both EEG and MEG sensors. >> >> Do you have any idea, how to define both elec and grad definition >> while calculating first forward then inverse solution. >> >> Because in a fieldtrip either you can defined elec or grad at one time. >> >> >> Regards; >> >> >> Mushfa Yousuf >> >> Neurozentrum, >> Universitätsklinikum Schleswig-Holstein, >> Campus Kiel (UKSH), Deutschland >> >> >> On Tue, Apr 30, 2013 at 6:23 PM, Johanna Zumer wrote: >> >>> Hi Mushfa, >>> >>> My guess is that the channels that have you used to compute .csdspctrm >>> are not the same as the channels in cfg.elec. If you set cfg.channel = >>> freqPost.label, does that solve it? >>> >>> Cheers, >>> Johanna >>> >>> >>> 2013/4/30 Mushfa Yousuf >>> >>>> Hello Fieldtrippers, >>>> >>>> I am doing source reconstruction using EEG channels on a fieldtrip. >>>> >>>> I have computed Forward solution i.e head model using 'Openmeeg' and >>>> lead field successfully. >>>> >>>> For the inverse solution using 'dics' method, I wrote the following >>>> syntax >>>> >>>> >>>> >>>> >>>> >>>> cfg = []; >>>> cfg.method = 'dics'; >>>> cfg.frequency = 130; >>>> cfg.elec = dataFIC12.hdr.elec; >>>> cfg.grid = grid; >>>> cfg.vol = vol; >>>> >>>> sourcePost = ft_sourceanalysis(cfg, freqPost); >>>> >>>> >>>> and I have received the following error: >>>> >>>> >>>> ??? Error using ==> mtimes >>>> Inner matrix dimensions must agree. >>>> >>>> Error in ==> beamformer_dics at 314 >>>> filt = pinv(lf' * invCf * lf) * lf' * invCf; % >>>> Gross eqn. 3, use PINV/SVD to cover rank deficient >>>> leadfield >>>> >>>> Error in ==> ft_sourceanalysis at 595 >>>> dip(i) = beamformer_dics(grid, sens, vol, [], >>>> squeeze(Cf(i,:,:)), optarg{:}); >>>> >>>> Error in ==> newCode at 214 >>>> sourcePost = ft_sourceanalysis(cfg, freqPost); >>>> >>>> >>>> >>>> >>>> Any help would be appreciated. >>>> >>>> >>>> Regards; >>>> >>>> >>>> Mushfa Yousuf >>>> >>>> Neurozentrum, >>>> Universitätsklinikum Schleswig-Holstein, >>>> Campus Kiel (UKSH), Deutschland >>>> >>>> >>>> _______________________________________________ >>>> 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 listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> >> _______________________________________________ >> 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: From mbj0310 at gmail.com Wed May 29 11:47:14 2013 From: mbj0310 at gmail.com (Beom Jun Min) Date: Wed, 29 May 2013 18:47:14 +0900 Subject: [FieldTrip] ft_preprocessing error message during reading some files Message-ID: Dear all, Hello, my name is BJ Min from Korea. I'm dealing with EEG data of many subjects. When I run ft_preprocessing, the error message below shows with only some files of my data. (not all files) Warning: rounding "endsample" to the nearest integer > In ft_read_data at 100 In ft_preprocessing at 577 ??? Error using ==> ft_read_data at 149 cannot read data after the end of the file Error in ==> ft_preprocessing at 577 dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx, 'checkboundary', strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat) I think that there might be a kind of problem in data acquisition, and I modified below scripts in the ft_read_data function with comment %. % % test whether the requested data segment is not outside the file % if any(begsample<1) % error('FILEIO:InvalidBegSample', 'cannot read data before the begin of the file'); % elseif any(endsample>(hdr.nSamples*hdr.nTrials)) % error('FILEIO:InvalidEndSample', 'cannot read data after the end of the file'); % end After that, the ft_preprocessing worked well. However, the files with the first problem showed additional warning message while running ft_definetrial. (not error message) Warning: Integer operands are required for colon operator when used as index > In fileio\private\loadcnt at 464 In ft_read_header at 1450 In ft_preprocessing at 398 Warning: rounding "endsample" to the nearest integer > In ft_read_data at 100 In ft_preprocessing at 577 Also, during ft_redefinetrial, following warning message occurs.(not error message) Warning: removing inconsistent sampleinfo > In ft_datatype_raw at 97 In ft_checkdata at 213 In ft_redefinetrial at 104 Warning: the trial definition in the configuration is inconsistent with the actual data > In utilities\private\warning_once at 116 In utilities\private\fixsampleinfo at 74 In ft_datatype_raw at 154 In ft_checkdata at 213 In ft_redefinetrial at 206 Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording > In utilities\private\warning_once at 116 In utilities\private\fixsampleinfo at 79 In ft_datatype_raw at 154 In ft_checkdata at 213 In ft_redefinetrial at 206 I wonder if these messages during ft_redefinetrial mean wrong defining trials. Should I continue these process like this, modifying the ft_preprocessing function? Or, is it better to exclude some erroneous files? Best regards -- BeomJun Min, M.D. Department of Medical System Engineering (DMSE) Gwangju Institute of Science and Technology (GIST) 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju 500-712, Republic of Korea (South) Phone: +82-62-715-3266 / Fax: +82-62-715-3244 E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Wed May 29 12:01:31 2013 From: julian.keil at gmail.com (Julian Keil) Date: Wed, 29 May 2013 12:01:31 +0200 Subject: [FieldTrip] ft_preprocessing error message during reading some files In-Reply-To: References: Message-ID: Dear BJ Min, what type of data are you trying to read in? I had similar problems when reading in .CNT data. Also, with some systems you have to specify the bit rate (e.g. Neuroscan). For me, reading in data with an older version of FieldTrip solved the problem, but this was in 2011, so I cannot say if the problem with .CNT files has been solved. Good Luck Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum E 307 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 29.05.2013 um 11:47 schrieb Beom Jun Min: > Dear all, > > Hello, my name is BJ Min from Korea. > > I'm dealing with EEG data of many subjects. > > When I run ft_preprocessing, the error message below shows with only some files of my data. (not all files) > > Warning: rounding "endsample" to the nearest integer > > In ft_read_data at 100 > In ft_preprocessing at 577 > ??? Error using ==> ft_read_data at 149 > cannot read data after the end of the file > > Error in ==> ft_preprocessing at 577 > dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx, > 'checkboundary', strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat) > > I think that there might be a kind of problem in data acquisition, and I modified below scripts in the ft_read_data function with comment %. > > % % test whether the requested data segment is not outside the file > % if any(begsample<1) > % error('FILEIO:InvalidBegSample', 'cannot read data before the begin of the file'); > % elseif any(endsample>(hdr.nSamples*hdr.nTrials)) > % error('FILEIO:InvalidEndSample', 'cannot read data after the end of the file'); > % end > > After that, the ft_preprocessing worked well. > > However, the files with the first problem showed additional warning message while running ft_definetrial. (not error message) > > Warning: Integer operands are required for colon operator when used as index > > In fileio\private\loadcnt at 464 > In ft_read_header at 1450 > In ft_preprocessing at 398 > > Warning: rounding "endsample" to the nearest integer > > In ft_read_data at 100 > In ft_preprocessing at 577 > > Also, during ft_redefinetrial, following warning message occurs.(not error message) > > Warning: removing inconsistent sampleinfo > > In ft_datatype_raw at 97 > In ft_checkdata at 213 > In ft_redefinetrial at 104 > > Warning: the trial definition in the configuration is inconsistent with the actual data > > In utilities\private\warning_once at 116 > In utilities\private\fixsampleinfo at 74 > In ft_datatype_raw at 154 > In ft_checkdata at 213 > In ft_redefinetrial at 206 > > Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording > > In utilities\private\warning_once at 116 > In utilities\private\fixsampleinfo at 79 > In ft_datatype_raw at 154 > In ft_checkdata at 213 > In ft_redefinetrial at 206 > > I wonder if these messages during ft_redefinetrial mean wrong defining trials. > Should I continue these process like this, modifying the ft_preprocessing function? > Or, is it better to exclude some erroneous files? > > Best regards > > -- > BeomJun Min, M.D. > > Department of Medical System Engineering (DMSE) > Gwangju Institute of Science and Technology (GIST) > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > 500-712, Republic of Korea (South) > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbj0310 at gmail.com Thu May 30 10:15:31 2013 From: mbj0310 at gmail.com (Beom Jun Min) Date: Thu, 30 May 2013 17:15:31 +0900 Subject: [FieldTrip] ft_preprocessing error message during reading some files In-Reply-To: References: Message-ID: Dear Julian Keil, Thank you for your reply. I agree with that your problem was similar with mine. My data was acquired by Neuroscan also. There might a problem associated with .CNT file in the newer version. Could you tell me the number of the older version you used? Best Regards 2013/5/29 Julian Keil > Dear BJ Min, > > what type of data are you trying to read in? > I had similar problems when reading in .CNT data. > Also, with some systems you have to specify the bit rate (e.g. Neuroscan). > For me, reading in data with an older version of FieldTrip solved the > problem, but this was in 2011, so I cannot say if the problem with .CNT > files has been solved. > > Good Luck > > Julian > > ******************** > *Dr. Julian Keil* > * > * > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum E 307 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 29.05.2013 um 11:47 schrieb Beom Jun Min: > > Dear all, > > Hello, my name is BJ Min from Korea. > > I'm dealing with EEG data of many subjects. > > When I run ft_preprocessing, the error message below shows with only some > files of my data. (not all files) > > Warning: rounding "endsample" to the nearest integer > > In ft_read_data at 100 > In ft_preprocessing at 577 > ??? Error using ==> ft_read_data at 149 > cannot read data after the end of the file > > Error in ==> ft_preprocessing at 577 > dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', > begsample, 'endsample', endsample, 'chanindx', rawindx, > 'checkboundary', strcmp(cfg.continuous, 'no'), 'dataformat', > cfg.dataformat) > > I think that there might be a kind of problem in data acquisition, and I > modified below scripts in the ft_read_data function with comment %. > > % % test whether the requested data segment is not outside the file > % if any(begsample<1) > % error('FILEIO:InvalidBegSample', 'cannot read data before the begin of > the file'); > % elseif any(endsample>(hdr.nSamples*hdr.nTrials)) > % error('FILEIO:InvalidEndSample', 'cannot read data after the end of > the file'); > % end > > After that, the ft_preprocessing worked well. > > However, the files with the first problem showed additional warning > message while running ft_definetrial. (not error message) > > Warning: Integer operands are required for colon operator when used as > index > > In fileio\private\loadcnt at 464 > In ft_read_header at 1450 > In ft_preprocessing at 398 > > Warning: rounding "endsample" to the nearest integer > > In ft_read_data at 100 > In ft_preprocessing at 577 > > Also, during ft_redefinetrial, following warning message occurs.(not error > message) > > Warning: removing inconsistent sampleinfo > > In ft_datatype_raw at 97 > In ft_checkdata at 213 > In ft_redefinetrial at 104 > > Warning: the trial definition in the configuration is inconsistent with > the actual data > > In utilities\private\warning_once at 116 > In utilities\private\fixsampleinfo at 74 > In ft_datatype_raw at 154 > In ft_checkdata at 213 > In ft_redefinetrial at 206 > > Warning: reconstructing sampleinfo by assuming that the trials are > consecutive segments of a continuous recording > > In utilities\private\warning_once at 116 > In utilities\private\fixsampleinfo at 79 > In ft_datatype_raw at 154 > In ft_checkdata at 213 > In ft_redefinetrial at 206 > > I wonder if these messages during ft_redefinetrial mean wrong defining > trials. > Should I continue these process like this, modifying the ft_preprocessing > function? > Or, is it better to exclude some erroneous files? > > Best regards > > -- > BeomJun Min, M.D. > > Department of Medical System Engineering (DMSE) > Gwangju Institute of Science and Technology (GIST) > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > 500-712, Republic of Korea (South) > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr > _______________________________________________ > 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 > -- BeomJun Min, M.D. Department of Medical System Engineering (DMSE) Gwangju Institute of Science and Technology (GIST) 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju 500-712, Republic of Korea (South) Phone: +82-62-715-3266 / Fax: +82-62-715-3244 E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Thu May 30 11:45:09 2013 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 30 May 2013 11:45:09 +0200 Subject: [FieldTrip] ft_preprocessing error message during reading some files In-Reply-To: References: Message-ID: <80EC72EF-2296-47F5-97EC-197F91402C79@gmail.com> Dear BJ Min, I used the field trip version 20111101. I don't know if it's still available though. To set the bitrate, you have to specify cfg.headerformat='ns_cnt32'; cfg.dataformat='ns_cnt32'; cfg.eventformat='ns_cnt32'; in ft_preprocessing One way to check this (and also if you set your bitrate correctly), is to see if you can find easily detectable ERPs, like the visual or auditory N1 in your data. If you can't see this component, then your settings are wrong, even if data has been read into Matlab. Good Luck, Julian Am 30.05.2013 um 10:15 schrieb Beom Jun Min: > Dear Julian Keil, > > Thank you for your reply. > I agree with that your problem was similar with mine. > My data was acquired by Neuroscan also. > There might a problem associated with .CNT file in the newer version. > > Could you tell me the number of the older version you used? > > Best Regards > > > > 2013/5/29 Julian Keil > Dear BJ Min, > > what type of data are you trying to read in? > I had similar problems when reading in .CNT data. > Also, with some systems you have to specify the bit rate (e.g. Neuroscan). > For me, reading in data with an older version of FieldTrip solved the problem, but this was in 2011, so I cannot say if the problem with .CNT files has been solved. > > Good Luck > > Julian > > ******************** > Dr. Julian Keil > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum E 307 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 29.05.2013 um 11:47 schrieb Beom Jun Min: > >> Dear all, >> >> Hello, my name is BJ Min from Korea. >> >> I'm dealing with EEG data of many subjects. >> >> When I run ft_preprocessing, the error message below shows with only some files of my data. (not all files) >> >> Warning: rounding "endsample" to the nearest integer >> > In ft_read_data at 100 >> In ft_preprocessing at 577 >> ??? Error using ==> ft_read_data at 149 >> cannot read data after the end of the file >> >> Error in ==> ft_preprocessing at 577 >> dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx, >> 'checkboundary', strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat) >> >> I think that there might be a kind of problem in data acquisition, and I modified below scripts in the ft_read_data function with comment %. >> >> % % test whether the requested data segment is not outside the file >> % if any(begsample<1) >> % error('FILEIO:InvalidBegSample', 'cannot read data before the begin of the file'); >> % elseif any(endsample>(hdr.nSamples*hdr.nTrials)) >> % error('FILEIO:InvalidEndSample', 'cannot read data after the end of the file'); >> % end >> >> After that, the ft_preprocessing worked well. >> >> However, the files with the first problem showed additional warning message while running ft_definetrial. (not error message) >> >> Warning: Integer operands are required for colon operator when used as index >> > In fileio\private\loadcnt at 464 >> In ft_read_header at 1450 >> In ft_preprocessing at 398 >> >> Warning: rounding "endsample" to the nearest integer >> > In ft_read_data at 100 >> In ft_preprocessing at 577 >> >> Also, during ft_redefinetrial, following warning message occurs.(not error message) >> >> Warning: removing inconsistent sampleinfo >> > In ft_datatype_raw at 97 >> In ft_checkdata at 213 >> In ft_redefinetrial at 104 >> >> Warning: the trial definition in the configuration is inconsistent with the actual data >> > In utilities\private\warning_once at 116 >> In utilities\private\fixsampleinfo at 74 >> In ft_datatype_raw at 154 >> In ft_checkdata at 213 >> In ft_redefinetrial at 206 >> >> Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording >> > In utilities\private\warning_once at 116 >> In utilities\private\fixsampleinfo at 79 >> In ft_datatype_raw at 154 >> In ft_checkdata at 213 >> In ft_redefinetrial at 206 >> >> I wonder if these messages during ft_redefinetrial mean wrong defining trials. >> Should I continue these process like this, modifying the ft_preprocessing function? >> Or, is it better to exclude some erroneous files? >> >> Best regards >> >> -- >> BeomJun Min, M.D. >> >> Department of Medical System Engineering (DMSE) >> Gwangju Institute of Science and Technology (GIST) >> 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju >> 500-712, Republic of Korea (South) >> Phone: +82-62-715-3266 / Fax: +82-62-715-3244 >> E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr >> _______________________________________________ >> 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 > > > > -- > BeomJun Min, M.D. > > Department of Medical System Engineering (DMSE) > Gwangju Institute of Science and Technology (GIST) > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > 500-712, Republic of Korea (South) > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From dr.chungki.lee at gmail.com Thu May 30 11:56:02 2013 From: dr.chungki.lee at gmail.com (Chungki Lee) Date: Thu, 30 May 2013 18:56:02 +0900 Subject: [FieldTrip] ft_preprocessing error message during reading some files In-Reply-To: References: Message-ID: Hi Min you'd better use ft_definetrial routine before ft_preprocessing. example) cfg = []; cfg.dataset = filename; % string cfg.trialdef.eventtype = your define text; % string cfg.trialdef.eventvalue = your label value; % integer cfg.trialdef.prestim = before onset time (sec); % positive integer, not negative integer cfg.trialdef.poststim = after onset time (sec); % positve integer cfg = ft_definetrial(cfg); data = ft_preprocessing(cfg); have fun ^^ 2013/5/30 Beom Jun Min > Dear Julian Keil, > > Thank you for your reply. > I agree with that your problem was similar with mine. > My data was acquired by Neuroscan also. > There might a problem associated with .CNT file in the newer version. > > Could you tell me the number of the older version you used? > > Best Regards > > > > 2013/5/29 Julian Keil > >> Dear BJ Min, >> >> what type of data are you trying to read in? >> I had similar problems when reading in .CNT data. >> Also, with some systems you have to specify the bit rate (e.g. Neuroscan). >> For me, reading in data with an older version of FieldTrip solved the >> problem, but this was in 2011, so I cannot say if the problem with .CNT >> files has been solved. >> >> Good Luck >> >> Julian >> >> ******************** >> *Dr. Julian Keil* >> * >> * >> AG Multisensorische Integration >> Psychiatrische Universitätsklinik >> der Charité im St. Hedwig-Krankenhaus >> Große Hamburger Straße 5-11, Raum E 307 >> 10115 Berlin >> >> Telefon: +49-30-2311-1879 >> Fax: +49-30-2311-2209 >> >> http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration >> >> Am 29.05.2013 um 11:47 schrieb Beom Jun Min: >> >> Dear all, >> >> Hello, my name is BJ Min from Korea. >> >> I'm dealing with EEG data of many subjects. >> >> When I run ft_preprocessing, the error message below shows with only some >> files of my data. (not all files) >> >> Warning: rounding "endsample" to the nearest integer >> > In ft_read_data at 100 >> In ft_preprocessing at 577 >> ??? Error using ==> ft_read_data at 149 >> cannot read data after the end of the file >> >> Error in ==> ft_preprocessing at 577 >> dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', >> begsample, 'endsample', endsample, 'chanindx', rawindx, >> 'checkboundary', strcmp(cfg.continuous, 'no'), 'dataformat', >> cfg.dataformat) >> >> I think that there might be a kind of problem in data acquisition, and I >> modified below scripts in the ft_read_data function with comment %. >> >> % % test whether the requested data segment is not outside the file >> % if any(begsample<1) >> % error('FILEIO:InvalidBegSample', 'cannot read data before the begin >> of the file'); >> % elseif any(endsample>(hdr.nSamples*hdr.nTrials)) >> % error('FILEIO:InvalidEndSample', 'cannot read data after the end of >> the file'); >> % end >> >> After that, the ft_preprocessing worked well. >> >> However, the files with the first problem showed additional warning >> message while running ft_definetrial. (not error message) >> >> Warning: Integer operands are required for colon operator when used as >> index >> > In fileio\private\loadcnt at 464 >> In ft_read_header at 1450 >> In ft_preprocessing at 398 >> >> Warning: rounding "endsample" to the nearest integer >> > In ft_read_data at 100 >> In ft_preprocessing at 577 >> >> Also, during ft_redefinetrial, following warning message occurs.(not >> error message) >> >> Warning: removing inconsistent sampleinfo >> > In ft_datatype_raw at 97 >> In ft_checkdata at 213 >> In ft_redefinetrial at 104 >> >> Warning: the trial definition in the configuration is inconsistent with >> the actual data >> > In utilities\private\warning_once at 116 >> In utilities\private\fixsampleinfo at 74 >> In ft_datatype_raw at 154 >> In ft_checkdata at 213 >> In ft_redefinetrial at 206 >> >> Warning: reconstructing sampleinfo by assuming that the trials are >> consecutive segments of a continuous recording >> > In utilities\private\warning_once at 116 >> In utilities\private\fixsampleinfo at 79 >> In ft_datatype_raw at 154 >> In ft_checkdata at 213 >> In ft_redefinetrial at 206 >> >> I wonder if these messages during ft_redefinetrial mean wrong defining >> trials. >> Should I continue these process like this, modifying the ft_preprocessing >> function? >> Or, is it better to exclude some erroneous files? >> >> Best regards >> >> -- >> BeomJun Min, M.D. >> >> Department of Medical System Engineering (DMSE) >> Gwangju Institute of Science and Technology (GIST) >> 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju >> 500-712, Republic of Korea (South) >> Phone: +82-62-715-3266 / Fax: +82-62-715-3244 >> E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr >> _______________________________________________ >> 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 >> > > > > -- > BeomJun Min, M.D. > > Department of Medical System Engineering (DMSE) > Gwangju Institute of Science and Technology (GIST) > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > 500-712, Republic of Korea (South) > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- ---------------------------------------------------------------- Chungki Lee, Ph.D. Post-doc Biomedical Research Institute Korea Institute of Science and Technology E-mail: chungki at kist.re.kr Tel:+82-2-958-5636, C.P: +82-10-5223-7309 ---------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From lkystra at hotmail.it Thu May 30 12:39:16 2013 From: lkystra at hotmail.it (lucia abbatantuoni) Date: Thu, 30 May 2013 12:39:16 +0200 Subject: [FieldTrip] distorsion of .edf file Message-ID: Dear all, I'm analyzing EEG files in format .edf with matlab. Many files after the use of read_edf, have a distorsion. Matlab indicate a warning for the 348 row of read_edf . Can someone give to me a help? Best regards, Lucia -------------- next part -------------- An HTML attachment was scrubbed... URL: From zriouil.imane at gmail.com Thu May 30 15:43:59 2013 From: zriouil.imane at gmail.com (z.imane) Date: Thu, 30 May 2013 15:43:59 +0200 Subject: [FieldTrip] distorsion of .edf file In-Reply-To: References: Message-ID: I have the same problem. if you want to read your data. it's possible to use ft_read_data(filename') 2013/5/30 lucia abbatantuoni > Dear all, > I'm analyzing EEG files in format .edf with matlab. Many files after the > use of read_edf, have a distorsion. Matlab indicate a warning for the 348 > row of read_edf . Can someone give to me a help? > > Best regards, > Lucia > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Zriouil Imane -------------- next part -------------- An HTML attachment was scrubbed... URL: From lkystra at hotmail.it Thu May 30 17:33:55 2013 From: lkystra at hotmail.it (lucia abbatantuoni) Date: Thu, 30 May 2013 17:33:55 +0200 Subject: [FieldTrip] distorsion of .edf file In-Reply-To: References: , Message-ID: I try and... it's not a good solution. Date: Thu, 30 May 2013 15:43:59 +0200 From: zriouil.imane at gmail.com To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] distorsion of .edf file I have the same problem. if you want to read your data. it's possible to use ft_read_data(filename') 2013/5/30 lucia abbatantuoni Dear all, I'm analyzing EEG files in format .edf with matlab. Many files after the use of read_edf, have a distorsion. Matlab indicate a warning for the 348 row of read_edf . Can someone give to me a help? Best regards, Lucia _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Zriouil Imane _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu May 30 18:31:22 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 30 May 2013 18:31:22 +0200 Subject: [FieldTrip] distorsion of .edf file In-Reply-To: References: , Message-ID: <4C650B52-1AFF-4CAE-9F28-D320B9E00C75@donders.ru.nl> Hi Lucia, Perhaps you need to be a bit more specific. In particular with respect to the fieldtrip version, matlab version, operating system, and warning message. Otherwise all of us are shooting in the dark. Best wishes, Jan-Mathijs On May 30, 2013, at 5:33 PM, lucia abbatantuoni wrote: > I try and... it's not a good solution. > > Date: Thu, 30 May 2013 15:43:59 +0200 > From: zriouil.imane at gmail.com > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] distorsion of .edf file > > I have the same problem. > > if you want to read your data. it's possible to use ft_read_data(filename') > > > > 2013/5/30 lucia abbatantuoni > Dear all, > I'm analyzing EEG files in format .edf with matlab. Many files after the use of read_edf, have a distorsion. Matlab indicate a warning for the 348 row of read_edf . Can someone give to me a help? > > Best regards, > Lucia > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > > > Zriouil Imane > > > > > _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From ebrahimi_nia at yahoo.com Thu May 30 19:14:52 2013 From: ebrahimi_nia at yahoo.com (Fatemeh Ebrahimi nia) Date: Thu, 30 May 2013 10:14:52 -0700 (PDT) Subject: [FieldTrip] loreta2fieldtrip function error Message-ID: <1369934092.15336.YahooMailNeo@web122405.mail.ne1.yahoo.com> Hi dear all, I am analyzing EEG data. I have computed sLORETA (.slor) from ERP data. Now I want to read and convert LORETA source reconstruction into a MATLAB data structure using "loreta2fieldtrip" function, But I have gotten the bellow error. **** Error using fread Invalid precision. Error in loreta2fieldtrip (line 85) activity = fread(fid, [voxnumber Ntime], 'float = >single'); *** Can someone give me a help? Best regards, Fatemeh -------------- next part -------------- An HTML attachment was scrubbed... URL: From inieuwenhuis at berkeley.edu Thu May 30 19:30:41 2013 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Thu, 30 May 2013 10:30:41 -0700 Subject: [FieldTrip] loreta2fieldtrip function error In-Reply-To: <1369934092.15336.YahooMailNeo@web122405.mail.ne1.yahoo.com> References: <1369934092.15336.YahooMailNeo@web122405.mail.ne1.yahoo.com> Message-ID: <51A78CC1.6030906@berkeley.edu> Hi Fatemeh, I had the same error recently when I did the same. I filed the bug, see http://bugzilla.fcdonders.nl/show_bug.cgi?id=2144 I did create a work around. In the LORETA program, you can export the source data as a text file. You can read that text file in with loreta2fieldtrip.m. It's a bit of a patch, but it worked for me. Hope this helps, Ingrid On 5/30/2013 10:14 AM, Fatemeh Ebrahimi nia wrote: > Hi dear all, > > I am analyzing EEG data. I have computed sLORETA (.slor) from ERP > data. Now I want to read and convert LORETA source reconstruction into a > MATLAB data structure using "loreta2fieldtrip" function, But I have > gotten the bellow error. > > **** Error using fread > Invalid precision. > Error in loreta2fieldtrip (line 85) > activity = fread(fid, [voxnumber Ntime], 'float = >single'); *** > > Can someone give me a help? > > Best regards, > Fatemeh > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 -------------- next part -------------- An HTML attachment was scrubbed... URL: From frank.ye.mei at gmail.com Thu May 30 21:33:53 2013 From: frank.ye.mei at gmail.com (Ye Mei) Date: Thu, 30 May 2013 15:33:53 -0400 Subject: [FieldTrip] error when using ctf2grad Message-ID: <51A7A9A1.6020401@gmail.com> Hi All, I have some problem using ctf2grad. The program will set grad.balance.current = 'G3AR';, and then do getfield(grad.balance, grad.balance.current) but grad.balance = G1BR: [1x1 struct] G2BR: [1x1 struct] G3BR: [1x1 struct] and has no G3AR in it. So an error will pop up. Can anyone help me with that? Also, What do G1BR, G2BR, G3BR, G3AR stand for? thanks, Ye From politzerahless at gmail.com Fri May 31 05:53:45 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Thu, 30 May 2013 22:53:45 -0500 Subject: [FieldTrip] Question about minimum norm estimate pipeline Message-ID: Hello all, I have not yet gotten a response to my question below, but in the meantime I have another question about the minimum norm estimate workflow--specifically, about the coordinate system for the skull-stripped anatomy in the step described at http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#preprocessing_of_the_anatomical_mrisave_to_disk. I'm confused by the following bit of code: % ensure that the skull-stripped anatomy is expressed in the same coordinate system as the anatomy seg.transform = mri_tal.transform; In my data, mri_tal.coordsys is 'spm' (I presume this is the result of re-aligning to Talairach in the previous step?) whereas seg.coordsys is 'ctf' (as a result of re-aligning to CTF several steps earlier). (But mri_tal also has a field mri_tal.transformorig, which seg does not have.) So should I really be using the same transform for both, as shown in the tutorial? Apologies if this question is pretty basic; I'm just trying to pinpoint where the mis-alignment described in my message below occurred, so I want to make sure I understand each step of the workflow correctly Best, Steve > Message: 1 > Date: Sat, 25 May 2013 08:11:18 -0500 > From: Stephen Politzer-Ahles > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Sourcespace and volume conductor misaligned > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Hello all, > > I am going through the workflow at > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate. After making > the volume conduction model using ft_prepare_headmodel(), I noticed that > although the volume conduction model and sourcespace have the same > orientation and overall size/shape (after I converted the volume conduction > model to cm, which wasn't in the tutorial but my original model came out in > mm), they don't quite line up, as you can see in this figure: > > http://i.imgur.com/mGEtLOa.png > > I did interactively re-align the data to CTF (twice--in step 2 of > "Preprocessing of the anatomical MRI" and in step 4 of "Source model") > using fiducials, and to Talairach (step 5 of "Preprocessing of the > anatomical data"), so I'm not sure how it ended up this way. The code I've > used at each step is basically the same as that in the tutorial. > > Is there any way to line up my volume conduction model and sourcespace now, > without going back and re-running most of the workflow? > > Best, > Steve > > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://people.ku.edu/~sjpa/ On Sat, May 25, 2013 at 1:56 PM, wrote: > > 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. Sourcespace and volume conductor misaligned > (Stephen Politzer-Ahles) > 2. Re: fieldtrip Digest, Vol 30, Issue 31 (Johanna Zumer) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sat, 25 May 2013 08:11:18 -0500 > From: Stephen Politzer-Ahles > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Sourcespace and volume conductor misaligned > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Hello all, > > I am going through the workflow at > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate. After making > the volume conduction model using ft_prepare_headmodel(), I noticed that > although the volume conduction model and sourcespace have the same > orientation and overall size/shape (after I converted the volume conduction > model to cm, which wasn't in the tutorial but my original model came out in > mm), they don't quite line up, as you can see in this figure: > > http://i.imgur.com/mGEtLOa.png > > I did interactively re-align the data to CTF (twice--in step 2 of > "Preprocessing of the anatomical MRI" and in step 4 of "Source model") > using fiducials, and to Talairach (step 5 of "Preprocessing of the > anatomical data"), so I'm not sure how it ended up this way. The code I've > used at each step is basically the same as that in the tutorial. > > Is there any way to line up my volume conduction model and sourcespace now, > without going back and re-running most of the workflow? > > Best, > Steve > > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://people.ku.edu/~sjpa/ > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130525/561df14f/attachment-0001.html > > > ------------------------------ > > Message: 2 > Date: Sat, 25 May 2013 20:54:59 +0200 > From: Johanna Zumer > To: FieldTrip discussion list > Subject: Re: [FieldTrip] fieldtrip Digest, Vol 30, Issue 31 > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Dear Jing, > > 1. Every MRI scanner is different, so I'm not familiar with that naming > scheme, but it seems the 'GAD' at the end of the file name indicates that > was with the Gadolinium contrast agent, so I would suggest to not use that, > but instead use the first (plain) T1. > > 2. I'm not sure what to suggest. I assume you can see the vitamin E marker > clearly when viewing the DICOM file? Is the issue that some slices are > missing in the conversion, or that the contrast on the image is not the > same? or right/left flipped? > > Best, > Johanna > > > 2013/5/23 WangJing <13681530640 at 139.com> > > > Dear Johanna, > > > > Thank you for your suggestion. > > 1.I have two folder of T1 MRI, one is t1_vibe_tra_4,and another is > > t1_vibe_traGAD-5. which one is best? > > 2.when I convert MRI from DICOM into CTF format,the vitamin E marker > > didn't be found. what can I do? > > > > Best Regards, > > Jing Wang > > > > > > > > > > ------------------------------ > > ----The following is the content of the forwarded email---- > > From?fieldtrip-request > > To?fieldtrip > > Date?2013-05-22 15:33:13 > > Subject?fieldtrip Digest, Vol 30, Issue 31 > > > > 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: question About head model (Johanna Zumer) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Wed, 22 May 2013 09:30:17 +0200 > > From: Johanna Zumer > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] question About head model > > Message-ID: > > > > Content-Type: text/plain; charset="utf-8" > > > > Dear Jing, > > > > It is best to use the T1 MRI rather than the other scans. To open a DICOM > > format file, you can try one of these options: > > > > % read the DICOM files > > mri = ft_read_mri('single_file_of_DICOM_series.IMA'); > > % or use a graphical file selection[f, p] = uigetfile > > < http://www.mathworks.com/access/helpdesk/help/techdoc/ref/uigetfile.html > > >('*'); > > mri = ft_read_mri(fullfile > > > >(p, > > f)); > > > > > > I copied the above from documentation on the FieldTrip wiki: > > > > http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_an_anatomical_mri_from_dicom_into_ctf_format > > > > > > Then you can save the 'mri' into a *.mat file for future use with FieldTrip. > > > > Best regards, > > Johanna > > > > > > 2013/5/22 WangJing <13681530640 at 139.com> > > > > > Hi > > > I am a freshman about field trip. > > > I am trying to build the forward model. but my mri data is different from > > > the data in the tutorial. So I don't know how to bulid the head model. I > > > use the date which is from the paper "Open Database of Epileptic EEG with > > > MRI and Postoperational Assessment of Foci?a Real World Verification for > > > the EEG Inverse Solutions",http://eeg.pl/epi > > . MRI recordings containing a > > > > > T1, T2 or fluid attenuated inversion recovery (FLAIR) weighted brain scans > > > with morphologic substrate of the epilepsy (mostly cortical dysplasias, > > > dysplastic tumors etc.). In some cases there is also a scan with the > > > > > gadolinium (GAD) contrast. The images were collected by Siemens Sonata 1.5T > > > scanner. The data is stored in the Digital Imaging and Communications in > > > Medicine (DICOM) format. The name of the scan?s folder indicates its > > > weighting.The scans have the following resolutions: T1: 512 ? 512 pixels, > > > pixel spacing 0.4687 mm, slice thickness 1.2 mm, T2: 256 ? 256 pixels, > > > pixel spacing 0.9375 mm,slice thickness 2.5 mm. > > > > > In the tutorial,the mri data stored in only one file, while the data which > > > > > I used have many files, I don't know how to process. who can help me,Thanks1 > > > Thanks very much! > > > Best Reagards > > > Jing Wang > > > > > > > > > > > > > > > > > > ------------------------------ > > > ----The following is the content of the forwarded email---- > > > From?fieldtrip-request > > > To?fieldtrip > > > Date?2013-05-21 23:59:18 > > > Subject?fieldtrip Digest, Vol 30, Issue 29 > > > > > > 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: problem in connectivityanalysis (Gabriel Gonzalez Escamilla) > > > > > > > > > ---------------------------------------------------------------------- > > > > > > Message: 1 > > > Date: Tue, 21 May 2013 17:52:21 +0200 > > > From: Gabriel Gonzalez Escamilla > > > To: FieldTrip discussion list > > > Subject: Re: [FieldTrip] problem in connectivityanalysis > > > Message-ID: <1348f6433edc26f9.519bb455 at upo.es> > > > Content-Type: text/plain; charset="iso-8859-1" > > > > > > Thank you so much for your answer J?rn, > > > > > > > > > > > Now I got it, so, I will let the 'fourier' as input to ft_connectivityanalysis, because for some indices I will need the auto-spectrum, and if I fully undertood what you said, it will be the same, as they always take the phase information from the fourier transform. And fieltrip will automatically compute the csd if the input is the frequency data. > > > > > > > > > > > Nevertheless, it give me some error when I tried to use the output from 'powandcsd' of freqanalysis, always gives me a matrix dimensions error, and when I use the output 'fourier' from connectivityanalysis, it computes almost all indices to ok, raging from? -1 to 1 (I'm saw that they are signed, so this is ok), the problem are the ImC ranging from -inf to inf, and the PLV values ranging from 0 to inf, but when I use the 'fourier' the values are. Which for me is really weird. > > > > > > > > > > > > > > I have checked internally, and even when I always use the 'fourier' as input, when it internally calculates cross-spectrum for the ImC and PLV, the data.crsspctrm is different, e.g: > > > data.dimord = 'rpt_rpt_chan_chan_freq' > > > ans size(data.crsspctrm) = [1 7 59 59]; > > > > > > > > So, both are apparently the same, but the data inside this matrices is different, > > > > > > > > > > > for example, when calculating the ImC the first 7 columns for the first two rows are: > > > val(:,:,1,1) > > > ?[0.9323? 0.3679? 0.8629? 1.6436? 0.6404? 1.8782? 0.1139] > > > val(:,:,1,2) > > > > > > > > ?[0.8509-0.1555i? 0.2507-0.1066i? 0.8173-0.0290i? 1.4328-0.2427i? 0.5457-0.0500i? 1.6505-0.0161i? 0.0993+0.0016i] > > > > > > while when calculating the PLV are: > > > val(:,:,1,1) > > > ?[1? 1? 1? 1? 1? 1? 1] > > > val(:,:,1,2) > > > > > > > > ?[0.9694-0.2133i? 0.7011-0.3564i? 0.9951-0.0104i? 0.9014-0.3481i? 0.9781-0.0819i? 0.9982-0.0046i? 0.9507-0.0483i] > > > > > > > > > > > > > > I'm pretty sure I'm doing something wrong here, but I don't really have a clue, > > > > > > > > > > > If I use the fourier transform to calculate the 'csd' in ft_connectivity analysis and use this csd as input to all other ft_connectivityanalysis indices all of them are set to NaN or 1, not ranging between any numbers. > > > > > > > > > > > > > > > > > > > > On the other hand, I have seen searching on the net, that fieltrip is capable of create surrogate data, by shifting the phase information on every trial for only one electrode of each pair while using the original samples of each trials on the second channel, but I couldn't find on the manual how to do such a thing. Is there any way to compute this kind of surrogates for every sensor? or was it something that some one suggest to somebody? > > > > > > > > > Many thanks in advanced, > > > Gabriel. > > > > > > > > > > > > > > > ----- Mensaje original ----- > > > De: "J?rn M. Horschig" > > > Fecha: Martes, 21 de Mayo de 2013, 9:03 am > > > Asunto: Re: [FieldTrip] problem in connectivityanalysis > > > A: FieldTrip discussion list > > > > > > > > > > > > > > > > > > > Dear Gabriel, > > > > > > > > > > > > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > > > > > > > > > > No. You should think of coherence more as a measure for the consistency of the phase relation between channels across trials, so coherence is just not defined per trial,neither would it make sense to compute coherence for a single trial. > > > > > > > > > > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? I see some terminology issues here. Let me try to explain in a simple (aka least-mathematical I can think of) way: > > > > > > > > > > > > > For all these connectivity measures, we need the phase information from the Fourier transform (FFT) to compute the cross-spectral density matrix (CSD). The CSD can be regarded as the equivalent in the frequency domain to the covariance matrix in the time domain, thus it is a measures how a certain channels activity is co-modulated with another channels activity (for a particular frequency) - makes pretty much sense to make use of this when computing connectivity, right? :) > > > > > > > > > As you might know, a Fourier transform returns complex numbers, where the imaginary part of this number contains phase information. When calling ft_freqanalysis, you can decide if it shall only return the (squared) real part of the frequency spectrum (cfg.output='pow'), or instead the full CSD (cfg.output = 'powandcsd'). Alternatively, you can also let ft_freqanalysis return the raw Fourier coefficients (cfg.output='fourier'). From the Fourier coefficients, however, you can easily obtain the CSD or the power spectrum basically by multiplication the Fourier matrix with itself (transposed). All of these measures quantify the phase relation between channels across trials, and as phase information is coded in the imaginary part of the fourier output, thus for connectivityanalysis you need the CSD which can be obtained either by 'powandcsd' or by 'fourier'. > > > > > > > > I hope that somehow clarifies your questions. > > > > > > > > Best, > > > > J?rn > > > > > > > > On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote: > > > > Dear Fieltrip experts, > > > > > > > > > > > > > I have my continuous data imported to fieldtrip with matlab, I'm looking for performing connectivity analysis between pairs of sensors, I have succed as: > > > > > > > > > data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels and 2000 samples > > > > data.label {59x1}; > > > > data.time {1xNepochs}; > > > > > > > > then, calculate only the FFT of all sensors as: > > > > cfg=[]; > > > > cfg.output='fourier'; > > > > cfg.method='mtmfft'; > > > > cfg.taper='hanning'; > > > > cfg.foilim=[8.5 9.5]; > > > > cfg.tapsmofrq=0; > > > > cfg.trials='all'; > > > > cfg.keeptrials='yes'; > > > > cfg.channel='all'; > > > > fourier=ft_freqanalysis(cfg, data) > > > > as output I get: > > > > dimord = 'rpttap_chan_freq' > > > > freq= [1x9] > > > > fourierspctrm=[7x59x9 double] > > > > > > > > Then compute the imaginary part of coherency as: > > > > cfg=[]; > > > > cfg.method ='cohe'; > > > > cfg.complex='imag'; > > > > cfg.channelcbm={'all' 'all'}; > > > > coher = ft_connectivityanalysis (cfg, fourier) > > > > as output get: > > > > dimord='chan_chan_freq'; > > > > cohspctrm=[59x59x9 double]; > > > > dof=7; > > > > > > > > I have two main questions: > > > > > > > > > > > > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > > > > > > > > > > > > > > > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? > > > > > > > > > > > > > > > > > > > > Many thanks in advanced, > > > > Gabriel. > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: > > > jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: > > > http://www.ru.nl/donders > > > > > > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________ > > > > fieldtrip mailing list > > > > fieldtrip at donders.ru.nl > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > > --------------------------
PhD. student Gabriel Gonz?lez-Escamilla
Laboratory of Functional Neuroscience
Department of Physiology, Anatomy, and Cell Biology
University Pablo de Olavide
Ctra. de Utrera, Km.1
41013 - Seville
- Spain -

Email: > > > ggonesc at upo.es
http://www.upo.es/neuroaging/es/
> > > > > > > > > -------------- next part -------------- > > > An HTML attachment was scrubbed... > > > URL: < > > > > > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130521/0886ac06/attachment.html > > > > > > > > > > ------------------------------ > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > End of fieldtrip Digest, Vol 30, Issue 29 > > > ***************************************** > > > > > > _______________________________________________ > > > 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/20130522/190aa246/attachment.html > > > > > > > ------------------------------ > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > End of fieldtrip Digest, Vol 30, Issue 31 > > ***************************************** > > > > _______________________________________________ > > 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/20130525/4259b000/attachment.html > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 30, Issue 36 > ***************************************** -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://people.ku.edu/~sjpa/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Fri May 31 08:11:23 2013 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Fri, 31 May 2013 08:11:23 +0200 (CEST) Subject: [FieldTrip] Question about minimum norm estimate pipeline In-Reply-To: Message-ID: <1914237354.1292588.1369980683984.JavaMail.root@sculptor.zimbra.ru.nl> Hi Steve, A quick guess; did you correctly align your resliced mri to Talairach space by indicating the commissures ( http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures ) and, if I'm correct, a point in the same place, e.g. between the hemispheres? This should update the transformation matrix. Best regards, Arjen ----- Oorspronkelijk bericht ----- > Van: "Stephen Politzer-Ahles" > Aan: fieldtrip at science.ru.nl > Verzonden: Vrijdag 31 mei 2013 05:53:45 > Onderwerp: [FieldTrip] Question about minimum norm estimate pipeline > Hello all, > I have not yet gotten a response to my question below, but in the > meantime I have another question about the minimum norm estimate > workflow--specifically, about the coordinate system for the > skull-stripped anatomy in the step described at > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#preprocessing_of_the_anatomical_mrisave_to_disk > . I'm confused by the following bit of code: > % ensure that the skull-stripped anatomy is expressed in the same > coordinate system as the anatomy > seg.transform = mri_tal.transform; > In my data, mri_tal.coordsys is 'spm' (I presume this is the result of > re-aligning to Talairach in the previous step?) whereas seg.coordsys > is 'ctf' (as a result of re-aligning to CTF several steps earlier). > (But mri_tal also has a field mri_tal.transformorig, which seg does > not have.) So should I really be using the same transform for both, as > shown in the tutorial? > Apologies if this question is pretty basic; I'm just trying to > pinpoint where the mis-alignment described in my message below > occurred, so I want to make sure I understand each step of the > workflow correctly > Best, > Steve > > Message: 1 > > Date: Sat, 25 May 2013 08:11:18 -0500 > > From: Stephen Politzer-Ahles < politzerahless at gmail.com > > > To: fieldtrip at donders.ru.nl > > Subject: [FieldTrip] Sourcespace and volume conductor misaligned > > Message-ID: > > > > > > Content-Type: text/plain; charset="utf-8" > > > > Hello all, > > > > I am going through the workflow at > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate . After > > making > > the volume conduction model using ft_prepare_headmodel(), I noticed > > that > > although the volume conduction model and sourcespace have the same > > orientation and overall size/shape (after I converted the volume > > conduction > > model to cm, which wasn't in the tutorial but my original model came > > out in > > mm), they don't quite line up, as you can see in this figure: > > > > http://i.imgur.com/mGEtLOa.png > > > > I did interactively re-align the data to CTF (twice--in step 2 of > > "Preprocessing of the anatomical MRI" and in step 4 of "Source > > model") > > using fiducials, and to Talairach (step 5 of "Preprocessing of the > > anatomical data"), so I'm not sure how it ended up this way. The > > code I've > > used at each step is basically the same as that in the tutorial. > > > > Is there any way to line up my volume conduction model and > > sourcespace now, > > without going back and re-running most of the workflow? > > > > Best, > > Steve > > > > -- > > Stephen Politzer-Ahles > > University of Kansas > > Linguistics Department > > http://people.ku.edu/~sjpa/ > On Sat, May 25, 2013 at 1:56 PM, < fieldtrip-request at science.ru.nl > > wrote: > > > > 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. Sourcespace and volume conductor misaligned > > (Stephen Politzer-Ahles) > > 2. Re: fieldtrip Digest, Vol 30, Issue 31 (Johanna Zumer) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Sat, 25 May 2013 08:11:18 -0500 > > From: Stephen Politzer-Ahles < politzerahless at gmail.com > > > To: fieldtrip at donders.ru.nl > > Subject: [FieldTrip] Sourcespace and volume conductor misaligned > > Message-ID: > > > > > > Content-Type: text/plain; charset="utf-8" > > > > Hello all, > > > > I am going through the workflow at > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate . After > > making > > the volume conduction model using ft_prepare_headmodel(), I noticed > > that > > although the volume conduction model and sourcespace have the same > > orientation and overall size/shape (after I converted the volume > > conduction > > model to cm, which wasn't in the tutorial but my original model came > > out in > > mm), they don't quite line up, as you can see in this figure: > > > > http://i.imgur.com/mGEtLOa.png > > > > I did interactively re-align the data to CTF (twice--in step 2 of > > "Preprocessing of the anatomical MRI" and in step 4 of "Source > > model") > > using fiducials, and to Talairach (step 5 of "Preprocessing of the > > anatomical data"), so I'm not sure how it ended up this way. The > > code I've > > used at each step is basically the same as that in the tutorial. > > > > Is there any way to line up my volume conduction model and > > sourcespace now, > > without going back and re-running most of the workflow? > > > > Best, > > Steve > > > > -- > > Stephen Politzer-Ahles > > University of Kansas > > Linguistics Department > > http://people.ku.edu/~sjpa/ > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130525/561df14f/attachment-0001.html > > > > > > > ------------------------------ > > > > Message: 2 > > Date: Sat, 25 May 2013 20:54:59 +0200 > > From: Johanna Zumer < johanna.zumer at donders.ru.nl > > > To: FieldTrip discussion list < fieldtrip at science.ru.nl > > > Subject: Re: [FieldTrip] fieldtrip Digest, Vol 30, Issue 31 > > Message-ID: > > > > > > Content-Type: text/plain; charset="utf-8" > > > > Dear Jing, > > > > 1. Every MRI scanner is different, so I'm not familiar with that > > naming > > scheme, but it seems the 'GAD' at the end of the file name indicates > > that > > was with the Gadolinium contrast agent, so I would suggest to not > > use that, > > but instead use the first (plain) T1. > > > > 2. I'm not sure what to suggest. I assume you can see the vitamin E > > marker > > clearly when viewing the DICOM file? Is the issue that some slices > > are > > missing in the conversion, or that the contrast on the image is not > > the > > same? or right/left flipped? > > > > Best, > > Johanna > > > > > > 2013/5/23 WangJing < 13681530640 at 139.com > > > > > > Dear Johanna, > > > > > > Thank you for your suggestion. > > > 1.I have two folder of T1 MRI, one is t1_vibe_tra_4,and another is > > > t1_vibe_traGAD-5. which one is best? > > > 2.when I convert MRI from DICOM into CTF format,the vitamin E > > > marker > > > didn't be found. what can I do? > > > > > > Best Regards, > > > Jing Wang > > > > > > > > > > > > > > > ------------------------------ > > > ----The following is the content of the forwarded email---- > > > From?fieldtrip-request< fieldtrip-request at science.ru.nl > > > > To?fieldtrip< fieldtrip at science.ru.nl > > > > Date?2013-05-22 15:33:13 > > > Subject?fieldtrip Digest, Vol 30, Issue 31 > > > > > > 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: question About head model (Johanna Zumer) > > > > > > > > > ---------------------------------------------------------------------- > > > > > > Message: 1 > > > Date: Wed, 22 May 2013 09:30:17 +0200 > > > From: Johanna Zumer < johanna.zumer at donders.ru.nl > > > > To: FieldTrip discussion list < fieldtrip at science.ru.nl > > > > Subject: Re: [FieldTrip] question About head model > > > Message-ID: > > > > > HsAS_X0-w at mail.gmail.com > > > > Content-Type: text/plain; charset="utf-8" > > > > > > Dear Jing, > > > > > > It is best to use the T1 MRI rather than the other scans. To open > > > a DICOM > > > format file, you can try one of these options: > > > > > > % read the DICOM files > > > mri = ft_read_mri('single_file_of_DICOM_series.IMA'); > > > % or use a graphical file selection[f, p] = uigetfile > > > < > > > http://www.mathworks.com/access/helpdesk/help/techdoc/ref/uigetfile.html > > > >('*'); > > > mri = ft_read_mri(fullfile > > > < > > > http://www.mathworks.com/access/helpdesk/help/techdoc/ref/fullfile.html > > > >(p, > > > f)); > > > > > > > > > I copied the above from documentation on the FieldTrip wiki: > > > > > > http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_an_anatomical_mri_from_dicom_into_ctf_format > > > > > > > > > Then you can save the 'mri' into a *.mat file for future use with > > > FieldTrip. > > > > > > Best regards, > > > Johanna > > > > > > > > > 2013/5/22 WangJing < 13681530640 at 139.com > > > > > > > > Hi > > > > I am a freshman about field trip. > > > > I am trying to build the forward model. but my mri data is > > > > different from > > > > the data in the tutorial. So I don't know how to bulid the head > > > > model. I > > > > use the date which is from the paper "Open Database of Epileptic > > > > EEG with > > > > MRI and Postoperational Assessment of Foci?a Real World > > > > Verification for > > > > the EEG Inverse Solutions", http://eeg.pl/epi > > > . MRI recordings containing a > > > > > > > T1, T2 or fluid attenuated inversion recovery (FLAIR) weighted > > > > brain scans > > > > with morphologic substrate of the epilepsy (mostly cortical > > > > dysplasias, > > > > dysplastic tumors etc.). In some cases there is also a scan with > > > > the > > > > > > > gadolinium (GAD) contrast. The images were collected by Siemens > > > > Sonata 1.5T > > > > scanner. The data is stored in the Digital Imaging and > > > > Communications in > > > > Medicine (DICOM) format. The name of the scan?s folder indicates > > > > its > > > > weighting.The scans have the following resolutions: T1: 512 ? > > > > 512 pixels, > > > > pixel spacing 0.4687 mm, slice thickness 1.2 mm, T2: 256 ? 256 > > > > pixels, > > > > pixel spacing 0.9375 mm,slice thickness 2.5 mm. > > > > > > > In the tutorial,the mri data stored in only one file, while the > > > > data which > > > > > > > I used have many files, I don't know how to process. who can > > > > help me,Thanks1 > > > > Thanks very much! > > > > Best Reagards > > > > Jing Wang > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > ----The following is the content of the forwarded email---- > > > > From?fieldtrip-request< fieldtrip-request at science.ru.nl > > > > > To?fieldtrip< fieldtrip at science.ru.nl > > > > > Date?2013-05-21 23:59:18 > > > > Subject?fieldtrip Digest, Vol 30, Issue 29 > > > > > > > > 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: problem in connectivityanalysis (Gabriel Gonzalez > > > > Escamilla) > > > > > > > > > > > > ---------------------------------------------------------------------- > > > > > > > > Message: 1 > > > > Date: Tue, 21 May 2013 17:52:21 +0200 > > > > From: Gabriel Gonzalez Escamilla < ggonesc at upo.es > > > > > To: FieldTrip discussion list < fieldtrip at science.ru.nl > > > > > Subject: Re: [FieldTrip] problem in connectivityanalysis > > > > Message-ID: < 1348f6433edc26f9.519bb455 at upo.es > > > > > Content-Type: text/plain; charset="iso-8859-1" > > > > > > > > Thank you so much for your answer J?rn, > > > > > > > > > > > > > > > Now I got it, so, I will let the 'fourier' as input to > > > > ft_connectivityanalysis, because for some indices I will need > > > > the auto-spectrum, and if I fully undertood what you said, it > > > > will be the same, as they always take the phase information from > > > > the fourier transform. And fieltrip will automatically compute > > > > the csd if the input is the frequency data. > > > > > > > > > > > > > > > Nevertheless, it give me some error when I tried to use the > > > > output from 'powandcsd' of freqanalysis, always gives me a > > > > matrix dimensions error, and when I use the output 'fourier' > > > > from connectivityanalysis, it computes almost all indices to ok, > > > > raging from? -1 to 1 (I'm saw that they are signed, so this is > > > > ok), the problem are the ImC ranging from -inf to inf, and the > > > > PLV values ranging from 0 to inf, but when I use the 'fourier' > > > > the values are. Which for me is really weird. > > > > > > > > > > > > > > > > > > > I have checked internally, and even when I always use the > > > > 'fourier' as input, when it internally calculates cross-spectrum > > > > for the ImC and PLV, the data.crsspctrm is different, e.g: > > > > data.dimord = 'rpt_rpt_chan_chan_freq' > > > > ans size(data.crsspctrm) = [1 7 59 59]; > > > > > > > > > > > So, both are apparently the same, but the data inside this > > > > matrices is different, > > > > > > > > > > > > > > > for example, when calculating the ImC the first 7 columns for > > > > the first two rows are: > > > > val(:,:,1,1) > > > > ?[0.9323? 0.3679? 0.8629? 1.6436? 0.6404? 1.8782? 0.1139] > > > > val(:,:,1,2) > > > > > > > > > > > ?[0.8509-0.1555i? 0.2507-0.1066i? 0.8173-0.0290i? > > > > 1.4328-0.2427i? 0.5457-0.0500i? 1.6505-0.0161i? 0.0993+0.0016i] > > > > > > > > while when calculating the PLV are: > > > > val(:,:,1,1) > > > > ?[1? 1? 1? 1? 1? 1? 1] > > > > val(:,:,1,2) > > > > > > > > > > > ?[0.9694-0.2133i? 0.7011-0.3564i? 0.9951-0.0104i? > > > > 0.9014-0.3481i? 0.9781-0.0819i? 0.9982-0.0046i? 0.9507-0.0483i] > > > > > > > > > > > > > > > > > > > I'm pretty sure I'm doing something wrong here, but I don't > > > > really have a clue, > > > > > > > > > > > > > > > If I use the fourier transform to calculate the 'csd' in > > > > ft_connectivity analysis and use this csd as input to all other > > > > ft_connectivityanalysis indices all of them are set to NaN or 1, > > > > not ranging between any numbers. > > > > > > > > > > > > > > > > > > > > > > > > > > > On the other hand, I have seen searching on the net, that > > > > fieltrip is capable of create surrogate data, by shifting the > > > > phase information on every trial for only one electrode of each > > > > pair while using the original samples of each trials on the > > > > second channel, but I couldn't find on the manual how to do such > > > > a thing. Is there any way to compute this kind of surrogates for > > > > every sensor? or was it something that some one suggest to > > > > somebody? > > > > > > > > > > > > Many thanks in advanced, > > > > Gabriel. > > > > > > > > > > > > > > > > > > > > ----- Mensaje original ----- > > > > De: "J?rn M. Horschig" < jm.horschig at donders.ru.nl > > > > > Fecha: Martes, 21 de Mayo de 2013, 9:03 am > > > > Asunto: Re: [FieldTrip] problem in connectivityanalysis > > > > A: FieldTrip discussion list < fieldtrip at science.ru.nl > > > > > > > > > > > > > > > > > > > > > > > > > > Dear Gabriel, > > > > > > > > > > > > > > > > > A) As you see, this makes an average over the epochs of each > > > > > channel, and not over the samples (which in this case are the > > > > > 9 frequencies of the FFT), And I would like to have the > > > > > opposite, this is, to get the imaginary part of coherence for > > > > > each epoch (repetition) on all my channels and not for each > > > > > frequency, something like: chan_chan_rpt or chancbm_rpt, Is > > > > > this possible? > > > > > > > > > > > > > > > > > No. You should think of coherence more as a measure for the > > > > > consistency of the phase relation between channels across > > > > > trials, so coherence is just not defined per trial,neither > > > > > would it make sense to compute coherence for a single trial. > > > > > > > > > > > > > > > > > B) Another question I have is: for the Imaginary part of > > > > > Coherence is not necessary to compute the cross-spectrum with > > > > > 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is > > > > > that way too? I see some terminology issues here. Let me try > > > > > to explain in a simple (aka least-mathematical I can think of) > > > > > way: > > > > > > > > > > > > > > > > > For all these connectivity measures, we need the phase > > > > > information from the Fourier transform (FFT) to compute the > > > > > cross-spectral density matrix (CSD). The CSD can be regarded > > > > > as the equivalent in the frequency domain to the covariance > > > > > matrix in the time domain, thus it is a measures how a certain > > > > > channels activity is co-modulated with another channels > > > > > activity (for a particular frequency) - makes pretty much > > > > > sense to make use of this when computing connectivity, right? > > > > > :) > > > > > > > > > > > > As you might know, a Fourier transform returns complex > > > > > numbers, where the imaginary part of this number contains > > > > > phase information. When calling ft_freqanalysis, you can > > > > > decide if it shall only return the (squared) real part of the > > > > > frequency spectrum (cfg.output='pow'), or instead the full CSD > > > > > (cfg.output = 'powandcsd'). Alternatively, you can also let > > > > > ft_freqanalysis return the raw Fourier coefficients > > > > > (cfg.output='fourier'). From the Fourier coefficients, > > > > > however, you can easily obtain the CSD or the power spectrum > > > > > basically by multiplication the Fourier matrix with itself > > > > > (transposed). All of these measures quantify the phase > > > > > relation between channels across trials, and as phase > > > > > information is coded in the imaginary part of the fourier > > > > > output, thus for connectivityanalysis you need the CSD which > > > > > can be obtained either by 'powandcsd' or by 'fourier'. > > > > > > > > > > I hope that somehow clarifies your questions. > > > > > > > > > > Best, > > > > > J?rn > > > > > > > > > > On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote: > > > > > Dear Fieltrip experts, > > > > > > > > > > > > > > > > > I have my continuous data imported to fieldtrip with matlab, > > > > > I'm looking for performing connectivity analysis between pairs > > > > > of sensors, I have succed as: > > > > > > > > > > > > data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 > > > > > channels and 2000 samples > > > > > data.label {59x1}; > > > > > data.time {1xNepochs}; > > > > > > > > > > then, calculate only the FFT of all sensors as: > > > > > cfg=[]; > > > > > cfg.output='fourier'; > > > > > cfg.method='mtmfft'; > > > > > cfg.taper='hanning'; > > > > > cfg.foilim=[8.5 9.5]; > > > > > cfg.tapsmofrq=0; > > > > > cfg.trials='all'; > > > > > cfg.keeptrials='yes'; > > > > > cfg.channel='all'; > > > > > fourier=ft_freqanalysis(cfg, data) > > > > > as output I get: > > > > > dimord = 'rpttap_chan_freq' > > > > > freq= [1x9] > > > > > fourierspctrm=[7x59x9 double] > > > > > > > > > > Then compute the imaginary part of coherency as: > > > > > cfg=[]; > > > > > cfg.method ='cohe'; > > > > > cfg.complex='imag'; > > > > > cfg.channelcbm={'all' 'all'}; > > > > > coher = ft_connectivityanalysis (cfg, fourier) > > > > > as output get: > > > > > dimord='chan_chan_freq'; > > > > > cohspctrm=[59x59x9 double]; > > > > > dof=7; > > > > > > > > > > I have two main questions: > > > > > > > > > > > > > > > > > A) As you see, this makes an average over the epochs of each > > > > > channel, and not over the samples (which in this case are the > > > > > 9 frequencies of the FFT), And I would like to have the > > > > > opposite, this is, to get the imaginary part of coherence for > > > > > each epoch (repetition) on all my channels and not for each > > > > > frequency, something like: chan_chan_rpt or chancbm_rpt, Is > > > > > this possible? > > > > > > > > > > > > > > > > > > > > > > > > > > > B) Another question I have is: for the Imaginary part of > > > > > Coherence is not necessary to compute the cross-spectrum with > > > > > 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is > > > > > that way too? > > > > > > > > > > > > > > > > > > > > > > > > > Many thanks in advanced, > > > > > Gabriel. > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > fieldtrip > > > > > mailing list > > > > > fieldtrip at donders.ru.nl > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > > > > > > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for > > > > > Brain, Cognition and Behaviour > Centre for Cognitive > > > > > Neuroimaging > Radboud University Nijmegen > Neuronal > > > > > Oscillations Group > FieldTrip Development Team > > P.O. Box > > > > > 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > > > > > > E-Mail: > > > > jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: > > > > http://www.ru.nl/donders > > > > > > > > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > > > > > > > NL-6525 EN Nijmegen > The Netherlands > > > > > > > _______________________________________________ > > > > > fieldtrip mailing list > > > > > fieldtrip at donders.ru.nl > > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > > > > > > --------------------------
PhD. student > > > > Gabriel Gonz?lez-Escamilla
Laboratory of Functional > > > > Neuroscience
Department of Physiology, Anatomy, and Cell > > > > Biology
University Pablo de Olavide
Ctra. de Utrera, > > > > Km.1
41013 - Seville
- Spain -

Email: > > > > ggonesc at upo.es
http://www.upo.es/neuroaging/es/
> > > > > > > > > > > > -------------- next part -------------- > > > > An HTML attachment was scrubbed... > > > > URL: < > > > > > > > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130521/0886ac06/attachment.html > > > > > > > > > > > > > ------------------------------ > > > > > > > > _______________________________________________ > > > > fieldtrip mailing list > > > > fieldtrip at donders.ru.nl > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > End of fieldtrip Digest, Vol 30, Issue 29 > > > > ***************************************** > > > > > > > > _______________________________________________ > > > > 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/20130522/190aa246/attachment.html > > > > > > > > > > ------------------------------ > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > End of fieldtrip Digest, Vol 30, Issue 31 > > > ***************************************** > > > > > > _______________________________________________ > > > 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/20130525/4259b000/attachment.html > > > > > > > ------------------------------ > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > End of fieldtrip Digest, Vol 30, Issue 36 > > ***************************************** > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://people.ku.edu/~sjpa/ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From yukaokazaki at gmail.com Fri May 31 08:21:56 2013 From: yukaokazaki at gmail.com (Yuka Okazaki) Date: Fri, 31 May 2013 15:21:56 +0900 Subject: [FieldTrip] single subject headmodel and mni-transformed grid doesn't fit Message-ID: Dear all I have a problem that single subject headmodel and the warped its grid to template grid do not fit, as attached figure. I expected they are exactly fit each other but it seems not. I generated this figure by following steps. MEG system is yokogawa. Any advices I should check will be very helpful and appreciated. Yuka ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ load('~\fieldtrip\template\sourcemodel\standard_sourcemodel3d10mm.mat') template_grid = sourcemodel; % Read mri data mri2nifti('subject.mri', 'mri.nii'); mri_nifti = ft_read_mri('mri.nii'); % Define fiducial position in MRI coordinate cfg = []; cfg.method = 'interactive'; mri = ft_volumerealign(cfg, mri_nifti); % segment the anatomical MRI cfg = []; cfg.coordsys = 'ctf'; seg = ft_volumesegment(cfg, mri); % construct volume conductor model (i.e. head model) for each subject cfg = []; cfg.method = 'singleshell'; vol = ft_prepare_headmodel(cfg, seg); vol = ft_convert_units(vol, 'cm'); % create the subject specific grid, using the template grid that has just been created cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; %sourcemodel% cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.mri = mri; grid = ft_prepare_sourcemodel(cfg); % make a figure of the single subject headmodel, and grid positions figure; ft_plot_vol(vol, 'edgecolor', 'none'); alpha 0.4; ft_plot_mesh(grid.pos(grid.inside,:),'vertexcolor','r');[image: Inline image 1] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.jpeg Type: image/jpeg Size: 56475 bytes Desc: not available URL: From politzerahless at gmail.com Fri May 31 08:27:19 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Fri, 31 May 2013 01:27:19 -0500 Subject: [FieldTrip] fieldtrip Digest, Vol 30, Issue 45 In-Reply-To: References: Message-ID: Hi Arjen, Thanks for your message; I did indeed re-align to Talairach after reslicing, although I can't be sure it was "correct" (the page linked from the tutorial, http://neuroimage.usc.edu/brainstorm/CoordinateSystems, didn't give guidelines on how anterior/posteriorly to place the interhemispheric point, so I just placed it near the top of the head on about the same plane as the commisures). But it wasn't until the end of the anatomical processing that I noticed the issue, so I'm wondering if there's a way to re-align the source space and volume conduction model to each other without going back to the beginning of the pipeline. Best, Steve > Message: 1 > Date: Fri, 31 May 2013 08:11:23 +0200 (CEST) > From: "Stolk, A." > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Question about minimum norm estimate pipeline > Message-ID: > < 1914237354.1292588.1369980683984.JavaMail.root at sculptor.zimbra.ru.nl> > Content-Type: text/plain; charset="utf-8" > > Hi Steve, A quick guess; did you correctly align your resliced mri to Talairach space by indicating the commissures ( http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures ) and, if I'm correct, a point in the same place, e.g. between the hemispheres? This should update the transformation matrix. Best regards, Arjen ----- Oorspronkelijk bericht ----- > > Van: "Stephen Politzer-Ahles" > > Aan: fieldtrip at science.ru.nl > > Verzonden: Vrijdag 31 mei 2013 05:53:45 > > Onderwerp: [FieldTrip] Question about minimum norm estimate pipeline > > Hello all, > > I have not yet gotten a response to my question below, but in the > > meantime I have another question about the minimum norm estimate > > workflow--specifically, about the coordinate system for the > > skull-stripped anatomy in the step described at > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#preprocessing_of_the_anatomical_mrisave_to_disk > > . I'm confused by the following bit of code: > > % ensure that the skull-stripped anatomy is expressed in the same > > coordinate system as the anatomy > > seg.transform = mri_tal.transform; > > In my data, mri_tal.coordsys is 'spm' (I presume this is the result of > > re-aligning to Talairach in the previous step?) whereas seg.coordsys > > is 'ctf' (as a result of re-aligning to CTF several steps earlier). > > (But mri_tal also has a field mri_tal.transformorig, which seg does > > not have.) So should I really be using the same transform for both, as > > shown in the tutorial? > > Apologies if this question is pretty basic; I'm just trying to > > pinpoint where the mis-alignment described in my message below > > occurred, so I want to make sure I understand each step of the > > workflow correctly > > Best, > > Steve > > > Message: 1 > > > Date: Sat, 25 May 2013 08:11:18 -0500 > > > From: Stephen Politzer-Ahles < politzerahless at gmail.com > > > > To: fieldtrip at donders.ru.nl > > > Subject: [FieldTrip] Sourcespace and volume conductor misaligned > > > Message-ID: > > > > > > > > > Content-Type: text/plain; charset="utf-8" > > > > > > Hello all, > > > > > > I am going through the workflow at > > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate . After > > > making > > > the volume conduction model using ft_prepare_headmodel(), I noticed > > > that > > > although the volume conduction model and sourcespace have the same > > > orientation and overall size/shape (after I converted the volume > > > conduction > > > model to cm, which wasn't in the tutorial but my original model came > > > out in > > > mm), they don't quite line up, as you can see in this figure: > > > > > > http://i.imgur.com/mGEtLOa.png > > > > > > I did interactively re-align the data to CTF (twice--in step 2 of > > > "Preprocessing of the anatomical MRI" and in step 4 of "Source > > > model") > > > using fiducials, and to Talairach (step 5 of "Preprocessing of the > > > anatomical data"), so I'm not sure how it ended up this way. The > > > code I've > > > used at each step is basically the same as that in the tutorial. > > > > > > Is there any way to line up my volume conduction model and > > > sourcespace now, > > > without going back and re-running most of the workflow? > > > > > > Best, > > > Steve > > > > > > -- > > > Stephen Politzer-Ahles > > > University of Kansas > > > Linguistics Department > > > http://people.ku.edu/~sjpa/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan.debener at uni-oldenburg.de Fri May 31 09:18:51 2013 From: stefan.debener at uni-oldenburg.de (Stefan Debener) Date: Fri, 31 May 2013 09:18:51 +0200 Subject: [FieldTrip] Open ostdoc position Message-ID: <51A84EDB.6010408@uni-oldenburg.de> The cluster of excellence Hearing4all: Models, Technology and Solutions for Diagnostics, Restoration and Support of Hearing at the Carl von Ossietzky Universität Oldenburg (in collaboration with Medizinische Hochschule Hannover and Leibniz Universität Hannover) is seeking to fill the position of a *Postdoctoral Research Associate in the Field of Auditory Psychophysiology * in the Department of Psychology, Faculty of Medicine and Health Sciences. The position is available from 1 September 2013, for initially 2 years, with prospect for continuation for up to 2.5 more years. Payment is depending on previous experience (German TV-L E13, full time). A paramount goal of the cluster of excellence Hearing4all (www.hearing4all.de) is to transform audiology into an "exact" science based on the interplay between experiment and theory as well as between basic science and clinical research. In the framework provided by the cluster the successful candidate is expected to contribute to the research goals of task group 2 "Audioneurotechnology and theragnostics" or task group 7 "Brain-computer interface for hearing devices", e.g., by: - studying hearing disorder related maladaptive plasticity in the human auditory cortex with non-invasive techniques (EEG, MEG, NIRS); - electrophysiological characterisation of auditory cortex adaption to hearing device use (hearing aids, cochlear implants); - the role of auditory neurofeedback on speech comprehension; - the role of multisensory processes in auditory rehabilitation. Candidates are expected to have an academic university degree in the field of psychology, biology, neuroscience, or a related discipline and have shown their ability to perform excellent scientific work, usually demonstrated by the outstanding quality of their Doctorate/PhD research and a good publication record. We are seeking candidates with extensive knowledge in at least one of the following methods: advanced EEG recording and analysis; near-infrared spectroscopy. Excellent Matlab skills are mandatory and good knowledge of EEG analysis software suites (e.g., EEGLAB, Fieldtrip, BESA, LORETA) will be an asset. It is also necessary to have a background in experimental psychology, and knowledge of the German language is required. The Department of Psychology will offer an attractive scientific environment with access to research dedicated state-of-the-art approaches to human neurophysiological techniques (fMRI, NIRS, EEG, MEG, mobile EEG and mobile eye-tracking). The University of Oldenburg strives to increase the proportion of women in science, so we especially encourage female candidates to apply. Handicapped applicants will be given preference if equally qualified. Please send your application including a cover letter, CV, list of potential referees, links to recent publications, and copies of certificates for academic grades by email to Prof. Stefan Debener (Stefan.Debener at uni-oldenburg.de ). Feel free to contact Stefan Debener for further questions regarding the position. The application deadline is July 15, 2013. -- Prof. Dr. Stefan Debener Neuropsychology Lab Department of Psychology University of Oldenburg D-26111 Oldenburg Germany Office: A7 0-038 Phone: +49-441-798-4271 Fax: +49-441-798-5522 Email: stefan.debener at uni-oldenburg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From baharbahar395 at yahoo.com Fri May 31 09:48:25 2013 From: baharbahar395 at yahoo.com (Bahar Bahar) Date: Fri, 31 May 2013 15:48:25 +0800 (SGT) Subject: [FieldTrip] format conversion Message-ID: <1369986505.7865.YahooMailNeo@web192306.mail.sg3.yahoo.com> Hi dear all, I have a technical question about format converter module via sLORETA software (.slor file to .txt one). Can any one give me some information about the conversion procedure (and the meaning of the column and row of the output file)? Thanks, bahar -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbj0310 at gmail.com Fri May 31 11:11:33 2013 From: mbj0310 at gmail.com (Beom Jun Min) Date: Fri, 31 May 2013 18:11:33 +0900 Subject: [FieldTrip] ft_preprocessing error message during reading some files In-Reply-To: References: Message-ID: Dear respondent, Thank you for your advices. I will try these methods. Best regards 2013/5/30 Chungki Lee > Hi Min > > you'd better use ft_definetrial routine before ft_preprocessing. > > example) > > cfg = []; > cfg.dataset = filename; % string > cfg.trialdef.eventtype = your define text; % string > cfg.trialdef.eventvalue = your label value; % integer > cfg.trialdef.prestim = before onset time (sec); % positive > integer, not negative integer > cfg.trialdef.poststim = after onset time (sec); % positve integer > cfg = ft_definetrial(cfg); > data = ft_preprocessing(cfg); > > have fun ^^ > > > 2013/5/30 Beom Jun Min > >> Dear Julian Keil, >> >> Thank you for your reply. >> I agree with that your problem was similar with mine. >> My data was acquired by Neuroscan also. >> There might a problem associated with .CNT file in the newer version. >> >> Could you tell me the number of the older version you used? >> >> Best Regards >> >> >> >> 2013/5/29 Julian Keil >> >>> Dear BJ Min, >>> >>> what type of data are you trying to read in? >>> I had similar problems when reading in .CNT data. >>> Also, with some systems you have to specify the bit rate (e.g. >>> Neuroscan). >>> For me, reading in data with an older version of FieldTrip solved the >>> problem, but this was in 2011, so I cannot say if the problem with .CNT >>> files has been solved. >>> >>> Good Luck >>> >>> Julian >>> >>> ******************** >>> *Dr. Julian Keil* >>> * >>> * >>> AG Multisensorische Integration >>> Psychiatrische Universitätsklinik >>> der Charité im St. Hedwig-Krankenhaus >>> Große Hamburger Straße 5-11, Raum E 307 >>> 10115 Berlin >>> >>> Telefon: +49-30-2311-1879 >>> Fax: +49-30-2311-2209 >>> >>> http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration >>> >>> Am 29.05.2013 um 11:47 schrieb Beom Jun Min: >>> >>> Dear all, >>> >>> Hello, my name is BJ Min from Korea. >>> >>> I'm dealing with EEG data of many subjects. >>> >>> When I run ft_preprocessing, the error message below shows with only >>> some files of my data. (not all files) >>> >>> Warning: rounding "endsample" to the nearest integer >>> > In ft_read_data at 100 >>> In ft_preprocessing at 577 >>> ??? Error using ==> ft_read_data at 149 >>> cannot read data after the end of the file >>> >>> Error in ==> ft_preprocessing at 577 >>> dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', >>> begsample, 'endsample', endsample, 'chanindx', rawindx, >>> 'checkboundary', strcmp(cfg.continuous, 'no'), 'dataformat', >>> cfg.dataformat) >>> >>> I think that there might be a kind of problem in data acquisition, and I >>> modified below scripts in the ft_read_data function with comment %. >>> >>> % % test whether the requested data segment is not outside the file >>> % if any(begsample<1) >>> % error('FILEIO:InvalidBegSample', 'cannot read data before the begin >>> of the file'); >>> % elseif any(endsample>(hdr.nSamples*hdr.nTrials)) >>> % error('FILEIO:InvalidEndSample', 'cannot read data after the end of >>> the file'); >>> % end >>> >>> After that, the ft_preprocessing worked well. >>> >>> However, the files with the first problem showed additional warning >>> message while running ft_definetrial. (not error message) >>> >>> Warning: Integer operands are required for colon operator when used as >>> index >>> > In fileio\private\loadcnt at 464 >>> In ft_read_header at 1450 >>> In ft_preprocessing at 398 >>> >>> Warning: rounding "endsample" to the nearest integer >>> > In ft_read_data at 100 >>> In ft_preprocessing at 577 >>> >>> Also, during ft_redefinetrial, following warning message occurs.(not >>> error message) >>> >>> Warning: removing inconsistent sampleinfo >>> > In ft_datatype_raw at 97 >>> In ft_checkdata at 213 >>> In ft_redefinetrial at 104 >>> >>> Warning: the trial definition in the configuration is inconsistent with >>> the actual data >>> > In utilities\private\warning_once at 116 >>> In utilities\private\fixsampleinfo at 74 >>> In ft_datatype_raw at 154 >>> In ft_checkdata at 213 >>> In ft_redefinetrial at 206 >>> >>> Warning: reconstructing sampleinfo by assuming that the trials are >>> consecutive segments of a continuous recording >>> > In utilities\private\warning_once at 116 >>> In utilities\private\fixsampleinfo at 79 >>> In ft_datatype_raw at 154 >>> In ft_checkdata at 213 >>> In ft_redefinetrial at 206 >>> >>> I wonder if these messages during ft_redefinetrial mean wrong defining >>> trials. >>> Should I continue these process like this, modifying the >>> ft_preprocessing function? >>> Or, is it better to exclude some erroneous files? >>> >>> Best regards >>> >>> -- >>> BeomJun Min, M.D. >>> >>> Department of Medical System Engineering (DMSE) >>> Gwangju Institute of Science and Technology (GIST) >>> 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju >>> 500-712, Republic of Korea (South) >>> Phone: +82-62-715-3266 / Fax: +82-62-715-3244 >>> E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr >>> _______________________________________________ >>> 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 >>> >> >> >> >> -- >> BeomJun Min, M.D. >> >> Department of Medical System Engineering (DMSE) >> Gwangju Institute of Science and Technology (GIST) >> 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju >> 500-712, Republic of Korea (South) >> Phone: +82-62-715-3266 / Fax: +82-62-715-3244 >> E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > ---------------------------------------------------------------- > Chungki Lee, Ph.D. > Post-doc > Biomedical Research Institute > Korea Institute of Science and Technology > E-mail: chungki at kist.re.kr > Tel:+82-2-958-5636, C.P: +82-10-5223-7309 > ---------------------------------------------------------------- > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- BeomJun Min, M.D. Department of Medical System Engineering (DMSE) Gwangju Institute of Science and Technology (GIST) 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju 500-712, Republic of Korea (South) Phone: +82-62-715-3266 / Fax: +82-62-715-3244 E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.wunderle at esi-frankfurt.de Fri May 31 11:42:03 2013 From: thomas.wunderle at esi-frankfurt.de (Wunderle, Thomas) Date: Fri, 31 May 2013 09:42:03 +0000 Subject: [FieldTrip] channel combination problems Message-ID: <27E5CAD9145EEC41BB9B34C01716A1983046156B@UM-EXCDAG-A01.um.gwdg.de> Hi all, I'm new in fieldtrip and I try to get the cfg.channelcmb to work, because I want to plot the connectivity between the channels of different laminar electrodes, let's say the connectivity between channel 1:24 and 25:38 I tried the following: cfg = []; cfg.method = 'mtmfft'; cfg.taper = 'dpss'; cfg.output = 'fourier'; cfg.tapsmofrq = 1; freq = ft_freqanalysis(cfg, data) The output is: >> freq freq = label: {3x1 cell} dimord: 'rpttap_chan_freq' freq: [1x101 double] fourierspctrm: [500x3x101 double] cumsumcnt: [500x1 double] cumtapcnt: [500x1 double] cfg: [1x1 struct] I then run cfg = []; cfg.method = 'coh'; cfg.channelcmb = {freq.label{1} freq.label{2};freq.label{2} freq.label{1}}; coh= ft_connectivityanalysis(cfg, freq); And the output here is: >> coh coh = labelcmb: {2x2 cell} dimord: 'chan_freq' cohspctrm: [2x101 double] freq: [1x101 double] dof: 500 cfg: [1x1 struct] As you can seen, the output of dimord is 'chan_freq' so in the subsequent call of ft_connectivityplot I get an error message: cfg = []; cfg.parameter = 'cohspctrm'; ft_connectivityplot(cfg, coh); ??? Error using ==> ft_connectivityplot at 99 the data should have a dimord of chan_chan_freq or chancmb_freq If I use in ft_freqanalysis the cfg.method = 'powandcsd', cfg.channelcmb seems to have no effect at all, the coherence is computed for all possible pairs. I also don't understand the difference between "cfg.channelcmb" and "cfg.labelcmb" Can you help me in how I should correctly use the cannelcmb and labelcmb options? Thanks for your help, Thomas ----- Dr. Thomas Wunderle Ernst Strüngmann Institute (ESI) for Neuroscience in Cooperation with Max Planck Society Deutschordenstrasse 46 60528 Frankfurt am Main, Germany www.esi-frankfurt.de thomas.wunderle at esi-frankfurt.de Tel: +49 69 96769 519 Fax: +49 69 96769 555 Sitz der Gesellschaft: Frankfurt am Main Registergericht: Amtsgericht Frankfurt - HRB 84266 Geschäftsführer: Prof. Dr. Pascal Fries -------------- next part -------------- An HTML attachment was scrubbed... URL: From sid.kouider at gmail.com Fri May 31 11:56:19 2013 From: sid.kouider at gmail.com (Sid Kouider) Date: Fri, 31 May 2013 11:56:19 +0200 Subject: [FieldTrip] postdoctoral position on EEG/BCI in Paris Message-ID: <007701ce5de5$1b083620$5118a260$@gmail.com> The Department of Cognitive Science at the Ecole Normale Supérieure (Paris) invites applications for a postdoctoral position to work on Brain-Computer Interfaces and Virtual Reality in the framework of the CEEDs European project ( http://ceeds-project.eu/). The post-doc will mainly be in charge of : 1) setting a BCI loop between a virtual environment and an EEG system 2) optimize online detection of specific EEG patterns 3) participate in the design and elaboration of research protocols. The successful applicant will be affiliated to the Brain and Consciousness team of Pr Sid Kouider (http://www.lscp.net/persons/sidk/). The Department of Cognitive Science offers a rich research environment composed of a multidisciplinary set of research units on philosophy, cognitive psychology, cognitive neurosciences and computational neurosciences. Our research team, at the interface of these disciplines, is working on the cognitive and neural determinants of consciousness, with an emphasis on the distinction between unconscious perception and perceptual awareness. Our lab is located in central Paris, within the historical Quartier Latin. Candidates should have at least a PhD degree in a relevant domain and a solid training in EEG, Brain-Computer interfaces and machine learning. Experience with virtual reality is desirable but not a prerequisite. The position will start on September 1st, 2013. The appointment is for one year initially but can be extended later on. The net salary will range between 2 100 and 2 500 euros/month depending on qualifications. Consideration of applicants will commence June 1st, 2013 and will continue until the position is filled. Knowledge of French is not required as the team is international and verbal interactions are primarily in English. Please send a CV along with the names and contact information of two references to Sid Kouider (sid.kouider at ens dot fr) and Cécile Girard (cecilegirard20 @ gmail dot com) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Pr Sid Kouider, CNRS research director Ecole Normale Supérieure LSCP, Pavillon Jardin, 29 rue d'Ulm, 75005 Paris, France www.lscp.net/persons/sidk/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiteng.jiang at gmail.com Fri May 31 12:15:59 2013 From: haiteng.jiang at gmail.com (Haiteng Jiang) Date: Fri, 31 May 2013 12:15:59 +0200 Subject: [FieldTrip] time-domain granger causality in Fieldtrip? Message-ID: Hi all, is it possible to run time-domain granger causality in Fieldtrip? Best, Haiteng -- Haiteng Jiang PhD candidate Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Visiting address Room 2.32 Donders Centre for Cognitive Neuroimaging Kapittelweg 29 6525 EN Nijmegen the Netherlands Tel.: +31 (0)243668291 Web: https://sites.google.com/site/haitengjiang/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Fri May 31 15:49:03 2013 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Fri, 31 May 2013 15:49:03 +0200 (CEST) Subject: [FieldTrip] error when using ctf2grad In-Reply-To: <51A7A9A1.6020401@gmail.com> Message-ID: <2006439449.1303047.1370008143778.JavaMail.root@sculptor.zimbra.ru.nl> Hi Ye, Are you using a recent fieldtrip version? The ctf2grad function has recently updated improving its robustness. I don't have any clue why G3AR but it basically means that your CTF system has a specific gradiometer balancing. By the way, which CTF system are you using: CTF64, CTF151, CTF275? In any case, I could have a look if you file a bug and send to me the *.res4 file and we'll figure out what's happening (but please try with a recent Fieldtrip version and tell me) Regarding your gradiometer question, I asked Robert and this is the answer we can provide (please correct me if I'm wrong here), the CTF system sensors consist in first-order axial gradiometer that measure the magnetic field gradient change in the radial direction (orthogonal to the scalp). The following is taken from the CTF documentation "MEG File Formats - release 5.2.1" appendix C. --- Higher-order gradiometer formation is a noise-cancellation technique exclusive to the CTF MEG System. It permits the MEG detectors to be sensitive to the weak signals of the brain, yet impervious to the much stronger sources from the environment. This process, which is carried out in real time, allows the system to be run without the expense of magnetic shielding, or in combination with a standard shielded room for enhanced noise reduction. In order to calculate the forward solution, the same procedure must be performed on any field data calculated from a simulated dipole. The procedure consists of calculating the field at each coil in the sensor as well as each coil in a set of reference channels. The field values at the reference channels are then multiplied by the appropriate weight and subtracted from the MEG sensor channels. --- The data set on disk contains in the header the parameters that are used to convert the data between the original (raw) representation and the higher-order gradiometer representation. This conversion can be done in real-time during acquisition, but can also be done (and undone) afterwards using CTF DataEditor, or using ft_denoise_synthetic.m function. The grad structure included in the FieldTrip representation (i.e. hdr.grad or data.grad) should be consistent with the data, hence it contains grad.balance.current grad.balance.G1BR grad.balance.G2BR grad.balance.G3BR and potentially other "balancing" schemes (your "G3AR " for instance). The grad.balance.current describes which balancing was applied to the data and to the specification of the sensor array (grad.tra) for the forward computation. In order to provide a more intuitive description, I've made a wiki FAQ to explain How does the CTF higher-order gradiometer work: http://fieldtrip.fcdonders.nl/faq/how_does_the_ctf_higher-order_gradiometer_work All the best, Diego ----- Original Message ----- > From: "Ye Mei" > To: fieldtrip at science.ru.nl > Sent: Thursday, 30 May, 2013 9:33:53 PM > Subject: [FieldTrip] error when using ctf2grad > Hi All, > > I have some problem using ctf2grad. > > The program will set grad.balance.current = 'G3AR';, > and then do getfield(grad.balance, grad.balance.current) > but > grad.balance = G1BR: [1x1 struct] > G2BR: [1x1 struct] > G3BR: [1x1 struct] > > and has no G3AR in it. So an error will pop up. > > Can anyone help me with that? > > Also, What do G1BR, G2BR, G3BR, G3AR stand for? > > > thanks, > Ye > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Trigon, room 0.83 Kapittelweg 29 Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands E-Mail: d.lozanosoldevilla at fcdonders.ru.nl Tel: +31-(0)24-36-66274 Web: http://www.neuosc.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lkystra at hotmail.it Fri May 31 17:15:01 2013 From: lkystra at hotmail.it (lucia abbatantuoni) Date: Fri, 31 May 2013 17:15:01 +0200 Subject: [FieldTrip] distorsion of .edf file In-Reply-To: <4C650B52-1AFF-4CAE-9F28-D320B9E00C75@donders.ru.nl> References: , , , , <4C650B52-1AFF-4CAE-9F28-D320B9E00C75@donders.ru.nl> Message-ID: Hi Jan-Mathijs, the specifies that you asked to me, are: fieldtrip version: 20130401 operating system: windows 7 matlab version : I use R2011a (64bits) or R2007b (32bits) I want to read a portion of my EEG signal of 3600 sec * 500 Hz. When I used a previous version of fieldtrip (2011-12-14), the lenght of the window wasn't 3600*500 but less. " Warning: Integer operands are required for colon operator when used as index > In read_edf at 348 " With fieldtrip 20130401 the length of the window is right, but, when I plot the signal, I can see its distorsion. Thank you for your attention, Lucia From: jan.schoffelen at donders.ru.nl Date: Thu, 30 May 2013 18:31:22 +0200 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] distorsion of .edf file Hi Lucia, Perhaps you need to be a bit more specific. In particular with respect to the fieldtrip version, matlab version, operating system, and warning message.Otherwise all of us are shooting in the dark.Best wishes,Jan-Mathijs On May 30, 2013, at 5:33 PM, lucia abbatantuoni wrote:I try and... it's not a good solution. Date: Thu, 30 May 2013 15:43:59 +0200 From: zriouil.imane at gmail.com To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] distorsion of .edf file I have the same problem. if you want to read your data. it's possible to use ft_read_data(filename') 2013/5/30 lucia abbatantuoni Dear all, I'm analyzing EEG files in format .edf with matlab. Many files after the use of read_edf, have a distorsion. Matlab indicate a warning for the 348 row of read_edf . Can someone give to me a help? Best regards, Lucia _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Zriouil Imane _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip_______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics,Nijmegen, The Netherlands J.Schoffelen at donders.ru.nlTelephone: +31-24-3614793 http://www.hettaligebrein.nl _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From ebrahimi_nia at yahoo.com Fri May 31 17:56:55 2013 From: ebrahimi_nia at yahoo.com (Fatemeh Ebrahimi nia) Date: Fri, 31 May 2013 08:56:55 -0700 (PDT) Subject: [FieldTrip] loreta2fieldtrip function error In-Reply-To: <51A78CC1.6030906@berkeley.edu> References: <1369934092.15336.YahooMailNeo@web122405.mail.ne1.yahoo.com> <51A78CC1.6030906@berkeley.edu> Message-ID: <1370015815.5183.YahooMailNeo@web122402.mail.ne1.yahoo.com> Dear respondent, Thank you for your advices. I have used the function that you have updated. It works out. Can you give me information about the output structure (What do the matrixes refer to?) or advise a reference to study about that please?  Best, Fatemeh ________________________________ From: Ingrid Nieuwenhuis To: fieldtrip at science.ru.nl Sent: Thursday, May 30, 2013 10:30 AM Subject: Re: [FieldTrip] loreta2fieldtrip function error Hi Fatemeh, I had the same error recently when I did the same. I filed the bug, see http://bugzilla.fcdonders.nl/show_bug.cgi?id=2144 I did create a work around. In the LORETA program, you can export the source data as a text file. You can read that text file in with loreta2fieldtrip.m. It's a bit of a patch, but it worked for me. Hope this helps, Ingrid On 5/30/2013 10:14 AM, Fatemeh Ebrahimi nia wrote: Hi dear all, > > >I am analyzing EEG data. I have computed sLORETA (.slor) from ERP data. Now I want to read and convert LORETA source reconstruction into a >MATLAB data structure using "loreta2fieldtrip" function, But I have gotten the bellow error. > > >**** Error using fread > >Invalid precision. >Error in loreta2fieldtrip (line 85) >activity = fread(fid, [voxnumber Ntime], 'float = >single'); *** > > >Can someone give me a help? > > > >Best regards, >Fatemeh > > > > >_______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From robince at gmail.com Fri May 31 18:14:15 2013 From: robince at gmail.com (Robin) Date: Fri, 31 May 2013 17:14:15 +0100 Subject: [FieldTrip] some of the requested samples occur twice Message-ID: I have a problem in preprocessing where I am getting this error: """ some of the requested samples occur twice in the data Error in ft_artifact_zvalue (line 262) dat{trlop} = ft_fetch_data(data, 'header', hdr, 'begsample', trl(trlop,1)-fltpadding, 'endsample', trl(trlop,2)+fltpadding, 'chanindx', sgnind, 'checkboundary', strcmp(cfg.continuous,'no Error in ft_artifact_muscle (line 158) [tmpcfg, artifact] = ft_artifact_zvalue(tmpcfg, data); """ I think this is because I am manually adding some extra padding to the trials so that the artifact filtering can use that padding (I am doing the artifact filtering on data in memory which is output from ft_denoise_pca). So in this case it is not a problem if consecutive trials overlap a bit. I would therefore like to disable this error and wondered what is the best way to do it. I am a bit confused because ft_artifact_zvalue calls ft_fetch data with a "checkboundary" option which looks like it might be what I want (and set correctly), but ft_fetch_data doesn't seem to use that option. Instead it has an allowoverlap option. So for now I will manually add the allowoverlap option to the call in ft_artifact_zvalue, but I wondered what checkboundary doesn't appear in ft_fetch_data or if this might be a bug. Cheers Robin From eelke.spaak at donders.ru.nl Wed May 1 09:40:01 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 1 May 2013 09:40:01 +0200 Subject: [FieldTrip] beggining Help In-Reply-To: References: Message-ID: Dear Gabriel, Since you indicate that you are "completely new to fieldtrip and almost new to EEG analysis", I would recommend you get started by going through some of our tutorials: http://fieldtrip.fcdonders.nl/tutorial These will help get you acquainted with FieldTrip's work style, as well as teach you some basics of EEG analysis. Understanding of the basics is vital if you want to (sensibly) do connectivity analysis later on. There are also some tutorials on connectivity, which you will find on the same page. As for getting your data into FieldTrip, all FT data is encapsulated in a Matlab structure. Once your data is in Matlab, you can make a FT structure out of it by creating a structure that resembles the output of ft_preprocessing. Refer to the documentation for ft_datatype_raw for details on this (http://fieldtrip.fcdonders.nl/reference/ft_datatype_raw or "edit ft_datatype_raw" in matlab). Best, and good luck, Eelke On 29 April 2013 23:58, Gabriel Gonzalez Escamilla wrote: > Dear fieldtrip experts, > > > I'm completely new to fieldtrip and almost new to the EEG analysis, I have > resting-state EEG registers for my subjects in txt format, that I can load > into matlab into something like: #timeSamples x #sensors. And I know the > name and order of all sensors > > I want to calculate the imaginary coherence, the PPC, the PLI and WPLI from > my data, but I couldn't find how to do so in the manual. Can anyone help me > with the steps to achieve that goal? > I want to get those indices between all pairs of sensors, and chosen pairs > (sensors manually selected according to my hypothesis), I hope it be > posssible. > > Many thanks in advanced, > Gabriel. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jose.herrero66 at gmail.com Wed May 1 12:08:19 2013 From: jose.herrero66 at gmail.com (Jose Herrero) Date: Wed, 1 May 2013 06:08:19 -0400 Subject: [FieldTrip] ft_mvaranalysis with unequal length trials Message-ID: Hi, using ft_mvaranalysis with unequal length trials, i encountering the following error (see below). This error does not occur after commenting out line 241 where the data gets preprocessed. Is this ok? mdata = ft_mvaranalysis(cfg, trials) the input is raw data with 25 channels and 237 trials removing 234 trials in which no data was selected the call to "ft_redefinetrial" took 0 seconds preprocessing preprocessing trial 3 from 3 the call to "ft_preprocessing" took 0 seconds ??? Index exceeds matrix dimensions. Error in ==> ft_mvaranalysis at 293 maxtim = max(maxtim, data.time{k}(end)); -- Jose L Herrero, PhD Department of Psychiatry Columbia University College of Physicians and Surgeons Cognitive Neuroscience and Schizophrenia Program Nathan S. Kline Institute for Psychiatric Research -------------- next part -------------- An HTML attachment was scrubbed... URL: From robince at gmail.com Wed May 1 18:41:37 2013 From: robince at gmail.com (Robin) Date: Wed, 1 May 2013 17:41:37 +0100 Subject: [FieldTrip] MNE tutorial Message-ID: I am trying to run through the MNE tutorial here: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate Unfortunately after the volumetric processing in freesurfer my intermediate result looks wrong. I have followed the steps (including interactive alignment to Talairach) according to the tutorial. I wondered if anyone has any idea what could be wrong, or could point to some more possible diagnostic commands to run? The original Subject01.mgz file seems to have been saved correctly. But if I load the orig.mgz created with: mri_convert -c -oc 0 0 0 Subject01masked.mgz orig.mgz and plot it with ft_sourceplot it has the same offset and upside down position as the final incorrectly segments freesurfer image. Could this indicate a problem? Thanks for any help, Cheers Robin -------------- next part -------------- A non-text attachment was scrubbed... Name: freesurfer.png Type: image/png Size: 7963 bytes Desc: not available URL: From joerg.neuberg at tu-ilmenau.de Wed May 1 20:42:25 2013 From: joerg.neuberg at tu-ilmenau.de (=?utf-8?Q?J=C3=B6rg_Neuberg?=) Date: Wed, 1 May 2013 20:42:25 +0200 Subject: [FieldTrip] Error: requested samples occur twice in the data Message-ID: <27F2D05FEDC14EF9839BD48C5B218D24@JoergPC> Hi FieldTrippers, we are students using fieldtrip for a project at our university. Now, we have some trouble. We want to search for muscle artifacts and we receive an error message. We started our signal processing with “ft_definetrial” to define the trials and “ft_preprocessing” to become our data. Then we cut out the stimulus artifact and interpolated the gaps. The data is saved as mat-file. Now, we are looking for muscle artifacts with the following code: ---------- begin code -------- % channel selection, cutoff and padding cfg.artfctdef.zvalue.channel = 'MEG*'; cfg.artfctdef.zvalue.cutoff = 0.5; cfg.artfctdef.zvalue.trlpadding = 0; cfg.artfctdef.zvalue.fltpadding = 0; cfg.artfctdef.zvalue.artpadding = 0.1; cfg.artfctdef.muscle.bpfilter = 'yes'; cfg.artfctdef.muscle.bpfreq = [110 140]; cfg.artfctdef.muscle.bpfiltord = 2; cfg.artfctdef.muscle.bpfilttype = 'but'; cfg.artfctdef.muscle.hilbert = 'yes'; cfg.artfctdef.muscle.boxcar = 0.2; % make the process interactive cfg.artfctdef.zvalue.interactive = 'yes'; [cfg, artifact_muscle] = ft_artifact_zvalue(cfg, data); ---------- end code -------- Unfortunately there is an error and we haven’t an idea where is the problem. Maybe the overlap of the trials is a reason for this. But we can’t change this for our data because we need this trial length. Example: trial 1 from 100 to 120, trial 2 from 115 to 135. ---------- begin error -------- searching for artifacts in 306 channel searching trials.Error using ft_fetch_data (line 123) some of the requested samples occur twice in the data Error in ft_artifact_zvalue (line 260) dat{trlop} = ft_fetch_data(data, 'header', hdr, 'begsample', trl(trlop,1)-fltpadding, 'endsample', trl(trlop,2)+fltpadding, 'chanindx', sgnind, 'checkboundary', strcmp(cfg.continuous,'no Error in muscle_artifacts (line 53) [cfg, artifact_muscle] = ft_artifact_zvalue(cfg, data);” ---------- end error -------- Do you have any idea to help us? We would be grateful for any help. Greetings, Joerg -------------- next part -------------- An HTML attachment was scrubbed... URL: From robince at gmail.com Thu May 2 14:04:03 2013 From: robince at gmail.com (Robin) Date: Thu, 2 May 2013 13:04:03 +0100 Subject: [FieldTrip] MNE tutorial In-Reply-To: References: Message-ID: Running the full Freesurfer reconstruction pipeline (without the hybrid skull stripping and Talaraich alignment on the fieldtrip side) appears to have been successful. However, when I try to continue with the tutorial I find that my volume and source grid don't line up (even before any issues converting to sensor space): Figure: http://imgur.com/uo9uPUc (code below) Does anyone have any idea what could be wrong? What coordinate system is the sub-oct-6-src.fif file in (created by MNE suite)? If it is in talairach coordinates, how do I load the Talairach aligned image from the Freesurfer pipeline? (is it orig.mgz? I also tried nu.mgz) Do I need to manually include the transform from transform/talairach.xfm? To include that can I use it directly as mri.transform in fieldtrip or do I need to multiply it by the existing mri.transform which is there when loading the raw anatomy scan (.img)? Come to think of it what does that transform represent? Sorry if these are not fieldtrip questions but I am trying to follow the fieldtrip MNE tutorial so I was hoping someone might know. Thanks Robin % load freesurfer image mri_fs_tal = ft_read_mri(fullfile(fs_dir, sub.code, 'mri', 'orig.mgz')); mri_fs_tal = ft_convert_units(mri_fs_tal, 'cm'); % load MNE grid% computed with mne_setup_source_space --ico -6 bnd = ft_read_headshape(fullfile(fs_dir, sub.code, 'bem', [sub.code '-oct-6-src.fif']), 'format', 'mne_source'); sourcespace = ft_convert_units(bnd, 'cm'); % Volume conduction model cfg = [];cfg.coordsys = 'spm';cfg.output = {'brain'}; seg = ft_volumesegment(cfg, mri_fs_tal); cfg = [];cfg.method = 'singleshell'; vol = ft_prepare_headmodel(cfg, seg); % Check volume conduction figure; hold on ft_plot_vol(vol, 'facecolor', 'none'); alpha 0.5; ft_plot_mesh(sourcespace, 'edgecolor', 'none'); camlight On Wed, May 1, 2013 at 5:41 PM, Robin robince at gmail.com wrote: I am trying to run through the MNE tutorial here: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate Unfortunately after the volumetric processing in freesurfer my intermediate result looks wrong. I have followed the steps (including interactive alignment to Talairach) according to the tutorial. I wondered if anyone has any idea what could be wrong, or could point to some more possible diagnostic commands to run? The original Subject01.mgz file seems to have been saved correctly. But if I load the orig.mgz created with: mri_convert -c -oc 0 0 0 Subject01masked.mgz orig.mgz and plot it with ft_sourceplot it has the same offset and upside down position as the final incorrectly segments freesurfer image. Could this indicate a problem? Thanks for any help, Cheers Robin -------------- next part -------------- An HTML attachment was scrubbed... URL: From brungio at gmail.com Thu May 2 14:26:10 2013 From: brungio at gmail.com (Bruno L. Giordano) Date: Thu, 2 May 2013 08:26:10 -0400 Subject: [FieldTrip] MNE tutorial In-Reply-To: References: Message-ID: Hi Robin, I had a similar problem during the field trip course. In my case I found out that one set of coordinates was in mm and then other in m, so I just had to multiply one set of coordinates. Another thing you should be aware of is that you can segment your anatomical using procedures other than the default ones. For example, Spm12 has new, better procedures. Importing an already prepared segmentation in ft requires some hacking, but if you are interested I can tell you how as soon as I get a decent internet connection. Finally, remember that the single shell model is not that great. You should prepare a better volume conduction model. Bruno On May 2, 2013 8:05 AM, "Robin" wrote: > Running the full Freesurfer reconstruction pipeline (without the hybrid > skull stripping and Talaraich alignment on the fieldtrip side) appears to > have been successful. > > However, when I try to continue with the tutorial I find that my volume > and source grid don't line up (even before any issues converting to sensor > space): > > Figure: http://imgur.com/uo9uPUc (code below) > > Does anyone have any idea what could be wrong? > > What coordinate system is the sub-oct-6-src.fif file in (created by MNE > suite)? > If it is in talairach coordinates, how do I load the Talairach aligned > image from the Freesurfer pipeline? (is it orig.mgz? I also tried nu.mgz) > > Do I need to manually include the transform from transform/talairach.xfm? > To include that can I use it directly as mri.transform in fieldtrip or do I > need to multiply it by the existing mri.transform which is there when > loading the raw anatomy scan (.img)? Come to think of it what does that > transform represent? > > Sorry if these are not fieldtrip questions but I am trying to follow the > fieldtrip MNE tutorial so I was hoping someone might know. > > Thanks > > Robin > > % load freesurfer image > mri_fs_tal = ft_read_mri(fullfile(fs_dir, sub.code, 'mri', 'orig.mgz')); > mri_fs_tal = ft_convert_units(mri_fs_tal, 'cm'); > % load MNE grid% computed with mne_setup_source_space --ico -6 > bnd = ft_read_headshape(fullfile(fs_dir, sub.code, 'bem', [sub.code '-oct-6-src.fif']), 'format', 'mne_source'); > sourcespace = ft_convert_units(bnd, 'cm'); > % Volume conduction model > cfg = [];cfg.coordsys = 'spm';cfg.output = {'brain'}; > seg = ft_volumesegment(cfg, mri_fs_tal); > cfg = [];cfg.method = 'singleshell'; > vol = ft_prepare_headmodel(cfg, seg); > % Check volume conduction > figure; hold on > ft_plot_vol(vol, 'facecolor', 'none'); alpha 0.5; > ft_plot_mesh(sourcespace, 'edgecolor', 'none'); camlight > > On Wed, May 1, 2013 at 5:41 PM, Robin robince at gmail.com wrote: > > I am trying to run through the MNE tutorial here: > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate > > Unfortunately after the volumetric processing in freesurfer my > intermediate result looks wrong. > > I have followed the steps (including interactive alignment to > Talairach) according to the tutorial. I wondered if anyone has any > idea what could be wrong, or could point to some more possible > diagnostic commands to run? > > The original Subject01.mgz file seems to have been saved correctly. > But if I load the orig.mgz created with: > mri_convert -c -oc 0 0 0 Subject01masked.mgz orig.mgz > and plot it with ft_sourceplot it has the same offset and upside down > position as the final incorrectly segments freesurfer image. Could > this indicate a problem? > > Thanks for any help, > > Cheers > > Robin > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brungio at gmail.com Thu May 2 14:28:16 2013 From: brungio at gmail.com (Bruno L. Giordano) Date: Thu, 2 May 2013 08:28:16 -0400 Subject: [FieldTrip] MNE tutorial In-Reply-To: References: Message-ID: Ah, I just saw that your problem might be with the origin of the anatomical space. Have you tried to see what happens if you set its origin to the anterior commissure before giving it in input to field trip? On May 2, 2013 8:05 AM, "Robin" wrote: > Running the full Freesurfer reconstruction pipeline (without the hybrid > skull stripping and Talaraich alignment on the fieldtrip side) appears to > have been successful. > > However, when I try to continue with the tutorial I find that my volume > and source grid don't line up (even before any issues converting to sensor > space): > > Figure: http://imgur.com/uo9uPUc (code below) > > Does anyone have any idea what could be wrong? > > What coordinate system is the sub-oct-6-src.fif file in (created by MNE > suite)? > If it is in talairach coordinates, how do I load the Talairach aligned > image from the Freesurfer pipeline? (is it orig.mgz? I also tried nu.mgz) > > Do I need to manually include the transform from transform/talairach.xfm? > To include that can I use it directly as mri.transform in fieldtrip or do I > need to multiply it by the existing mri.transform which is there when > loading the raw anatomy scan (.img)? Come to think of it what does that > transform represent? > > Sorry if these are not fieldtrip questions but I am trying to follow the > fieldtrip MNE tutorial so I was hoping someone might know. > > Thanks > > Robin > > % load freesurfer image > mri_fs_tal = ft_read_mri(fullfile(fs_dir, sub.code, 'mri', 'orig.mgz')); > mri_fs_tal = ft_convert_units(mri_fs_tal, 'cm'); > % load MNE grid% computed with mne_setup_source_space --ico -6 > bnd = ft_read_headshape(fullfile(fs_dir, sub.code, 'bem', [sub.code '-oct-6-src.fif']), 'format', 'mne_source'); > sourcespace = ft_convert_units(bnd, 'cm'); > % Volume conduction model > cfg = [];cfg.coordsys = 'spm';cfg.output = {'brain'}; > seg = ft_volumesegment(cfg, mri_fs_tal); > cfg = [];cfg.method = 'singleshell'; > vol = ft_prepare_headmodel(cfg, seg); > % Check volume conduction > figure; hold on > ft_plot_vol(vol, 'facecolor', 'none'); alpha 0.5; > ft_plot_mesh(sourcespace, 'edgecolor', 'none'); camlight > > On Wed, May 1, 2013 at 5:41 PM, Robin robince at gmail.com wrote: > > I am trying to run through the MNE tutorial here: > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate > > Unfortunately after the volumetric processing in freesurfer my > intermediate result looks wrong. > > I have followed the steps (including interactive alignment to > Talairach) according to the tutorial. I wondered if anyone has any > idea what could be wrong, or could point to some more possible > diagnostic commands to run? > > The original Subject01.mgz file seems to have been saved correctly. > But if I load the orig.mgz created with: > mri_convert -c -oc 0 0 0 Subject01masked.mgz orig.mgz > and plot it with ft_sourceplot it has the same offset and upside down > position as the final incorrectly segments freesurfer image. Could > this indicate a problem? > > Thanks for any help, > > Cheers > > Robin > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brungio at gmail.com Thu May 2 14:42:08 2013 From: brungio at gmail.com (Bruno L. Giordano) Date: Thu, 2 May 2013 08:42:08 -0400 Subject: [FieldTrip] MNE tutorial In-Reply-To: References: Message-ID: Sorry, my replies were not meant for the list. On May 2, 2013 8:28 AM, "Bruno L. Giordano" wrote: > Ah, I just saw that your problem might be with the origin of the > anatomical space. Have you tried to see what happens if you set its origin > to the anterior commissure before giving it in input to field trip? > On May 2, 2013 8:05 AM, "Robin" wrote: > >> Running the full Freesurfer reconstruction pipeline (without the hybrid >> skull stripping and Talaraich alignment on the fieldtrip side) appears to >> have been successful. >> >> However, when I try to continue with the tutorial I find that my volume >> and source grid don't line up (even before any issues converting to sensor >> space): >> >> Figure: http://imgur.com/uo9uPUc (code below) >> >> Does anyone have any idea what could be wrong? >> >> What coordinate system is the sub-oct-6-src.fif file in (created by MNE >> suite)? >> If it is in talairach coordinates, how do I load the Talairach aligned >> image from the Freesurfer pipeline? (is it orig.mgz? I also tried nu.mgz) >> >> Do I need to manually include the transform from transform/talairach.xfm? >> To include that can I use it directly as mri.transform in fieldtrip or do I >> need to multiply it by the existing mri.transform which is there when >> loading the raw anatomy scan (.img)? Come to think of it what does that >> transform represent? >> >> Sorry if these are not fieldtrip questions but I am trying to follow the >> fieldtrip MNE tutorial so I was hoping someone might know. >> >> Thanks >> >> Robin >> >> % load freesurfer image >> mri_fs_tal = ft_read_mri(fullfile(fs_dir, sub.code, 'mri', 'orig.mgz')); >> mri_fs_tal = ft_convert_units(mri_fs_tal, 'cm'); >> % load MNE grid% computed with mne_setup_source_space --ico -6 >> bnd = ft_read_headshape(fullfile(fs_dir, sub.code, 'bem', [sub.code '-oct-6-src.fif']), 'format', 'mne_source'); >> sourcespace = ft_convert_units(bnd, 'cm'); >> % Volume conduction model >> cfg = [];cfg.coordsys = 'spm';cfg.output = {'brain'}; >> seg = ft_volumesegment(cfg, mri_fs_tal); >> cfg = [];cfg.method = 'singleshell'; >> vol = ft_prepare_headmodel(cfg, seg); >> % Check volume conduction >> figure; hold on >> ft_plot_vol(vol, 'facecolor', 'none'); alpha 0.5; >> ft_plot_mesh(sourcespace, 'edgecolor', 'none'); camlight >> >> On Wed, May 1, 2013 at 5:41 PM, Robin robince at gmail.com wrote: >> >> I am trying to run through the MNE tutorial here: >> >> http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate >> >> Unfortunately after the volumetric processing in freesurfer my >> intermediate result looks wrong. >> >> I have followed the steps (including interactive alignment to >> Talairach) according to the tutorial. I wondered if anyone has any >> idea what could be wrong, or could point to some more possible >> diagnostic commands to run? >> >> The original Subject01.mgz file seems to have been saved correctly. >> But if I load the orig.mgz created with: >> mri_convert -c -oc 0 0 0 Subject01masked.mgz orig.mgz >> and plot it with ft_sourceplot it has the same offset and upside down >> position as the final incorrectly segments freesurfer image. Could >> this indicate a problem? >> >> Thanks for any help, >> >> Cheers >> >> Robin >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From robince at gmail.com Thu May 2 15:46:22 2013 From: robince at gmail.com (Robin) Date: Thu, 2 May 2013 14:46:22 +0100 Subject: [FieldTrip] MNE tutorial In-Reply-To: References: Message-ID: By running from MNE suite: mne_setup_mri --subject BON02 --mri T1 to create a COR.fif image from the Freesurfer output (including Talaraich transformation) at least that COR.fir and the oct-6-src.fif mesh seem to line up. But now I am not sure which coordinate system they are in? (cordsys is 'neuromag' in fieldtrip) nor how to obtain the necessary inverse transform from this space to the raw anatomy voxel space (so I can build the transform from oct-6-src mesh to sensor space; I already have the transform to take the original raw anatomy .img to the sensor coordinate system). Thanks, Robin On Thu, May 2, 2013 at 1:04 PM, Robin wrote: > Running the full Freesurfer reconstruction pipeline (without the hybrid > skull stripping and Talaraich alignment on the fieldtrip side) appears to > have been successful. > > However, when I try to continue with the tutorial I find that my volume > and source grid don't line up (even before any issues converting to sensor > space): > > Figure: http://imgur.com/uo9uPUc (code below) > > Does anyone have any idea what could be wrong? > > What coordinate system is the sub-oct-6-src.fif file in (created by MNE > suite)? > If it is in talairach coordinates, how do I load the Talairach aligned > image from the Freesurfer pipeline? (is it orig.mgz? I also tried nu.mgz) > > Do I need to manually include the transform from transform/talairach.xfm? > To include that can I use it directly as mri.transform in fieldtrip or do I > need to multiply it by the existing mri.transform which is there when > loading the raw anatomy scan (.img)? Come to think of it what does that > transform represent? > > Sorry if these are not fieldtrip questions but I am trying to follow the > fieldtrip MNE tutorial so I was hoping someone might know. > > Thanks > > Robin > > % load freesurfer image > mri_fs_tal = ft_read_mri(fullfile(fs_dir, sub.code, 'mri', 'orig.mgz')); > mri_fs_tal = ft_convert_units(mri_fs_tal, 'cm'); > % load MNE grid% computed with mne_setup_source_space --ico -6 > bnd = ft_read_headshape(fullfile(fs_dir, sub.code, 'bem', [sub.code '-oct-6-src.fif']), 'format', 'mne_source'); > sourcespace = ft_convert_units(bnd, 'cm'); > % Volume conduction model > cfg = [];cfg.coordsys = 'spm';cfg.output = {'brain'}; > seg = ft_volumesegment(cfg, mri_fs_tal); > cfg = [];cfg.method = 'singleshell'; > vol = ft_prepare_headmodel(cfg, seg); > % Check volume conduction > figure; hold on > ft_plot_vol(vol, 'facecolor', 'none'); alpha 0.5; > ft_plot_mesh(sourcespace, 'edgecolor', 'none'); camlight > > On Wed, May 1, 2013 at 5:41 PM, Robin robince at gmail.com wrote: > > I am trying to run through the MNE tutorial here: > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate > > Unfortunately after the volumetric processing in freesurfer my > intermediate result looks wrong. > > I have followed the steps (including interactive alignment to > Talairach) according to the tutorial. I wondered if anyone has any > idea what could be wrong, or could point to some more possible > diagnostic commands to run? > > The original Subject01.mgz file seems to have been saved correctly. > But if I load the orig.mgz created with: > mri_convert -c -oc 0 0 0 Subject01masked.mgz orig.mgz > and plot it with ft_sourceplot it has the same offset and upside down > position as the final incorrectly segments freesurfer image. Could > this indicate a problem? > > Thanks for any help, > > Cheers > > Robin > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu May 2 15:57:00 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 2 May 2013 15:57:00 +0200 Subject: [FieldTrip] Only 1 and Inf as output of ft_connectivityanalysis In-Reply-To: References: Message-ID: <9A3D199E-0816-4CBC-AE43-65F768C84EA6@donders.ru.nl> Hi Lucia, Could you remove cfg.removemean = 'yes' and try again? Best, Jan-Mathijs On Apr 29, 2013, at 2:38 AM, Lucia Melloni wrote: > Hi! > I am trying to calculate coherence using ft_connectivityanalysis, but > I am getting only ones and infinity as output in cohspctrm with all of > my data sets. > > I first run ft_freqanalysis with > cfg.method = 'mtmfft'; > cfg.taper = 'dpss'; > cfg.output = 'fourier'; > cfg.foilim = [1 45]; > cfg.tapsmofrq = 1; > cfg.keeptrials = 'yes'; > cfg.keeptapers = 'yes'; > freq = ft_freqanalysis(cfg, data); > > Whether I do or I do not specify cfg.channel and cfg.channelcmb here > does not seem to make a difference for my problem later on. The > spectra look absolutely fine. > > I then run ft_connectivityanalysis with > cfg.method = 'coh'; > cfg.removemean= 'yes'; > cfg.trials = 'all'; > cfg.feedback = 'yes'; > cfg.complex = 'abs'; > coh = ft_connectivityanalysis(cfg, freq); > > The cohspctrm looks like this: > val(:,:,1,1) = > > 1 Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf > Inf Inf Inf (etc.) > > I get the following warning during ft_connectivityanalysis > > Warning: Divide by zero. >> In ft_connectivity_corr at 103 > In ft_connectivityanalysis at 524 > Warning: Divide by zero. >> In ft_connectivity_corr at 104 > In ft_connectivityanalysis at 524 > > The same happens if I try to calculate PLV through ft_connectivityanalysis. > This is with Fieldtrip version 20130422 and 20130427, Matlab R2009a, > Windows 7 (64bit). > > Any advice? > Thanks! > Lucia > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From lmelloni at gmail.com Thu May 2 18:56:19 2013 From: lmelloni at gmail.com (Lucia Melloni) Date: Thu, 2 May 2013 12:56:19 -0400 Subject: [FieldTrip] Only 1 and Inf as output of ft_connectivityanalysis In-Reply-To: <9A3D199E-0816-4CBC-AE43-65F768C84EA6@donders.ru.nl> References: <9A3D199E-0816-4CBC-AE43-65F768C84EA6@donders.ru.nl> Message-ID: <-7204743264059944684@unknownmsgid> Hi jan-mathijs Unfortunately I get the same result whether or not I remove the mean. Best, -- Lucía On May 2, 2013, at 9:57 AM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: Hi Lucia, Could you remove cfg.removemean = 'yes' and try again? Best, Jan-Mathijs On Apr 29, 2013, at 2:38 AM, Lucia Melloni wrote: Hi! I am trying to calculate coherence using ft_connectivityanalysis, but I am getting only ones and infinity as output in cohspctrm with all of my data sets. I first run ft_freqanalysis with cfg.method = 'mtmfft'; cfg.taper = 'dpss'; cfg.output = 'fourier'; cfg.foilim = [1 45]; cfg.tapsmofrq = 1; cfg.keeptrials = 'yes'; cfg.keeptapers = 'yes'; freq = ft_freqanalysis(cfg, data); Whether I do or I do not specify cfg.channel and cfg.channelcmb here does not seem to make a difference for my problem later on. The spectra look absolutely fine. I then run ft_connectivityanalysis with cfg.method = 'coh'; cfg.removemean= 'yes'; cfg.trials = 'all'; cfg.feedback = 'yes'; cfg.complex = 'abs'; coh = ft_connectivityanalysis(cfg, freq); The cohspctrm looks like this: val(:,:,1,1) = 1 Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf (etc.) I get the following warning during ft_connectivityanalysis Warning: Divide by zero. In ft_connectivity_corr at 103 In ft_connectivityanalysis at 524 Warning: Divide by zero. In ft_connectivity_corr at 104 In ft_connectivityanalysis at 524 The same happens if I try to calculate PLV through ft_connectivityanalysis. This is with Fieldtrip version 20130422 and 20130427, Matlab R2009a, Windows 7 (64bit). Any advice? Thanks! Lucia _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu May 2 21:12:22 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 2 May 2013 21:12:22 +0200 Subject: [FieldTrip] Only 1 and Inf as output of ft_connectivityanalysis In-Reply-To: <-7204743264059944684@unknownmsgid> References: <9A3D199E-0816-4CBC-AE43-65F768C84EA6@donders.ru.nl> <-7204743264059944684@unknownmsgid> Message-ID: <4B415E50-71DE-42C8-893D-54F991DC616A@donders.ru.nl> Hi Lucia, The warnings indicate that you are dividing by zero. Are you sure that your cfg is correct? Please try cfg = []; cfg.method = 'coh'; coh = ft_connectivityanalysis(cfg, freq); This should work. Best, Jan-Mathijs On May 2, 2013, at 6:56 PM, Lucia Melloni wrote: > Hi jan-mathijs > > Unfortunately I get the same result whether or not I remove the mean. > Best, > -- Lucía > > On May 2, 2013, at 9:57 AM, jan-mathijs schoffelen wrote: > >> Hi Lucia, >> >> Could you remove cfg.removemean = 'yes' and try again? >> >> Best, >> >> Jan-Mathijs >> >> On Apr 29, 2013, at 2:38 AM, Lucia Melloni wrote: >> >>> Hi! >>> I am trying to calculate coherence using ft_connectivityanalysis, but >>> I am getting only ones and infinity as output in cohspctrm with all of >>> my data sets. >>> >>> I first run ft_freqanalysis with >>> cfg.method = 'mtmfft'; >>> cfg.taper = 'dpss'; >>> cfg.output = 'fourier'; >>> cfg.foilim = [1 45]; >>> cfg.tapsmofrq = 1; >>> cfg.keeptrials = 'yes'; >>> cfg.keeptapers = 'yes'; >>> freq = ft_freqanalysis(cfg, data); >>> >>> Whether I do or I do not specify cfg.channel and cfg.channelcmb here >>> does not seem to make a difference for my problem later on. The >>> spectra look absolutely fine. >>> >>> I then run ft_connectivityanalysis with >>> cfg.method = 'coh'; >>> cfg.removemean= 'yes'; >>> cfg.trials = 'all'; >>> cfg.feedback = 'yes'; >>> cfg.complex = 'abs'; >>> coh = ft_connectivityanalysis(cfg, freq); >>> >>> The cohspctrm looks like this: >>> val(:,:,1,1) = >>> >>> 1 Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf >>> Inf Inf Inf (etc.) >>> >>> I get the following warning during ft_connectivityanalysis >>> >>> Warning: Divide by zero. >>>> In ft_connectivity_corr at 103 >>> In ft_connectivityanalysis at 524 >>> Warning: Divide by zero. >>>> In ft_connectivity_corr at 104 >>> In ft_connectivityanalysis at 524 >>> >>> The same happens if I try to calculate PLV through ft_connectivityanalysis. >>> This is with Fieldtrip version 20130422 and 20130427, Matlab R2009a, >>> Windows 7 (64bit). >>> >>> Any advice? >>> Thanks! >>> Lucia >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> _______________________________________________ >> 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 Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From evaladez at psych.udel.edu Thu May 2 23:07:51 2013 From: evaladez at psych.udel.edu (Emilio Valadez) Date: Thu, 2 May 2013 17:07:51 -0400 Subject: [FieldTrip] Phase-amplitude coupling (PAC) Message-ID: <10DBEA48DAE8BB4F8F588B1254C0D92E01B8763E014C@razor.psych.udel.edu> Dear FieldTrippers, I am trying to compute phase-amplitude coupling (PAC) between the phase of theta activity at one channel and the amplitude of gamma activity at another channel over a specific time window within trials. I have read that PAC is captured with a phase-locking value (PLV), which leads me to think that this might be computed with ft_connectivityanalysis. If this is true, what would the configuration structure and input data need to look like? Or, is there an alternative way to compute PAC using FieldTrip? Thank you in advance! All the best, Emilio -------------- next part -------------- An HTML attachment was scrubbed... URL: From lmelloni at gmail.com Fri May 3 00:56:30 2013 From: lmelloni at gmail.com (Lucia Melloni) Date: Thu, 2 May 2013 18:56:30 -0400 Subject: [FieldTrip] Only 1 and Inf as output of ft_connectivityanalysis In-Reply-To: <4B415E50-71DE-42C8-893D-54F991DC616A@donders.ru.nl> References: <9A3D199E-0816-4CBC-AE43-65F768C84EA6@donders.ru.nl> <-7204743264059944684@unknownmsgid> <4B415E50-71DE-42C8-893D-54F991DC616A@donders.ru.nl> Message-ID: Hi Jan-Mathijs, still the same result with the code that you suggested. selection fourierspctrm along dimension 2 averaging crsspctrm over rpt removing dimension rpt from crsspctrm Warning: PROGRESS is only a compatibility wrapper, which will soon be removed. Please instead call FT_PROGRESS. > In progress at 16 In ft_connectivity_corr at 87 In ft_connectivityanalysis at 524 Warning: PROGRESS is only a compatibility wrapper, which will soon be removed. Please instead call FT_PROGRESS. > In progress at 16 In ft_connectivity_corr at 89 In ft_connectivityanalysis at 524 Warning: PROGRESS is only a compatibility wrapper, which will soon be removed. Please instead call FT_PROGRESS. > In progress at 16 In ft_connectivity_corr at 106 In ft_connectivityanalysis at 524 the call to "ft_connectivityanalysis" took 0 seconds Lucia -- Lucia. On Thu, May 2, 2013 at 3:12 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Lucia, > > The warnings indicate that you are dividing by zero. Are you sure that > your cfg is correct? > > Please try > > cfg = []; > cfg.method = 'coh'; > coh = ft_connectivityanalysis(cfg, freq); > > This should work. > > Best, > Jan-Mathijs > > On May 2, 2013, at 6:56 PM, Lucia Melloni wrote: > > Hi jan-mathijs > > Unfortunately I get the same result whether or not I remove the mean. > Best, > -- Lucía > > On May 2, 2013, at 9:57 AM, jan-mathijs schoffelen < > jan.schoffelen at donders.ru.nl> wrote: > > Hi Lucia, > > Could you remove cfg.removemean = 'yes' and try again? > > Best, > > Jan-Mathijs > > On Apr 29, 2013, at 2:38 AM, Lucia Melloni wrote: > > Hi! > I am trying to calculate coherence using ft_connectivityanalysis, but > I am getting only ones and infinity as output in cohspctrm with all of > my data sets. > > I first run ft_freqanalysis with > cfg.method = 'mtmfft'; > cfg.taper = 'dpss'; > cfg.output = 'fourier'; > cfg.foilim = [1 45]; > cfg.tapsmofrq = 1; > cfg.keeptrials = 'yes'; > cfg.keeptapers = 'yes'; > freq = ft_freqanalysis(cfg, data); > > Whether I do or I do not specify cfg.channel and cfg.channelcmb here > does not seem to make a difference for my problem later on. The > spectra look absolutely fine. > > I then run ft_connectivityanalysis with > cfg.method = 'coh'; > cfg.removemean= 'yes'; > cfg.trials = 'all'; > cfg.feedback = 'yes'; > cfg.complex = 'abs'; > coh = ft_connectivityanalysis(cfg, freq); > > The cohspctrm looks like this: > val(:,:,1,1) = > > 1 Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf > Inf Inf Inf (etc.) > > I get the following warning during ft_connectivityanalysis > > Warning: Divide by zero. > > In ft_connectivity_corr at 103 > > In ft_connectivityanalysis at 524 > Warning: Divide by zero. > > In ft_connectivity_corr at 104 > > In ft_connectivityanalysis at 524 > > The same happens if I try to calculate PLV through ft_connectivityanalysis. > This is with Fieldtrip version 20130422 and 20130427, Matlab R2009a, > Windows 7 (64bit). > > Any advice? > Thanks! > Lucia > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > _______________________________________________ > 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 > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri May 3 08:32:30 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 03 May 2013 08:32:30 +0200 Subject: [FieldTrip] Only 1 and Inf as output of ft_connectivityanalysis In-Reply-To: References: <9A3D199E-0816-4CBC-AE43-65F768C84EA6@donders.ru.nl> <-7204743264059944684@unknownmsgid> <4B415E50-71DE-42C8-893D-54F991DC616A@donders.ru.nl> Message-ID: <518359FE.4070207@donders.ru.nl> Dear Lucia, could you try whether the error persists with a recent version? If it does, could you go test whether this code gives the same error: / % ************* code starts here / /%dummy data cfg = []; cfg.ntrials = 500; cfg.triallength = 1; cfg.fsample = 200; cfg.nsignal = 3; cfg.method = 'ar'; cfg.params(:,:,1) = [ 0.8 0 0; 0 0.9 0.5; 0.4 0 0.5]; cfg.params(:,:,2) = [-0.5 0 0; 0 -0.8 0; 0 0 -0.2]; cfg.noisecov = [0.3 0 0; 0 1 0; 0 0 0.2]; data = ft_connectivitysimulation(cfg); % freqanalysis cfgf = []; cfgf.method = 'mtmfft'; cfgf.output = 'fourier'; cfgf.tapsmofrq = 2; freq = ft_freqanalysis(cfgf, data); % connectivityanalysis cfgc = []; cfgc.method = 'coh'; c1 = ft_connectivityanalysis(cfgc, freq); c1.cohspctrm// % ************* code ends here / The code snippet above is part of our test suite for making sure that everything works fine. If it does work for you, but does not with your own data instead of simulated data, the error must be somewhere in your data, e.g. powspctrm consists of nans or 0s etc. Anyway, I assume that it will all work fine if you use an updated version of FieldTrip. Best, Jörn On 5/3/2013 12:56 AM, Lucia Melloni wrote: > Hi Jan-Mathijs, > still the same result with the code that you suggested. > > selection fourierspctrm along dimension 2 > averaging crsspctrm over rpt > removing dimension rpt from crsspctrm > Warning: PROGRESS is only a compatibility wrapper, which will soon be > removed. Please instead call FT_PROGRESS. > > In progress at 16 > In ft_connectivity_corr at 87 > In ft_connectivityanalysis at 524 > Warning: PROGRESS is only a compatibility wrapper, which will soon be > removed. Please instead call FT_PROGRESS. > > In progress at 16 > In ft_connectivity_corr at 89 > In ft_connectivityanalysis at 524 > Warning: PROGRESS is only a compatibility wrapper, which will soon be > removed. Please instead call FT_PROGRESS. > > In progress at 16 > In ft_connectivity_corr at 106 > In ft_connectivityanalysis at 524 > the call to "ft_connectivityanalysis" took 0 seconds > > > Lucia > > -- > Lucia. > > > On Thu, May 2, 2013 at 3:12 PM, jan-mathijs schoffelen > > > wrote: > > Hi Lucia, > > The warnings indicate that you are dividing by zero. Are you sure > that your cfg is correct? > > Please try > > cfg = []; > cfg.method = 'coh'; > coh = ft_connectivityanalysis(cfg, freq); > > This should work. > > Best, > Jan-Mathijs > > On May 2, 2013, at 6:56 PM, Lucia Melloni wrote: > >> Hi jan-mathijs >> >> Unfortunately I get the same result whether or not I remove the >> mean. >> Best, >> -- Lucía >> >> On May 2, 2013, at 9:57 AM, jan-mathijs schoffelen >> > > wrote: >> >>> Hi Lucia, >>> >>> Could you remove cfg.removemean = 'yes' and try again? >>> >>> Best, >>> >>> Jan-Mathijs >>> >>> On Apr 29, 2013, at 2:38 AM, Lucia Melloni wrote: >>> >>>> Hi! >>>> I am trying to calculate coherence using >>>> ft_connectivityanalysis, but >>>> I am getting only ones and infinity as output in cohspctrm with >>>> all of >>>> my data sets. >>>> >>>> I first run ft_freqanalysis with >>>> cfg.method = 'mtmfft'; >>>> cfg.taper = 'dpss'; >>>> cfg.output = 'fourier'; >>>> cfg.foilim = [1 45]; >>>> cfg.tapsmofrq = 1; >>>> cfg.keeptrials = 'yes'; >>>> cfg.keeptapers = 'yes'; >>>> freq = ft_freqanalysis(cfg, data); >>>> >>>> Whether I do or I do not specify cfg.channel and cfg.channelcmb >>>> here >>>> does not seem to make a difference for my problem later on. The >>>> spectra look absolutely fine. >>>> >>>> I then run ft_connectivityanalysis with >>>> cfg.method = 'coh'; >>>> cfg.removemean= 'yes'; >>>> cfg.trials = 'all'; >>>> cfg.feedback = 'yes'; >>>> cfg.complex = 'abs'; >>>> coh = ft_connectivityanalysis(cfg, freq); >>>> >>>> The cohspctrm looks like this: >>>> val(:,:,1,1) = >>>> >>>> 1 Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf >>>> Inf Inf Inf (etc.) >>>> >>>> I get the following warning during ft_connectivityanalysis >>>> >>>> Warning: Divide by zero. >>>>> In ft_connectivity_corr at 103 >>>> In ft_connectivityanalysis at 524 >>>> Warning: Divide by zero. >>>>> In ft_connectivity_corr at 104 >>>> In ft_connectivityanalysis at 524 >>>> >>>> The same happens if I try to calculate PLV through >>>> ft_connectivityanalysis. >>>> This is with Fieldtrip version 20130422 and 20130427, Matlab >>>> R2009a, >>>> Windows 7 (64bit). >>>> >>>> Any advice? >>>> Thanks! >>>> Lucia >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> _______________________________________________ >>> 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 > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > _______________________________________________ > 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 -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From gregor.volberg at psychologie.uni-regensburg.de Fri May 3 09:35:40 2013 From: gregor.volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Fri, 03 May 2013 09:35:40 +0200 Subject: [FieldTrip] Phase-amplitude coupling (PAC) In-Reply-To: <10DBEA48DAE8BB4F8F588B1254C0D92E01B8763E014C@razor.psych.udel.edu> References: <10DBEA48DAE8BB4F8F588B1254C0D92E01B8763E014C@razor.psych.udel.edu> Message-ID: <518368CC.9030102@psychologie.uni-regensburg.de> Dear Emilio, I might not be fully up to date with the functionality of ft_connectivityanalysis, but as much as I know there is some preprocessing necessary to get a phase-to-amplitude coupling. A common strategy is to compute a Hilbert transform on the upper frequency band. This can be used to get the 'analytic amplitude', which is essentially a waveform that connects the amplitude peaks of the higher frequency. If the gamma amplitude is driven by the theta phase, then the analytic waveform should be phase-locked with the theta cycle. The latter part of the analysis could be performed with the option 'plv' in ft_connectivityanalysis. For the processing steps you might want to have a look at an example script at http://fieldtrip.fcdonders.nl/example/crossfreq/phalow_amphigh. Best regards, Gregor Am 02.05.2013 23:07, schrieb Emilio Valadez: > Dear FieldTrippers, > > I am trying to compute phase-amplitude coupling (PAC) between the phase > of theta activity at one channel and the amplitude of gamma activity at > another channel over a specific time window within trials. I have read > that PAC is captured with a phase-locking value (PLV), which leads me to > think that this might be computed with ft_connectivityanalysis. If this > is true, what would the configuration structure and input data need to > look like? Or, is there an alternative way to compute PAC using > FieldTrip? Thank you in advance! > > All the best, > > Emilio > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Dr. rer. nat. Gregor Volberg Institut für Psychologie Universität Regensburg Universitätsstraße 31 D-93053 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 From lmelloni at gmail.com Fri May 3 14:48:01 2013 From: lmelloni at gmail.com (Lucia Melloni) Date: Fri, 3 May 2013 08:48:01 -0400 Subject: [FieldTrip] Only 1 and Inf as output of ft_connectivityanalysis In-Reply-To: <518359FE.4070207@donders.ru.nl> References: <9A3D199E-0816-4CBC-AE43-65F768C84EA6@donders.ru.nl> <-7204743264059944684@unknownmsgid> <4B415E50-71DE-42C8-893D-54F991DC616A@donders.ru.nl> <518359FE.4070207@donders.ru.nl> Message-ID: Hi Jörn, I downloaded version 20130502 and ran both my code and the test code that you had emailed. I get 1 and inf with both. The freq input seems to be ok, so ist must be an issue with ft_connectivityanalysis. Lucia -- Lucia. On Fri, May 3, 2013 at 2:32 AM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Lucia, > > could you try whether the error persists with a recent version? If it > does, could you go test whether this code gives the same error: > > * > % ************* code starts here * > *%dummy data > cfg = []; > cfg.ntrials = 500; > cfg.triallength = 1; > cfg.fsample = 200; > cfg.nsignal = 3; > cfg.method = 'ar'; > cfg.params(:,:,1) = [ 0.8 0 0; > 0 0.9 0.5; > 0.4 0 0.5]; > cfg.params(:,:,2) = [-0.5 0 0; > 0 -0.8 0; > 0 0 -0.2]; > cfg.noisecov = [0.3 0 0; > 0 1 0; > 0 0 0.2]; > > data = ft_connectivitysimulation(cfg); > > > % freqanalysis > cfgf = []; > cfgf.method = 'mtmfft'; > cfgf.output = 'fourier'; > cfgf.tapsmofrq = 2; > freq = ft_freqanalysis(cfgf, data); > > % connectivityanalysis > cfgc = []; > cfgc.method = 'coh'; > c1 = ft_connectivityanalysis(cfgc, freq); > > c1.cohspctrm** > % ************* code ends here > * > The code snippet above is part of our test suite for making sure that > everything works fine. If it does work for you, but does not with your own > data instead of simulated data, the error must be somewhere in your data, > e.g. powspctrm consists of nans or 0s etc. Anyway, I assume that it will > all work fine if you use an updated version of FieldTrip. > > Best, > Jörn > > > > On 5/3/2013 12:56 AM, Lucia Melloni wrote: > > Hi Jan-Mathijs, > still the same result with the code that you suggested. > > selection fourierspctrm along dimension 2 > averaging crsspctrm over rpt > removing dimension rpt from crsspctrm > Warning: PROGRESS is only a compatibility wrapper, which will soon be > removed. Please instead call FT_PROGRESS. > > In progress at 16 > In ft_connectivity_corr at 87 > In ft_connectivityanalysis at 524 > Warning: PROGRESS is only a compatibility wrapper, which will soon be > removed. Please instead call FT_PROGRESS. > > In progress at 16 > In ft_connectivity_corr at 89 > In ft_connectivityanalysis at 524 > Warning: PROGRESS is only a compatibility wrapper, which will soon be > removed. Please instead call FT_PROGRESS. > > In progress at 16 > In ft_connectivity_corr at 106 > In ft_connectivityanalysis at 524 > the call to "ft_connectivityanalysis" took 0 seconds > > > Lucia > > -- > Lucia. > > > On Thu, May 2, 2013 at 3:12 PM, jan-mathijs schoffelen < > jan.schoffelen at donders.ru.nl> wrote: > >> Hi Lucia, >> >> The warnings indicate that you are dividing by zero. Are you sure that >> your cfg is correct? >> >> Please try >> >> cfg = []; >> cfg.method = 'coh'; >> coh = ft_connectivityanalysis(cfg, freq); >> >> This should work. >> >> Best, >> Jan-Mathijs >> >> On May 2, 2013, at 6:56 PM, Lucia Melloni wrote: >> >> Hi jan-mathijs >> >> Unfortunately I get the same result whether or not I remove the mean. >> Best, >> -- Lucía >> >> On May 2, 2013, at 9:57 AM, jan-mathijs schoffelen < >> jan.schoffelen at donders.ru.nl> wrote: >> >> Hi Lucia, >> >> Could you remove cfg.removemean = 'yes' and try again? >> >> Best, >> >> Jan-Mathijs >> >> On Apr 29, 2013, at 2:38 AM, Lucia Melloni wrote: >> >> Hi! >> I am trying to calculate coherence using ft_connectivityanalysis, but >> I am getting only ones and infinity as output in cohspctrm with all of >> my data sets. >> >> I first run ft_freqanalysis with >> cfg.method = 'mtmfft'; >> cfg.taper = 'dpss'; >> cfg.output = 'fourier'; >> cfg.foilim = [1 45]; >> cfg.tapsmofrq = 1; >> cfg.keeptrials = 'yes'; >> cfg.keeptapers = 'yes'; >> freq = ft_freqanalysis(cfg, data); >> >> Whether I do or I do not specify cfg.channel and cfg.channelcmb here >> does not seem to make a difference for my problem later on. The >> spectra look absolutely fine. >> >> I then run ft_connectivityanalysis with >> cfg.method = 'coh'; >> cfg.removemean= 'yes'; >> cfg.trials = 'all'; >> cfg.feedback = 'yes'; >> cfg.complex = 'abs'; >> coh = ft_connectivityanalysis(cfg, freq); >> >> The cohspctrm looks like this: >> val(:,:,1,1) = >> >> 1 Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf >> Inf Inf Inf (etc.) >> >> I get the following warning during ft_connectivityanalysis >> >> Warning: Divide by zero. >> >> In ft_connectivity_corr at 103 >> >> In ft_connectivityanalysis at 524 >> Warning: Divide by zero. >> >> In ft_connectivity_corr at 104 >> >> In ft_connectivityanalysis at 524 >> >> The same happens if I try to calculate PLV through >> ft_connectivityanalysis. >> This is with Fieldtrip version 20130422 and 20130427, Matlab R2009a, >> Windows 7 (64bit). >> >> Any advice? >> Thanks! >> Lucia >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> _______________________________________________ >> 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 >> >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vale.niccolai at gmail.com Fri May 3 15:09:58 2013 From: vale.niccolai at gmail.com (Valentina Niccolai) Date: Fri, 3 May 2013 15:09:58 +0200 Subject: [FieldTrip] neuromag122_neighb Message-ID: Hallo! I would like to use the template neuromag122_neighb.mat to repair channels, but it seems to me that this template contains labels form the neuromag306 system. Is it right? And can I find the template somewhere? Best, Valentina -------------- next part -------------- An HTML attachment was scrubbed... URL: From Markus.Butz at uni-duesseldorf.de Fri May 3 16:06:24 2013 From: Markus.Butz at uni-duesseldorf.de (Markus Butz) Date: Fri, 03 May 2013 15:06:24 +0100 Subject: [FieldTrip] Problems reading in DICOM Message-ID: <75e09cb13160d.5183d270@uni-duesseldorf.de> Thanks for your replies and help Robert, Jörn, and Eelke! Finally it worked out, but the problem was rather on my side, as there where several series of different MRTs scans in one folder of which some did not work, some worked out strange as they had just some files (16-26), and some worked fine. Unfortunately I tried most intensively on the subject who came with no correct series at all. :-( To be fair, all the files appeared exactlty the same, but ft_read_mri is luckily mentioning which series it works on and how many files it include, which finally made me wonder. ;-) Thanks again and have a good weekend Markus ps: Sorry for the belated thanks! Am 13.03.13, schrieb Robert Oostenveld : > > > > > > > > > > > > Hi > > > DICOM files come with different extensions. I guess it depends on the scanner (Siemens/Philips/...). But the file format should be the same as it is a standard format, so the extension should not matter. The fileio/ft_filetype.m function detects both dcm and ima files as dicom. > > > > if the files have no extension, the autodetection fails and you should explicitly specify the format as > mri = ft_read_mri('single_file_of_DICOM_series', 'format', 'dicom'); > I now realize that to be a hidden option. I'll get that fixed in the function documentation. > > > > > > > I recommend that you specify a filename from somewhere in the middle of the stack of files. There are often a few localizer scans in the same directory, and these (due to the sorting of the file names) tend to end up at the beginning or end of the (alphabetical) directory listing. > > > cheers > Robert > > > > > > > > > > > On 13 Mar 2013, at 14:22, Jörn M. Horschig wrote: > > > > > > > > > Hi Markus, > > > > I kept on avoiding these errors by using MRIcron's dcm2nii functionality: http://www.mccauslandcenter.sc.edu/mricro/mricron/index.html > > But pay attention to the coordinate system when importing it into FieldTrip afterwards, it can be quite a hassle... > > > > Maybe Robert or JM know whether reading in .dcm files is possible, but I have to admit that I never tried ;) > > > > Best, > > Jörn > > > > On 3/13/2013 12:11 PM, Markus Butz wrote: > > > > > > > > > > > > > > > > Dear list, > > > > > > > > > I am experiencing problems reading in external MRI in DICOM format from a CD (doing it the first time though). > > > I wanted to do it the new and easy way as described here: > > > http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_an_anatomical_mri_from_dicom_into_ctf_format?s[]=dicom > > > > > > > > > % read the DICOM files > > > mri = ft_read_mri('single_file_of_DICOM_series.IMA'); > > > > > > > > > However, I have no single slices with extension *.ima but one dataset with the extension *.dcm and the other dataset with no extension for the single slice files. I am also not sure where to copy the DICOMDIR file. > > > > > > > > > When I try to open a single file of the *.dcm series I get: > > > > > > > > > mri = ft_read_mri('508652C3.dcm'); > > > > > > > > > ??? Undefined function or variable "hdr". > > > > > > > > > Error in ==> ft_read_mri at 216 > > > hdr = hdr(keep); > > > > > > > > > Trying to read in a single file of the no extension series I get: > > > > > > > > > mri = ft_read_mri('73850486'); > > > > > > > > > ??? Error using ==> dicominfo at 41 > > > The specified file is not in DICOM format > > > > > > > > > The Image Processing toolbox V 7.2 is installed and this is fieldtrip-20111101. > > > > > > > > > Any help appreciated! > > > > > > > > > Markus > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > > -- > > Jörn M. Horschig > > PhD Student > > Donders Institute for Brain, Cognition and Behaviour > > Centre for Cognitive Neuroimaging > > Radboud University Nijmegen > > Neuronal Oscillations Group > > FieldTrip Development Team > > > > P.O. Box 9101 > > NL-6500 HB Nijmegen > > The Netherlands > > > > Contact: > > E-Mail: jm.horschig at donders.ru.nl > > Tel: +31-(0)24-36-68493 > > Web: http://www.ru.nl/donders > > > > Visiting address: > > Trigon, room 2.30 > > Kapittelweg 29 > > NL-6525 EN Nijmegen > > The Netherlands > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jimparkinson at me.com Fri May 3 22:57:26 2013 From: jimparkinson at me.com (Jim Parkinson) Date: Fri, 03 May 2013 21:57:26 +0100 Subject: [FieldTrip] 2x2x3 Repeated Measures ANOVA in FT Message-ID: Hi All Sorry for the very simplistic question here but I am finding it difficult to construct an answer - if indeed there is one - from previous posts. I have a study which is a 2x2x3 repeated measures design, event-related using 64 channel EEG. The design is a culmination of a number of previous studies, so in that sense is justified, and eyeballing the data suggests that the effects are pulling in the directions we have hypothesised. I would really like to attempt to pull interaction effects, main effects and then specified (a priori and justified) contrasts from my EEG data. So, is it even possible using cluster permutation methods to report 3-way, 2-way and main effect stats from such a design, and if so, what is the best/most justifiable method? Secondly, considering the amount of *possible*n simple contrasts available in a 2x2x3 design - even if I don;t run them all because it is not meaningful to do so - what is the best method to correct for multiple comparisons in the simpel contrasts I do end up running? Thans for any help in this confusing matter! best, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: From chadwick.boulay at gmail.com Mon May 6 07:36:18 2013 From: chadwick.boulay at gmail.com (Chadwick Boulay) Date: Mon, 06 May 2013 14:36:18 +0900 Subject: [FieldTrip] Please help me get component dipole fitting results using custom anatomy into normalized template for EEGLAB clustering. Message-ID: <51874152.9090903@gmail.com> Dear Fieldtrip users, Using the subject's MRI and recorded EEG electrode locations, I've managed to segment the MRI, create the volume conduction model, align the electrodes, create a sourcemodel using a grid warped from the MNI template, create the leadfield, and perform ft_dipolefitting on IC weights (imported from EEGLAB). The geometry, electrode positions, and mri all line up (coordsys='ctf', unit='cm') and the calculated dipole positions are what I would expect. [Aside: All of my topoplots have the electrodes positioned correctly relative to each other but the nose and ears are 90 degrees from where I would expect them. Do the topoplot functions not know how to deal with ctf coordsys?] How can I normalize these dipole locations into the template brain so that I may perform component clustering in EEGLAB? I have some ideas but I don't know how to implement them. 1) Calculate the transformation matrix to normalize the original MRI to the template MRI, then apply that transformation to the dipole positions and momentums. I'm guessing I need to use mri_norm = ft_volumenormalize(cfg, mri); but then I don't know how to use mri_norm.transform and mri_norm.initial. Further, the output of ft_dipolefitting doesn't seem to be suitable for ft_transform_geometry. 2) Since the sourcemodel grid is warped from the template brain, I can find the sourcemodel grid index closest to the dipole location then set the new dipole location to be the location of the template grid at the same index. I don't know how to do this for the momentum but I probably don't need the momentum for clustering. 3) Start over from the beginning, normalizing the MRI and the electrode locations as soon as possible then performing all subsequent calculations using the normalized geometry. I searched the documentation and the list archives but I could not find an answer. I am surprised because I expected dipole normalisation to be a common requirement. Maybe I am missing something simple. Thank you in advance for any help. -Chad -- Chadwick Boulay JSPS Postdoctoral Fellow Keio University Yokohama Japan boulay at brain.bio.keio.ac.jp From mushfa.yousuf at googlemail.com Mon May 6 14:47:44 2013 From: mushfa.yousuf at googlemail.com (Mushfa Yousuf) Date: Mon, 6 May 2013 14:47:44 +0200 Subject: [FieldTrip] Source Reconstruction using Openmeeg method In-Reply-To: References: Message-ID: Hello; Yes you were right. I have defined the wrong sensors i.e 'grad' instead of 'elec' while calculating the Leadfield. Actually I am trying to calculate Combined source reconstruction from both EEG and MEG sensors. Do you have any idea, how to define both elec and grad definition while calculating first forward then inverse solution. Because in a fieldtrip either you can defined elec or grad at one time. Regards; Mushfa Yousuf Neurozentrum, Universitätsklinikum Schleswig-Holstein, Campus Kiel (UKSH), Deutschland On Tue, Apr 30, 2013 at 6:23 PM, Johanna Zumer wrote: > Hi Mushfa, > > My guess is that the channels that have you used to compute .csdspctrm are > not the same as the channels in cfg.elec. If you set cfg.channel = > freqPost.label, does that solve it? > > Cheers, > Johanna > > > 2013/4/30 Mushfa Yousuf > >> Hello Fieldtrippers, >> >> I am doing source reconstruction using EEG channels on a fieldtrip. >> >> I have computed Forward solution i.e head model using 'Openmeeg' and >> lead field successfully. >> >> For the inverse solution using 'dics' method, I wrote the following >> syntax >> >> >> >> >> >> cfg = []; >> cfg.method = 'dics'; >> cfg.frequency = 130; >> cfg.elec = dataFIC12.hdr.elec; >> cfg.grid = grid; >> cfg.vol = vol; >> >> sourcePost = ft_sourceanalysis(cfg, freqPost); >> >> >> and I have received the following error: >> >> >> ??? Error using ==> mtimes >> Inner matrix dimensions must agree. >> >> Error in ==> beamformer_dics at 314 >> filt = pinv(lf' * invCf * lf) * lf' * invCf; % >> Gross eqn. 3, use PINV/SVD to cover rank deficient >> leadfield >> >> Error in ==> ft_sourceanalysis at 595 >> dip(i) = beamformer_dics(grid, sens, vol, [], >> squeeze(Cf(i,:,:)), optarg{:}); >> >> Error in ==> newCode at 214 >> sourcePost = ft_sourceanalysis(cfg, freqPost); >> >> >> >> >> Any help would be appreciated. >> >> >> Regards; >> >> >> Mushfa Yousuf >> >> Neurozentrum, >> Universitätsklinikum Schleswig-Holstein, >> Campus Kiel (UKSH), Deutschland >> >> >> _______________________________________________ >> 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: From chaowang0704 at gmail.com Tue May 7 13:35:20 2013 From: chaowang0704 at gmail.com (Chao Wang) Date: Tue, 7 May 2013 14:35:20 +0300 Subject: [FieldTrip] Some Questions on the resample design Message-ID: I have been using field-trip. Recently, I tried to use it for statistic test by non-parametric method, e.g. bootstrap and permutation. As usual, the two method involve resample original data with or without replacement. I carefully inspected the code in the function *resampledesign* but I was quite confused by the method in the bootstrap section: 254resample = zeros(cfg.numrandomization, Nrepl); -------------- next part -------------- An HTML attachment was scrubbed... URL: From chaowang0704 at gmail.com Tue May 7 14:08:57 2013 From: chaowang0704 at gmail.com (Chao Wang) Date: Tue, 7 May 2013 15:08:57 +0300 Subject: [FieldTrip] Some Questions on the resample design In-Reply-To: References: Message-ID: I'm sorry to make a mistake just now. The previous message sent didn't fullfill my meaning. I carefully inspected the code in the function *resampledesign* but I was quite confused by the codes in the bootstrap section (For paired design, the design matrix should be like this, design(1,:)=[1:N 1:N], design(2,1:N)=1 and design(2,N+1:2*N)=2 and N is for example the subject number; and cfg.uvar=2): 91 Nvar = size(design,1); % number of factors or regressors 92 Nrepl = size(design,2); % number of replications ... ... 248 units = design(cfg.uvar,:); 249 for k = 1:length(unique(units)) 250 sel = find(units==k); 251 indx(:,k) = sel; 252 Nrep(k) = length(sel); 253 end 254 resample = zeros(cfg.numrandomization, Nrepl); ... ... 274 tmp = zeros(cfg.numrandomization*10, Nrepl/Nrep(1)); 275 for i=1:cfg.numrandomization*10 276 tmp(i,:) = *sort*(randsample(1:Nrepl/Nrep(1), Nrepl/Nrep(1))); 277 end 278 tmp = unique(tmp, 'rows'); 279 fprintf('found %d unique rows in bootstrap matrix of %d bootstraps', size(tmp,1), cfg.numrandomization*10); ... ... 292 for i=1:cfg.numrandomization 293 for k=1:size(indx,1) 294 resample(i,indx(k,:)) = indx(k,tmp(i,:)); 295 end 296 end My question was on the code in 276 line. These code was to generate a number of rand numbers (about cfg.numrandomization lines) in the range of 1 to Nrepl/Nrep(1), in which Nrepl is the number of replications in the design and Nrep is the number of repetition (Nrep(:)=2 for paired design). If the function '*sort*' is used, then every row of matrix tmp is the same, which will be 1,2,..., Nrepl/Nrep(1). And this will lead the 278 line to the result: temp=1:Nrepl/Nrep(1) (because of the function unique). This result is by no means what we want, I think. What we do want is several rows numbers with same range but with distinct orders. Only in this way, can we guarantee that each resample is not the same. On Tue, May 7, 2013 at 2:35 PM, Chao Wang wrote: > I > have been using field-trip. Recently, I tried to use it for statistic test > by non-parametric method, e.g. bootstrap and permutation. As usual, the two > method involve resample original data with or without replacement. I > carefully inspected the code in the function *resampledesign* but I was > quite confused by the method in the bootstrap section: > > 254resample = zeros(cfg.numrandomization, Nrepl); > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zriouil.imane at gmail.com Tue May 7 14:48:24 2013 From: zriouil.imane at gmail.com (z.imane) Date: Tue, 7 May 2013 14:48:24 +0200 Subject: [FieldTrip] convert .plx to .nex ? Message-ID: Hi i have a problem to read data with extension .plx and i want to convert this to .nex. it's possible or no? please respond me -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Tue May 7 14:53:40 2013 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Tue, 7 May 2013 14:53:40 +0200 Subject: [FieldTrip] Some Questions on the resample design In-Reply-To: References: Message-ID: Dear Chao, I'm not familiar with this piece of code, but I had a quick look. Line 276, with the 'sort' command, is testing for the number of unique 'rows' (line 278). It then uses this information to modify the value of cfg.numrandomization (line 283 which you have not displayed), which is reduced if not enough unique information to do the requested number of randomizations. Then (I think) the actual randomization should be occuring in subsequent lines of code (292-296). Note also that this part of code is only reached if max(design(cfg.uvar,:)) < 20. Does that help? Maybe someone else with more experience in this section of code can comment as well? Or if you still find that it indeed is not randomizing, you can file a bug here (http://bugzilla.fcdonders.nl/), ideally with a small test script. Cheers, Johanna 2013/5/7 Chao Wang > I'm sorry to make a mistake just now. The previous message sent didn't > fullfill my meaning. > > I carefully inspected the code in the function *resampledesign* but I was > quite confused by the codes in the bootstrap section (For paired design, > the design matrix should be like this, design(1,:)=[1:N 1:N], design(2,1:N)=1 > and design(2,N+1:2*N)=2 and N is for example the subject number; and > cfg.uvar=2): > 91 Nvar = size(design,1); % number of factors or regressors > 92 Nrepl = size(design,2); % number of replications > ... > ... > 248 units = design(cfg.uvar,:); > 249 for k = 1:length(unique(units)) > 250 sel = find(units==k); > 251 indx(:,k) = sel; > 252 Nrep(k) = length(sel); > 253 end > 254 resample = zeros(cfg.numrandomization, Nrepl); > ... > ... > 274 tmp = zeros(cfg.numrandomization*10, Nrepl/Nrep(1)); > 275 for i=1:cfg.numrandomization*10 > 276 tmp(i,:) = *sort*(randsample(1:Nrepl/Nrep(1), Nrepl/Nrep(1))); > 277 end > > 278 tmp = unique(tmp, 'rows'); > 279 fprintf('found %d unique rows in bootstrap matrix of %d bootstraps', > size(tmp,1), cfg.numrandomization*10); > ... > ... > 292 for i=1:cfg.numrandomization > 293 for k=1:size(indx,1) > 294 resample(i,indx(k,:)) = indx(k,tmp(i,:)); > 295 end > 296 end > > My question was on the code in 276 line. These code was to generate a > number of rand numbers (about cfg.numrandomization lines) in the range of 1 > to Nrepl/Nrep(1), in which Nrepl is the number of replications in the > design and Nrep is the number of repetition (Nrep(:)=2 for paired design). > If the function '*sort*' is used, then every row of matrix tmp is the > same, which will be 1,2,..., Nrepl/Nrep(1). And this will lead the 278 line > to the result: temp=1:Nrepl/Nrep(1) (because of the function unique). This > result is by no means what we want, I think. What we do want is several > rows numbers with same range but with distinct orders. Only in this way, > can we guarantee that each resample is not the same. > > > > On Tue, May 7, 2013 at 2:35 PM, Chao Wang wrote: > >> I >> have been using field-trip. Recently, I tried to use it for statistic >> test by non-parametric method, e.g. bootstrap and permutation. As usual, >> the two method involve resample original data with or without replacement. >> I carefully inspected the code in the function *resampledesign* but I >> was quite confused by the method in the bootstrap section: >> >> 254resample = zeros(cfg.numrandomization, Nrepl); >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From antony.passaro at gmail.com Wed May 8 23:17:21 2013 From: antony.passaro at gmail.com (Antony Passaro) Date: Wed, 8 May 2013 17:17:21 -0400 Subject: [FieldTrip] Clustering channel dimension of DTF Connectivity In-Reply-To: References: Message-ID: Hi Fieldtrippers, I am trying to perform a group-level comparison of 2 conditions across 10 subjects based on the DTF connectivity. For the time being, we are looking at the DTF for a subset of frequencies (alpha) and choosing the avgoverfreq option which gives us a 4096 x 1 matrix since we are looking at 64 x 64 channels. Using ft_freqstatistics, I noticed that it will throw an error explaining that there is not yet an implementation for data with channelcmb for a cluster analysis so I took it upon myself to identify channel pairs which should be considered neighbors and build a new neighbor structure prior to running ft_freqstatistics. To do that, I took the basic neighbor structure for 64 channels and then created a new neighbor structure of 4096 channel pairs based on the code below: for i=1:4096 label{i,1} = [dtf.labelcmb{i,1},'_',dtf.labelcmb{i,2}]; end labelcmb = dtf.labelcmb; chans=64; %Identify the channel pairs which are neighbors with the target channel NBtarget = {}; for ch=1:chans^2 NBtarget(ch).label = label{ch}; target = find(cellfun(@(x) strcmp(labelcmb{ch,1},x),{neighbours(:).label}) ==1) ; tempnb = cellfun(@(x) strcat(x,['_' labelcmb{ch,2}]),{neighbours( 1,target).neighblabel},'UniformOutput',0); NBtarget(ch).neighblabel = tempnb{:}; end %Identify the channel pairs which are neighbors with the reference channel NBref = {}; for ch=1:chans^2 NBref(ch).label = label{ch}; target = find(cellfun(@(x) strcmp(labelcmb{ch,2},x),{neighbours(:).label}) ==1) ; tempnb = cellfun(@(x) strcat([labelcmb{ch,1} '_'],x),{neighbours(1,target).neighblabel},'UniformOutput',0); NBref(ch).neighblabel = tempnb{:}; end %Append both sets of neighbors (ref and target) NBboth= {}; for ch=1:chans^2 NBboth(ch).label = label{ch}; NBboth(ch).neighblabel = [NBref(ch).neighblabel; NBtarget(ch).neighblabel]; end This seems to work and the clustering method proceeds without error. My question is the following: is this the proper way to utilize the clustering method using ft_freqstatistics on connectivity data or am I missing something? Thanks, -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From chaowang0704 at gmail.com Thu May 9 10:51:37 2013 From: chaowang0704 at gmail.com (Chao Wang) Date: Thu, 9 May 2013 11:51:37 +0300 Subject: [FieldTrip] Some Questions on the resample design (Johanna Zumer) Message-ID: Dear Johanna, Thank you! I understand your meaning and that's right that this part of code is only reached if max(design(cfg.uvar,:)) < 20, but what I do not understand is that for what reason, the '20' is set to test the max(design(cfg.uvar,:)). And besides, by using 'sort', each row of tmp will be the same, in ascending order, which will lead the 278 line using 'unique' to have tmp only one row. That is size(tmp,1)=1; this will lead to cfg.numrandomization=1 in 284 line. > 274 tmp = zeros(cfg.numrandomization*10, Nrepl/Nrep(1)); > 275 for i=1:cfg.numrandomization*10 > 276 tmp(i,:) = *sort*(randsample(1:Nrepl/Nrep(1), Nrepl/Nrep(1))); > 277 end > > 278 tmp = unique(tmp, 'rows'); Best regards! Chao Message: 4 > Date: Tue, 7 May 2013 14:53:40 +0200 > From: Johanna Zumer > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Some Questions on the resample design > Message-ID: > < > CAL4kA6d-WLuip_tUvBRbQr2JiYQ9vr0rb_FnOe18aK8tqEmadA at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Dear Chao, > > I'm not familiar with this piece of code, but I had a quick look. Line > 276, with the 'sort' command, is testing for the number of unique 'rows' > (line 278). It then uses this information to modify the value of > cfg.numrandomization (line 283 which you have not displayed), which is > reduced if not enough unique information to do the requested number of > randomizations. Then (I think) the actual randomization should be > occuring in subsequent lines of code (292-296). Note also that > > this part > of code is only reached if > > max(design(cfg.uvar,:)) < 20. > > Does that help? Maybe someone else with more experience in this section > of code can comment as well? > > Or if you still find that it indeed is not randomizing, you can file a bug > here (http://bugzilla.fcdonders.nl/), ideally with a small test script. > > Cheers, > > Johanna > > > > > 2013/5/7 Chao Wang > > > I'm sorry to make a mistake just now. The previous message sent didn't > > fullfill my meaning. > > > > I carefully inspected the code in the function *resampledesign* but I was > > quite confused by the codes in the bootstrap section (For paired design, > > the design matrix should be like this, design(1,:)=[1:N 1:N], > design(2,1:N)=1 > > and design(2,N+1:2*N)=2 and N is for example the subject number; and > > cfg.uvar=2): > > 91 Nvar = size(design,1); % number of factors or regressors > > 92 Nrepl = size(design,2); % number of replications > > ... > > ... > > 248 units = design(cfg.uvar,:); > > 249 for k = 1:length(unique(units)) > > 250 sel = find(units==k); > > 251 indx(:,k) = sel; > > 252 Nrep(k) = length(sel); > > 253 end > > 254 resample = zeros(cfg.numrandomization, Nrepl); > > ... > > ... > > 274 tmp = zeros(cfg.numrandomization*10, Nrepl/Nrep(1)); > > 275 for i=1:cfg.numrandomization*10 > > 276 tmp(i,:) = *sort*(randsample(1:Nrepl/Nrep(1), Nrepl/Nrep(1))); > > 277 end > > > > 278 tmp = unique(tmp, 'rows'); > > 279 fprintf('found %d unique rows in bootstrap matrix of %d > bootstraps', > > size(tmp,1), cfg.numrandomization*10); > > ... > > ... > > 292 for i=1:cfg.numrandomization > > 293 for k=1:size(indx,1) > > 294 resample(i,indx(k,:)) = indx(k,tmp(i,:)); > > 295 end > > 296 end > > > > My question was on the code in 276 line. These code was to generate a > > number of rand numbers (about cfg.numrandomization lines) in the range > of 1 > > to Nrepl/Nrep(1), in which Nrepl is the number of replications in the > > design and Nrep is the number of repetition (Nrep(:)=2 for paired > design). > > If the function '*sort*' is used, then every row of matrix tmp is the > > same, which will be 1,2,..., Nrepl/Nrep(1). And this will lead the 278 > line > > to the result: temp=1:Nrepl/Nrep(1) (because of the function unique). > This > > result is by no means what we want, I think. What we do want is several > > rows numbers with same range but with distinct orders. Only in this way, > > can we guarantee that each resample is not the same. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marianapbranco1 at gmail.com Fri May 10 10:08:41 2013 From: marianapbranco1 at gmail.com (Mariana Branco) Date: Fri, 10 May 2013 10:08:41 +0200 Subject: [FieldTrip] Real-time processing References: <9B1A8EA6-CCDE-4CED-83FD-C5D2F21607F5@student.tudelft.nl> Message-ID: <31275A3B-B8D6-4C46-8B30-5EF745AD13BA@gmail.com> Hello, I am new in the BCI research field, and I am starting to implement an online BCI system using the Fieldtrip toolbox to detect ERD/ERS features. I already did two offline experiments using this toolbox, but now I am having some doubts about how to adapt the offline signal processing functions into real-time; I started by simulating real-time data from a file. My questions are: 1) To process the data real-time using ft_preprocessing is it first necessary to define trials (with ft_definetrial)? If so, how can I define the trial if it is real-time? 2) Is it possible to still use the function ft_preprocessing and ft_resampledata in real-time with the same specifications of offline procedure? 3) When simulating data stream (with two matlab sessions) the function ft_realtime_powerestimate(cfg) reports an error related to the "arg 3 (overlap)" on the welch's method. How can I correct this? 4) Also, for synchronous/triggered data analysis it is available the function ft_realtime_average. Is it possible to explain how can this example function be used for implementation of my own feature processing and extraction function. Does it preprocess the data in an alternative way to ft_preprocessing? I am sorry for all the questions. Regards, Mariana Branco From mengtongxiao at gmail.com Fri May 10 11:39:29 2013 From: mengtongxiao at gmail.com (=?GB2312?B?s8LRqQ==?=) Date: Fri, 10 May 2013 17:39:29 +0800 Subject: [FieldTrip] cooradinate Message-ID: Dear all, I got some ROIs from MNE. But in MNE it use brain template that is *MNI152 . * I want use fieldtrip compute the spatial filter for ROIs. For this reason ,I want got the position in sourcemodel from template in fieldtrip. I see the fieldtrip seem to use *MNI305 ,*isn,t it? If fieldtrip use *MNI305 ,* this problem is making me question whether a transformation is really necessary ? The both "MNI" space cooradation * x ,y,z axis *represent right,anterior, superior.(+x=right,+y=anterior,+z=superior)?(MNI cooradation from http://imaging.mrc-cbu.cam.ac.uk/imaging/MniTalairach) I find infieldtrip (http://fieldtrip.fcdonders.nl/tutorial/connectivity) sourcemodel is that *x ,y,z axis *represent anterior, right,superior? If a transformation is really necessary ,how should I do? Then I am puzzed what do *x ,y,z axis *represent in stanard_1020.elc Thanks for your help, best, xiao -------------- next part -------------- An HTML attachment was scrubbed... URL: From mengtongxiao at gmail.com Mon May 13 03:30:06 2013 From: mengtongxiao at gmail.com (=?GB2312?B?s8LRqQ==?=) Date: Mon, 13 May 2013 09:30:06 +0800 Subject: [FieldTrip] grid-template Message-ID: Dear all, I want to konw what is the MNI-template that constructed 3D-grids in the fieldtrip (Template sourcemodels ) ? is it MNI305 ,clin27 ,MNI125 or something else? thanks, xiao -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon May 13 11:13:14 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 13 May 2013 11:13:14 +0200 Subject: [FieldTrip] Source Reconstruction using Openmeeg method In-Reply-To: References: Message-ID: <5190AEAA.3020301@donders.ru.nl> Dear Mushfa, I think you have to compute two leadfield matrices, one for EEG (elec) and one for MEG (grad), and then concatenate these (and make sure that the order of sensors won't get mixed up anywhere, because sourceanalysis just expects the leadfield matrix to be ordered like your data. If that's not the case, you either encounter the previous error you described or (if the number of channels matches, but order is mixed up) it will just return wrong source estimated activity. Best, Jörn On 5/6/2013 2:47 PM, Mushfa Yousuf wrote: > Hello; > > Yes you were right. I have defined the wrong sensors i.e 'grad' > instead of 'elec' while calculating the Leadfield. > > Actually I am trying to calculate Combined source reconstruction from > both EEG and MEG sensors. > > Do you have any idea, how to define both elec and grad definition > while calculating first forward then inverse solution. > > Because in a fieldtrip either you can defined elec or grad at one time. > > > Regards; > > > Mushfa Yousuf > > Neurozentrum, > Universitätsklinikum Schleswig-Holstein, > Campus Kiel (UKSH), Deutschland > > > On Tue, Apr 30, 2013 at 6:23 PM, Johanna Zumer > > wrote: > > Hi Mushfa, > > My guess is that the channels that have you used to compute > .csdspctrm are not the same as the channels in cfg.elec. If you > set cfg.channel = freqPost.label, does that solve it? > > Cheers, > Johanna > > > 2013/4/30 Mushfa Yousuf > > > Hello Fieldtrippers, > > I am doing source reconstruction using EEG channels on a > fieldtrip. > > I have computed Forward solution i.e head model using > 'Openmeeg' and lead field successfully. > > For the inverse solution using 'dics' method, I wrote the > following syntax > > > > > > cfg = []; > cfg.method = 'dics'; > cfg.frequency = 130; > cfg.elec = dataFIC12.hdr.elec; > cfg.grid = grid; > cfg.vol = vol; > > sourcePost = ft_sourceanalysis(cfg, freqPost); > > > and I have received the following error: > > > ??? Error using ==> mtimes > Inner matrix dimensions must agree. > > Error in ==> beamformer_dics at 314 > filt = pinv(lf' * invCf * lf) * lf' * invCf; % > Gross eqn. 3, use PINV/SVD to cover rank deficient > leadfield > > Error in ==> ft_sourceanalysis at 595 > dip(i) = beamformer_dics(grid, sens, vol, [], > squeeze(Cf(i,:,:)), optarg{:}); > > Error in ==> newCode at 214 > sourcePost = ft_sourceanalysis(cfg, freqPost); > > > > > Any help would be appreciated. > > > Regards; > > > Mushfa Yousuf > > Neurozentrum, > Universitätsklinikum Schleswig-Holstein, > Campus Kiel (UKSH), Deutschland > > > _______________________________________________ > 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 -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From naran.kutt at gmail.com Mon May 13 11:48:17 2013 From: naran.kutt at gmail.com (Narayanan Kutty) Date: Mon, 13 May 2013 05:48:17 -0400 Subject: [FieldTrip] Mutual Information Message-ID: Hello All, Are there any functions within fieldtrip to calculate mutual information between channels at the sensor level. I remember that eeglab used to have a plugin for that. Couldn't find anything in fieldtrip. Thank you, Naran. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon May 13 14:14:44 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 13 May 2013 14:14:44 +0200 Subject: [FieldTrip] Clustering channel dimension of DTF Connectivity In-Reply-To: References: Message-ID: <5190D934.5020407@donders.ru.nl> Dear Tony, I had a quick look at your code, and I think it is fine. However, I would define neighbours purely based on the target sensor, not on the reference, e.g. when computing cortico-muscular coherence on channel level, you are interested in spatial clusters near the cortex and not in cluster on the arm where the reference sensor is. Also check out this: data = ft_checkdata(data, 'cmbrepresentation', 'full'); This will turn chancmb (Nx1) into chan X chan (RxS, where R*S = N). Best, Jörn On 5/8/2013 11:17 PM, Antony Passaro wrote: > Hi Fieldtrippers, > I am trying to perform a group-level comparison of 2 conditions across > 10 subjects based on the DTF connectivity. For the time being, we are > looking at the DTF for a subset of frequencies (alpha) and choosing > the avgoverfreq option which gives us a 4096 x 1 matrix since we are > looking at 64 x 64 channels. Using ft_freqstatistics, I noticed that > it will throw an error explaining that there is not yet an > implementation for data with channelcmb for a cluster analysis so I > took it upon myself to identify channel pairs which should be > considered neighbors and build a new neighbor structure prior to > running ft_freqstatistics. To do that, I took the basic neighbor > structure for 64 channels and then created a new neighbor structure of > 4096 channel pairs based on the code below: > for i=1:4096 > label{i,1} = [dtf.labelcmb{i,1},'_',dtf.labelcmb{i,2}]; > end > labelcmb = dtf.labelcmb; > > chans=64; > %Identify the channel pairs which are neighbors with the target channel > NBtarget = {}; > for ch=1:chans^2 > NBtarget(ch).label = label{ch}; > target = find(cellfun(@(x) > strcmp(labelcmb{ch,1},x),{neighbours(:).label}) ==1) ; > tempnb = cellfun(@(x) strcat(x,['_' > labelcmb{ch,2}]),{neighbours(1,target).neighblabel},'UniformOutput',0); > NBtarget(ch).neighblabel = tempnb{:}; > end > > %Identify the channel pairs which are neighbors with the reference channel > NBref = {}; > for ch=1:chans^2 > NBref(ch).label = label{ch}; > target = find(cellfun(@(x) > strcmp(labelcmb{ch,2},x),{neighbours(:).label}) ==1) ; > tempnb = cellfun(@(x) strcat([labelcmb{ch,1} > '_'],x),{neighbours(1,target).neighblabel},'UniformOutput',0); > NBref(ch).neighblabel = tempnb{:}; > end > > > %Append both sets of neighbors (ref and target) > NBboth= {}; > for ch=1:chans^2 > NBboth(ch).label = label{ch}; > NBboth(ch).neighblabel = [NBref(ch).neighblabel; > NBtarget(ch).neighblabel]; > end > This seems to work and the clustering method proceeds without error. > My question is the following: is this the proper way to utilize the > clustering method using ft_freqstatistics on connectivity data or am I > missing something? > Thanks, > -Tony > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanbelluzo at gmail.com Mon May 13 21:13:08 2013 From: sanbelluzo at gmail.com (Santiago Belluzo) Date: Mon, 13 May 2013 16:13:08 -0300 Subject: [FieldTrip] Emotiv + FieldTrip + Matlab In-Reply-To: References: Message-ID: Hi, i´m trying to use emotiv2ft in a windows machine and Matlab return this message "Waiting for the device to become ready - press [Escape] to quit EDK: User added, will now start acquisition. Streaming 16 out of 22 channels Could not connect to buffer server at localhost:1972." In http://fieldtrip.fcdonders.nl/development/realtime/emotiv?s[]=emotiv said that "If port 1972 cannot be accessed on a Windows machine it may help to first initialize the port from matlab, e.g., via ft_realtime_fileproxy". But i´m not sure how to do it.... Someone can help me?. Santiago. 2013/3/4 Santiago Belluzo > *Hi, I'm new to FieldTrip and I'm interested in using it to capture **realtime data from the Emotiv headset using the function emotiv2ft.I`ve tried some examples like signalviewer andpowerviewer with random signal from signalproxy to check that the FieldTripBuffer works fine. Then i`ve tried to use emotiv2ft and have problems. * > > *I'm not sure about how to call to this interface from within **Matlab.* > > *I`ve read some messages from the mailinglist with similar problem but in there is not clear for me how they solve it. * > > *I´ll be waiting for any help!.* > > *Thanks.* > > -- > Santiago > -- Santiago Belluzo -------------- next part -------------- An HTML attachment was scrubbed... URL: From chenxiaogang1986 at 163.com Tue May 14 03:37:29 2013 From: chenxiaogang1986 at 163.com (Xiaogang Chen) Date: Tue, 14 May 2013 09:37:29 +0800 (CST) Subject: [FieldTrip] ft_topoplotCC of vector Message-ID: <5ef5e6c2.25f7.13ea0af63fd.Coremail.chenxiaogang1986@163.com> Hi all, I am trying to plot some results that are not the output from a ft function, using a ft_topoplotCC function. However, I don’t know how to use it. Would you send me some simple examples? Thanks very much. Best, Xiaogang Chen -------------- next part -------------- An HTML attachment was scrubbed... URL: From yoel.sher at mail.huji.ac.il Tue May 14 18:09:37 2013 From: yoel.sher at mail.huji.ac.il (Yoel Sher) Date: Tue, 14 May 2013 19:09:37 +0300 Subject: [FieldTrip] EEG -> Topographic Matrix Message-ID: <519261C1.3020002@mail.huji.ac.il> Dear FieldTrippers, I would like to know if there is an option to extract the Topographic map (Such as the scalp in ft_topoplotER) to a matrix. I've searched around the functions in fieldtrip and couldn't find any.. Many Thanks, Yoel From eelke.spaak at donders.ru.nl Tue May 14 19:25:40 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 14 May 2013 19:25:40 +0200 Subject: [FieldTrip] EEG -> Topographic Matrix In-Reply-To: <519261C1.3020002@mail.huji.ac.il> References: <519261C1.3020002@mail.huji.ac.il> Message-ID: Dear Yoel, I'm not sure if I understand what you mean exactly, but do you simply want the values plotted by ft_topoplotER in case of plotting the results of ft_timelockanalysis? In that case, you can look at the tl.avg field (if tl = ft_timelockanalysis(cfg, data)). But that seems rather trivial, so I think you must mean something else. Best, Eelke On 14 May 2013 18:09, Yoel Sher wrote: > Dear FieldTrippers, > > I would like to know if there is an option to extract the Topographic map > (Such as the scalp in ft_topoplotER) to a matrix. I've searched around the > functions in fieldtrip and couldn't find any.. > > Many Thanks, > Yoel > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From yoel.sher at mail.huji.ac.il Wed May 15 12:08:20 2013 From: yoel.sher at mail.huji.ac.il (Yoel Sher) Date: Wed, 15 May 2013 13:08:20 +0300 Subject: [FieldTrip] EEG -> Topographic Matrix In-Reply-To: References: <519261C1.3020002@mail.huji.ac.il> Message-ID: <51935E94.7090605@mail.huji.ac.il> Dear Eelke, First, thanks for you fast replay. Second, let me clarify my question. I'm looking for other result than the average ERP/ERF. I'm looking for a matrix that output the EEG value per each location (not just the electrodes) on the scalp. Of course that every location other than the electrode is an interpolated value. The plot of ft_topoplotER shows that matrix (but does not output, as far as I know). Regards, Yoel On 05/14/2013 08:25 PM, Eelke Spaak wrote: > Dear Yoel, > > I'm not sure if I understand what you mean exactly, but do you simply > want the values plotted by ft_topoplotER in case of plotting the > results of ft_timelockanalysis? In that case, you can look at the > tl.avg field (if tl = ft_timelockanalysis(cfg, data)). But that seems > rather trivial, so I think you must mean something else. > > Best, > Eelke > > On 14 May 2013 18:09, Yoel Sher wrote: >> Dear FieldTrippers, >> >> I would like to know if there is an option to extract the Topographic map >> (Such as the scalp in ft_topoplotER) to a matrix. I've searched around the >> functions in fieldtrip and couldn't find any.. >> >> Many Thanks, >> Yoel >> _______________________________________________ >> 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 > From eelke.spaak at donders.ru.nl Wed May 15 12:22:21 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 15 May 2013 12:22:21 +0200 Subject: [FieldTrip] EEG -> Topographic Matrix In-Reply-To: <51935E94.7090605@mail.huji.ac.il> References: <519261C1.3020002@mail.huji.ac.il> <51935E94.7090605@mail.huji.ac.il> Message-ID: Dear Yoel, Ah, I understand now; you want the interpolated matrix. This is not possible with standard FieldTrip code. However, it should not be very difficult to get this. I would recommend to set a breakpoint in plotting/ft_plot_topo.m, at line 220. Then, when the code breaks at that point, you can type in the command window assignin('base','Xi',Xi) and the same for Yi and Zi, that way you have the x and y coordinates and the data (z) in variables in your base workspace. Getting this matrix programmatically in a script should also be possible, but that would require custom hacks of ft_plot_topo (e.g. you could put this assignin call in your local copy of the function, or add Xi,Yi,Zi as output arguments, etc.) Good luck, best, Eelke On 15 May 2013 12:08, Yoel Sher wrote: > Dear Eelke, > > First, thanks for you fast replay. Second, let me clarify my question. I'm > looking for other result than the average ERP/ERF. I'm looking for a matrix > that output the EEG value per each location (not just the electrodes) on the > scalp. Of course that every location other than the electrode is an > interpolated value. The plot of ft_topoplotER shows that matrix (but does > not output, as far as I know). > > Regards, > Yoel > > > On 05/14/2013 08:25 PM, Eelke Spaak wrote: >> >> Dear Yoel, >> >> I'm not sure if I understand what you mean exactly, but do you simply >> want the values plotted by ft_topoplotER in case of plotting the >> results of ft_timelockanalysis? In that case, you can look at the >> tl.avg field (if tl = ft_timelockanalysis(cfg, data)). But that seems >> rather trivial, so I think you must mean something else. >> >> Best, >> Eelke >> >> On 14 May 2013 18:09, Yoel Sher wrote: >>> >>> Dear FieldTrippers, >>> >>> I would like to know if there is an option to extract the Topographic map >>> (Such as the scalp in ft_topoplotER) to a matrix. I've searched around >>> the >>> functions in fieldtrip and couldn't find any.. >>> >>> Many Thanks, >>> Yoel >>> _______________________________________________ >>> 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 >> > From yoel.sher at mail.huji.ac.il Wed May 15 12:47:06 2013 From: yoel.sher at mail.huji.ac.il (Yoel Sher) Date: Wed, 15 May 2013 13:47:06 +0300 Subject: [FieldTrip] EEG -> Topographic Matrix In-Reply-To: References: <519261C1.3020002@mail.huji.ac.il> <51935E94.7090605@mail.huji.ac.il> Message-ID: <519367AA.60204@mail.huji.ac.il> Dear Eelke, Many thanks, I'll try it out. Best, - Yoel On 05/15/2013 01:22 PM, Eelke Spaak wrote: > Dear Yoel, > > Ah, I understand now; you want the interpolated matrix. This is not > possible with standard FieldTrip code. > > However, it should not be very difficult to get this. I would > recommend to set a breakpoint in plotting/ft_plot_topo.m, at line 220. > Then, when the code breaks at that point, you can type in the command > window assignin('base','Xi',Xi) and the same for Yi and Zi, that way > you have the x and y coordinates and the data (z) in variables in your > base workspace. > > Getting this matrix programmatically in a script should also be > possible, but that would require custom hacks of ft_plot_topo (e.g. > you could put this assignin call in your local copy of the function, > or add Xi,Yi,Zi as output arguments, etc.) > > Good luck, > best, > > Eelke > > On 15 May 2013 12:08, Yoel Sher wrote: >> Dear Eelke, >> >> First, thanks for you fast replay. Second, let me clarify my question. I'm >> looking for other result than the average ERP/ERF. I'm looking for a matrix >> that output the EEG value per each location (not just the electrodes) on the >> scalp. Of course that every location other than the electrode is an >> interpolated value. The plot of ft_topoplotER shows that matrix (but does >> not output, as far as I know). >> >> Regards, >> Yoel >> >> >> On 05/14/2013 08:25 PM, Eelke Spaak wrote: >>> Dear Yoel, >>> >>> I'm not sure if I understand what you mean exactly, but do you simply >>> want the values plotted by ft_topoplotER in case of plotting the >>> results of ft_timelockanalysis? In that case, you can look at the >>> tl.avg field (if tl = ft_timelockanalysis(cfg, data)). But that seems >>> rather trivial, so I think you must mean something else. >>> >>> Best, >>> Eelke >>> >>> On 14 May 2013 18:09, Yoel Sher wrote: >>>> Dear FieldTrippers, >>>> >>>> I would like to know if there is an option to extract the Topographic map >>>> (Such as the scalp in ft_topoplotER) to a matrix. I've searched around >>>> the >>>> functions in fieldtrip and couldn't find any.. >>>> >>>> Many Thanks, >>>> Yoel >>>> _______________________________________________ >>>> 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 > From ggonesc at upo.es Wed May 15 19:37:11 2013 From: ggonesc at upo.es (Gabriel Gonzalez Escamilla) Date: Wed, 15 May 2013 19:37:11 +0200 Subject: [FieldTrip] PLV and ImC computation Message-ID: <8d77945c28ba0f58.5193e3e7@upo.es> An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: SpamAssassinReport.txt URL: From mbj0310 at gmail.com Thu May 16 08:28:13 2013 From: mbj0310 at gmail.com (Beom Jun Min) Date: Thu, 16 May 2013 15:28:13 +0900 Subject: [FieldTrip] About preprocessing and define trial Message-ID: <9F7D3012-ADFE-40C4-AC5F-AA3F320348AD@gmail.com> Dear all, Hello, my name is BJ Min from Korea. I am just a beginner in the Fieldtrip. Anyway, with the help of tutorials, I could make grand average ERP of my data finally. However, my question is about the order of preprocessing. According to the tutorials, and examples, it looks the ft_definetrial step is the first, then ft_preprocessing step is followed. But, is there any method to flip these two steps? What I want to do is preprocessing (filtering, notch filtering) first then to use ft_definetrial sequentially. Best regards BeomJun Min, M.D. Ph. D. student, Department of Medical System Engineering (DMSE) Gwangju Institute of Science and Technology (GIST) 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju 500-712, Republic of Korea (South) Phone: +82-62-715-3266 / Fax: +82-62-715-3244 E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu May 16 08:52:02 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 16 May 2013 08:52:02 +0200 Subject: [FieldTrip] About preprocessing and define trial In-Reply-To: <9F7D3012-ADFE-40C4-AC5F-AA3F320348AD@gmail.com> References: <9F7D3012-ADFE-40C4-AC5F-AA3F320348AD@gmail.com> Message-ID: Dear BeomJun, What you describe is definitely possible. If you specify: cfg = []; cfg.dataset = 'dataset'; data = ft_preprocessing(cfg); you will get one very big 'trial' in the data structure, representing just all your data. In the step above, you can also specify filter options. After this step, you can segment your data into trials by using ft_redefinetrial (rather than ft_definetrial). However, you still need a trl matrix containing the trial definition. The easiest way to obtain this is to still call ft_definetrial as you used to do: cfg = []; cfg.dataset = 'dataset'; cfg.trialdef..... % all the trial definition options go here cfgout = ft_definetrial(cfg); and then just save the output trl matrix: trl = cfgout.trl; now you can call ft_redefinetrial: cfg = []; cfg.trl = trl; data = ft_redefinetrial(cfg, data); and your data will be segmented. Hope this helps, Best, Eelke On 16 May 2013 08:28, Beom Jun Min wrote: > > Dear all, > > Hello, my name is BJ Min from Korea. > > I am just a beginner in the Fieldtrip. > Anyway, with the help of tutorials, I could make grand average ERP of my > data finally. > > However, my question is about the order of preprocessing. According to the > tutorials, and examples, it looks the ft_definetrial step is the first, then > ft_preprocessing step is followed. But, is there any method to flip these > two steps? What I want to do is preprocessing (filtering, notch filtering) > first then to use ft_definetrial sequentially. > > Best regards > > > BeomJun Min, M.D. > > Ph. D. student, Department of Medical System Engineering (DMSE) > Gwangju Institute of Science and Technology (GIST) > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > 500-712, Republic of Korea (South) > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From mbj0310 at gmail.com Thu May 16 10:06:51 2013 From: mbj0310 at gmail.com (Beom Jun Min) Date: Thu, 16 May 2013 17:06:51 +0900 Subject: [FieldTrip] About preprocessing and define trial In-Reply-To: References: <9F7D3012-ADFE-40C4-AC5F-AA3F320348AD@gmail.com> Message-ID: Dear Eelke Spaak Thank you very much. It works perfect! Best regards. 2013/5/16 Eelke Spaak > Dear BeomJun, > > What you describe is definitely possible. If you specify: > > cfg = []; > cfg.dataset = 'dataset'; > data = ft_preprocessing(cfg); > > you will get one very big 'trial' in the data structure, representing > just all your data. In the step above, you can also specify filter > options. > > After this step, you can segment your data into trials by using > ft_redefinetrial (rather than ft_definetrial). However, you still need > a trl matrix containing the trial definition. The easiest way to > obtain this is to still call ft_definetrial as you used to do: > > cfg = []; > cfg.dataset = 'dataset'; > cfg.trialdef..... > % all the trial definition options go here > cfgout = ft_definetrial(cfg); > > and then just save the output trl matrix: > > trl = cfgout.trl; > > now you can call ft_redefinetrial: > > cfg = []; > cfg.trl = trl; > data = ft_redefinetrial(cfg, data); > > and your data will be segmented. > > Hope this helps, > Best, > > Eelke > > > On 16 May 2013 08:28, Beom Jun Min wrote: > > > > Dear all, > > > > Hello, my name is BJ Min from Korea. > > > > I am just a beginner in the Fieldtrip. > > Anyway, with the help of tutorials, I could make grand average ERP of my > > data finally. > > > > However, my question is about the order of preprocessing. According to > the > > tutorials, and examples, it looks the ft_definetrial step is the first, > then > > ft_preprocessing step is followed. But, is there any method to flip > these > > two steps? What I want to do is preprocessing (filtering, notch > filtering) > > first then to use ft_definetrial sequentially. > > > > Best regards > > > > > > BeomJun Min, M.D. > > > > Ph. D. student, Department of Medical System Engineering (DMSE) > > Gwangju Institute of Science and Technology (GIST) > > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > > 500-712, Republic of Korea (South) > > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > > E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr > > > > > > _______________________________________________ > > 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 > -- BeomJun Min, M.D. Department of Medical System Engineering (DMSE) Gwangju Institute of Science and Technology (GIST) 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju 500-712, Republic of Korea (South) Phone: +82-62-715-3266 / Fax: +82-62-715-3244 E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu May 16 10:07:47 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 16 May 2013 10:07:47 +0200 Subject: [FieldTrip] Second-level one-sample t test with clustering Message-ID: Dear fellow FieldTrippers, At the moment, I want to do second-level source statistics on my data (but the question is the same for sensor statistics). I have computed two-sample t-scores for each subject, between the trials in conditions A and B. Now, the appropriate per-voxel test to do across subjects would be a one-sample t-test. This is rather easy to do, but I would like to use cluster permutations to correct for multiple comparisons. My idea is to generate fake data of all zeroes, the same size as my t-score descriptive data per subject, and then do a paired-samples t test between the real data and these zeroes (using ft_statfun_depsamplesT). The voxel-level t statistic of data vs 0 should be the same as a one-sample test of course. However, I am not sure the permutations of the data would give me a valid distribution of the cluster statistic. The test for the real data would be (comparing column 1 to column 2): dataA 0 dataB 0 dataC 0 dataD 0 whereas a permutation might look like so: 0 dataA dataB 0 dataC 0 0 dataD Intuitively, I think this makes sense, as the t score of 0 vs data will be the negative of t(data vs 0), I should get an appropriate randomization distribution. But I'm not completely sure of this. So, my question: does anyone see a problem with my approach? Or is this a valid way of cluster-correcting a one-sample T test? If not, what would be the right way to proceed? Many thanks, best, Eelke From e.maris at psych.ru.nl Thu May 16 16:31:15 2013 From: e.maris at psych.ru.nl (Eric Maris) Date: Thu, 16 May 2013 16:31:15 +0200 (CEST) Subject: [FieldTrip] fieldtrip Digest, Vol 30, Issue 20 In-Reply-To: Message-ID: <245706559.668339.1368714675557.JavaMail.root@draco.zimbra.ru.nl> Hi Eelke, This not valid. At the second level, you must use the condition means (per subject) as the observations about which you have a hypothesis and which therefore have to be permuted. Eric http://www.nphyscog.com/contact ----- fieldtrip-request at science.ru.nl schreef: > 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..." From eelke.spaak at donders.ru.nl Thu May 16 16:43:32 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 16 May 2013 16:43:32 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 30, Issue 20 In-Reply-To: <245706559.668339.1368714675557.JavaMail.root@draco.zimbra.ru.nl> References: <245706559.668339.1368714675557.JavaMail.root@draco.zimbra.ru.nl> Message-ID: Hi Eric, Thanks, that's what I expected. However, that approach does not take into account the different between-trial variances in the different subjects. What would you recommend to take those into account? Best, Eelke On 16 May 2013 16:31, Eric Maris wrote: > Hi Eelke, > > This not valid. At the second level, you must use the condition means (per subject) as the observations about which you have a hypothesis and which therefore have to be permuted. > > Eric > > > http://www.nphyscog.com/contact > ----- fieldtrip-request at science.ru.nl schreef: >> 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..." > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From e.maris at psych.ru.nl Thu May 16 17:28:36 2013 From: e.maris at psych.ru.nl (Eric Maris) Date: Thu, 16 May 2013 17:28:36 +0200 (CEST) Subject: [FieldTrip] fieldtrip Digest, Vol 30, Issue 20 In-Reply-To: References: <245706559.668339.1368714675557.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <022601ce524a$0c47c250$24d746f0$@maris@psych.ru.nl> Hi Eelke, It all depends on the null hypothesis that you want to test. It's better to discuss this with you in person or at some meeting with other colleagues (for non-Donders Discussion List readers, Eelke and I work at the same institute), because at the end it is a matter of deciding on what is an interesting null hypothesis (both for you and the reviewers of your paper). I remember a discussion with a colleague about the same issue (using first-level t-statistics at the second level), and he was quite unhappy when I questioned this approach (by asking whether this is really the null hypothesis he was interested in). At the end, it turned out that he also had tried the standard approach (using only condition means) but this did not result in a significant p-value. Best, Eric > -----Original Message----- > From: eelke.spaak at gmail.com [mailto:eelke.spaak at gmail.com] On Behalf Of > Eelke Spaak > Sent: donderdag 16 mei 2013 16:44 > To: Eric Maris; FieldTrip discussion list > Subject: Re: [FieldTrip] fieldtrip Digest, Vol 30, Issue 20 > > Hi Eric, > > Thanks, that's what I expected. However, that approach does not take > into account the different between-trial variances in the different > subjects. What would you recommend to take those into account? > > Best, > Eelke > > On 16 May 2013 16:31, Eric Maris wrote: > > Hi Eelke, > > > > This not valid. At the second level, you must use the condition means > (per subject) as the observations about which you have a hypothesis and > which therefore have to be permuted. > > > > Eric > > > > > > http://www.nphyscog.com/contact > > ----- fieldtrip-request at science.ru.nl schreef: > >> 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..." > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tim.curran at Colorado.EDU Fri May 17 14:36:54 2013 From: tim.curran at Colorado.EDU (Tim Curran) Date: Fri, 17 May 2013 06:36:54 -0600 Subject: [FieldTrip] Postdoctoral Position, Curran Lab, University of Colorado Boulder In-Reply-To: <022601ce524a$0c47c250$24d746f0$@maris@psych.ru.nl> References: <245706559.668339.1368714675557.JavaMail.root@draco.zimbra.ru.nl> <022601ce524a$0c47c250$24d746f0$@maris@psych.ru.nl> Message-ID: Postdoctoral Position Curran Lab, University of Colorado Boulder Postdoctoral research position available in the lab of Tim Curran at the Department of Psychology & Neuroscience, University of Colorado Boulder to work on NIH-funded ERP studies of memory and perceptual expertise. Desirable qualifications include research experience related to memory, perceptual expertise, ERP/EEG, and/or related domains. Anticipated start date is summer or fall of 2013. The University of Colorado is an Equal Opportunity/Affirmative Action employer. For further information contact, tim.curran at colorado.edu. Applicants must submit a CV, a statement of research experience/interests, and a cover letter including email addresses for at least three referees to contact for recommendation letters if needed. Applications will be accepted electronically at https://www.jobsatcu.com/postings/63602 http://psych.colorado.edu/~tcurran/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ggonesc at upo.es Fri May 17 17:45:40 2013 From: ggonesc at upo.es (Gabriel Gonzalez Escamilla) Date: Fri, 17 May 2013 17:45:40 +0200 Subject: [FieldTrip] problem in connectivityanalysis Message-ID: <9f89709b303dae2.51966cc4@upo.es> An HTML attachment was scrubbed... URL: From jessetinker at gmail.com Fri May 17 21:36:12 2013 From: jessetinker at gmail.com (Jesse Tinker) Date: Fri, 17 May 2013 12:36:12 -0700 Subject: [FieldTrip] Segmentation Memory Issue Message-ID: Hello Fieldtrippers! This is my first post ever and I just want to say thank you to everyone for promoting such a vibrant and supportive intellectual community. I have an issue which seems so simple but I am somewhat stymied by: using fieldtrip to accomplish the coregistration. The main points of my code are: mri = ft_read_mri( ); mri = ft_volumerealign(cfg, mri); % Mark fiducials mrireslice = ft_volumereslice(cfg,mri); %To apply the resultant transformation matrix segmentedmri = ft_volumesegment(cfg, mrireslice); First, if I skip the reslice step, everything works fine. However, if I do the reslice and then try to segment, spm_preproc tries to create a 1.8 Tb array. Although it bravely tries, my 24 Gb of RAM inevitably fails. The analogous array for the unsliced mri is 2Mb. I found this confusing as the quantity of information in the resliced image is the exact same. I traced through all the coding and the computation that fails is based on the transformation matrix of the MRI which, of course, changes with the reslicing. I am happy to provide details of that but won't at the moment. My question, has anyone else encountered this or developed a workaround? Very much appreciated, Jesse British Columbia Mental Health and Research Institute -------------- next part -------------- An HTML attachment was scrubbed... URL: From mengtongxiao at gmail.com Sat May 18 16:06:20 2013 From: mengtongxiao at gmail.com (=?GB2312?B?s8LRqQ==?=) Date: Sat, 18 May 2013 22:06:20 +0800 Subject: [FieldTrip] a .mat file about meg data do preprocessing Message-ID: Dear all, I have a .mat file about meg data(102*98800,channel*time,channel is 'MEG0111','MEG0121'.....'M*1' ); Then I use eeglab read it,got .set file;I want use ft_timelockanalysis then *cfg = []; cfg.dataset = 'megalpha.set'; cfg.grad=grad; data_org = ft_preprocessing(cfg)* >grad = chanori: [102x3 double] chanpos: [102x3 double] chantype: {102x1 cell} chanunit: {102x1 cell} coilori: [510x3 double] coilpos: [510x3 double] label: {102x1 cell} tra: [102x510 double] unit: 'cm' Warning: creating default channel names > In fileio\private\read_eeglabheader at 53 In ft_read_header at 572 In ft_preprocessing at 343 processing channel { 'chan001' 'chan002' 'chan003' 'chan004' 'chan005' 'chan006' 'chan007' 'chan008' 'chan009' 'chan010' 'chan011' 'chan012' 'chan013' 'chan014' 'chan015' 'chan016' 'chan017' 'chan018' 'chan019' 'chan020' 'chan021' 'chan022' 'chan023' 'chan024' 'chan025' 'chan026' 'chan027' 'chan028' 'chan029' 'chan030' 'chan031' 'chan032' 'chan033' 'chan034' 'chan035' 'chan036' 'chan037' 'chan038' 'chan039' 'chan040' 'chan041' 'chan042' 'chan043' 'chan044' 'chan045' 'chan046' 'chan047' 'chan048' 'chan049' 'chan050' 'chan051' 'chan052' 'chan053' 'chan054' 'chan055' 'chan056' 'chan057' 'chan058' 'chan059' 'chan060' 'chan061' 'chan062' 'chan063' 'chan064' 'chan065' 'chan066' 'chan067' 'chan068' 'chan069' 'chan070' 'chan071' 'chan072' 'chan073' 'chan074' 'chan075' 'chan076' 'chan077' 'chan078' 'chan079' 'chan080' 'chan081' 'chan082' 'chan083' 'chan084' 'chan085' 'chan086' 'chan087' 'chan088' 'chan089' 'chan090' 'chan091' 'chan092' 'chan093' 'chan094' 'chan095' 'chan096' 'chan097' 'chan098' 'chan099' 'chan100' 'chan101' 'chan102' } reading and preprocessing reading and preprocessing trial 1 from 1 data_org = hdr: [1x1 struct] label: {102x1 cell} time: {[1x98800 double]} trial: {[102x98800 double]} fsample: 1037 sampleinfo: [1 98800] cfg: [1x1 struct] *cfg = []; cfg.covariance = 'yes'; cfg.channel = 'M*1'; cfg.vartrllength = 2; cfg.covariancewindow = 'all'; timelock = ft_timelockanalysis(cfg, data_org);* timelock = avg: [0x98800 double] var: [0x98800 double] time: [1x98800 double] dof: [0x98800 double] label: {0x1 cell} dimord: 'chan_time' cov: [] cfg: [1x1 struct] there is no error displyed in command window but the timlock is empty,why? thanks for you help, best, xiao -------------- next part -------------- An HTML attachment was scrubbed... URL: From eeguser at hotmail.com Sat May 18 18:21:48 2013 From: eeguser at hotmail.com (Subramaniam Iyer) Date: Sat, 18 May 2013 19:21:48 +0300 Subject: [FieldTrip] computing threshold for PLV Message-ID: Dear FT Experts, I have calculated PLV for a set of EEG data from 5 different patients. Now I want to convert the PLV matrix of each patient into a binary matrix. For this I need a threshold PLV value below which I can assume the phase locking is zero. My question is, how do I compute this threshold. I know hard thresholding is one option ( for ex setting 0.1 or 0.2 as threshold), but I guess it is not a very good option. Can somebody suggest a better and robust (statistical) way of determining the threshold ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sherrykhan78 at gmail.com Sat May 18 18:37:28 2013 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Sat, 18 May 2013 12:37:28 -0400 Subject: [FieldTrip] computing threshold for PLV In-Reply-To: References: Message-ID: You can randomly shift in time the epochs, to compute null-distribution, and then threshold at some p-value say p < 0.01, you can even correct for multiple comparison in space and time using this principle. On Sat, May 18, 2013 at 12:21 PM, Subramaniam Iyer wrote: > Dear FT Experts, > > I have calculated PLV for a set of EEG data from 5 different patients. Now > I want to convert the PLV matrix of each patient into a binary matrix. For > this I need a threshold PLV value below which I can assume the phase > locking is zero. > My question is, how do I compute this threshold. I know hard thresholding > is one option ( for ex setting 0.1 or 0.2 as threshold), but I guess it is > not a very good option. > > Can somebody suggest a better and robust (statistical) way of determining > the threshold ? > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sat May 18 19:25:50 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 18 May 2013 19:25:50 +0200 Subject: [FieldTrip] computing threshold for PLV In-Reply-To: References: Message-ID: <4EDB7A1D-4484-454B-A9CE-5AE826E2AE98@donders.ru.nl> Dear all, Note that shuffling the epochs with respect to one another (where for one of the channels in the pair the epoch order stays fixed) usually yields a too liberal null-distribution. The reason is that the shuffling also destroys all structure in the data that is due to electromagnetic field spread. So, even if an observed pattern of PLV is caused by a single underlying neural generator, shuffling the epochs most likely makes this pattern 'significant'. However, it still does not reflect physiological interaction between sources. Best, Jan-Mathijs On May 18, 2013, at 6:37 PM, Sheraz Khan wrote: > You can randomly shift in time the epochs, to compute null-distribution, and then threshold at some p-value say p < 0.01, you can even correct for multiple comparison in space and time using this principle. > > > > On Sat, May 18, 2013 at 12:21 PM, Subramaniam Iyer wrote: > Dear FT Experts, > > I have calculated PLV for a set of EEG data from 5 different patients. Now I want to convert the PLV matrix of each patient into a binary matrix. For this I need a threshold PLV value below which I can assume the phase locking is zero. > My question is, how do I compute this threshold. I know hard thresholding is one option ( for ex setting 0.1 or 0.2 as threshold), but I guess it is not a very good option. > > Can somebody suggest a better and robust (statistical) way of determining the threshold ? > > _______________________________________________ > 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 Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From smoratti at psi.ucm.es Sat May 18 20:11:11 2013 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Sat, 18 May 2013 20:11:11 +0200 Subject: [FieldTrip] computing threshold for PLV In-Reply-To: References: Message-ID: Dear Sheraz, You might consult the following article: Lachaux, J. P. et al. 1999. Measuring Phase Synchrony in Brain Signal. Human Brain Mapping 8: 194-208. In principle you have to create surrogate data that represent the null hypothesis that there is no phase locking between your electrodes, sources, etc. Then you create hundreds or thousands of surrogate data sets and calculate each time you PLV. That way you create a distribution of your PLV values under the Null hypothesis. Then you check in what percentile your observed PLV lies (e. g. if its beyond the 95% percentile you would reject the Null hypothesis). Hope that helps, Stephan ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Universidad Complutense de Madrid Facultad de Psicología Departamento de Psicología Básica I Campus de Somosaguas 28223 Pozuelo de Alarcón (Madrid) Spain and Center for Biomedical Technology Laboratory for Cognitive and Computational Neuroscience Parque Científico y Tecnológico de la Universidad Politecnica de Madrid Campus Montegancedo 28223 Pozuelo de Alarcón (Madrid) Spain email: smoratti at psi.ucm.es Tel.: +34 679219982 El 18/05/2013, a las 18:21, Subramaniam Iyer escribió: > Dear FT Experts, > > I have calculated PLV for a set of EEG data from 5 different patients. Now I want to convert the PLV matrix of each patient into a binary matrix. For this I need a threshold PLV value below which I can assume the phase locking is zero. > My question is, how do I compute this threshold. I know hard thresholding is one option ( for ex setting 0.1 or 0.2 as threshold), but I guess it is not a very good option. > > Can somebody suggest a better and robust (statistical) way of determining the threshold ? > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From eeguser at hotmail.com Sat May 18 21:42:05 2013 From: eeguser at hotmail.com (Subramaniam Iyer) Date: Sat, 18 May 2013 22:42:05 +0300 Subject: [FieldTrip] computing threshold for PLV In-Reply-To: References: , Message-ID: Dear FT Experts Thank you for your inputs. I should add here that I have continuous EEG data (so effectively single trial). The way I am computing PLV is by dividing my data into windows of 2 seconds each and computing PLV for each window and then I finally average the PLV values of all the windows. So when we talk of shuffling trials, in my case should i consider each of 2 second window as a trial ? Sorry if this sounds stupid as I am new to this kind of analysis. From: smoratti at psi.ucm.es Date: Sat, 18 May 2013 20:11:11 +0200 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] computing threshold for PLV Dear Sheraz, You might consult the following article: Lachaux, J. P. et al. 1999. Measuring Phase Synchrony in Brain Signal. Human Brain Mapping 8: 194-208. In principle you have to create surrogate data that represent the null hypothesis that there is no phase locking between your electrodes, sources, etc. Then you create hundreds or thousands of surrogate data sets and calculate each time you PLV. That way you create a distribution of your PLV values under the Null hypothesis. Then you check in what percentile your observed PLV lies (e. g. if its beyond the 95% percentile you would reject the Null hypothesis). Hope that helps, Stephan ________________________________________________________Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Universidad Complutense de MadridFacultad de PsicologíaDepartamento de Psicología Básica ICampus de Somosaguas28223 Pozuelo de Alarcón (Madrid)Spain and Center for Biomedical TechnologyLaboratory for Cognitive and Computational NeuroscienceParque Científico y Tecnológico de la Universidad Politecnica de Madrid Campus Montegancedo28223 Pozuelo de Alarcón (Madrid)Spain email: smoratti at psi.ucm.es Tel.: +34 679219982 El 18/05/2013, a las 18:21, Subramaniam Iyer escribió:Dear FT Experts, I have calculated PLV for a set of EEG data from 5 different patients. Now I want to convert the PLV matrix of each patient into a binary matrix. For this I need a threshold PLV value below which I can assume the phase locking is zero. My question is, how do I compute this threshold. I know hard thresholding is one option ( for ex setting 0.1 or 0.2 as threshold), but I guess it is not a very good option. Can somebody suggest a better and robust (statistical) way of determining the threshold ? _______________________________________________ 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: From sherrykhan78 at gmail.com Sun May 19 01:55:07 2013 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Sat, 18 May 2013 19:55:07 -0400 Subject: [FieldTrip] computing threshold for PLV In-Reply-To: References: Message-ID: Most of the previois discussion targeted toward event related plv for continous data may be look at Hipp 2012 Nature Neuroscience orthogonal correlation paper On May 18, 2013 3:42 PM, "Subramaniam Iyer" wrote: > Dear FT Experts > > Thank you for your inputs. I should add here that I have continuous EEG > data (so effectively single trial). The way I am computing PLV is by > dividing my data into windows of 2 seconds each and computing PLV for each > window and then I finally average the PLV values of all the windows. > > So when we talk of shuffling trials, in my case should i consider each of > 2 second window as a trial ? Sorry if this sounds stupid as I am new to > this kind of analysis. > > ------------------------------ > From: smoratti at psi.ucm.es > Date: Sat, 18 May 2013 20:11:11 +0200 > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] computing threshold for PLV > > Dear Sheraz, > > You might consult the following article: Lachaux, J. P. et al. 1999. > Measuring Phase Synchrony in Brain Signal. Human Brain Mapping 8: 194-208. > In principle you have to create surrogate data that represent the null > hypothesis that there is no phase locking between your electrodes, sources, > etc. Then you create hundreds or thousands of surrogate data sets and > calculate each time you PLV. That way you create a distribution of your PLV > values under the Null hypothesis. Then you check in what percentile your > observed PLV lies (e. g. if its beyond the 95% percentile you would reject > the Null hypothesis). > > Hope that helps, > > Stephan > > > > ________________________________________________________ > Stephan Moratti, PhD > > see also: http://web.me.com/smoratti/ > > Universidad Complutense de Madrid > Facultad de Psicología > Departamento de Psicología Básica I > Campus de Somosaguas > 28223 Pozuelo de Alarcón (Madrid) > Spain > > and > > Center for Biomedical Technology > Laboratory for Cognitive and Computational Neuroscience > Parque Científico y Tecnológico de la Universidad Politecnica de Madrid > Campus Montegancedo > 28223 Pozuelo de Alarcón (Madrid) > Spain > > > email: smoratti at psi.ucm.es > Tel.: +34 679219982 > > El 18/05/2013, a las 18:21, Subramaniam Iyer escribió: > > Dear FT Experts, > > I have calculated PLV for a set of EEG data from 5 different patients. Now > I want to convert the PLV matrix of each patient into a binary matrix. For > this I need a threshold PLV value below which I can assume the phase > locking is zero. > My question is, how do I compute this threshold. I know hard thresholding > is one option ( for ex setting 0.1 or 0.2 as threshold), but I guess it is > not a very good option. > > Can somebody suggest a better and robust (statistical) way of determining > the threshold ? > _______________________________________________ > 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: From mengtongxiao at gmail.com Sun May 19 09:32:37 2013 From: mengtongxiao at gmail.com (=?GB2312?B?s8LRqQ==?=) Date: Sun, 19 May 2013 15:32:37 +0800 Subject: [FieldTrip] help about ft_timelockanalysis Message-ID: Dear all, when I use ft_timelockanalysis like follow,there are some mistake. cfg = []; cfg.covariance = 'yes'; cfg.channel = 'all'; cfg.vartrllength = 2; cfg.covariancewindow = 'all'; timelock = ft_timelockanalysis(cfg, data_org); the input is raw data with 102 channels and 1 trials averaging trials averaging trial 1 of 1 the call to "ft_timelockanalysis" took 5 seconds ??? Error using ==> mxSerialize Error during serialization of (null) Error in ==> ft_postamble_provenance at 76 cfg.callinfo.outputhash = cellfun(@CalcMD5, cellfun(@mxSerialize, cellfun(@eval, ft_default.postamble, 'UniformOutput', false), 'UniformOutput', false), 'UniformOutput', false); Error in ==> ft_postamble at 55 evalin('caller', ['ft_postamble_' cmd]); Error in ==> ft_timelockanalysis at 401 ft_postamble provenance timelock Thank you so much for your help!! xiao -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: SpamAssassinReport.txt URL: From eeguser at hotmail.com Sun May 19 09:54:21 2013 From: eeguser at hotmail.com (Subramaniam Iyer) Date: Sun, 19 May 2013 10:54:21 +0300 Subject: [FieldTrip] computing threshold for PLV In-Reply-To: References: , , , Message-ID: So, does it mean that PLV method does not make much sense for continuous data ? To be more specific, I am trying to investigate synchrony from epileptic EEG recordings. Date: Sat, 18 May 2013 19:55:07 -0400 From: sherrykhan78 at gmail.com To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] computing threshold for PLV Most of the previois discussion targeted toward event related plv for continous data may be look at Hipp 2012 Nature Neuroscience orthogonal correlation paper On May 18, 2013 3:42 PM, "Subramaniam Iyer" wrote: Dear FT Experts Thank you for your inputs. I should add here that I have continuous EEG data (so effectively single trial). The way I am computing PLV is by dividing my data into windows of 2 seconds each and computing PLV for each window and then I finally average the PLV values of all the windows. So when we talk of shuffling trials, in my case should i consider each of 2 second window as a trial ? Sorry if this sounds stupid as I am new to this kind of analysis. From: smoratti at psi.ucm.es Date: Sat, 18 May 2013 20:11:11 +0200 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] computing threshold for PLV Dear Sheraz, You might consult the following article: Lachaux, J. P. et al. 1999. Measuring Phase Synchrony in Brain Signal. Human Brain Mapping 8: 194-208. In principle you have to create surrogate data that represent the null hypothesis that there is no phase locking between your electrodes, sources, etc. Then you create hundreds or thousands of surrogate data sets and calculate each time you PLV. That way you create a distribution of your PLV values under the Null hypothesis. Then you check in what percentile your observed PLV lies (e. g. if its beyond the 95% percentile you would reject the Null hypothesis). Hope that helps, Stephan ________________________________________________________Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Universidad Complutense de MadridFacultad de PsicologíaDepartamento de Psicología Básica ICampus de Somosaguas28223 Pozuelo de Alarcón (Madrid)Spain and Center for Biomedical TechnologyLaboratory for Cognitive and Computational NeuroscienceParque Científico y Tecnológico de la Universidad Politecnica de Madrid Campus Montegancedo 28223 Pozuelo de Alarcón (Madrid)Spain email: smoratti at psi.ucm.es Tel.: +34 679219982 El 18/05/2013, a las 18:21, Subramaniam Iyer escribió: Dear FT Experts, I have calculated PLV for a set of EEG data from 5 different patients. Now I want to convert the PLV matrix of each patient into a binary matrix. For this I need a threshold PLV value below which I can assume the phase locking is zero. My question is, how do I compute this threshold. I know hard thresholding is one option ( for ex setting 0.1 or 0.2 as threshold), but I guess it is not a very good option. Can somebody suggest a better and robust (statistical) way of determining the threshold ? _______________________________________________ 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: From politzerahless at gmail.com Sun May 19 14:27:37 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sun, 19 May 2013 07:27:37 -0500 Subject: [FieldTrip] help about ft_timelockanalysis Message-ID: Hello Xiao, I don't know if this is what is causing the error, but I did notice that your dataset apparently only has one trial. Usually ft_timelockanalysis() would take a dataset consisting of multiple trials and average them; you may need to run ft_preprocessing() to divide your dataset into trials. Best, Steve > > Message: 1 > Date: Sun, 19 May 2013 15:32:37 +0800 > From: ?? > To: fieldtrip > Subject: [FieldTrip] help about ft_timelockanalysis > Message-ID: > < CADiddyWhMO7vgM2ZjV8xABCVe8WS4d2eXNwvY92hcj2oA0piFQ at mail.gmail.com> > Content-Type: text/plain; charset="gb2312" > > Dear all? > when I use ft_timelockanalysis like follow,there are some mistake. > > cfg = []; > cfg.covariance = 'yes'; > cfg.channel = 'all'; > cfg.vartrllength = 2; > cfg.covariancewindow = 'all'; > timelock = ft_timelockanalysis(cfg, data_org); > the input is raw data with 102 channels and 1 trials > averaging trials > averaging trial 1 of 1 > > the call to "ft_timelockanalysis" took 5 seconds > ??? Error using ==> mxSerialize > Error during serialization of (null) > > Error in ==> ft_postamble_provenance at 76 > cfg.callinfo.outputhash = cellfun(@CalcMD5, cellfun(@mxSerialize, > cellfun(@eval, ft_default.postamble, 'UniformOutput', false), > 'UniformOutput', false), 'UniformOutput', false); > > Error in ==> ft_postamble at 55 > evalin('caller', ['ft_postamble_' cmd]); > Error in ==> ft_timelockanalysis at 401 > ft_postamble provenance timelock > > Thank you so much for your help!! > xiao > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130519/5cd3ca08/attachment-0001.html > > -------------- next part -------------- > An embedded and charset-unspecified text was scrubbed... > Name: SpamAssassinReport.txt > URL: < http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130519/5cd3ca08/attachment-0001.txt > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://people.ku.edu/~sjpa/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephanie.ries at berkeley.edu Mon May 20 06:32:49 2013 From: stephanie.ries at berkeley.edu (Stephanie Kathleen Ries-cornou) Date: Sun, 19 May 2013 21:32:49 -0700 Subject: [FieldTrip] dipole modeling using field trip Message-ID: Hi, I would like to know if it possible to reject horizontal eye movements from scalp EEG signal using equivalent dipole modeling in Fieldtrip. I have tried doing this using ICA but it was not possible to identify a component reflecting saccades for all subjects. Has anyone ever done this? If yes, any suggestion would be great! I am trying to learn about source reconstruction using two dipoles thinking this might be a good start and have started going through the tutorial. I got the following error messages: >> data = ft_dipolesimulation(cfg); using headmodel specified in the configuration using gradiometers specified in the configuration computing simulated data Error using .* Matrix dimensions must agree. Error in ft_dipolesimulation (line 203) simulated.trial{trial} = simulated.trial{trial} + lf(:,i:3:end) * ... This was fixed when I removed the "..." but then I got this message: Error using ft_fetch_vol (line 76) no headmodel specified Error in prepare_headmodel (line 51) vol = ft_fetch_vol(cfg, data); Error in ft_dipolesimulation (line 106) [vol, sens, cfg] = prepare_headmodel(cfg, []); The "vol" parameter is defined, so I do not know where the error is coming from. Best, Stephanie Stephanie Ries, PhD Knight Lab - Helen Wills Neuroscience Institute University of California at Berkeley -------------- next part -------------- An HTML attachment was scrubbed... URL: From ggonesc at upo.es Mon May 20 09:28:55 2013 From: ggonesc at upo.es (Gabriel Gonzalez Escamilla) Date: Mon, 20 May 2013 09:28:55 +0200 Subject: [FieldTrip] problem with PLV and ImC computing Message-ID: <1115d37d2b1643b.5199ecd7@upo.es> I'm re-sending this, becasue searching at the fieldtrip archives, I've notice that my message was scrubbed... Dear Fieltrip experts, I have my continuous data imported to fieldtrip with matlab, I'm looking for performing connectivity analysis between pairs of sensors, I have succed as: data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels and 2000 samples data.label {59x1}; data.time {1xNepochs}; then, calculate only the FFT of all sensors as: cfg=[]; cfg.output='fourier'; cfg.method='mtmfft'; cfg.taper='hanning'; cfg.foilim=[8.5 9.5]; cfg.tapsmofrq=0; cfg.trials='all'; cfg.keeptrials='yes'; cfg.channel='all'; fourier=ft_freqanalysis(cfg, data) as output I get: dimord = 'rpttap_chan_freq' freq= [1x9] fourierspctrm=[7x59x9 double] Then compute the imaginary part of coherency as: cfg=[]; cfg.method ='cohe'; cfg.complex='imag'; cfg.channelcbm={'all' 'all'}; coher = ft_connectivityanalysis (cfg, fourier) as output get: dimord='chan_chan_freq'; cohspctrm=[59x59x9 double]; dof=7; I have two main questions: A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? Many thanks in advanced, Gabriel. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue May 21 08:24:48 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 21 May 2013 08:24:48 +0200 Subject: [FieldTrip] computing threshold for PLV In-Reply-To: References: Message-ID: Hi all, PLV is in principle a perfectly valid method to investigate synchrony, also in continuous data. Jörg (Hipp)'s paper introduces a connectivity metric that is insensitive to the effects of electromagnetic field spread, but it is a measure whose relationship to synchrony is hard to interpret; it quantifies amplitude envelope correlations after explicit removal of the instantaneous mixing, and does not quantify the consistency of phase relationships, as does PLV. If you are after interpreting the connectivity in terms of synchrony, you could look into using the imaginary part of coherency, or the weighted phase lag index, although neither of these methods are easy in their interpretation, either. Best, Jan-Mathijs On May 19, 2013, at 1:55 AM, Sheraz Khan wrote: > Most of the previois discussion targeted toward event related plv for continous data may be look at Hipp 2012 Nature Neuroscience orthogonal correlation paper > > On May 18, 2013 3:42 PM, "Subramaniam Iyer" wrote: > Dear FT Experts > > Thank you for your inputs. I should add here that I have continuous EEG data (so effectively single trial). The way I am computing PLV is by dividing my data into windows of 2 seconds each and computing PLV for each window and then I finally average the PLV values of all the windows. > > So when we talk of shuffling trials, in my case should i consider each of 2 second window as a trial ? Sorry if this sounds stupid as I am new to this kind of analysis. > > From: smoratti at psi.ucm.es > Date: Sat, 18 May 2013 20:11:11 +0200 > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] computing threshold for PLV > > Dear Sheraz, > > You might consult the following article: Lachaux, J. P. et al. 1999. Measuring Phase Synchrony in Brain Signal. Human Brain Mapping 8: 194-208. In principle you have to create surrogate data that represent the null hypothesis that there is no phase locking between your electrodes, sources, etc. Then you create hundreds or thousands of surrogate data sets and calculate each time you PLV. That way you create a distribution of your PLV values under the Null hypothesis. Then you check in what percentile your observed PLV lies (e. g. if its beyond the 95% percentile you would reject the Null hypothesis). > > Hope that helps, > > Stephan > > > > ________________________________________________________ > Stephan Moratti, PhD > > see also: http://web.me.com/smoratti/ > > Universidad Complutense de Madrid > Facultad de Psicología > Departamento de Psicología Básica I > Campus de Somosaguas > 28223 Pozuelo de Alarcón (Madrid) > Spain > > and > > Center for Biomedical Technology > Laboratory for Cognitive and Computational Neuroscience > Parque Científico y Tecnológico de la Universidad Politecnica de Madrid > Campus Montegancedo > 28223 Pozuelo de Alarcón (Madrid) > Spain > > > email: smoratti at psi.ucm.es > Tel.: +34 679219982 > > El 18/05/2013, a las 18:21, Subramaniam Iyer escribió: > > Dear FT Experts, > > I have calculated PLV for a set of EEG data from 5 different patients. Now I want to convert the PLV matrix of each patient into a binary matrix. For this I need a threshold PLV value below which I can assume the phase locking is zero. > My question is, how do I compute this threshold. I know hard thresholding is one option ( for ex setting 0.1 or 0.2 as threshold), but I guess it is not a very good option. > > Can somebody suggest a better and robust (statistical) way of determining the threshold ? > _______________________________________________ > 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 Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue May 21 08:31:22 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 21 May 2013 08:31:22 +0200 Subject: [FieldTrip] problem in connectivityanalysis In-Reply-To: <9f89709b303dae2.51966cc4@upo.es> References: <9f89709b303dae2.51966cc4@upo.es> Message-ID: <519B14BA.9030908@donders.ru.nl> Dear Gabriel, > A) As you see, this makes an average over the epochs of each channel, > and not over the samples (which in this case are the 9 frequencies of > the FFT), And I would like to have the opposite, this is, to get the > imaginary part of coherence for each epoch (repetition) on all my > channels and not for each frequency, something like: chan_chan_rpt or > chancbm_rpt, Is this possible? No. You should think of coherence more as a measure for the consistency of the phase relation between channels across trials, so coherence is just not defined per trial,neither would it make sense to compute coherence for a single trial. > B) Another question I have is: for the Imaginary part of Coherence is > not necessary to compute the cross-spectrum with 'powandcsd', only the > FFT, but for the PLV, PPC or WPLI is that way too? I see some terminology issues here. Let me try to explain in a simple (aka least-mathematical I can think of) way: For all these connectivity measures, we need the phase information from the Fourier transform (FFT) to compute the cross-spectral density matrix (CSD). The CSD can be regarded as the equivalent in the frequency domain to the covariance matrix in the time domain, thus it is a measures how a certain channels activity is co-modulated with another channels activity (for a particular frequency) - makes pretty much sense to make use of this when computing connectivity, right? :) As you might know, a Fourier transform returns complex numbers, where the imaginary part of this number contains phase information. When calling ft_freqanalysis, you can decide if it shall only return the (squared) real part of the frequency spectrum (cfg.output='pow'), or instead the full CSD (cfg.output = 'powandcsd'). Alternatively, you can also let ft_freqanalysis return the raw Fourier coefficients (cfg.output='fourier'). From the Fourier coefficients, however, you can easily obtain the CSD or the power spectrum basically by multiplication the Fourier matrix with itself (transposed). All of these measures quantify the phase relation between channels across trials, and as phase information is coded in the imaginary part of the fourier output, thus for connectivityanalysis you need the CSD which can be obtained either by 'powandcsd' or by 'fourier'. I hope that somehow clarifies your questions. Best, Jörn On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote: > Dear Fieltrip experts, > > I have my continuous data imported to fieldtrip with matlab, I'm > looking for performing connectivity analysis between pairs of sensors, > I have succed as: > data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels > and 2000 samples > data.label {59x1}; > data.time {1xNepochs}; > > then, calculate only the FFT of all sensors as: > cfg=[]; > cfg.output='fourier'; > cfg.method='mtmfft'; > cfg.taper='hanning'; > cfg.foilim=[8.5 9.5]; > cfg.tapsmofrq=0; > cfg.trials='all'; > cfg.keeptrials='yes'; > cfg.channel='all'; > fourier=ft_freqanalysis(cfg, data) > as output I get: > dimord = 'rpttap_chan_freq' > freq= [1x9] > fourierspctrm=[7x59x9 double] > > Then compute the imaginary part of coherency as: > cfg=[]; > cfg.method ='cohe'; > cfg.complex='imag'; > cfg.channelcbm={'all' 'all'}; > coher = ft_connectivityanalysis (cfg, fourier) > as output get: > dimord='chan_chan_freq'; > cohspctrm=[59x59x9 double]; > dof=7; > > I have two main questions: > > A) As you see, this makes an average over the epochs of each channel, > and not over the samples (which in this case are the 9 frequencies of > the FFT), And I would like to have the opposite, this is, to get the > imaginary part of coherence for each epoch (repetition) on all my > channels and not for each frequency, something like: chan_chan_rpt or > chancbm_rpt, Is this possible? > > > > B) Another question I have is: for the Imaginary part of Coherence is > not necessary to compute the cross-spectrum with 'powandcsd', only the > FFT, but for the PLV, PPC or WPLI is that way too? > > > > > Many thanks in advanced, > Gabriel. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue May 21 08:39:14 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 21 May 2013 08:39:14 +0200 Subject: [FieldTrip] a .mat file about meg data do preprocessing In-Reply-To: References: Message-ID: <519B1692.3080101@donders.ru.nl> Dear Xiao, Somehow your channel names seem to not be recognized by FieldTrip, and then it reverts to default channel names (chan001, chan002, ...). You will see that data_org.label will have those channel labels. Subsequently, you define in the cfg for timelockanalysis channel names that are not in your data (your channels are called chanXXX, not MEGXXXX now), and FieldTrip thus does not perform the operation on any channel. I don't know much about EEGLAB and how it is integrated with FieldTrip - there should be an eeglab2fieldtrip function though in fieldtrip/external/eeglab. Maybe you can try this, or maybe someone else here knows why your channel labels do not get copied over to FieldTrip correctly. Good luck :) Best, Jörn On 5/18/2013 4:06 PM, ?? wrote: > Dear all, > I have a .mat file about meg data(102*98800,channel*time,channel is > 'MEG0111','MEG0121'.....'M*1' ); > Then I use eeglab read it,got .set file;I want use ft_timelockanalysis > then > /cfg = []; > cfg.dataset = 'megalpha.set'; > cfg.grad=grad; > data_org = ft_preprocessing(cfg)/ > >grad = > chanori: [102x3 double] > chanpos: [102x3 double] > chantype: {102x1 cell} > chanunit: {102x1 cell} > coilori: [510x3 double] > coilpos: [510x3 double] > label: {102x1 cell} > tra: [102x510 double] > unit: 'cm' > Warning: creating default channel names > > In fileio\private\read_eeglabheader at 53 > In ft_read_header at 572 > In ft_preprocessing at 343 > processing channel { 'chan001' 'chan002' 'chan003' 'chan004' 'chan005' > 'chan006' 'chan007' 'chan008' 'chan009' 'chan010' 'chan011' 'chan012' > 'chan013' 'chan014' 'chan015' 'chan016' 'chan017' 'chan018' 'chan019' > 'chan020' 'chan021' 'chan022' 'chan023' 'chan024' 'chan025' 'chan026' > 'chan027' 'chan028' 'chan029' 'chan030' 'chan031' 'chan032' 'chan033' > 'chan034' 'chan035' 'chan036' 'chan037' 'chan038' 'chan039' 'chan040' > 'chan041' 'chan042' 'chan043' 'chan044' 'chan045' 'chan046' 'chan047' > 'chan048' 'chan049' 'chan050' 'chan051' 'chan052' 'chan053' 'chan054' > 'chan055' 'chan056' 'chan057' 'chan058' 'chan059' 'chan060' 'chan061' > 'chan062' 'chan063' 'chan064' 'chan065' 'chan066' 'chan067' 'chan068' > 'chan069' 'chan070' 'chan071' 'chan072' 'chan073' 'chan074' 'chan075' > 'chan076' 'chan077' 'chan078' 'chan079' 'chan080' 'chan081' 'chan082' > 'chan083' 'chan084' 'chan085' 'chan086' 'chan087' 'chan088' 'chan089' > 'chan090' 'chan091' 'chan092' 'chan093' 'chan094' 'chan095' 'chan096' > 'chan097' 'chan098' 'chan099' 'chan100' 'chan101' 'chan102' } > reading and preprocessing > reading and preprocessing trial 1 from 1 > data_org = > hdr: [1x1 struct] > label: {102x1 cell} > time: {[1x98800 double]} > trial: {[102x98800 double]} > fsample: 1037 > sampleinfo: [1 98800] > cfg: [1x1 struct] > /cfg = []; > cfg.covariance = 'yes'; > cfg.channel = 'M*1'; > cfg.vartrllength = 2; > cfg.covariancewindow = 'all'; > timelock = ft_timelockanalysis(cfg, data_org);/ > timelock = > avg: [0x98800 double] > var: [0x98800 double] > time: [1x98800 double] > dof: [0x98800 double] > label: {0x1 cell} > dimord: 'chan_time' > cov: [] > cfg: [1x1 struct] > there is no error displyed in command window but the timlock is empty,why? > thanks for you help, > best, > xiao > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From zriouil.imane at gmail.com Tue May 21 10:18:58 2013 From: zriouil.imane at gmail.com (z.imane) Date: Tue, 21 May 2013 10:18:58 +0200 Subject: [FieldTrip] ft_read_event Message-ID: Hello, i have a problems in ft_read_event. if you help me please I try to follow all instructions on the tutorial: 'Preprocessing and analysis of spike and local field potential data' >> spike=ft_read_spike(filename) spike = label: {'Elec_1_Neuron_1' 'Elec_2_Neuron_1' 'Elec_3_Neuron_1'} timestamp: {[1x20246 int32] [1x9126 int32] [1x74291 int32]} waveform: {[0x20246 double] [0x9126 double] [0x74291 double]} unit: {[1x20246 double] [1x9126 double] [1x74291 double]} hdr: [1x1 struct] dimord: '{chan}_lead_time_spike' >> header=ft_read_header(filename) header = nChans: 94 Fs: 781.2500 nSamples: 862310 nTrials: 1 nSamplesPre: 0 label: {94x1 cell} FirstTimeStamp: 70433310 TimeStampPerSample: 32 orig: [1x1 struct] chantype: {94x1 cell} chanunit: {94x1 cell} >>cfg=[]; cfg.dataset=filename; cfg.trialfun='trialfun_stimon_samples'; cfg=ft_definetrial(cfg) evaluating trialfunction 'trialfun_stimon_samples' ??? Error using ==> fseek Not enough input arguments. Error in ==> read_nex_event at 49 status = fseek(fid,hdr.varheader(mrkvarnum).offset,'bof'); Error in ==> ft_read_event at 1528 event = read_nex_event(filename); Error in ==> trialfun_stimon_samples at 3 event = ft_read_event(cfg.dataset); Error in ==> ft_definetrial at 157 trl = feval(cfg.trialfun, cfg); -------------- next part -------------- An HTML attachment was scrubbed... URL: From ggonesc at upo.es Tue May 21 17:52:21 2013 From: ggonesc at upo.es (Gabriel Gonzalez Escamilla) Date: Tue, 21 May 2013 17:52:21 +0200 Subject: [FieldTrip] problem in connectivityanalysis In-Reply-To: <519B14BA.9030908@donders.ru.nl> References: <9f89709b303dae2.51966cc4@upo.es> <519B14BA.9030908@donders.ru.nl> Message-ID: <1348f6433edc26f9.519bb455@upo.es> Thank you so much for your answer Jörn, Now I got it, so, I will let the 'fourier' as input to ft_connectivityanalysis, because for some indices I will need the auto-spectrum, and if I fully undertood what you said, it will be the same, as they always take the phase information from the fourier transform. And fieltrip will automatically compute the csd if the input is the frequency data. Nevertheless, it give me some error when I tried to use the output from 'powandcsd' of freqanalysis, always gives me a matrix dimensions error, and when I use the output 'fourier' from connectivityanalysis, it computes almost all indices to ok, raging from  -1 to 1 (I'm saw that they are signed, so this is ok), the problem are the ImC ranging from -inf to inf, and the PLV values ranging from 0 to inf, but when I use the 'fourier' the values are. Which for me is really weird. I have checked internally, and even when I always use the 'fourier' as input, when it internally calculates cross-spectrum for the ImC and PLV, the data.crsspctrm is different, e.g: data.dimord = 'rpt_rpt_chan_chan_freq' ans size(data.crsspctrm) = [1 7 59 59]; So, both are apparently the same, but the data inside this matrices is different, for example, when calculating the ImC the first 7 columns for the first two rows are: val(:,:,1,1)  [0.9323  0.3679  0.8629  1.6436  0.6404  1.8782  0.1139] val(:,:,1,2)  [0.8509-0.1555i  0.2507-0.1066i  0.8173-0.0290i  1.4328-0.2427i  0.5457-0.0500i  1.6505-0.0161i  0.0993+0.0016i] while when calculating the PLV are: val(:,:,1,1)  [1  1  1  1  1  1  1] val(:,:,1,2)  [0.9694-0.2133i  0.7011-0.3564i  0.9951-0.0104i  0.9014-0.3481i  0.9781-0.0819i  0.9982-0.0046i  0.9507-0.0483i] I'm pretty sure I'm doing something wrong here, but I don't really have a clue, If I use the fourier transform to calculate the 'csd' in ft_connectivity analysis and use this csd as input to all other ft_connectivityanalysis indices all of them are set to NaN or 1, not ranging between any numbers. On the other hand, I have seen searching on the net, that fieltrip is capable of create surrogate data, by shifting the phase information on every trial for only one electrode of each pair while using the original samples of each trials on the second channel, but I couldn't find on the manual how to do such a thing. Is there any way to compute this kind of surrogates for every sensor? or was it something that some one suggest to somebody? Many thanks in advanced, Gabriel. ----- Mensaje original ----- De: "Jörn M. Horschig" Fecha: Martes, 21 de Mayo de 2013, 9:03 am Asunto: Re: [FieldTrip] problem in connectivityanalysis A: FieldTrip discussion list > Dear Gabriel, > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > No. You should think of coherence more as a measure for the consistency of the phase relation between channels across trials, so coherence is just not defined per trial,neither would it make sense to compute coherence for a single trial. > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? I see some terminology issues here. Let me try to explain in a simple (aka least-mathematical I can think of) way: > > For all these connectivity measures, we need the phase information from the Fourier transform (FFT) to compute the cross-spectral density matrix (CSD). The CSD can be regarded as the equivalent in the frequency domain to the covariance matrix in the time domain, thus it is a measures how a certain channels activity is co-modulated with another channels activity (for a particular frequency) - makes pretty much sense to make use of this when computing connectivity, right? :) > As you might know, a Fourier transform returns complex numbers, where the imaginary part of this number contains phase information. When calling ft_freqanalysis, you can decide if it shall only return the (squared) real part of the frequency spectrum (cfg.output='pow'), or instead the full CSD (cfg.output = 'powandcsd'). Alternatively, you can also let ft_freqanalysis return the raw Fourier coefficients (cfg.output='fourier'). From the Fourier coefficients, however, you can easily obtain the CSD or the power spectrum basically by multiplication the Fourier matrix with itself (transposed). All of these measures quantify the phase relation between channels across trials, and as phase information is coded in the imaginary part of the fourier output, thus for connectivityanalysis you need the CSD which can be obtained either by 'powandcsd' or by 'fourier'. > > I hope that somehow clarifies your questions. > > Best, > Jörn > > On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote: > Dear Fieltrip experts, > > I have my continuous data imported to fieldtrip with matlab, I'm looking for performing connectivity analysis between pairs of sensors, I have succed as: > data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels and 2000 samples > data.label {59x1}; > data.time {1xNepochs}; > > then, calculate only the FFT of all sensors as: > cfg=[]; > cfg.output='fourier'; > cfg.method='mtmfft'; > cfg.taper='hanning'; > cfg.foilim=[8.5 9.5]; > cfg.tapsmofrq=0; > cfg.trials='all'; > cfg.keeptrials='yes'; > cfg.channel='all'; > fourier=ft_freqanalysis(cfg, data) > as output I get: > dimord = 'rpttap_chan_freq' > freq= [1x9] > fourierspctrm=[7x59x9 double] > > Then compute the imaginary part of coherency as: > cfg=[]; > cfg.method ='cohe'; > cfg.complex='imag'; > cfg.channelcbm={'all' 'all'}; > coher = ft_connectivityanalysis (cfg, fourier) > as output get: > dimord='chan_chan_freq'; > cohspctrm=[59x59x9 double]; > dof=7; > > I have two main questions: > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? > > > > > Many thanks in advanced, > Gabriel. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip --------------------------
PhD. student Gabriel González-Escamilla
Laboratory of Functional Neuroscience
Department of Physiology, Anatomy, and Cell Biology
University Pablo de Olavide
Ctra. de Utrera, Km.1
41013 - Seville
- Spain -

Email: ggonesc at upo.es
http://www.upo.es/neuroaging/es/
-------------- next part -------------- An HTML attachment was scrubbed... URL: From antony.passaro at gmail.com Tue May 21 18:13:28 2013 From: antony.passaro at gmail.com (Antony Passaro) Date: Tue, 21 May 2013 12:13:28 -0400 Subject: [FieldTrip] Subject-level Statistics on mvar connectivity measures Message-ID: Hi everyone, I have had some success processing the subject-level differences between two conditions for phase-based measures such as coherence and plv but I was wondering what the approach would be for the directed or mvar-based measures such as dtf, granger, or pdc? Since there are no trials to shuffle as you normally would for the phase-based connectivity measures, what would be the optimal statistical approach? I thought about shuffling the trials and recomputing the mvar over and over again for each condition as a simulation but this doesn't seem practical as it would be too computationally intensive. Thank you, -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From 13681530640 at 139.com Wed May 22 04:20:45 2013 From: 13681530640 at 139.com (WangJing) Date: Wed, 22 May 2013 10:20:45 +0800 (CST) Subject: [FieldTrip] question About head model References: Message-ID: <2b26519c1b85ee0-0001c.Richmail.00022806623245833658@139.com> Hi I am a freshman about field trip. I am trying to build the forward model. but my mri data is different from the data in the tutorial. So I don't know how to bulid the head model. I use the date which is from the paper "Open Database of Epileptic EEG with MRI and Postoperational Assessment of Foci—a Real World Verification for the EEG Inverse Solutions",http://eeg.pl/epi. MRI recordings containing a T1, T2 or fluid attenuated inversion recovery (FLAIR) weighted brain scans with morphologic substrate of the epilepsy (mostly cortical dysplasias, dysplastic tumors etc.). In some cases there is also a scan with the gadolinium (GAD) contrast. The images were collected by Siemens Sonata 1.5T scanner. The data is stored in the Digital Imaging and Communications in Medicine (DICOM) format. The name of the scan’s folder indicates its weighting.The scans have the following resolutions: T1: 512 × 512 pixels, pixel spacing 0.4687 mm, slice thickness 1.2 mm, T2: 256 × 256 pixels, pixel spacing 0.9375 mm,slice thickness 2.5 mm. In the tutorial,the mri data stored in only one file, while the data which I used have many files, I don't know how to process. who can help me,Thanks1 Thanks very much! Best Reagards Jing Wang -------------------------------------------------------------------------------- ----The following is the content of the forwarded email---- From:fieldtrip-request To:fieldtrip Date:2013-05-21 23:59:18 Subject:fieldtrip Digest, Vol 30, Issue 29 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: problem in connectivityanalysis (Gabriel Gonzalez Escamilla) ---------------------------------------------------------------------- Message: 1 Date: Tue, 21 May 2013 17:52:21 +0200 From: Gabriel Gonzalez Escamilla To: FieldTrip discussion list Subject: Re: [FieldTrip] problem in connectivityanalysis Message-ID: <1348f6433edc26f9.519bb455 at upo.es> Content-Type: text/plain; charset="iso-8859-1" Thank you so much for your answer J?rn, Now I got it, so, I will let the 'fourier' as input to ft_connectivityanalysis, because for some indices I will need the auto-spectrum, and if I fully undertood what you said, it will be the same, as they always take the phase information from the fourier transform. And fieltrip will automatically compute the csd if the input is the frequency data. Nevertheless, it give me some error when I tried to use the output from 'powandcsd' of freqanalysis, always gives me a matrix dimensions error, and when I use the output 'fourier' from connectivityanalysis, it computes almost all indices to ok, raging from? -1 to 1 (I'm saw that they are signed, so this is ok), the problem are the ImC ranging from -inf to inf, and the PLV values ranging from 0 to inf, but when I use the 'fourier' the values are. Which for me is really weird. I have checked internally, and even when I always use the 'fourier' as input, when it internally calculates cross-spectrum for the ImC and PLV, the data.crsspctrm is different, e.g: data.dimord = 'rpt_rpt_chan_chan_freq' ans size(data.crsspctrm) = [1 7 59 59]; So, both are apparently the same, but the data inside this matrices is different, for example, when calculating the ImC the first 7 columns for the first two rows are: val(:,:,1,1) ?[0.9323? 0.3679? 0.8629? 1.6436? 0.6404? 1.8782? 0.1139] val(:,:,1,2) ?[0.8509-0.1555i? 0.2507-0.1066i? 0.8173-0.0290i? 1.4328-0.2427i? 0.5457-0.0500i? 1.6505-0.0161i? 0.0993+0.0016i] while when calculating the PLV are: val(:,:,1,1) ?[1? 1? 1? 1? 1? 1? 1] val(:,:,1,2) ?[0.9694-0.2133i? 0.7011-0.3564i? 0.9951-0.0104i? 0.9014-0.3481i? 0.9781-0.0819i? 0.9982-0.0046i? 0.9507-0.0483i] I'm pretty sure I'm doing something wrong here, but I don't really have a clue, If I use the fourier transform to calculate the 'csd' in ft_connectivity analysis and use this csd as input to all other ft_connectivityanalysis indices all of them are set to NaN or 1, not ranging between any numbers. On the other hand, I have seen searching on the net, that fieltrip is capable of create surrogate data, by shifting the phase information on every trial for only one electrode of each pair while using the original samples of each trials on the second channel, but I couldn't find on the manual how to do such a thing. Is there any way to compute this kind of surrogates for every sensor? or was it something that some one suggest to somebody? Many thanks in advanced, Gabriel. ----- Mensaje original ----- De: "J?rn M. Horschig" Fecha: Martes, 21 de Mayo de 2013, 9:03 am Asunto: Re: [FieldTrip] problem in connectivityanalysis A: FieldTrip discussion list > Dear Gabriel, > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > No. You should think of coherence more as a measure for the consistency of the phase relation between channels across trials, so coherence is just not defined per trial,neither would it make sense to compute coherence for a single trial. > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? I see some terminology issues here. Let me try to explain in a simple (aka least-mathematical I can think of) way: > > For all these connectivity measures, we need the phase information from the Fourier transform (FFT) to compute the cross-spectral density matrix (CSD). The CSD can be regarded as the equivalent in the frequency domain to the covariance matrix in the time domain, thus it is a measures how a certain channels activity is co-modulated with another channels activity (for a particular frequency) - makes pretty much sense to make use of this when computing connectivity, right? :) > As you might know, a Fourier transform returns complex numbers, where the imaginary part of this number contains phase information. When calling ft_freqanalysis, you can decide if it shall only return the (squared) real part of the frequency spectrum (cfg.output='pow'), or instead the full CSD (cfg.output = 'powandcsd'). Alternatively, you can also let ft_freqanalysis return the raw Fourier coefficients (cfg.output='fourier'). From the Fourier coefficients, however, you can easily obtain the CSD or the power spectrum basically by multiplication the Fourier matrix with itself (transposed). All of these measures quantify the phase relation between channels across trials, and as phase information is coded in the imaginary part of the fourier output, thus for connectivityanalysis you need the CSD which can be obtained either by 'powandcsd' or by 'fourier'. > > I hope that somehow clarifies your questions. > > Best, > J?rn > > On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote: > Dear Fieltrip experts, > > I have my continuous data imported to fieldtrip with matlab, I'm looking for performing connectivity analysis between pairs of sensors, I have succed as: > data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels and 2000 samples > data.label {59x1}; > data.time {1xNepochs}; > > then, calculate only the FFT of all sensors as: > cfg=[]; > cfg.output='fourier'; > cfg.method='mtmfft'; > cfg.taper='hanning'; > cfg.foilim=[8.5 9.5]; > cfg.tapsmofrq=0; > cfg.trials='all'; > cfg.keeptrials='yes'; > cfg.channel='all'; > fourier=ft_freqanalysis(cfg, data) > as output I get: > dimord = 'rpttap_chan_freq' > freq= [1x9] > fourierspctrm=[7x59x9 double] > > Then compute the imaginary part of coherency as: > cfg=[]; > cfg.method ='cohe'; > cfg.complex='imag'; > cfg.channelcbm={'all' 'all'}; > coher = ft_connectivityanalysis (cfg, fourier) > as output get: > dimord='chan_chan_freq'; > cohspctrm=[59x59x9 double]; > dof=7; > > I have two main questions: > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? > > > > > Many thanks in advanced, > Gabriel. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip --------------------------
PhD. student Gabriel Gonz?lez-Escamilla
Laboratory of Functional Neuroscience
Department of Physiology, Anatomy, and Cell Biology
University Pablo de Olavide
Ctra. de Utrera, Km.1
41013 - Seville
- Spain -

Email: ggonesc at upo.es
http://www.upo.es/neuroaging/es/
-------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 30, Issue 29 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Wed May 22 09:30:17 2013 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Wed, 22 May 2013 09:30:17 +0200 Subject: [FieldTrip] question About head model In-Reply-To: <2b26519c1b85ee0-0001c.Richmail.00022806623245833658@139.com> References: <2b26519c1b85ee0-0001c.Richmail.00022806623245833658@139.com> Message-ID: Dear Jing, It is best to use the T1 MRI rather than the other scans. To open a DICOM format file, you can try one of these options: % read the DICOM files mri = ft_read_mri('single_file_of_DICOM_series.IMA'); % or use a graphical file selection[f, p] = uigetfile ('*'); mri = ft_read_mri(fullfile (p, f)); I copied the above from documentation on the FieldTrip wiki: http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_an_anatomical_mri_from_dicom_into_ctf_format Then you can save the 'mri' into a *.mat file for future use with FieldTrip. Best regards, Johanna 2013/5/22 WangJing <13681530640 at 139.com> > Hi > I am a freshman about field trip. > I am trying to build the forward model. but my mri data is different from > the data in the tutorial. So I don't know how to bulid the head model. I > use the date which is from the paper "Open Database of Epileptic EEG with > MRI and Postoperational Assessment of Foci—a Real World Verification for > the EEG Inverse Solutions",http://eeg.pl/epi. MRI recordings containing a > T1, T2 or fluid attenuated inversion recovery (FLAIR) weighted brain scans > with morphologic substrate of the epilepsy (mostly cortical dysplasias, > dysplastic tumors etc.). In some cases there is also a scan with the > gadolinium (GAD) contrast. The images were collected by Siemens Sonata 1.5T > scanner. The data is stored in the Digital Imaging and Communications in > Medicine (DICOM) format. The name of the scan’s folder indicates its > weighting.The scans have the following resolutions: T1: 512 × 512 pixels, > pixel spacing 0.4687 mm, slice thickness 1.2 mm, T2: 256 × 256 pixels, > pixel spacing 0.9375 mm,slice thickness 2.5 mm. > In the tutorial,the mri data stored in only one file, while the data which > I used have many files, I don't know how to process. who can help me,Thanks1 > Thanks very much! > Best Reagards > Jing Wang > > > > > > ------------------------------ > ----The following is the content of the forwarded email---- > From:fieldtrip-request > To:fieldtrip > Date:2013-05-21 23:59:18 > Subject:fieldtrip Digest, Vol 30, Issue 29 > > 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: problem in connectivityanalysis (Gabriel Gonzalez Escamilla) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 21 May 2013 17:52:21 +0200 > From: Gabriel Gonzalez Escamilla > To: FieldTrip discussion list > Subject: Re: [FieldTrip] problem in connectivityanalysis > Message-ID: <1348f6433edc26f9.519bb455 at upo.es> > Content-Type: text/plain; charset="iso-8859-1" > > Thank you so much for your answer J?rn, > > > Now I got it, so, I will let the 'fourier' as input to ft_connectivityanalysis, because for some indices I will need the auto-spectrum, and if I fully undertood what you said, it will be the same, as they always take the phase information from the fourier transform. And fieltrip will automatically compute the csd if the input is the frequency data. > > > Nevertheless, it give me some error when I tried to use the output from 'powandcsd' of freqanalysis, always gives me a matrix dimensions error, and when I use the output 'fourier' from connectivityanalysis, it computes almost all indices to ok, raging from? -1 to 1 (I'm saw that they are signed, so this is ok), the problem are the ImC ranging from -inf to inf, and the PLV values ranging from 0 to inf, but when I use the 'fourier' the values are. Which for me is really weird. > > > > I have checked internally, and even when I always use the 'fourier' as input, when it internally calculates cross-spectrum for the ImC and PLV, the data.crsspctrm is different, e.g: > data.dimord = 'rpt_rpt_chan_chan_freq' > ans size(data.crsspctrm) = [1 7 59 59]; > > So, both are apparently the same, but the data inside this matrices is different, > > > for example, when calculating the ImC the first 7 columns for the first two rows are: > val(:,:,1,1) > ?[0.9323? 0.3679? 0.8629? 1.6436? 0.6404? 1.8782? 0.1139] > val(:,:,1,2) > > ?[0.8509-0.1555i? 0.2507-0.1066i? 0.8173-0.0290i? 1.4328-0.2427i? 0.5457-0.0500i? 1.6505-0.0161i? 0.0993+0.0016i] > > while when calculating the PLV are: > val(:,:,1,1) > ?[1? 1? 1? 1? 1? 1? 1] > val(:,:,1,2) > > ?[0.9694-0.2133i? 0.7011-0.3564i? 0.9951-0.0104i? 0.9014-0.3481i? 0.9781-0.0819i? 0.9982-0.0046i? 0.9507-0.0483i] > > > > I'm pretty sure I'm doing something wrong here, but I don't really have a clue, > > > If I use the fourier transform to calculate the 'csd' in ft_connectivity analysis and use this csd as input to all other ft_connectivityanalysis indices all of them are set to NaN or 1, not ranging between any numbers. > > > > > > On the other hand, I have seen searching on the net, that fieltrip is capable of create surrogate data, by shifting the phase information on every trial for only one electrode of each pair while using the original samples of each trials on the second channel, but I couldn't find on the manual how to do such a thing. Is there any way to compute this kind of surrogates for every sensor? or was it something that some one suggest to somebody? > > > Many thanks in advanced, > Gabriel. > > > > > ----- Mensaje original ----- > De: "J?rn M. Horschig" > Fecha: Martes, 21 de Mayo de 2013, 9:03 am > Asunto: Re: [FieldTrip] problem in connectivityanalysis > A: FieldTrip discussion list > > > > > > > Dear Gabriel, > > > > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > > No. You should think of coherence more as a measure for the consistency of the phase relation between channels across trials, so coherence is just not defined per trial,neither would it make sense to compute coherence for a single trial. > > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? I see some terminology issues here. Let me try to explain in a simple (aka least-mathematical I can think of) way: > > > > > For all these connectivity measures, we need the phase information from the Fourier transform (FFT) to compute the cross-spectral density matrix (CSD). The CSD can be regarded as the equivalent in the frequency domain to the covariance matrix in the time domain, thus it is a measures how a certain channels activity is co-modulated with another channels activity (for a particular frequency) - makes pretty much sense to make use of this when computing connectivity, right? :) > > > As you might know, a Fourier transform returns complex numbers, where the imaginary part of this number contains phase information. When calling ft_freqanalysis, you can decide if it shall only return the (squared) real part of the frequency spectrum (cfg.output='pow'), or instead the full CSD (cfg.output = 'powandcsd'). Alternatively, you can also let ft_freqanalysis return the raw Fourier coefficients (cfg.output='fourier'). From the Fourier coefficients, however, you can easily obtain the CSD or the power spectrum basically by multiplication the Fourier matrix with itself (transposed). All of these measures quantify the phase relation between channels across trials, and as phase information is coded in the imaginary part of the fourier output, thus for connectivityanalysis you need the CSD which can be obtained either by 'powandcsd' or by 'fourier'. > > > > I hope that somehow clarifies your questions. > > > > Best, > > J?rn > > > > On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote: > > Dear Fieltrip experts, > > > > > I have my continuous data imported to fieldtrip with matlab, I'm looking for performing connectivity analysis between pairs of sensors, I have succed as: > > > data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels and 2000 samples > > data.label {59x1}; > > data.time {1xNepochs}; > > > > then, calculate only the FFT of all sensors as: > > cfg=[]; > > cfg.output='fourier'; > > cfg.method='mtmfft'; > > cfg.taper='hanning'; > > cfg.foilim=[8.5 9.5]; > > cfg.tapsmofrq=0; > > cfg.trials='all'; > > cfg.keeptrials='yes'; > > cfg.channel='all'; > > fourier=ft_freqanalysis(cfg, data) > > as output I get: > > dimord = 'rpttap_chan_freq' > > freq= [1x9] > > fourierspctrm=[7x59x9 double] > > > > Then compute the imaginary part of coherency as: > > cfg=[]; > > cfg.method ='cohe'; > > cfg.complex='imag'; > > cfg.channelcbm={'all' 'all'}; > > coher = ft_connectivityanalysis (cfg, fourier) > > as output get: > > dimord='chan_chan_freq'; > > cohspctrm=[59x59x9 double]; > > dof=7; > > > > I have two main questions: > > > > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > > > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? > > > > > > > > > > Many thanks in advanced, > > Gabriel. > > > > > > > > > _______________________________________________ > fieldtrip mailing list > > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: > jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: > http://www.ru.nl/donders > > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > --------------------------
PhD. student Gabriel Gonz?lez-Escamilla
Laboratory of Functional Neuroscience
Department of Physiology, Anatomy, and Cell Biology
University Pablo de Olavide
Ctra. de Utrera, Km.1
41013 - Seville
- Spain -

Email: > ggonesc at upo.es
http://www.upo.es/neuroaging/es/
> > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130521/0886ac06/attachment.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 30, Issue 29 > ***************************************** > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mushfa.yousuf at googlemail.com Wed May 22 12:13:56 2013 From: mushfa.yousuf at googlemail.com (Mushfa Yousuf) Date: Wed, 22 May 2013 12:13:56 +0200 Subject: [FieldTrip] Source Reconstruction using Openmeeg method In-Reply-To: <5190AEAA.3020301@donders.ru.nl> References: <5190AEAA.3020301@donders.ru.nl> Message-ID: Hello Jörn; I have calculated an indiviual leadfield for both EEG and MEG. The structure of EEg and MEG shows the following variable grid_meg = xgrid: [1x20 double] ygrid: [-8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8] zgrid: [-2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13] dim: [20 17 16] pos: [5440x3 double] unit: 'cm' inside: [1x3177 double] outside: [1x2263 double] cfg: [1x1 struct] leadfield: {1x5440 cell} grid_eeg = xgrid: [-6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9] ygrid: [-6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6] zgrid: [2 3 4 5 6 7 8 9 10 11] dim: [16 13 10] pos: [2080x3 double] unit: 'cm' inside: [1x1331 double] outside: [1x749 double] cfg: [1x1 struct] leadfield: {1x2080 cell} Can you please give me a rough idea that how to concatenate the variables from both structure ? Thank you Regards ; Mushfa Yousuf On Mon, May 13, 2013 at 11:13 AM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Mushfa, > > I think you have to compute two leadfield matrices, one for EEG (elec) and > one for MEG (grad), and then concatenate these (and make sure that the > order of sensors won't get mixed up anywhere, because sourceanalysis just > expects the leadfield matrix to be ordered like your data. If that's not > the case, you either encounter the previous error you described or (if the > number of channels matches, but order is mixed up) it will just return > wrong source estimated activity. > > Best, > Jörn > > > On 5/6/2013 2:47 PM, Mushfa Yousuf wrote: > > Hello; > > Yes you were right. I have defined the wrong sensors i.e 'grad' instead > of 'elec' while calculating the Leadfield. > > Actually I am trying to calculate Combined source reconstruction from > both EEG and MEG sensors. > > Do you have any idea, how to define both elec and grad definition while > calculating first forward then inverse solution. > > Because in a fieldtrip either you can defined elec or grad at one time. > > > Regards; > > > Mushfa Yousuf > > Neurozentrum, > Universitätsklinikum Schleswig-Holstein, > Campus Kiel (UKSH), Deutschland > > > On Tue, Apr 30, 2013 at 6:23 PM, Johanna Zumer wrote: > >> Hi Mushfa, >> >> My guess is that the channels that have you used to compute .csdspctrm >> are not the same as the channels in cfg.elec. If you set cfg.channel = >> freqPost.label, does that solve it? >> >> Cheers, >> Johanna >> >> >> 2013/4/30 Mushfa Yousuf >> >>> Hello Fieldtrippers, >>> >>> I am doing source reconstruction using EEG channels on a fieldtrip. >>> >>> I have computed Forward solution i.e head model using 'Openmeeg' and >>> lead field successfully. >>> >>> For the inverse solution using 'dics' method, I wrote the following >>> syntax >>> >>> >>> >>> >>> >>> cfg = []; >>> cfg.method = 'dics'; >>> cfg.frequency = 130; >>> cfg.elec = dataFIC12.hdr.elec; >>> cfg.grid = grid; >>> cfg.vol = vol; >>> >>> sourcePost = ft_sourceanalysis(cfg, freqPost); >>> >>> >>> and I have received the following error: >>> >>> >>> ??? Error using ==> mtimes >>> Inner matrix dimensions must agree. >>> >>> Error in ==> beamformer_dics at 314 >>> filt = pinv(lf' * invCf * lf) * lf' * invCf; % >>> Gross eqn. 3, use PINV/SVD to cover rank deficient >>> leadfield >>> >>> Error in ==> ft_sourceanalysis at 595 >>> dip(i) = beamformer_dics(grid, sens, vol, [], >>> squeeze(Cf(i,:,:)), optarg{:}); >>> >>> Error in ==> newCode at 214 >>> sourcePost = ft_sourceanalysis(cfg, freqPost); >>> >>> >>> >>> >>> Any help would be appreciated. >>> >>> >>> Regards; >>> >>> >>> Mushfa Yousuf >>> >>> Neurozentrum, >>> Universitätsklinikum Schleswig-Holstein, >>> Campus Kiel (UKSH), Deutschland >>> >>> >>> _______________________________________________ >>> 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 listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ggonesc at upo.es Wed May 22 19:36:08 2013 From: ggonesc at upo.es (Gabriel Gonzalez Escamilla) Date: Wed, 22 May 2013 19:36:08 +0200 Subject: [FieldTrip] connectivity problem Message-ID: <596f90904ed40d3b.519d1e28@upo.es> Dear Fieldtrip experts, I finally understood how fieltrip computes the plv, so, my last e-mail has no sense now. Given say this, I have one question: I've followed the fieltrip implementation to compute the PLV, and found that it takes the CSD, and normalizes it for the amplitude of the replicates, this is to divide the csd by the absolute of the same csd, then makes an average of the normalized csd's, to finally take the absolute of the average-normalized-csd as the PLV.  I think it can be summarized to something like, PLV = |E( csd/abs(csd) )| I do not see the similarity with the clasical formula that appears in the papers PLV=| E{exp(i*I{X})} |, where I{X} is the imaginary of the cross-spectrum, and E|.| is the expected value; I cannot find the relationship between the implementation on fieltrip of the PLV and the formula on the papers. Can anyone explain to me the relationship between the two approaches? or tell me the paper where it is explained? Many thanks in advanced, Gabriel -------------- next part -------------- An HTML attachment was scrubbed... URL: From 13681530640 at 139.com Thu May 23 03:38:08 2013 From: 13681530640 at 139.com (WangJing) Date: Thu, 23 May 2013 09:38:08 +0800 (CST) Subject: [FieldTrip] fieldtrip Digest, Vol 30, Issue 31 References: Message-ID: <2b26519d65c97b6-0000c.Richmail.00022826124215434628@139.com> Dear Johanna, Thank you for your suggestion. 1.I have two folder of T1 MRI, one is t1_vibe_tra_4,and another is t1_vibe_traGAD-5. which one is best? 2.when I convert MRI from DICOM into CTF format,the vitamin E marker didn't be found. what can I do? Best Regards, Jing Wang -------------------------------------------------------------------------------- ----The following is the content of the forwarded email---- From:fieldtrip-request To:fieldtrip Date:2013-05-22 15:33:13 Subject:fieldtrip Digest, Vol 30, Issue 31 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: question About head model (Johanna Zumer) ---------------------------------------------------------------------- Message: 1 Date: Wed, 22 May 2013 09:30:17 +0200 From: Johanna Zumer To: FieldTrip discussion list Subject: Re: [FieldTrip] question About head model Message-ID: Content-Type: text/plain; charset="utf-8" Dear Jing, It is best to use the T1 MRI rather than the other scans. To open a DICOM format file, you can try one of these options: % read the DICOM files mri = ft_read_mri('single_file_of_DICOM_series.IMA'); % or use a graphical file selection[f, p] = uigetfile ('*'); mri = ft_read_mri(fullfile (p, f)); I copied the above from documentation on the FieldTrip wiki: http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_an_anatomical_mri_from_dicom_into_ctf_format Then you can save the 'mri' into a *.mat file for future use with FieldTrip. Best regards, Johanna 2013/5/22 WangJing <13681530640 at 139.com> > Hi > I am a freshman about field trip. > I am trying to build the forward model. but my mri data is different from > the data in the tutorial. So I don't know how to bulid the head model. I > use the date which is from the paper "Open Database of Epileptic EEG with > MRI and Postoperational Assessment of Foci?a Real World Verification for > the EEG Inverse Solutions",http://eeg.pl/epi. MRI recordings containing a > T1, T2 or fluid attenuated inversion recovery (FLAIR) weighted brain scans > with morphologic substrate of the epilepsy (mostly cortical dysplasias, > dysplastic tumors etc.). In some cases there is also a scan with the > gadolinium (GAD) contrast. The images were collected by Siemens Sonata 1.5T > scanner. The data is stored in the Digital Imaging and Communications in > Medicine (DICOM) format. The name of the scan?s folder indicates its > weighting.The scans have the following resolutions: T1: 512 ? 512 pixels, > pixel spacing 0.4687 mm, slice thickness 1.2 mm, T2: 256 ? 256 pixels, > pixel spacing 0.9375 mm,slice thickness 2.5 mm. > In the tutorial,the mri data stored in only one file, while the data which > I used have many files, I don't know how to process. who can help me,Thanks1 > Thanks very much! > Best Reagards > Jing Wang > > > > > > ------------------------------ > ----The following is the content of the forwarded email---- > From?fieldtrip-request > To?fieldtrip > Date?2013-05-21 23:59:18 > Subject?fieldtrip Digest, Vol 30, Issue 29 > > 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: problem in connectivityanalysis (Gabriel Gonzalez Escamilla) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 21 May 2013 17:52:21 +0200 > From: Gabriel Gonzalez Escamilla > To: FieldTrip discussion list > Subject: Re: [FieldTrip] problem in connectivityanalysis > Message-ID: <1348f6433edc26f9.519bb455 at upo.es> > Content-Type: text/plain; charset="iso-8859-1" > > Thank you so much for your answer J?rn, > > > Now I got it, so, I will let the 'fourier' as input to ft_connectivityanalysis, because for some indices I will need the auto-spectrum, and if I fully undertood what you said, it will be the same, as they always take the phase information from the fourier transform. And fieltrip will automatically compute the csd if the input is the frequency data. > > > Nevertheless, it give me some error when I tried to use the output from 'powandcsd' of freqanalysis, always gives me a matrix dimensions error, and when I use the output 'fourier' from connectivityanalysis, it computes almost all indices to ok, raging from? -1 to 1 (I'm saw that they are signed, so this is ok), the problem are the ImC ranging from -inf to inf, and the PLV values ranging from 0 to inf, but when I use the 'fourier' the values are. Which for me is really weird. > > > > I have checked internally, and even when I always use the 'fourier' as input, when it internally calculates cross-spectrum for the ImC and PLV, the data.crsspctrm is different, e.g: > data.dimord = 'rpt_rpt_chan_chan_freq' > ans size(data.crsspctrm) = [1 7 59 59]; > > So, both are apparently the same, but the data inside this matrices is different, > > > for example, when calculating the ImC the first 7 columns for the first two rows are: > val(:,:,1,1) > ?[0.9323? 0.3679? 0.8629? 1.6436? 0.6404? 1.8782? 0.1139] > val(:,:,1,2) > > ?[0.8509-0.1555i? 0.2507-0.1066i? 0.8173-0.0290i? 1.4328-0.2427i? 0.5457-0.0500i? 1.6505-0.0161i? 0.0993+0.0016i] > > while when calculating the PLV are: > val(:,:,1,1) > ?[1? 1? 1? 1? 1? 1? 1] > val(:,:,1,2) > > ?[0.9694-0.2133i? 0.7011-0.3564i? 0.9951-0.0104i? 0.9014-0.3481i? 0.9781-0.0819i? 0.9982-0.0046i? 0.9507-0.0483i] > > > > I'm pretty sure I'm doing something wrong here, but I don't really have a clue, > > > If I use the fourier transform to calculate the 'csd' in ft_connectivity analysis and use this csd as input to all other ft_connectivityanalysis indices all of them are set to NaN or 1, not ranging between any numbers. > > > > > > On the other hand, I have seen searching on the net, that fieltrip is capable of create surrogate data, by shifting the phase information on every trial for only one electrode of each pair while using the original samples of each trials on the second channel, but I couldn't find on the manual how to do such a thing. Is there any way to compute this kind of surrogates for every sensor? or was it something that some one suggest to somebody? > > > Many thanks in advanced, > Gabriel. > > > > > ----- Mensaje original ----- > De: "J?rn M. Horschig" > Fecha: Martes, 21 de Mayo de 2013, 9:03 am > Asunto: Re: [FieldTrip] problem in connectivityanalysis > A: FieldTrip discussion list > > > > > > > Dear Gabriel, > > > > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > > No. You should think of coherence more as a measure for the consistency of the phase relation between channels across trials, so coherence is just not defined per trial,neither would it make sense to compute coherence for a single trial. > > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? I see some terminology issues here. Let me try to explain in a simple (aka least-mathematical I can think of) way: > > > > > For all these connectivity measures, we need the phase information from the Fourier transform (FFT) to compute the cross-spectral density matrix (CSD). The CSD can be regarded as the equivalent in the frequency domain to the covariance matrix in the time domain, thus it is a measures how a certain channels activity is co-modulated with another channels activity (for a particular frequency) - makes pretty much sense to make use of this when computing connectivity, right? :) > > > As you might know, a Fourier transform returns complex numbers, where the imaginary part of this number contains phase information. When calling ft_freqanalysis, you can decide if it shall only return the (squared) real part of the frequency spectrum (cfg.output='pow'), or instead the full CSD (cfg.output = 'powandcsd'). Alternatively, you can also let ft_freqanalysis return the raw Fourier coefficients (cfg.output='fourier'). From the Fourier coefficients, however, you can easily obtain the CSD or the power spectrum basically by multiplication the Fourier matrix with itself (transposed). All of these measures quantify the phase relation between channels across trials, and as phase information is coded in the imaginary part of the fourier output, thus for connectivityanalysis you need the CSD which can be obtained either by 'powandcsd' or by 'fourier'. > > > > I hope that somehow clarifies your questions. > > > > Best, > > J?rn > > > > On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote: > > Dear Fieltrip experts, > > > > > I have my continuous data imported to fieldtrip with matlab, I'm looking for performing connectivity analysis between pairs of sensors, I have succed as: > > > data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels and 2000 samples > > data.label {59x1}; > > data.time {1xNepochs}; > > > > then, calculate only the FFT of all sensors as: > > cfg=[]; > > cfg.output='fourier'; > > cfg.method='mtmfft'; > > cfg.taper='hanning'; > > cfg.foilim=[8.5 9.5]; > > cfg.tapsmofrq=0; > > cfg.trials='all'; > > cfg.keeptrials='yes'; > > cfg.channel='all'; > > fourier=ft_freqanalysis(cfg, data) > > as output I get: > > dimord = 'rpttap_chan_freq' > > freq= [1x9] > > fourierspctrm=[7x59x9 double] > > > > Then compute the imaginary part of coherency as: > > cfg=[]; > > cfg.method ='cohe'; > > cfg.complex='imag'; > > cfg.channelcbm={'all' 'all'}; > > coher = ft_connectivityanalysis (cfg, fourier) > > as output get: > > dimord='chan_chan_freq'; > > cohspctrm=[59x59x9 double]; > > dof=7; > > > > I have two main questions: > > > > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > > > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? > > > > > > > > > > Many thanks in advanced, > > Gabriel. > > > > > > > > > _______________________________________________ > fieldtrip mailing list > > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: > jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: > http://www.ru.nl/donders > > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > --------------------------
PhD. student Gabriel Gonz?lez-Escamilla
Laboratory of Functional Neuroscience
Department of Physiology, Anatomy, and Cell Biology
University Pablo de Olavide
Ctra. de Utrera, Km.1
41013 - Seville
- Spain -

Email: > ggonesc at upo.es
http://www.upo.es/neuroaging/es/
> > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130521/0886ac06/attachment.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 30, Issue 29 > ***************************************** > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 30, Issue 31 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu May 23 10:09:17 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 23 May 2013 10:09:17 +0200 Subject: [FieldTrip] connectivity problem In-Reply-To: <596f90904ed40d3b.519d1e28@upo.es> References: <596f90904ed40d3b.519d1e28@upo.es> Message-ID: Dear Gabriel, If I am not mistaken, the classical formula in Lachaux et al. (1999) Human Brain Mapping is PLV = 1/N * | sum(exp(i * theta(t,n))) | . This is almost the same as the formula you mention, except, importantly, that theta is the phase difference between two signals, so the angle of the CSD, and *not* the imaginary part. Note furthermore that 1 * exp(i*angle(z)) is equal to z/abs(z) for any complex z, and you see that the implementation computes the classical formula. Hope this helps, Best, Eelke On 22 May 2013 19:36, Gabriel Gonzalez Escamilla wrote: > Dear Fieldtrip experts, > > I finally understood how fieltrip computes the plv, so, my last e-mail has > no sense now. Given say this, I have one question: > > I've followed the fieltrip implementation to compute the PLV, and found that > it takes the CSD, and normalizes it for the amplitude of the replicates, > this is to divide the csd by the absolute of the same csd, then makes an > average of the normalized csd's, to finally take the absolute of the > average-normalized-csd as the PLV. I think it can be summarized to > something like, PLV = |E( csd/abs(csd) )| > > I do not see the similarity with the clasical formula that appears in the > papers PLV=| E{exp(i*I{X})} |, where I{X} is the imaginary of the > cross-spectrum, and E|.| is the expected value; I cannot find the > relationship between the implementation on fieltrip of the PLV and the > formula on the papers. > > Can anyone explain to me the relationship between the two approaches? or > tell me the paper where it is explained? > > Many thanks in advanced, > Gabriel > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jeremiemattout at yahoo.fr Thu May 23 10:19:09 2013 From: jeremiemattout at yahoo.fr (Jeremie MATTOUT) Date: Thu, 23 May 2013 09:19:09 +0100 (BST) Subject: [FieldTrip] DCM for fMRI and EEG/MEG course - Seattle June 2013 Message-ID: <1369297149.1995.YahooMailNeo@web133005.mail.ir2.yahoo.com> Dear Colleagues, We are pleased to announce DCM for fMRI and MEG/EEG, an intermediate-level, 3-day workshop designed for investigators having familiarity with the fundamental principles of fMRI or MEG/EEG data acquisition and analysis.. It will be held at the University of Washington in Seattle, WA from JUN 21-23, 2013, immediately following the OHBM 2013 meeting. This course will bring together investigators interested in using quantitative biophysical models to identify brain connectivity and dynamics using the tools of imaging neuroscience, including fMRI, EEG/MEG, and LFP. Presentations will include: overviews of brain connectivity methods and models descriptions of specifics of DCM for fMRI, EEG/MEG and LFP data explanations of Bayesian analysis at both single-subject and group levels explorations of DCM experimental design and other advanced issues Each afternoon will include a laboratory session, in which participants will gather in small groups to work with the faculty through the stages of analyzing data from example experiments. Further details can be found at: http://www.neurometrika.org/DCM2013 Kind Regards, Tom Zeffiro, Jean Daunizeau & Jeremie Mattout -------------- next part -------------- An HTML attachment was scrubbed... URL: From marianapbranco1 at gmail.com Thu May 23 10:25:45 2013 From: marianapbranco1 at gmail.com (Mariana Branco) Date: Thu, 23 May 2013 10:25:45 +0200 Subject: [FieldTrip] Online preprocessing Message-ID: <1FDFE75C-E4A5-4F6D-B860-76647C558465@gmail.com> Hello, I am new in the BCI research field, and I am starting to implement an online BCI system using the Fieldtrip toolbox to detect ERD/ERS features. I already did two offline experiments using this toolbox, but now I am having some doubts about how to adapt the offline signal processing functions into real-time; I started by simulating real-time data from a file. My questions are: 1) To process the data real-time using ft_preprocessing is it first necessary to define trials (with ft_definetrial)? If so, how can I define the trial if it is real-time? 2) Is it possible to still use the function ft_preprocessing and ft_resampledata in real-time with the same specifications of offline procedure? 3) When simulating data stream (with two matlab sessions) the function ft_realtime_powerestimate(cfg) reports an error related to the "arg 3 (overlap)" on the welch's method. How can I correct this? 4) Also, for synchronous/triggered data analysis it is available the function ft_realtime_average. Is it possible to explain how can this example function be used for implementation of my own feature processing and extraction function. Does it preprocess the data in an alternative way to ft_preprocessing? I am sorry for all the questions. Regards, Mariana Branco From jm.horschig at donders.ru.nl Thu May 23 11:37:59 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 23 May 2013 11:37:59 +0200 Subject: [FieldTrip] Online preprocessing In-Reply-To: <1FDFE75C-E4A5-4F6D-B860-76647C558465@gmail.com> References: <1FDFE75C-E4A5-4F6D-B860-76647C558465@gmail.com> Message-ID: <519DE377.1020805@donders.ru.nl> Hi Mariana, On 5/23/2013 10:25 AM, Mariana Branco wrote: > Hello, > > I am new in the BCI research field, and I am starting to implement an online BCI system using the Fieldtrip toolbox to detect ERD/ERS features. I already did two offline experiments using this toolbox, but now I am having some doubts about how to adapt the offline signal processing functions into real-time; I started by simulating real-time data from a file. > My questions are: > 1) To process the data real-time using ft_preprocessing is it first necessary to define trials (with ft_definetrial)? If so, how can I define the trial if it is real-time? no, you should use ft_read_data directly. The way to go is to check the header of your buffer for new events using ft_read_event. Upon detection of a relevant trigger, you need to use the returned event sample to compute your beginning and endsample manually (this is what ft_definetrial, or more precisely, your trialfun, usually does). Then you can use ft_read_data to read data from the buffer into memory. ft_read_data returns a datamatrix that can be used to create your data.trial field. Also, you need to manually create the rest of the data-structure. > 2) Is it possible to still use the function ft_preprocessing and ft_resampledata in real-time with the same specifications of offline procedure? It is definitely possible, once you converted the matrix to a regular fieldtrip structure. However, since it is about speed in online processing, you can think about using low-level functions of FieldTrip directly. Note that for resampling, you can also set up the shared memory (eg. acq2ftx) such that is downsamples right from the start. > 3) When simulating data stream (with two matlab sessions) the function ft_realtime_powerestimate(cfg) reports an error related to the "arg 3 (overlap)" on the welch's method. How can I correct this? Do not use Welch's method, use another function. I don't know about this particular example function, but I think you would greatly benefit from finding out where the error is yourself. Note that online streaming od data *is* complicated and requires *you* to have knowledge about this. > 4) Also, for synchronous/triggered data analysis it is available the function ft_realtime_average. Is it possible to explain how can this example function be used for implementation of my own feature processing and extraction function. Does it preprocess the data in an alternative way to ft_preprocessing? It should be an example, yes. Usually, there should be, as explained above, some ft_read_event statement to read the trigger value(s). In that particular example, the trialfun is used rather than ft_read_data directly, but trialfun is basically a wrapper around ft_read_data. Also, in that example a bunch of trials is read in, not just one. The thing you need to do to adjust this is to filter out the event structure such that only in case of the trigger of interest some data processing is done (you can use ft_filter_event for this). My best advise for you is to read all (most) example functions and adjust them so that they run in your lab. Then sketch a flow diagram how triggers/data will be sent and read, try to implement this yourself (by copy&pasting relevant parts out of the example functions). If you have specific questions, feel free to always ask, but as this stage (please excuse my bluntnessI think you do not really know what needs to be done. I could write a lot about this, but I think you will benefit more if you first try yourself (especially because I do not know how your lab is set up and how things needs to be adjusted). But, as just said, feel free to write again when you have other questions. Good luck! Best, Jörn > > I am sorry for all the questions. No problem, no way to know everything :) > Regards, > > Mariana Branco > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From marianapbranco1 at gmail.com Thu May 23 11:57:27 2013 From: marianapbranco1 at gmail.com (Mariana Branco) Date: Thu, 23 May 2013 11:57:27 +0200 Subject: [FieldTrip] Online preprocessing In-Reply-To: <519DE377.1020805@donders.ru.nl> References: <1FDFE75C-E4A5-4F6D-B860-76647C558465@gmail.com> <519DE377.1020805@donders.ru.nl> Message-ID: Hi Jörn, Thank you very much for answering. I definitely still have a lot to understand about online implementation, which I will do. Another specific doubt came up when I was trying to understand the function ft_preprocessing. My offline data is composed of 40 trials of approx. 9-10s paradigms. I have a cued motor task at 3s (lasting 5s) and I use 0s until 3s as baseline to each trial. In the examples used in fieldtrip it is possible to chose the 'demean' option and specify the baseline period in seconds. My question is how exactly does the ft_preprocessing function corrects the baseline? Also, the examples define the baseline window with negative time, but I defined the baselinewindow=[0 3]. Is it wrong? Thank you again for all the advices, I will definitely pose more question in the future. Mariana Branco On 23 May 2013, at 11:37, "Jörn M. Horschig" wrote: > Hi Mariana, > > On 5/23/2013 10:25 AM, Mariana Branco wrote: >> Hello, >> >> I am new in the BCI research field, and I am starting to implement an online BCI system using the Fieldtrip toolbox to detect ERD/ERS features. I already did two offline experiments using this toolbox, but now I am having some doubts about how to adapt the offline signal processing functions into real-time; I started by simulating real-time data from a file. >> My questions are: >> 1) To process the data real-time using ft_preprocessing is it first necessary to define trials (with ft_definetrial)? If so, how can I define the trial if it is real-time? > > no, you should use ft_read_data directly. The way to go is to check the header of your buffer for new events using ft_read_event. Upon detection of a relevant trigger, you need to use the returned event sample to compute your beginning and endsample manually (this is what ft_definetrial, or more precisely, your trialfun, usually does). Then you can use ft_read_data to read data from the buffer into memory. ft_read_data returns a datamatrix that can be used to create your data.trial field. Also, you need to manually create the rest of the data-structure. >> 2) Is it possible to still use the function ft_preprocessing and ft_resampledata in real-time with the same specifications of offline procedure? > It is definitely possible, once you converted the matrix to a regular fieldtrip structure. However, since it is about speed in online processing, you can think about using low-level functions of FieldTrip directly. Note that for resampling, you can also set up the shared memory (eg. acq2ftx) such that is downsamples right from the start. > >> 3) When simulating data stream (with two matlab sessions) the function ft_realtime_powerestimate(cfg) reports an error related to the "arg 3 (overlap)" on the welch's method. How can I correct this? > Do not use Welch's method, use another function. I don't know about this particular example function, but I think you would greatly benefit from finding out where the error is yourself. Note that online streaming od data *is* complicated and requires *you* to have knowledge about this. >> 4) Also, for synchronous/triggered data analysis it is available the function ft_realtime_average. Is it possible to explain how can this example function be used for implementation of my own feature processing and extraction function. Does it preprocess the data in an alternative way to ft_preprocessing? > It should be an example, yes. Usually, there should be, as explained above, some ft_read_event statement to read the trigger value(s). In that particular example, the trialfun is used rather than ft_read_data directly, but trialfun is basically a wrapper around ft_read_data. Also, in that example a bunch of trials is read in, not just one. The thing you need to do to adjust this is to filter out the event structure such that only in case of the trigger of interest some data processing is done (you can use ft_filter_event for this). > > My best advise for you is to read all (most) example functions and adjust them so that they run in your lab. Then sketch a flow diagram how triggers/data will be sent and read, try to implement this yourself (by copy&pasting relevant parts out of the example functions). If you have specific questions, feel free to always ask, but as this stage (please excuse my bluntnessI think you do not really know what needs to be done. I could write a lot about this, but I think you will benefit more if you first try yourself (especially because I do not know how your lab is set up and how things needs to be adjusted). But, as just said, feel free to write again when you have other questions. > > Good luck! > Best, > Jörn > >> >> I am sorry for all the questions. > > No problem, no way to know everything :) > >> Regards, >> >> Mariana Branco >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Thu May 23 12:08:33 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 23 May 2013 12:08:33 +0200 Subject: [FieldTrip] Online preprocessing In-Reply-To: References: <1FDFE75C-E4A5-4F6D-B860-76647C558465@gmail.com> <519DE377.1020805@donders.ru.nl> Message-ID: <519DEAA1.5030402@donders.ru.nl> Hi Mariana, ft_preprocessing demeans by the whole time window, in your 0s to 5s. The baseline window you specify depends on the time axis itself, if it goes from 0s to 5s, then defining [0 3] is fine. If it goes from -3 to 2s, then you need to define [-3 0]. Time is relative :) Also, please check ft_timelockbaseline. But such a simple thing as subtracting a number from a matrix can also easily be done without relying on a fieldtrip function :) Best, Jörn On 5/23/2013 11:57 AM, Mariana Branco wrote: > Hi Jörn, > > Thank you very much for answering. I definitely still have a lot to understand about online implementation, which I will do. > > Another specific doubt came up when I was trying to understand the function ft_preprocessing. My offline data is composed of 40 trials of approx. 9-10s paradigms. I have a cued motor task at 3s (lasting 5s) and I use 0s until 3s as baseline to each trial. > In the examples used in fieldtrip it is possible to chose the 'demean' option and specify the baseline period in seconds. My question is how exactly does the ft_preprocessing function corrects the baseline? Also, the examples define the baseline window with negative time, but I defined the baselinewindow=[0 3]. Is it wrong? > > Thank you again for all the advices, I will definitely pose more question in the future. > > Mariana Branco > > On 23 May 2013, at 11:37, "Jörn M. Horschig" wrote: > >> Hi Mariana, >> >> On 5/23/2013 10:25 AM, Mariana Branco wrote: >>> Hello, >>> >>> I am new in the BCI research field, and I am starting to implement an online BCI system using the Fieldtrip toolbox to detect ERD/ERS features. I already did two offline experiments using this toolbox, but now I am having some doubts about how to adapt the offline signal processing functions into real-time; I started by simulating real-time data from a file. >>> My questions are: >>> 1) To process the data real-time using ft_preprocessing is it first necessary to define trials (with ft_definetrial)? If so, how can I define the trial if it is real-time? >> no, you should use ft_read_data directly. The way to go is to check the header of your buffer for new events using ft_read_event. Upon detection of a relevant trigger, you need to use the returned event sample to compute your beginning and endsample manually (this is what ft_definetrial, or more precisely, your trialfun, usually does). Then you can use ft_read_data to read data from the buffer into memory. ft_read_data returns a datamatrix that can be used to create your data.trial field. Also, you need to manually create the rest of the data-structure. >>> 2) Is it possible to still use the function ft_preprocessing and ft_resampledata in real-time with the same specifications of offline procedure? >> It is definitely possible, once you converted the matrix to a regular fieldtrip structure. However, since it is about speed in online processing, you can think about using low-level functions of FieldTrip directly. Note that for resampling, you can also set up the shared memory (eg. acq2ftx) such that is downsamples right from the start. >> >>> 3) When simulating data stream (with two matlab sessions) the function ft_realtime_powerestimate(cfg) reports an error related to the "arg 3 (overlap)" on the welch's method. How can I correct this? >> Do not use Welch's method, use another function. I don't know about this particular example function, but I think you would greatly benefit from finding out where the error is yourself. Note that online streaming od data *is* complicated and requires *you* to have knowledge about this. >>> 4) Also, for synchronous/triggered data analysis it is available the function ft_realtime_average. Is it possible to explain how can this example function be used for implementation of my own feature processing and extraction function. Does it preprocess the data in an alternative way to ft_preprocessing? >> It should be an example, yes. Usually, there should be, as explained above, some ft_read_event statement to read the trigger value(s). In that particular example, the trialfun is used rather than ft_read_data directly, but trialfun is basically a wrapper around ft_read_data. Also, in that example a bunch of trials is read in, not just one. The thing you need to do to adjust this is to filter out the event structure such that only in case of the trigger of interest some data processing is done (you can use ft_filter_event for this). >> >> My best advise for you is to read all (most) example functions and adjust them so that they run in your lab. Then sketch a flow diagram how triggers/data will be sent and read, try to implement this yourself (by copy&pasting relevant parts out of the example functions). If you have specific questions, feel free to always ask, but as this stage (please excuse my bluntnessI think you do not really know what needs to be done. I could write a lot about this, but I think you will benefit more if you first try yourself (especially because I do not know how your lab is set up and how things needs to be adjusted). But, as just said, feel free to write again when you have other questions. >> >> Good luck! >> Best, >> Jörn >> >>> I am sorry for all the questions. >> No problem, no way to know everything :) >> >>> Regards, >>> >>> Mariana Branco >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> 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 -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From andmib at gmail.com Thu May 23 16:29:07 2013 From: andmib at gmail.com (Andrew Brooks) Date: Thu, 23 May 2013 10:29:07 -0400 Subject: [FieldTrip] Format for ft_volumewrite? Message-ID: Hello all, I am new to FieldTrip, so this is a very basic question I was hoping someone might know an answer to. I am using ft_read_data to read the first EPI volume after dummy scans are thrown out. I want to write this volume to a .nii file to my disk. For some reason, I am unable to figure out the correct structure that ft_volumewrite wants. Using the output from ft_read_data ('dat') does not seem to work. Does anybody have any suggestions? [ For a longer explanation of exactly what I am aiming to do, in case you have any suggestions: I have ROI that is defined in Talairach space. This is the ROI I would like to pull my real-time data from for each subject in my study. To do this, I plan to register a talairach template brain to individual subject-space, and then apply that transformation to my ROI so that it is in subject space. I was going to simply write out the subject's EPI to an .nii file, and then run SPM's co-registration step which allows for a 'child dataset' to be set (my ROI), with the source file being the template, and the reference being the individual ROI]. Thanks Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: From ggonesc at upo.es Thu May 23 16:46:53 2013 From: ggonesc at upo.es (Gabriel Gonzalez Escamilla) Date: Thu, 23 May 2013 16:46:53 +0200 Subject: [FieldTrip] connectivity problem Message-ID: An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Fri May 24 10:21:24 2013 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Fri, 24 May 2013 10:21:24 +0200 Subject: [FieldTrip] Format for ft_volumewrite? In-Reply-To: References: Message-ID: Dear Andrew, To read EPI (MRI) data, you should use ft_read_mri instead. Then hopefully the format will match what ft_volumewrite wants. Cheers, Johanna 2013/5/23 Andrew Brooks > Hello all, > > I am new to FieldTrip, so this is a very basic question I was hoping > someone might know an answer to. > > I am using ft_read_data to read the first EPI volume after dummy scans are > thrown out. I want to write this volume to a .nii file to my disk. For some > reason, I am unable to figure out the correct structure that ft_volumewrite > wants. Using the output from ft_read_data ('dat') does not seem to work. > Does anybody have any suggestions? > > [ For a longer explanation of exactly what I am aiming to do, in case you > have any suggestions: I have ROI that is defined in Talairach space. This > is the ROI I would like to pull my real-time data from for each subject in > my study. To do this, I plan to register a talairach template brain to > individual subject-space, and then apply that transformation to my ROI so > that it is in subject space. I was going to simply write out the subject's > EPI to an .nii file, and then run SPM's co-registration step which allows > for a 'child dataset' to be set (my ROI), with the source file being the > template, and the reference being the individual ROI]. > > Thanks > Andrew > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andmib at gmail.com Fri May 24 15:15:09 2013 From: andmib at gmail.com (Andrew Brooks) Date: Fri, 24 May 2013 09:15:09 -0400 Subject: [FieldTrip] Format for ft_volumewrite? In-Reply-To: References: Message-ID: Thanks Johanna. Ft_read_mri only pulls from a file, correct? I'm trying to pull a single volume from the buffer using ft_read_data, and then write it out to a nifti file using ft_volumewrite, but ft_read_data does not output the volume in a structure that ft_volumewrite wants. On Fri, May 24, 2013 at 4:21 AM, Johanna Zumer wrote: > Dear Andrew, > > To read EPI (MRI) data, you should use ft_read_mri instead. Then > hopefully the format will match what ft_volumewrite wants. > > Cheers, > Johanna > > > 2013/5/23 Andrew Brooks > >> Hello all, >> >> I am new to FieldTrip, so this is a very basic question I was hoping >> someone might know an answer to. >> >> I am using ft_read_data to read the first EPI volume after dummy scans >> are thrown out. I want to write this volume to a .nii file to my disk. For >> some reason, I am unable to figure out the correct structure that >> ft_volumewrite wants. Using the output from ft_read_data ('dat') does not >> seem to work. Does anybody have any suggestions? >> >> [ For a longer explanation of exactly what I am aiming to do, in case you >> have any suggestions: I have ROI that is defined in Talairach space. This >> is the ROI I would like to pull my real-time data from for each subject in >> my study. To do this, I plan to register a talairach template brain to >> individual subject-space, and then apply that transformation to my ROI so >> that it is in subject space. I was going to simply write out the subject's >> EPI to an .nii file, and then run SPM's co-registration step which allows >> for a 'child dataset' to be set (my ROI), with the source file being the >> template, and the reference being the individual ROI]. >> >> Thanks >> Andrew >> >> _______________________________________________ >> 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: From johanna.zumer at gmail.com Fri May 24 16:29:00 2013 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Fri, 24 May 2013 16:29:00 +0200 Subject: [FieldTrip] Format for ft_volumewrite? In-Reply-To: References: Message-ID: I'm not familiar with the buffer, but if you can read in your data successfully, then to convert it to the structure that ft_volumewrite wants, you can get some information inside ft_datatype_volume for what are required or optional fields. 2013/5/24 Andrew Brooks > Thanks Johanna. Ft_read_mri only pulls from a file, correct? I'm trying to > pull a single volume from the buffer using ft_read_data, and then write it > out to a nifti file using ft_volumewrite, but ft_read_data does not output > the volume in a structure that ft_volumewrite wants. > > > On Fri, May 24, 2013 at 4:21 AM, Johanna Zumer < > johanna.zumer at donders.ru.nl> wrote: > >> Dear Andrew, >> >> To read EPI (MRI) data, you should use ft_read_mri instead. Then >> hopefully the format will match what ft_volumewrite wants. >> >> Cheers, >> Johanna >> >> >> 2013/5/23 Andrew Brooks >> >>> Hello all, >>> >>> I am new to FieldTrip, so this is a very basic question I was hoping >>> someone might know an answer to. >>> >>> I am using ft_read_data to read the first EPI volume after dummy scans >>> are thrown out. I want to write this volume to a .nii file to my disk. For >>> some reason, I am unable to figure out the correct structure that >>> ft_volumewrite wants. Using the output from ft_read_data ('dat') does not >>> seem to work. Does anybody have any suggestions? >>> >>> [ For a longer explanation of exactly what I am aiming to do, in case >>> you have any suggestions: I have ROI that is defined in Talairach space. >>> This is the ROI I would like to pull my real-time data from for each >>> subject in my study. To do this, I plan to register a talairach template >>> brain to individual subject-space, and then apply that transformation to my >>> ROI so that it is in subject space. I was going to simply write out the >>> subject's EPI to an .nii file, and then run SPM's co-registration step >>> which allows for a 'child dataset' to be set (my ROI), with the source file >>> being the template, and the reference being the individual ROI]. >>> >>> Thanks >>> Andrew >>> >>> _______________________________________________ >>> 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: From politzerahless at gmail.com Sat May 25 15:11:18 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 25 May 2013 08:11:18 -0500 Subject: [FieldTrip] Sourcespace and volume conductor misaligned Message-ID: Hello all, I am going through the workflow at http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate. After making the volume conduction model using ft_prepare_headmodel(), I noticed that although the volume conduction model and sourcespace have the same orientation and overall size/shape (after I converted the volume conduction model to cm, which wasn't in the tutorial but my original model came out in mm), they don't quite line up, as you can see in this figure: http://i.imgur.com/mGEtLOa.png I did interactively re-align the data to CTF (twice--in step 2 of "Preprocessing of the anatomical MRI" and in step 4 of "Source model") using fiducials, and to Talairach (step 5 of "Preprocessing of the anatomical data"), so I'm not sure how it ended up this way. The code I've used at each step is basically the same as that in the tutorial. Is there any way to line up my volume conduction model and sourcespace now, without going back and re-running most of the workflow? Best, Steve -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://people.ku.edu/~sjpa/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Sat May 25 20:54:59 2013 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Sat, 25 May 2013 20:54:59 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 30, Issue 31 In-Reply-To: <2b26519d65c97b6-0000c.Richmail.00022826124215434628@139.com> References: <2b26519d65c97b6-0000c.Richmail.00022826124215434628@139.com> Message-ID: Dear Jing, 1. Every MRI scanner is different, so I'm not familiar with that naming scheme, but it seems the 'GAD' at the end of the file name indicates that was with the Gadolinium contrast agent, so I would suggest to not use that, but instead use the first (plain) T1. 2. I'm not sure what to suggest. I assume you can see the vitamin E marker clearly when viewing the DICOM file? Is the issue that some slices are missing in the conversion, or that the contrast on the image is not the same? or right/left flipped? Best, Johanna 2013/5/23 WangJing <13681530640 at 139.com> > Dear Johanna, > > Thank you for your suggestion. > 1.I have two folder of T1 MRI, one is t1_vibe_tra_4,and another is > t1_vibe_traGAD-5. which one is best? > 2.when I convert MRI from DICOM into CTF format,the vitamin E marker > didn't be found. what can I do? > > Best Regards, > Jing Wang > > > > > ------------------------------ > ----The following is the content of the forwarded email---- > From:fieldtrip-request > To:fieldtrip > Date:2013-05-22 15:33:13 > Subject:fieldtrip Digest, Vol 30, Issue 31 > > 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: question About head model (Johanna Zumer) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 22 May 2013 09:30:17 +0200 > From: Johanna Zumer > To: FieldTrip discussion list > Subject: Re: [FieldTrip] question About head model > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Dear Jing, > > It is best to use the T1 MRI rather than the other scans. To open a DICOM > format file, you can try one of these options: > > % read the DICOM files > mri = ft_read_mri('single_file_of_DICOM_series.IMA'); > % or use a graphical file selection[f, p] = uigetfile > >('*'); > mri = ft_read_mri(fullfile > >(p, > f)); > > > I copied the above from documentation on the FieldTrip wiki: > > http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_an_anatomical_mri_from_dicom_into_ctf_format > > > Then you can save the 'mri' into a *.mat file for future use with FieldTrip. > > Best regards, > Johanna > > > 2013/5/22 WangJing <13681530640 at 139.com> > > > Hi > > I am a freshman about field trip. > > I am trying to build the forward model. but my mri data is different from > > the data in the tutorial. So I don't know how to bulid the head model. I > > use the date which is from the paper "Open Database of Epileptic EEG with > > MRI and Postoperational Assessment of Foci?a Real World Verification for > > the EEG Inverse Solutions",http://eeg.pl/epi > . MRI recordings containing a > > > T1, T2 or fluid attenuated inversion recovery (FLAIR) weighted brain scans > > with morphologic substrate of the epilepsy (mostly cortical dysplasias, > > dysplastic tumors etc.). In some cases there is also a scan with the > > > gadolinium (GAD) contrast. The images were collected by Siemens Sonata 1.5T > > scanner. The data is stored in the Digital Imaging and Communications in > > Medicine (DICOM) format. The name of the scan?s folder indicates its > > weighting.The scans have the following resolutions: T1: 512 ? 512 pixels, > > pixel spacing 0.4687 mm, slice thickness 1.2 mm, T2: 256 ? 256 pixels, > > pixel spacing 0.9375 mm,slice thickness 2.5 mm. > > > In the tutorial,the mri data stored in only one file, while the data which > > > I used have many files, I don't know how to process. who can help me,Thanks1 > > Thanks very much! > > Best Reagards > > Jing Wang > > > > > > > > > > > > ------------------------------ > > ----The following is the content of the forwarded email---- > > From?fieldtrip-request > > To?fieldtrip > > Date?2013-05-21 23:59:18 > > Subject?fieldtrip Digest, Vol 30, Issue 29 > > > > 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: problem in connectivityanalysis (Gabriel Gonzalez Escamilla) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Tue, 21 May 2013 17:52:21 +0200 > > From: Gabriel Gonzalez Escamilla > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] problem in connectivityanalysis > > Message-ID: <1348f6433edc26f9.519bb455 at upo.es> > > Content-Type: text/plain; charset="iso-8859-1" > > > > Thank you so much for your answer J?rn, > > > > > > > Now I got it, so, I will let the 'fourier' as input to ft_connectivityanalysis, because for some indices I will need the auto-spectrum, and if I fully undertood what you said, it will be the same, as they always take the phase information from the fourier transform. And fieltrip will automatically compute the csd if the input is the frequency data. > > > > > > > Nevertheless, it give me some error when I tried to use the output from 'powandcsd' of freqanalysis, always gives me a matrix dimensions error, and when I use the output 'fourier' from connectivityanalysis, it computes almost all indices to ok, raging from? -1 to 1 (I'm saw that they are signed, so this is ok), the problem are the ImC ranging from -inf to inf, and the PLV values ranging from 0 to inf, but when I use the 'fourier' the values are. Which for me is really weird. > > > > > > > > > I have checked internally, and even when I always use the 'fourier' as input, when it internally calculates cross-spectrum for the ImC and PLV, the data.crsspctrm is different, e.g: > > data.dimord = 'rpt_rpt_chan_chan_freq' > > ans size(data.crsspctrm) = [1 7 59 59]; > > > > > So, both are apparently the same, but the data inside this matrices is different, > > > > > > > for example, when calculating the ImC the first 7 columns for the first two rows are: > > val(:,:,1,1) > > ?[0.9323? 0.3679? 0.8629? 1.6436? 0.6404? 1.8782? 0.1139] > > val(:,:,1,2) > > > > > ?[0.8509-0.1555i? 0.2507-0.1066i? 0.8173-0.0290i? 1.4328-0.2427i? 0.5457-0.0500i? 1.6505-0.0161i? 0.0993+0.0016i] > > > > while when calculating the PLV are: > > val(:,:,1,1) > > ?[1? 1? 1? 1? 1? 1? 1] > > val(:,:,1,2) > > > > > ?[0.9694-0.2133i? 0.7011-0.3564i? 0.9951-0.0104i? 0.9014-0.3481i? 0.9781-0.0819i? 0.9982-0.0046i? 0.9507-0.0483i] > > > > > > > > > I'm pretty sure I'm doing something wrong here, but I don't really have a clue, > > > > > > > If I use the fourier transform to calculate the 'csd' in ft_connectivity analysis and use this csd as input to all other ft_connectivityanalysis indices all of them are set to NaN or 1, not ranging between any numbers. > > > > > > > > > > > > > On the other hand, I have seen searching on the net, that fieltrip is capable of create surrogate data, by shifting the phase information on every trial for only one electrode of each pair while using the original samples of each trials on the second channel, but I couldn't find on the manual how to do such a thing. Is there any way to compute this kind of surrogates for every sensor? or was it something that some one suggest to somebody? > > > > > > Many thanks in advanced, > > Gabriel. > > > > > > > > > > ----- Mensaje original ----- > > De: "J?rn M. Horschig" > > Fecha: Martes, 21 de Mayo de 2013, 9:03 am > > Asunto: Re: [FieldTrip] problem in connectivityanalysis > > A: FieldTrip discussion list > > > > > > > > > > > > > Dear Gabriel, > > > > > > > > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > > > > > > No. You should think of coherence more as a measure for the consistency of the phase relation between channels across trials, so coherence is just not defined per trial,neither would it make sense to compute coherence for a single trial. > > > > > > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? I see some terminology issues here. Let me try to explain in a simple (aka least-mathematical I can think of) way: > > > > > > > > > For all these connectivity measures, we need the phase information from the Fourier transform (FFT) to compute the cross-spectral density matrix (CSD). The CSD can be regarded as the equivalent in the frequency domain to the covariance matrix in the time domain, thus it is a measures how a certain channels activity is co-modulated with another channels activity (for a particular frequency) - makes pretty much sense to make use of this when computing connectivity, right? :) > > > > > > As you might know, a Fourier transform returns complex numbers, where the imaginary part of this number contains phase information. When calling ft_freqanalysis, you can decide if it shall only return the (squared) real part of the frequency spectrum (cfg.output='pow'), or instead the full CSD (cfg.output = 'powandcsd'). Alternatively, you can also let ft_freqanalysis return the raw Fourier coefficients (cfg.output='fourier'). From the Fourier coefficients, however, you can easily obtain the CSD or the power spectrum basically by multiplication the Fourier matrix with itself (transposed). All of these measures quantify the phase relation between channels across trials, and as phase information is coded in the imaginary part of the fourier output, thus for connectivityanalysis you need the CSD which can be obtained either by 'powandcsd' or by 'fourier'. > > > > > > I hope that somehow clarifies your questions. > > > > > > Best, > > > J?rn > > > > > > On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote: > > > Dear Fieltrip experts, > > > > > > > > > I have my continuous data imported to fieldtrip with matlab, I'm looking for performing connectivity analysis between pairs of sensors, I have succed as: > > > > > > data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels and 2000 samples > > > data.label {59x1}; > > > data.time {1xNepochs}; > > > > > > then, calculate only the FFT of all sensors as: > > > cfg=[]; > > > cfg.output='fourier'; > > > cfg.method='mtmfft'; > > > cfg.taper='hanning'; > > > cfg.foilim=[8.5 9.5]; > > > cfg.tapsmofrq=0; > > > cfg.trials='all'; > > > cfg.keeptrials='yes'; > > > cfg.channel='all'; > > > fourier=ft_freqanalysis(cfg, data) > > > as output I get: > > > dimord = 'rpttap_chan_freq' > > > freq= [1x9] > > > fourierspctrm=[7x59x9 double] > > > > > > Then compute the imaginary part of coherency as: > > > cfg=[]; > > > cfg.method ='cohe'; > > > cfg.complex='imag'; > > > cfg.channelcbm={'all' 'all'}; > > > coher = ft_connectivityanalysis (cfg, fourier) > > > as output get: > > > dimord='chan_chan_freq'; > > > cohspctrm=[59x59x9 double]; > > > dof=7; > > > > > > I have two main questions: > > > > > > > > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > > > > > > > > > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? > > > > > > > > > > > > > > > Many thanks in advanced, > > > Gabriel. > > > > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: > > jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: > > http://www.ru.nl/donders > > > > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > --------------------------
PhD. student Gabriel Gonz?lez-Escamilla
Laboratory of Functional Neuroscience
Department of Physiology, Anatomy, and Cell Biology
University Pablo de Olavide
Ctra. de Utrera, Km.1
41013 - Seville
- Spain -

Email: > > ggonesc at upo.es
http://www.upo.es/neuroaging/es/
> > > > > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130521/0886ac06/attachment.html > > > > > > > ------------------------------ > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > End of fieldtrip Digest, Vol 30, Issue 29 > > ***************************************** > > > > _______________________________________________ > > 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/20130522/190aa246/attachment.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 30, Issue 31 > ***************************************** > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From 13681530640 at 139.com Sun May 26 11:26:07 2013 From: 13681530640 at 139.com (WangJing) Date: Sun, 26 May 2013 17:26:07 +0800 (CST) Subject: [FieldTrip] Question about Memory requirement Of Head model References: Message-ID: <2b1851a17ca79ab-00017.Richmail.00027836529255037638@139.com> Hello Everyone, I want to know what's the requiement of fieldtrip to hardware and software. My computer 's CPU is 3GHz, and RAM is 8GB. the OS is windows sever 2003, and the matlab is 2011a(32bit).I often encounter the problem of out of Memery. for example 1: > mri = ft_read_mri('IM-0001-0001.dcm'); % the dim of data is [512 512 144] cfg = []; ft_sourceplot(cfg,mri); the result is: ??? Out of memory. Type HELP MEMORY for your options. Error in ==> ft_sourceplot at 368 ana = (ana-dmin)./(dmax-dmin); example 2: clear all mri = ft_read_mri('IM-0001-0001.dcm'); cfg = []; cfg.method = 'interactive'; cfg.coordsys = 'ctf'; mri_realigned = ft_volumerealign(cfg,mri); clear mri cfg=[]; mrirs = ft_volumereslice(cfg,mri_realigned); when run to the last code, I face the same problem. Thank you! Best Regards! Jing Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Sun May 26 12:23:34 2013 From: julian.keil at gmail.com (Julian Keil) Date: Sun, 26 May 2013 12:23:34 +0200 Subject: [FieldTrip] Question about Memory requirement Of Head model In-Reply-To: <2b1851a17ca79ab-00017.Richmail.00027836529255037638@139.com> References: <2b1851a17ca79ab-00017.Richmail.00027836529255037638@139.com> Message-ID: <95C94C42-6516-4536-AD5A-66FA5041E3F3@gmail.com> Dear Jing Wang, this might be due to you using a 32bit System. As far as I know, 32bit Windows can only use ~3 GB of Memory. At least that's what I experienced using Win XP, maybe it's different for the server. However, I'd advise you to switch to a 64bit System and try again. Best, Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum E 307 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 26.05.2013 um 11:26 schrieb WangJing: > Hello Everyone, > I want to know what's the requiement of fieldtrip to hardware and software. My computer 's CPU is 3GHz, and RAM is 8GB. the OS is windows sever 2003, and the matlab is 2011a(32bit).I often encounter the problem of out of Memery. > for example 1: > > mri = ft_read_mri('IM-0001-0001.dcm'); % the dim of data is [512 512 144] > cfg = []; > ft_sourceplot(cfg,mri); > > the result is: > ??? Out of memory. Type HELP MEMORY for your options. > Error in ==> ft_sourceplot at 368 > ana = (ana-dmin)./(dmax-dmin); > > example 2: > clear all > mri = ft_read_mri('IM-0001-0001.dcm'); > cfg = []; > cfg.method = 'interactive'; > cfg.coordsys = 'ctf'; > mri_realigned = ft_volumerealign(cfg,mri); > clear mri > cfg=[]; > mrirs = ft_volumereslice(cfg,mri_realigned); > > when run to the last code, I face the same problem. > > Thank you! > Best Regards! > Jing Wang > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From 13681530640 at 139.com Sun May 26 17:01:10 2013 From: 13681530640 at 139.com (WangJing) Date: Sun, 26 May 2013 23:01:10 +0800 (CST) Subject: [FieldTrip] fieldtrip Digest, Vol 30, Issue 37 References: Message-ID: <2b1851a22104e22-00005.Richmail.00025896525295133618@139.com> Hello Everyone, I have resolved the problem when I ran it in computer with 64 bit OS, thanks. Best Regards, Jing Wang -------------------------------------------------------------------------------- ----The following is the content of the forwarded email---- From:fieldtrip-request To:fieldtrip Date:2013-05-26 18:00:05 Subject:fieldtrip Digest, Vol 30, Issue 37 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. Question about Memory requirement Of Head model (WangJing) ---------------------------------------------------------------------- Message: 1 Date: Sun, 26 May 2013 17:26:07 +0800 (CST) From: WangJing <13681530640 at 139.com> To: fieldtrip Subject: [FieldTrip] Question about Memory requirement Of Head model Message-ID: <2b1851a17ca79ab-00017.Richmail.00027836529255037638 at 139.com> Content-Type: text/plain; charset="utf-8" Hello Everyone, I want to know what's the requiement of fieldtrip to hardware and software. My computer 's CPU is 3GHz, and RAM is 8GB. the OS is windows sever 2003, and the matlab is 2011a(32bit).I often encounter the problem of out of Memery. for example 1: > mri = ft_read_mri('IM-0001-0001.dcm'); % the dim of data is [512 512 144] cfg = []; ft_sourceplot(cfg,mri); the result is: ??? Out of memory. Type HELP MEMORY for your options. Error in ==> ft_sourceplot at 368 ana = (ana-dmin)./(dmax-dmin); example 2: clear all mri = ft_read_mri('IM-0001-0001.dcm'); cfg = []; cfg.method = 'interactive'; cfg.coordsys = 'ctf'; mri_realigned = ft_volumerealign(cfg,mri); clear mri cfg=[]; mrirs = ft_volumereslice(cfg,mri_realigned); when run to the last code, I face the same problem. Thank you! Best Regards! Jing Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 30, Issue 37 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon May 27 11:54:00 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 27 May 2013 11:54:00 +0200 Subject: [FieldTrip] Question about Memory requirement Of Head model In-Reply-To: <95C94C42-6516-4536-AD5A-66FA5041E3F3@gmail.com> References: <2b1851a17ca79ab-00017.Richmail.00027836529255037638@139.com> <95C94C42-6516-4536-AD5A-66FA5041E3F3@gmail.com> Message-ID: <51A32D38.3060908@donders.ru.nl> Hi all, Julian is right, that's a limit of the 32bit system (the OS does not matter, just the number of bits). FieldTrip itself does not have any requirements other than Matlab does, however the size of your data matters. If you want to put data with more than 3gigs into memory, it's just not possible with a 32bit OS or Matlab (note that even if you have a 64bit OS but 32bit Matlab then the 3GB limit hold). So the only way for you to go is to clear variables from memory or reduce the size of the data you want to read it (or, go to 64bit). Maybe closing background tasks or other programs that are running will help as well. Best, Jörn On 5/26/2013 12:23 PM, Julian Keil wrote: > Dear Jing Wang, > > this might be due to you using a 32bit System. > As far as I know, 32bit Windows can only use ~3 GB of Memory. At least > that's what I experienced using Win XP, maybe it's different for the > server. > However, I'd advise you to switch to a 64bit System and try again. > > Best, > > Julian > > ******************** > *Dr. Julian Keil* > * > * > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum E 307 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 26.05.2013 um 11:26 schrieb WangJing: > >> Hello Everyone, >> I want to know what's the requiement of fieldtrip to hardware >> and software. My computer 's CPU is 3GHz, and RAM is 8GB. the OS is >> windows sever 2003, and the matlab is 2011a(32bit).I often encounter >> the problem of out of Memery. >> for example 1: >> > mri = ft_read_mri('IM-0001-0001.dcm'); % the dim of data is [512 >> 512 144] >> cfg = []; >> ft_sourceplot(cfg,mri); >> the result is: >> ??? Out of memory. Type HELP MEMORY for your options. >> Error in ==> ft_sourceplot at 368 >> ana = (ana-dmin)./(dmax-dmin); >> example 2: >> clear all >> mri = ft_read_mri('IM-0001-0001.dcm'); >> cfg = []; >> cfg.method = 'interactive'; >> cfg.coordsys = 'ctf'; >> mri_realigned = ft_volumerealign(cfg,mri); >> clear mri >> cfg=[]; >> mrirs = ft_volumereslice(cfg,mri_realigned); >> when run to the last code, I face the same problem. >> Thank you! >> Best Regards! >> Jing Wang >> _______________________________________________ >> 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 -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From member at linkedin.com Mon May 27 14:14:43 2013 From: member at linkedin.com (Stavros Dimitriadis) Date: Mon, 27 May 2013 12:14:43 +0000 (UTC) Subject: [FieldTrip] Invitation to connect on LinkedIn Message-ID: <1730678420.35398857.1369656883124.JavaMail.app@ela4-app0128.prod> LinkedIn ------------ Stavros Dimitriadis requested to add you as a connection on LinkedIn: ------------------------------------------ Diego, I'd like to add you to my professional network on LinkedIn. - Stavros Accept invitation from Stavros Dimitriadis http://www.linkedin.com/e/-kyqm8y-hh7mceqk-4t/o2zr3wMN-KUziWnbF0JpKw1y-MN7WW_ZDEc0/blk/I248853902_185/e39SrCAJoS5vrCAJoyRJtCVFnSRJrScJr6RBfnhv9ClRsDgZp6lQs6lzoQ5AomZIpn8_djwNnP8MejcRe3wQcAALhmRzm4IQqQALdzcNcj0Scj8ScP4LrCBxbOYWrSlI/eml-comm_invm-b-in_ac-inv28/?hs=false&tok=2VrJfyqClukBM1 View profile of Stavros Dimitriadis http://www.linkedin.com/e/-kyqm8y-hh7mceqk-4t/rso/258301386/VLXI/name/188663824_I248853902_185/?hs=false&tok=09C8hmgc9ukBM1 ------------------------------------------ You are receiving Invitation emails. This email was intended for Diego Lozano-Soldevilla. Learn why this is included: http://www.linkedin.com/e/-kyqm8y-hh7mceqk-4t/plh/http%3A%2F%2Fhelp%2Elinkedin%2Ecom%2Fapp%2Fanswers%2Fdetail%2Fa_id%2F4788/-GXI/?hs=false&tok=11g45aA75ukBM1 (c) 2012, LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA. -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at gmail.com Mon May 27 15:12:27 2013 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Mon, 27 May 2013 15:12:27 +0200 Subject: [FieldTrip] Source Reconstruction using Openmeeg method In-Reply-To: References: <5190AEAA.3020301@donders.ru.nl> Message-ID: Hi Mushfa, The values inside grid_*.leadfield are the ones that need to be concatenated, per grid position. So the first thing to do is figure out which rows in grid_eeg.pos match up with which rows in grid_meg.pos, and then only for those that match, concatenate so that the *.leadfield is of size [(number of eeg channels + number of meg channels) X 3]. It might be easier to first ensure that the grid used to create these leadfields have the same 'inside' positions (inside the volume conductor). Best, Johanna 2013/5/22 Mushfa Yousuf > Hello Jörn; > > I have calculated an indiviual leadfield for both EEG and MEG. The > structure of EEg and MEG shows the following variable > > grid_meg = > > xgrid: [1x20 double] > ygrid: [-8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8] > zgrid: [-2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13] > dim: [20 17 16] > pos: [5440x3 double] > unit: 'cm' > inside: [1x3177 double] > outside: [1x2263 double] > cfg: [1x1 struct] > leadfield: {1x5440 cell} > > > grid_eeg = > > xgrid: [-6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9] > ygrid: [-6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6] > zgrid: [2 3 4 5 6 7 8 9 10 11] > dim: [16 13 10] > pos: [2080x3 double] > unit: 'cm' > inside: [1x1331 double] > outside: [1x749 double] > cfg: [1x1 struct] > leadfield: {1x2080 cell} > > > Can you please give me a rough idea that how to concatenate the variables > from both structure ? > > > Thank you > > Regards ; > > Mushfa Yousuf > > > On Mon, May 13, 2013 at 11:13 AM, "Jörn M. Horschig" < > jm.horschig at donders.ru.nl> wrote: > >> Dear Mushfa, >> >> I think you have to compute two leadfield matrices, one for EEG (elec) >> and one for MEG (grad), and then concatenate these (and make sure that the >> order of sensors won't get mixed up anywhere, because sourceanalysis just >> expects the leadfield matrix to be ordered like your data. If that's not >> the case, you either encounter the previous error you described or (if the >> number of channels matches, but order is mixed up) it will just return >> wrong source estimated activity. >> >> Best, >> Jörn >> >> >> On 5/6/2013 2:47 PM, Mushfa Yousuf wrote: >> >> Hello; >> >> Yes you were right. I have defined the wrong sensors i.e 'grad' instead >> of 'elec' while calculating the Leadfield. >> >> Actually I am trying to calculate Combined source reconstruction from >> both EEG and MEG sensors. >> >> Do you have any idea, how to define both elec and grad definition >> while calculating first forward then inverse solution. >> >> Because in a fieldtrip either you can defined elec or grad at one time. >> >> >> Regards; >> >> >> Mushfa Yousuf >> >> Neurozentrum, >> Universitätsklinikum Schleswig-Holstein, >> Campus Kiel (UKSH), Deutschland >> >> >> On Tue, Apr 30, 2013 at 6:23 PM, Johanna Zumer wrote: >> >>> Hi Mushfa, >>> >>> My guess is that the channels that have you used to compute .csdspctrm >>> are not the same as the channels in cfg.elec. If you set cfg.channel = >>> freqPost.label, does that solve it? >>> >>> Cheers, >>> Johanna >>> >>> >>> 2013/4/30 Mushfa Yousuf >>> >>>> Hello Fieldtrippers, >>>> >>>> I am doing source reconstruction using EEG channels on a fieldtrip. >>>> >>>> I have computed Forward solution i.e head model using 'Openmeeg' and >>>> lead field successfully. >>>> >>>> For the inverse solution using 'dics' method, I wrote the following >>>> syntax >>>> >>>> >>>> >>>> >>>> >>>> cfg = []; >>>> cfg.method = 'dics'; >>>> cfg.frequency = 130; >>>> cfg.elec = dataFIC12.hdr.elec; >>>> cfg.grid = grid; >>>> cfg.vol = vol; >>>> >>>> sourcePost = ft_sourceanalysis(cfg, freqPost); >>>> >>>> >>>> and I have received the following error: >>>> >>>> >>>> ??? Error using ==> mtimes >>>> Inner matrix dimensions must agree. >>>> >>>> Error in ==> beamformer_dics at 314 >>>> filt = pinv(lf' * invCf * lf) * lf' * invCf; % >>>> Gross eqn. 3, use PINV/SVD to cover rank deficient >>>> leadfield >>>> >>>> Error in ==> ft_sourceanalysis at 595 >>>> dip(i) = beamformer_dics(grid, sens, vol, [], >>>> squeeze(Cf(i,:,:)), optarg{:}); >>>> >>>> Error in ==> newCode at 214 >>>> sourcePost = ft_sourceanalysis(cfg, freqPost); >>>> >>>> >>>> >>>> >>>> Any help would be appreciated. >>>> >>>> >>>> Regards; >>>> >>>> >>>> Mushfa Yousuf >>>> >>>> Neurozentrum, >>>> Universitätsklinikum Schleswig-Holstein, >>>> Campus Kiel (UKSH), Deutschland >>>> >>>> >>>> _______________________________________________ >>>> 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 listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> >> _______________________________________________ >> 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: From mbj0310 at gmail.com Wed May 29 11:47:14 2013 From: mbj0310 at gmail.com (Beom Jun Min) Date: Wed, 29 May 2013 18:47:14 +0900 Subject: [FieldTrip] ft_preprocessing error message during reading some files Message-ID: Dear all, Hello, my name is BJ Min from Korea. I'm dealing with EEG data of many subjects. When I run ft_preprocessing, the error message below shows with only some files of my data. (not all files) Warning: rounding "endsample" to the nearest integer > In ft_read_data at 100 In ft_preprocessing at 577 ??? Error using ==> ft_read_data at 149 cannot read data after the end of the file Error in ==> ft_preprocessing at 577 dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx, 'checkboundary', strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat) I think that there might be a kind of problem in data acquisition, and I modified below scripts in the ft_read_data function with comment %. % % test whether the requested data segment is not outside the file % if any(begsample<1) % error('FILEIO:InvalidBegSample', 'cannot read data before the begin of the file'); % elseif any(endsample>(hdr.nSamples*hdr.nTrials)) % error('FILEIO:InvalidEndSample', 'cannot read data after the end of the file'); % end After that, the ft_preprocessing worked well. However, the files with the first problem showed additional warning message while running ft_definetrial. (not error message) Warning: Integer operands are required for colon operator when used as index > In fileio\private\loadcnt at 464 In ft_read_header at 1450 In ft_preprocessing at 398 Warning: rounding "endsample" to the nearest integer > In ft_read_data at 100 In ft_preprocessing at 577 Also, during ft_redefinetrial, following warning message occurs.(not error message) Warning: removing inconsistent sampleinfo > In ft_datatype_raw at 97 In ft_checkdata at 213 In ft_redefinetrial at 104 Warning: the trial definition in the configuration is inconsistent with the actual data > In utilities\private\warning_once at 116 In utilities\private\fixsampleinfo at 74 In ft_datatype_raw at 154 In ft_checkdata at 213 In ft_redefinetrial at 206 Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording > In utilities\private\warning_once at 116 In utilities\private\fixsampleinfo at 79 In ft_datatype_raw at 154 In ft_checkdata at 213 In ft_redefinetrial at 206 I wonder if these messages during ft_redefinetrial mean wrong defining trials. Should I continue these process like this, modifying the ft_preprocessing function? Or, is it better to exclude some erroneous files? Best regards -- BeomJun Min, M.D. Department of Medical System Engineering (DMSE) Gwangju Institute of Science and Technology (GIST) 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju 500-712, Republic of Korea (South) Phone: +82-62-715-3266 / Fax: +82-62-715-3244 E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Wed May 29 12:01:31 2013 From: julian.keil at gmail.com (Julian Keil) Date: Wed, 29 May 2013 12:01:31 +0200 Subject: [FieldTrip] ft_preprocessing error message during reading some files In-Reply-To: References: Message-ID: Dear BJ Min, what type of data are you trying to read in? I had similar problems when reading in .CNT data. Also, with some systems you have to specify the bit rate (e.g. Neuroscan). For me, reading in data with an older version of FieldTrip solved the problem, but this was in 2011, so I cannot say if the problem with .CNT files has been solved. Good Luck Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum E 307 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 29.05.2013 um 11:47 schrieb Beom Jun Min: > Dear all, > > Hello, my name is BJ Min from Korea. > > I'm dealing with EEG data of many subjects. > > When I run ft_preprocessing, the error message below shows with only some files of my data. (not all files) > > Warning: rounding "endsample" to the nearest integer > > In ft_read_data at 100 > In ft_preprocessing at 577 > ??? Error using ==> ft_read_data at 149 > cannot read data after the end of the file > > Error in ==> ft_preprocessing at 577 > dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx, > 'checkboundary', strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat) > > I think that there might be a kind of problem in data acquisition, and I modified below scripts in the ft_read_data function with comment %. > > % % test whether the requested data segment is not outside the file > % if any(begsample<1) > % error('FILEIO:InvalidBegSample', 'cannot read data before the begin of the file'); > % elseif any(endsample>(hdr.nSamples*hdr.nTrials)) > % error('FILEIO:InvalidEndSample', 'cannot read data after the end of the file'); > % end > > After that, the ft_preprocessing worked well. > > However, the files with the first problem showed additional warning message while running ft_definetrial. (not error message) > > Warning: Integer operands are required for colon operator when used as index > > In fileio\private\loadcnt at 464 > In ft_read_header at 1450 > In ft_preprocessing at 398 > > Warning: rounding "endsample" to the nearest integer > > In ft_read_data at 100 > In ft_preprocessing at 577 > > Also, during ft_redefinetrial, following warning message occurs.(not error message) > > Warning: removing inconsistent sampleinfo > > In ft_datatype_raw at 97 > In ft_checkdata at 213 > In ft_redefinetrial at 104 > > Warning: the trial definition in the configuration is inconsistent with the actual data > > In utilities\private\warning_once at 116 > In utilities\private\fixsampleinfo at 74 > In ft_datatype_raw at 154 > In ft_checkdata at 213 > In ft_redefinetrial at 206 > > Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording > > In utilities\private\warning_once at 116 > In utilities\private\fixsampleinfo at 79 > In ft_datatype_raw at 154 > In ft_checkdata at 213 > In ft_redefinetrial at 206 > > I wonder if these messages during ft_redefinetrial mean wrong defining trials. > Should I continue these process like this, modifying the ft_preprocessing function? > Or, is it better to exclude some erroneous files? > > Best regards > > -- > BeomJun Min, M.D. > > Department of Medical System Engineering (DMSE) > Gwangju Institute of Science and Technology (GIST) > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > 500-712, Republic of Korea (South) > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbj0310 at gmail.com Thu May 30 10:15:31 2013 From: mbj0310 at gmail.com (Beom Jun Min) Date: Thu, 30 May 2013 17:15:31 +0900 Subject: [FieldTrip] ft_preprocessing error message during reading some files In-Reply-To: References: Message-ID: Dear Julian Keil, Thank you for your reply. I agree with that your problem was similar with mine. My data was acquired by Neuroscan also. There might a problem associated with .CNT file in the newer version. Could you tell me the number of the older version you used? Best Regards 2013/5/29 Julian Keil > Dear BJ Min, > > what type of data are you trying to read in? > I had similar problems when reading in .CNT data. > Also, with some systems you have to specify the bit rate (e.g. Neuroscan). > For me, reading in data with an older version of FieldTrip solved the > problem, but this was in 2011, so I cannot say if the problem with .CNT > files has been solved. > > Good Luck > > Julian > > ******************** > *Dr. Julian Keil* > * > * > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum E 307 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 29.05.2013 um 11:47 schrieb Beom Jun Min: > > Dear all, > > Hello, my name is BJ Min from Korea. > > I'm dealing with EEG data of many subjects. > > When I run ft_preprocessing, the error message below shows with only some > files of my data. (not all files) > > Warning: rounding "endsample" to the nearest integer > > In ft_read_data at 100 > In ft_preprocessing at 577 > ??? Error using ==> ft_read_data at 149 > cannot read data after the end of the file > > Error in ==> ft_preprocessing at 577 > dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', > begsample, 'endsample', endsample, 'chanindx', rawindx, > 'checkboundary', strcmp(cfg.continuous, 'no'), 'dataformat', > cfg.dataformat) > > I think that there might be a kind of problem in data acquisition, and I > modified below scripts in the ft_read_data function with comment %. > > % % test whether the requested data segment is not outside the file > % if any(begsample<1) > % error('FILEIO:InvalidBegSample', 'cannot read data before the begin of > the file'); > % elseif any(endsample>(hdr.nSamples*hdr.nTrials)) > % error('FILEIO:InvalidEndSample', 'cannot read data after the end of > the file'); > % end > > After that, the ft_preprocessing worked well. > > However, the files with the first problem showed additional warning > message while running ft_definetrial. (not error message) > > Warning: Integer operands are required for colon operator when used as > index > > In fileio\private\loadcnt at 464 > In ft_read_header at 1450 > In ft_preprocessing at 398 > > Warning: rounding "endsample" to the nearest integer > > In ft_read_data at 100 > In ft_preprocessing at 577 > > Also, during ft_redefinetrial, following warning message occurs.(not error > message) > > Warning: removing inconsistent sampleinfo > > In ft_datatype_raw at 97 > In ft_checkdata at 213 > In ft_redefinetrial at 104 > > Warning: the trial definition in the configuration is inconsistent with > the actual data > > In utilities\private\warning_once at 116 > In utilities\private\fixsampleinfo at 74 > In ft_datatype_raw at 154 > In ft_checkdata at 213 > In ft_redefinetrial at 206 > > Warning: reconstructing sampleinfo by assuming that the trials are > consecutive segments of a continuous recording > > In utilities\private\warning_once at 116 > In utilities\private\fixsampleinfo at 79 > In ft_datatype_raw at 154 > In ft_checkdata at 213 > In ft_redefinetrial at 206 > > I wonder if these messages during ft_redefinetrial mean wrong defining > trials. > Should I continue these process like this, modifying the ft_preprocessing > function? > Or, is it better to exclude some erroneous files? > > Best regards > > -- > BeomJun Min, M.D. > > Department of Medical System Engineering (DMSE) > Gwangju Institute of Science and Technology (GIST) > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > 500-712, Republic of Korea (South) > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr > _______________________________________________ > 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 > -- BeomJun Min, M.D. Department of Medical System Engineering (DMSE) Gwangju Institute of Science and Technology (GIST) 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju 500-712, Republic of Korea (South) Phone: +82-62-715-3266 / Fax: +82-62-715-3244 E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Thu May 30 11:45:09 2013 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 30 May 2013 11:45:09 +0200 Subject: [FieldTrip] ft_preprocessing error message during reading some files In-Reply-To: References: Message-ID: <80EC72EF-2296-47F5-97EC-197F91402C79@gmail.com> Dear BJ Min, I used the field trip version 20111101. I don't know if it's still available though. To set the bitrate, you have to specify cfg.headerformat='ns_cnt32'; cfg.dataformat='ns_cnt32'; cfg.eventformat='ns_cnt32'; in ft_preprocessing One way to check this (and also if you set your bitrate correctly), is to see if you can find easily detectable ERPs, like the visual or auditory N1 in your data. If you can't see this component, then your settings are wrong, even if data has been read into Matlab. Good Luck, Julian Am 30.05.2013 um 10:15 schrieb Beom Jun Min: > Dear Julian Keil, > > Thank you for your reply. > I agree with that your problem was similar with mine. > My data was acquired by Neuroscan also. > There might a problem associated with .CNT file in the newer version. > > Could you tell me the number of the older version you used? > > Best Regards > > > > 2013/5/29 Julian Keil > Dear BJ Min, > > what type of data are you trying to read in? > I had similar problems when reading in .CNT data. > Also, with some systems you have to specify the bit rate (e.g. Neuroscan). > For me, reading in data with an older version of FieldTrip solved the problem, but this was in 2011, so I cannot say if the problem with .CNT files has been solved. > > Good Luck > > Julian > > ******************** > Dr. Julian Keil > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum E 307 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 29.05.2013 um 11:47 schrieb Beom Jun Min: > >> Dear all, >> >> Hello, my name is BJ Min from Korea. >> >> I'm dealing with EEG data of many subjects. >> >> When I run ft_preprocessing, the error message below shows with only some files of my data. (not all files) >> >> Warning: rounding "endsample" to the nearest integer >> > In ft_read_data at 100 >> In ft_preprocessing at 577 >> ??? Error using ==> ft_read_data at 149 >> cannot read data after the end of the file >> >> Error in ==> ft_preprocessing at 577 >> dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx, >> 'checkboundary', strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat) >> >> I think that there might be a kind of problem in data acquisition, and I modified below scripts in the ft_read_data function with comment %. >> >> % % test whether the requested data segment is not outside the file >> % if any(begsample<1) >> % error('FILEIO:InvalidBegSample', 'cannot read data before the begin of the file'); >> % elseif any(endsample>(hdr.nSamples*hdr.nTrials)) >> % error('FILEIO:InvalidEndSample', 'cannot read data after the end of the file'); >> % end >> >> After that, the ft_preprocessing worked well. >> >> However, the files with the first problem showed additional warning message while running ft_definetrial. (not error message) >> >> Warning: Integer operands are required for colon operator when used as index >> > In fileio\private\loadcnt at 464 >> In ft_read_header at 1450 >> In ft_preprocessing at 398 >> >> Warning: rounding "endsample" to the nearest integer >> > In ft_read_data at 100 >> In ft_preprocessing at 577 >> >> Also, during ft_redefinetrial, following warning message occurs.(not error message) >> >> Warning: removing inconsistent sampleinfo >> > In ft_datatype_raw at 97 >> In ft_checkdata at 213 >> In ft_redefinetrial at 104 >> >> Warning: the trial definition in the configuration is inconsistent with the actual data >> > In utilities\private\warning_once at 116 >> In utilities\private\fixsampleinfo at 74 >> In ft_datatype_raw at 154 >> In ft_checkdata at 213 >> In ft_redefinetrial at 206 >> >> Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording >> > In utilities\private\warning_once at 116 >> In utilities\private\fixsampleinfo at 79 >> In ft_datatype_raw at 154 >> In ft_checkdata at 213 >> In ft_redefinetrial at 206 >> >> I wonder if these messages during ft_redefinetrial mean wrong defining trials. >> Should I continue these process like this, modifying the ft_preprocessing function? >> Or, is it better to exclude some erroneous files? >> >> Best regards >> >> -- >> BeomJun Min, M.D. >> >> Department of Medical System Engineering (DMSE) >> Gwangju Institute of Science and Technology (GIST) >> 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju >> 500-712, Republic of Korea (South) >> Phone: +82-62-715-3266 / Fax: +82-62-715-3244 >> E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr >> _______________________________________________ >> 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 > > > > -- > BeomJun Min, M.D. > > Department of Medical System Engineering (DMSE) > Gwangju Institute of Science and Technology (GIST) > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > 500-712, Republic of Korea (South) > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From dr.chungki.lee at gmail.com Thu May 30 11:56:02 2013 From: dr.chungki.lee at gmail.com (Chungki Lee) Date: Thu, 30 May 2013 18:56:02 +0900 Subject: [FieldTrip] ft_preprocessing error message during reading some files In-Reply-To: References: Message-ID: Hi Min you'd better use ft_definetrial routine before ft_preprocessing. example) cfg = []; cfg.dataset = filename; % string cfg.trialdef.eventtype = your define text; % string cfg.trialdef.eventvalue = your label value; % integer cfg.trialdef.prestim = before onset time (sec); % positive integer, not negative integer cfg.trialdef.poststim = after onset time (sec); % positve integer cfg = ft_definetrial(cfg); data = ft_preprocessing(cfg); have fun ^^ 2013/5/30 Beom Jun Min > Dear Julian Keil, > > Thank you for your reply. > I agree with that your problem was similar with mine. > My data was acquired by Neuroscan also. > There might a problem associated with .CNT file in the newer version. > > Could you tell me the number of the older version you used? > > Best Regards > > > > 2013/5/29 Julian Keil > >> Dear BJ Min, >> >> what type of data are you trying to read in? >> I had similar problems when reading in .CNT data. >> Also, with some systems you have to specify the bit rate (e.g. Neuroscan). >> For me, reading in data with an older version of FieldTrip solved the >> problem, but this was in 2011, so I cannot say if the problem with .CNT >> files has been solved. >> >> Good Luck >> >> Julian >> >> ******************** >> *Dr. Julian Keil* >> * >> * >> AG Multisensorische Integration >> Psychiatrische Universitätsklinik >> der Charité im St. Hedwig-Krankenhaus >> Große Hamburger Straße 5-11, Raum E 307 >> 10115 Berlin >> >> Telefon: +49-30-2311-1879 >> Fax: +49-30-2311-2209 >> >> http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration >> >> Am 29.05.2013 um 11:47 schrieb Beom Jun Min: >> >> Dear all, >> >> Hello, my name is BJ Min from Korea. >> >> I'm dealing with EEG data of many subjects. >> >> When I run ft_preprocessing, the error message below shows with only some >> files of my data. (not all files) >> >> Warning: rounding "endsample" to the nearest integer >> > In ft_read_data at 100 >> In ft_preprocessing at 577 >> ??? Error using ==> ft_read_data at 149 >> cannot read data after the end of the file >> >> Error in ==> ft_preprocessing at 577 >> dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', >> begsample, 'endsample', endsample, 'chanindx', rawindx, >> 'checkboundary', strcmp(cfg.continuous, 'no'), 'dataformat', >> cfg.dataformat) >> >> I think that there might be a kind of problem in data acquisition, and I >> modified below scripts in the ft_read_data function with comment %. >> >> % % test whether the requested data segment is not outside the file >> % if any(begsample<1) >> % error('FILEIO:InvalidBegSample', 'cannot read data before the begin >> of the file'); >> % elseif any(endsample>(hdr.nSamples*hdr.nTrials)) >> % error('FILEIO:InvalidEndSample', 'cannot read data after the end of >> the file'); >> % end >> >> After that, the ft_preprocessing worked well. >> >> However, the files with the first problem showed additional warning >> message while running ft_definetrial. (not error message) >> >> Warning: Integer operands are required for colon operator when used as >> index >> > In fileio\private\loadcnt at 464 >> In ft_read_header at 1450 >> In ft_preprocessing at 398 >> >> Warning: rounding "endsample" to the nearest integer >> > In ft_read_data at 100 >> In ft_preprocessing at 577 >> >> Also, during ft_redefinetrial, following warning message occurs.(not >> error message) >> >> Warning: removing inconsistent sampleinfo >> > In ft_datatype_raw at 97 >> In ft_checkdata at 213 >> In ft_redefinetrial at 104 >> >> Warning: the trial definition in the configuration is inconsistent with >> the actual data >> > In utilities\private\warning_once at 116 >> In utilities\private\fixsampleinfo at 74 >> In ft_datatype_raw at 154 >> In ft_checkdata at 213 >> In ft_redefinetrial at 206 >> >> Warning: reconstructing sampleinfo by assuming that the trials are >> consecutive segments of a continuous recording >> > In utilities\private\warning_once at 116 >> In utilities\private\fixsampleinfo at 79 >> In ft_datatype_raw at 154 >> In ft_checkdata at 213 >> In ft_redefinetrial at 206 >> >> I wonder if these messages during ft_redefinetrial mean wrong defining >> trials. >> Should I continue these process like this, modifying the ft_preprocessing >> function? >> Or, is it better to exclude some erroneous files? >> >> Best regards >> >> -- >> BeomJun Min, M.D. >> >> Department of Medical System Engineering (DMSE) >> Gwangju Institute of Science and Technology (GIST) >> 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju >> 500-712, Republic of Korea (South) >> Phone: +82-62-715-3266 / Fax: +82-62-715-3244 >> E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr >> _______________________________________________ >> 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 >> > > > > -- > BeomJun Min, M.D. > > Department of Medical System Engineering (DMSE) > Gwangju Institute of Science and Technology (GIST) > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > 500-712, Republic of Korea (South) > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- ---------------------------------------------------------------- Chungki Lee, Ph.D. Post-doc Biomedical Research Institute Korea Institute of Science and Technology E-mail: chungki at kist.re.kr Tel:+82-2-958-5636, C.P: +82-10-5223-7309 ---------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From lkystra at hotmail.it Thu May 30 12:39:16 2013 From: lkystra at hotmail.it (lucia abbatantuoni) Date: Thu, 30 May 2013 12:39:16 +0200 Subject: [FieldTrip] distorsion of .edf file Message-ID: Dear all, I'm analyzing EEG files in format .edf with matlab. Many files after the use of read_edf, have a distorsion. Matlab indicate a warning for the 348 row of read_edf . Can someone give to me a help? Best regards, Lucia -------------- next part -------------- An HTML attachment was scrubbed... URL: From zriouil.imane at gmail.com Thu May 30 15:43:59 2013 From: zriouil.imane at gmail.com (z.imane) Date: Thu, 30 May 2013 15:43:59 +0200 Subject: [FieldTrip] distorsion of .edf file In-Reply-To: References: Message-ID: I have the same problem. if you want to read your data. it's possible to use ft_read_data(filename') 2013/5/30 lucia abbatantuoni > Dear all, > I'm analyzing EEG files in format .edf with matlab. Many files after the > use of read_edf, have a distorsion. Matlab indicate a warning for the 348 > row of read_edf . Can someone give to me a help? > > Best regards, > Lucia > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Zriouil Imane -------------- next part -------------- An HTML attachment was scrubbed... URL: From lkystra at hotmail.it Thu May 30 17:33:55 2013 From: lkystra at hotmail.it (lucia abbatantuoni) Date: Thu, 30 May 2013 17:33:55 +0200 Subject: [FieldTrip] distorsion of .edf file In-Reply-To: References: , Message-ID: I try and... it's not a good solution. Date: Thu, 30 May 2013 15:43:59 +0200 From: zriouil.imane at gmail.com To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] distorsion of .edf file I have the same problem. if you want to read your data. it's possible to use ft_read_data(filename') 2013/5/30 lucia abbatantuoni Dear all, I'm analyzing EEG files in format .edf with matlab. Many files after the use of read_edf, have a distorsion. Matlab indicate a warning for the 348 row of read_edf . Can someone give to me a help? Best regards, Lucia _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Zriouil Imane _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu May 30 18:31:22 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 30 May 2013 18:31:22 +0200 Subject: [FieldTrip] distorsion of .edf file In-Reply-To: References: , Message-ID: <4C650B52-1AFF-4CAE-9F28-D320B9E00C75@donders.ru.nl> Hi Lucia, Perhaps you need to be a bit more specific. In particular with respect to the fieldtrip version, matlab version, operating system, and warning message. Otherwise all of us are shooting in the dark. Best wishes, Jan-Mathijs On May 30, 2013, at 5:33 PM, lucia abbatantuoni wrote: > I try and... it's not a good solution. > > Date: Thu, 30 May 2013 15:43:59 +0200 > From: zriouil.imane at gmail.com > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] distorsion of .edf file > > I have the same problem. > > if you want to read your data. it's possible to use ft_read_data(filename') > > > > 2013/5/30 lucia abbatantuoni > Dear all, > I'm analyzing EEG files in format .edf with matlab. Many files after the use of read_edf, have a distorsion. Matlab indicate a warning for the 348 row of read_edf . Can someone give to me a help? > > Best regards, > Lucia > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > > > Zriouil Imane > > > > > _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From ebrahimi_nia at yahoo.com Thu May 30 19:14:52 2013 From: ebrahimi_nia at yahoo.com (Fatemeh Ebrahimi nia) Date: Thu, 30 May 2013 10:14:52 -0700 (PDT) Subject: [FieldTrip] loreta2fieldtrip function error Message-ID: <1369934092.15336.YahooMailNeo@web122405.mail.ne1.yahoo.com> Hi dear all, I am analyzing EEG data. I have computed sLORETA (.slor) from ERP data. Now I want to read and convert LORETA source reconstruction into a MATLAB data structure using "loreta2fieldtrip" function, But I have gotten the bellow error. **** Error using fread Invalid precision. Error in loreta2fieldtrip (line 85) activity = fread(fid, [voxnumber Ntime], 'float = >single'); *** Can someone give me a help? Best regards, Fatemeh -------------- next part -------------- An HTML attachment was scrubbed... URL: From inieuwenhuis at berkeley.edu Thu May 30 19:30:41 2013 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Thu, 30 May 2013 10:30:41 -0700 Subject: [FieldTrip] loreta2fieldtrip function error In-Reply-To: <1369934092.15336.YahooMailNeo@web122405.mail.ne1.yahoo.com> References: <1369934092.15336.YahooMailNeo@web122405.mail.ne1.yahoo.com> Message-ID: <51A78CC1.6030906@berkeley.edu> Hi Fatemeh, I had the same error recently when I did the same. I filed the bug, see http://bugzilla.fcdonders.nl/show_bug.cgi?id=2144 I did create a work around. In the LORETA program, you can export the source data as a text file. You can read that text file in with loreta2fieldtrip.m. It's a bit of a patch, but it worked for me. Hope this helps, Ingrid On 5/30/2013 10:14 AM, Fatemeh Ebrahimi nia wrote: > Hi dear all, > > I am analyzing EEG data. I have computed sLORETA (.slor) from ERP > data. Now I want to read and convert LORETA source reconstruction into a > MATLAB data structure using "loreta2fieldtrip" function, But I have > gotten the bellow error. > > **** Error using fread > Invalid precision. > Error in loreta2fieldtrip (line 85) > activity = fread(fid, [voxnumber Ntime], 'float = >single'); *** > > Can someone give me a help? > > Best regards, > Fatemeh > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 -------------- next part -------------- An HTML attachment was scrubbed... URL: From frank.ye.mei at gmail.com Thu May 30 21:33:53 2013 From: frank.ye.mei at gmail.com (Ye Mei) Date: Thu, 30 May 2013 15:33:53 -0400 Subject: [FieldTrip] error when using ctf2grad Message-ID: <51A7A9A1.6020401@gmail.com> Hi All, I have some problem using ctf2grad. The program will set grad.balance.current = 'G3AR';, and then do getfield(grad.balance, grad.balance.current) but grad.balance = G1BR: [1x1 struct] G2BR: [1x1 struct] G3BR: [1x1 struct] and has no G3AR in it. So an error will pop up. Can anyone help me with that? Also, What do G1BR, G2BR, G3BR, G3AR stand for? thanks, Ye From politzerahless at gmail.com Fri May 31 05:53:45 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Thu, 30 May 2013 22:53:45 -0500 Subject: [FieldTrip] Question about minimum norm estimate pipeline Message-ID: Hello all, I have not yet gotten a response to my question below, but in the meantime I have another question about the minimum norm estimate workflow--specifically, about the coordinate system for the skull-stripped anatomy in the step described at http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#preprocessing_of_the_anatomical_mrisave_to_disk. I'm confused by the following bit of code: % ensure that the skull-stripped anatomy is expressed in the same coordinate system as the anatomy seg.transform = mri_tal.transform; In my data, mri_tal.coordsys is 'spm' (I presume this is the result of re-aligning to Talairach in the previous step?) whereas seg.coordsys is 'ctf' (as a result of re-aligning to CTF several steps earlier). (But mri_tal also has a field mri_tal.transformorig, which seg does not have.) So should I really be using the same transform for both, as shown in the tutorial? Apologies if this question is pretty basic; I'm just trying to pinpoint where the mis-alignment described in my message below occurred, so I want to make sure I understand each step of the workflow correctly Best, Steve > Message: 1 > Date: Sat, 25 May 2013 08:11:18 -0500 > From: Stephen Politzer-Ahles > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Sourcespace and volume conductor misaligned > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Hello all, > > I am going through the workflow at > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate. After making > the volume conduction model using ft_prepare_headmodel(), I noticed that > although the volume conduction model and sourcespace have the same > orientation and overall size/shape (after I converted the volume conduction > model to cm, which wasn't in the tutorial but my original model came out in > mm), they don't quite line up, as you can see in this figure: > > http://i.imgur.com/mGEtLOa.png > > I did interactively re-align the data to CTF (twice--in step 2 of > "Preprocessing of the anatomical MRI" and in step 4 of "Source model") > using fiducials, and to Talairach (step 5 of "Preprocessing of the > anatomical data"), so I'm not sure how it ended up this way. The code I've > used at each step is basically the same as that in the tutorial. > > Is there any way to line up my volume conduction model and sourcespace now, > without going back and re-running most of the workflow? > > Best, > Steve > > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://people.ku.edu/~sjpa/ On Sat, May 25, 2013 at 1:56 PM, wrote: > > 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. Sourcespace and volume conductor misaligned > (Stephen Politzer-Ahles) > 2. Re: fieldtrip Digest, Vol 30, Issue 31 (Johanna Zumer) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sat, 25 May 2013 08:11:18 -0500 > From: Stephen Politzer-Ahles > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Sourcespace and volume conductor misaligned > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Hello all, > > I am going through the workflow at > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate. After making > the volume conduction model using ft_prepare_headmodel(), I noticed that > although the volume conduction model and sourcespace have the same > orientation and overall size/shape (after I converted the volume conduction > model to cm, which wasn't in the tutorial but my original model came out in > mm), they don't quite line up, as you can see in this figure: > > http://i.imgur.com/mGEtLOa.png > > I did interactively re-align the data to CTF (twice--in step 2 of > "Preprocessing of the anatomical MRI" and in step 4 of "Source model") > using fiducials, and to Talairach (step 5 of "Preprocessing of the > anatomical data"), so I'm not sure how it ended up this way. The code I've > used at each step is basically the same as that in the tutorial. > > Is there any way to line up my volume conduction model and sourcespace now, > without going back and re-running most of the workflow? > > Best, > Steve > > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://people.ku.edu/~sjpa/ > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130525/561df14f/attachment-0001.html > > > ------------------------------ > > Message: 2 > Date: Sat, 25 May 2013 20:54:59 +0200 > From: Johanna Zumer > To: FieldTrip discussion list > Subject: Re: [FieldTrip] fieldtrip Digest, Vol 30, Issue 31 > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Dear Jing, > > 1. Every MRI scanner is different, so I'm not familiar with that naming > scheme, but it seems the 'GAD' at the end of the file name indicates that > was with the Gadolinium contrast agent, so I would suggest to not use that, > but instead use the first (plain) T1. > > 2. I'm not sure what to suggest. I assume you can see the vitamin E marker > clearly when viewing the DICOM file? Is the issue that some slices are > missing in the conversion, or that the contrast on the image is not the > same? or right/left flipped? > > Best, > Johanna > > > 2013/5/23 WangJing <13681530640 at 139.com> > > > Dear Johanna, > > > > Thank you for your suggestion. > > 1.I have two folder of T1 MRI, one is t1_vibe_tra_4,and another is > > t1_vibe_traGAD-5. which one is best? > > 2.when I convert MRI from DICOM into CTF format,the vitamin E marker > > didn't be found. what can I do? > > > > Best Regards, > > Jing Wang > > > > > > > > > > ------------------------------ > > ----The following is the content of the forwarded email---- > > From?fieldtrip-request > > To?fieldtrip > > Date?2013-05-22 15:33:13 > > Subject?fieldtrip Digest, Vol 30, Issue 31 > > > > 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: question About head model (Johanna Zumer) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Wed, 22 May 2013 09:30:17 +0200 > > From: Johanna Zumer > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] question About head model > > Message-ID: > > > > Content-Type: text/plain; charset="utf-8" > > > > Dear Jing, > > > > It is best to use the T1 MRI rather than the other scans. To open a DICOM > > format file, you can try one of these options: > > > > % read the DICOM files > > mri = ft_read_mri('single_file_of_DICOM_series.IMA'); > > % or use a graphical file selection[f, p] = uigetfile > > < http://www.mathworks.com/access/helpdesk/help/techdoc/ref/uigetfile.html > > >('*'); > > mri = ft_read_mri(fullfile > > > >(p, > > f)); > > > > > > I copied the above from documentation on the FieldTrip wiki: > > > > http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_an_anatomical_mri_from_dicom_into_ctf_format > > > > > > Then you can save the 'mri' into a *.mat file for future use with FieldTrip. > > > > Best regards, > > Johanna > > > > > > 2013/5/22 WangJing <13681530640 at 139.com> > > > > > Hi > > > I am a freshman about field trip. > > > I am trying to build the forward model. but my mri data is different from > > > the data in the tutorial. So I don't know how to bulid the head model. I > > > use the date which is from the paper "Open Database of Epileptic EEG with > > > MRI and Postoperational Assessment of Foci?a Real World Verification for > > > the EEG Inverse Solutions",http://eeg.pl/epi > > . MRI recordings containing a > > > > > T1, T2 or fluid attenuated inversion recovery (FLAIR) weighted brain scans > > > with morphologic substrate of the epilepsy (mostly cortical dysplasias, > > > dysplastic tumors etc.). In some cases there is also a scan with the > > > > > gadolinium (GAD) contrast. The images were collected by Siemens Sonata 1.5T > > > scanner. The data is stored in the Digital Imaging and Communications in > > > Medicine (DICOM) format. The name of the scan?s folder indicates its > > > weighting.The scans have the following resolutions: T1: 512 ? 512 pixels, > > > pixel spacing 0.4687 mm, slice thickness 1.2 mm, T2: 256 ? 256 pixels, > > > pixel spacing 0.9375 mm,slice thickness 2.5 mm. > > > > > In the tutorial,the mri data stored in only one file, while the data which > > > > > I used have many files, I don't know how to process. who can help me,Thanks1 > > > Thanks very much! > > > Best Reagards > > > Jing Wang > > > > > > > > > > > > > > > > > > ------------------------------ > > > ----The following is the content of the forwarded email---- > > > From?fieldtrip-request > > > To?fieldtrip > > > Date?2013-05-21 23:59:18 > > > Subject?fieldtrip Digest, Vol 30, Issue 29 > > > > > > 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: problem in connectivityanalysis (Gabriel Gonzalez Escamilla) > > > > > > > > > ---------------------------------------------------------------------- > > > > > > Message: 1 > > > Date: Tue, 21 May 2013 17:52:21 +0200 > > > From: Gabriel Gonzalez Escamilla > > > To: FieldTrip discussion list > > > Subject: Re: [FieldTrip] problem in connectivityanalysis > > > Message-ID: <1348f6433edc26f9.519bb455 at upo.es> > > > Content-Type: text/plain; charset="iso-8859-1" > > > > > > Thank you so much for your answer J?rn, > > > > > > > > > > > Now I got it, so, I will let the 'fourier' as input to ft_connectivityanalysis, because for some indices I will need the auto-spectrum, and if I fully undertood what you said, it will be the same, as they always take the phase information from the fourier transform. And fieltrip will automatically compute the csd if the input is the frequency data. > > > > > > > > > > > Nevertheless, it give me some error when I tried to use the output from 'powandcsd' of freqanalysis, always gives me a matrix dimensions error, and when I use the output 'fourier' from connectivityanalysis, it computes almost all indices to ok, raging from? -1 to 1 (I'm saw that they are signed, so this is ok), the problem are the ImC ranging from -inf to inf, and the PLV values ranging from 0 to inf, but when I use the 'fourier' the values are. Which for me is really weird. > > > > > > > > > > > > > > I have checked internally, and even when I always use the 'fourier' as input, when it internally calculates cross-spectrum for the ImC and PLV, the data.crsspctrm is different, e.g: > > > data.dimord = 'rpt_rpt_chan_chan_freq' > > > ans size(data.crsspctrm) = [1 7 59 59]; > > > > > > > > So, both are apparently the same, but the data inside this matrices is different, > > > > > > > > > > > for example, when calculating the ImC the first 7 columns for the first two rows are: > > > val(:,:,1,1) > > > ?[0.9323? 0.3679? 0.8629? 1.6436? 0.6404? 1.8782? 0.1139] > > > val(:,:,1,2) > > > > > > > > ?[0.8509-0.1555i? 0.2507-0.1066i? 0.8173-0.0290i? 1.4328-0.2427i? 0.5457-0.0500i? 1.6505-0.0161i? 0.0993+0.0016i] > > > > > > while when calculating the PLV are: > > > val(:,:,1,1) > > > ?[1? 1? 1? 1? 1? 1? 1] > > > val(:,:,1,2) > > > > > > > > ?[0.9694-0.2133i? 0.7011-0.3564i? 0.9951-0.0104i? 0.9014-0.3481i? 0.9781-0.0819i? 0.9982-0.0046i? 0.9507-0.0483i] > > > > > > > > > > > > > > I'm pretty sure I'm doing something wrong here, but I don't really have a clue, > > > > > > > > > > > If I use the fourier transform to calculate the 'csd' in ft_connectivity analysis and use this csd as input to all other ft_connectivityanalysis indices all of them are set to NaN or 1, not ranging between any numbers. > > > > > > > > > > > > > > > > > > > > On the other hand, I have seen searching on the net, that fieltrip is capable of create surrogate data, by shifting the phase information on every trial for only one electrode of each pair while using the original samples of each trials on the second channel, but I couldn't find on the manual how to do such a thing. Is there any way to compute this kind of surrogates for every sensor? or was it something that some one suggest to somebody? > > > > > > > > > Many thanks in advanced, > > > Gabriel. > > > > > > > > > > > > > > > ----- Mensaje original ----- > > > De: "J?rn M. Horschig" > > > Fecha: Martes, 21 de Mayo de 2013, 9:03 am > > > Asunto: Re: [FieldTrip] problem in connectivityanalysis > > > A: FieldTrip discussion list > > > > > > > > > > > > > > > > > > > Dear Gabriel, > > > > > > > > > > > > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > > > > > > > > > > No. You should think of coherence more as a measure for the consistency of the phase relation between channels across trials, so coherence is just not defined per trial,neither would it make sense to compute coherence for a single trial. > > > > > > > > > > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? I see some terminology issues here. Let me try to explain in a simple (aka least-mathematical I can think of) way: > > > > > > > > > > > > > For all these connectivity measures, we need the phase information from the Fourier transform (FFT) to compute the cross-spectral density matrix (CSD). The CSD can be regarded as the equivalent in the frequency domain to the covariance matrix in the time domain, thus it is a measures how a certain channels activity is co-modulated with another channels activity (for a particular frequency) - makes pretty much sense to make use of this when computing connectivity, right? :) > > > > > > > > > As you might know, a Fourier transform returns complex numbers, where the imaginary part of this number contains phase information. When calling ft_freqanalysis, you can decide if it shall only return the (squared) real part of the frequency spectrum (cfg.output='pow'), or instead the full CSD (cfg.output = 'powandcsd'). Alternatively, you can also let ft_freqanalysis return the raw Fourier coefficients (cfg.output='fourier'). From the Fourier coefficients, however, you can easily obtain the CSD or the power spectrum basically by multiplication the Fourier matrix with itself (transposed). All of these measures quantify the phase relation between channels across trials, and as phase information is coded in the imaginary part of the fourier output, thus for connectivityanalysis you need the CSD which can be obtained either by 'powandcsd' or by 'fourier'. > > > > > > > > I hope that somehow clarifies your questions. > > > > > > > > Best, > > > > J?rn > > > > > > > > On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote: > > > > Dear Fieltrip experts, > > > > > > > > > > > > > I have my continuous data imported to fieldtrip with matlab, I'm looking for performing connectivity analysis between pairs of sensors, I have succed as: > > > > > > > > > data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels and 2000 samples > > > > data.label {59x1}; > > > > data.time {1xNepochs}; > > > > > > > > then, calculate only the FFT of all sensors as: > > > > cfg=[]; > > > > cfg.output='fourier'; > > > > cfg.method='mtmfft'; > > > > cfg.taper='hanning'; > > > > cfg.foilim=[8.5 9.5]; > > > > cfg.tapsmofrq=0; > > > > cfg.trials='all'; > > > > cfg.keeptrials='yes'; > > > > cfg.channel='all'; > > > > fourier=ft_freqanalysis(cfg, data) > > > > as output I get: > > > > dimord = 'rpttap_chan_freq' > > > > freq= [1x9] > > > > fourierspctrm=[7x59x9 double] > > > > > > > > Then compute the imaginary part of coherency as: > > > > cfg=[]; > > > > cfg.method ='cohe'; > > > > cfg.complex='imag'; > > > > cfg.channelcbm={'all' 'all'}; > > > > coher = ft_connectivityanalysis (cfg, fourier) > > > > as output get: > > > > dimord='chan_chan_freq'; > > > > cohspctrm=[59x59x9 double]; > > > > dof=7; > > > > > > > > I have two main questions: > > > > > > > > > > > > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > > > > > > > > > > > > > > > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? > > > > > > > > > > > > > > > > > > > > Many thanks in advanced, > > > > Gabriel. > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: > > > jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: > > > http://www.ru.nl/donders > > > > > > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________ > > > > fieldtrip mailing list > > > > fieldtrip at donders.ru.nl > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > > --------------------------
PhD. student Gabriel Gonz?lez-Escamilla
Laboratory of Functional Neuroscience
Department of Physiology, Anatomy, and Cell Biology
University Pablo de Olavide
Ctra. de Utrera, Km.1
41013 - Seville
- Spain -

Email: > > > ggonesc at upo.es
http://www.upo.es/neuroaging/es/
> > > > > > > > > -------------- next part -------------- > > > An HTML attachment was scrubbed... > > > URL: < > > > > > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130521/0886ac06/attachment.html > > > > > > > > > > ------------------------------ > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > End of fieldtrip Digest, Vol 30, Issue 29 > > > ***************************************** > > > > > > _______________________________________________ > > > 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/20130522/190aa246/attachment.html > > > > > > > ------------------------------ > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > End of fieldtrip Digest, Vol 30, Issue 31 > > ***************************************** > > > > _______________________________________________ > > 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/20130525/4259b000/attachment.html > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 30, Issue 36 > ***************************************** -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://people.ku.edu/~sjpa/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Fri May 31 08:11:23 2013 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Fri, 31 May 2013 08:11:23 +0200 (CEST) Subject: [FieldTrip] Question about minimum norm estimate pipeline In-Reply-To: Message-ID: <1914237354.1292588.1369980683984.JavaMail.root@sculptor.zimbra.ru.nl> Hi Steve, A quick guess; did you correctly align your resliced mri to Talairach space by indicating the commissures ( http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures ) and, if I'm correct, a point in the same place, e.g. between the hemispheres? This should update the transformation matrix. Best regards, Arjen ----- Oorspronkelijk bericht ----- > Van: "Stephen Politzer-Ahles" > Aan: fieldtrip at science.ru.nl > Verzonden: Vrijdag 31 mei 2013 05:53:45 > Onderwerp: [FieldTrip] Question about minimum norm estimate pipeline > Hello all, > I have not yet gotten a response to my question below, but in the > meantime I have another question about the minimum norm estimate > workflow--specifically, about the coordinate system for the > skull-stripped anatomy in the step described at > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#preprocessing_of_the_anatomical_mrisave_to_disk > . I'm confused by the following bit of code: > % ensure that the skull-stripped anatomy is expressed in the same > coordinate system as the anatomy > seg.transform = mri_tal.transform; > In my data, mri_tal.coordsys is 'spm' (I presume this is the result of > re-aligning to Talairach in the previous step?) whereas seg.coordsys > is 'ctf' (as a result of re-aligning to CTF several steps earlier). > (But mri_tal also has a field mri_tal.transformorig, which seg does > not have.) So should I really be using the same transform for both, as > shown in the tutorial? > Apologies if this question is pretty basic; I'm just trying to > pinpoint where the mis-alignment described in my message below > occurred, so I want to make sure I understand each step of the > workflow correctly > Best, > Steve > > Message: 1 > > Date: Sat, 25 May 2013 08:11:18 -0500 > > From: Stephen Politzer-Ahles < politzerahless at gmail.com > > > To: fieldtrip at donders.ru.nl > > Subject: [FieldTrip] Sourcespace and volume conductor misaligned > > Message-ID: > > > > > > Content-Type: text/plain; charset="utf-8" > > > > Hello all, > > > > I am going through the workflow at > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate . After > > making > > the volume conduction model using ft_prepare_headmodel(), I noticed > > that > > although the volume conduction model and sourcespace have the same > > orientation and overall size/shape (after I converted the volume > > conduction > > model to cm, which wasn't in the tutorial but my original model came > > out in > > mm), they don't quite line up, as you can see in this figure: > > > > http://i.imgur.com/mGEtLOa.png > > > > I did interactively re-align the data to CTF (twice--in step 2 of > > "Preprocessing of the anatomical MRI" and in step 4 of "Source > > model") > > using fiducials, and to Talairach (step 5 of "Preprocessing of the > > anatomical data"), so I'm not sure how it ended up this way. The > > code I've > > used at each step is basically the same as that in the tutorial. > > > > Is there any way to line up my volume conduction model and > > sourcespace now, > > without going back and re-running most of the workflow? > > > > Best, > > Steve > > > > -- > > Stephen Politzer-Ahles > > University of Kansas > > Linguistics Department > > http://people.ku.edu/~sjpa/ > On Sat, May 25, 2013 at 1:56 PM, < fieldtrip-request at science.ru.nl > > wrote: > > > > 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. Sourcespace and volume conductor misaligned > > (Stephen Politzer-Ahles) > > 2. Re: fieldtrip Digest, Vol 30, Issue 31 (Johanna Zumer) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Sat, 25 May 2013 08:11:18 -0500 > > From: Stephen Politzer-Ahles < politzerahless at gmail.com > > > To: fieldtrip at donders.ru.nl > > Subject: [FieldTrip] Sourcespace and volume conductor misaligned > > Message-ID: > > > > > > Content-Type: text/plain; charset="utf-8" > > > > Hello all, > > > > I am going through the workflow at > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate . After > > making > > the volume conduction model using ft_prepare_headmodel(), I noticed > > that > > although the volume conduction model and sourcespace have the same > > orientation and overall size/shape (after I converted the volume > > conduction > > model to cm, which wasn't in the tutorial but my original model came > > out in > > mm), they don't quite line up, as you can see in this figure: > > > > http://i.imgur.com/mGEtLOa.png > > > > I did interactively re-align the data to CTF (twice--in step 2 of > > "Preprocessing of the anatomical MRI" and in step 4 of "Source > > model") > > using fiducials, and to Talairach (step 5 of "Preprocessing of the > > anatomical data"), so I'm not sure how it ended up this way. The > > code I've > > used at each step is basically the same as that in the tutorial. > > > > Is there any way to line up my volume conduction model and > > sourcespace now, > > without going back and re-running most of the workflow? > > > > Best, > > Steve > > > > -- > > Stephen Politzer-Ahles > > University of Kansas > > Linguistics Department > > http://people.ku.edu/~sjpa/ > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130525/561df14f/attachment-0001.html > > > > > > > ------------------------------ > > > > Message: 2 > > Date: Sat, 25 May 2013 20:54:59 +0200 > > From: Johanna Zumer < johanna.zumer at donders.ru.nl > > > To: FieldTrip discussion list < fieldtrip at science.ru.nl > > > Subject: Re: [FieldTrip] fieldtrip Digest, Vol 30, Issue 31 > > Message-ID: > > > > > > Content-Type: text/plain; charset="utf-8" > > > > Dear Jing, > > > > 1. Every MRI scanner is different, so I'm not familiar with that > > naming > > scheme, but it seems the 'GAD' at the end of the file name indicates > > that > > was with the Gadolinium contrast agent, so I would suggest to not > > use that, > > but instead use the first (plain) T1. > > > > 2. I'm not sure what to suggest. I assume you can see the vitamin E > > marker > > clearly when viewing the DICOM file? Is the issue that some slices > > are > > missing in the conversion, or that the contrast on the image is not > > the > > same? or right/left flipped? > > > > Best, > > Johanna > > > > > > 2013/5/23 WangJing < 13681530640 at 139.com > > > > > > Dear Johanna, > > > > > > Thank you for your suggestion. > > > 1.I have two folder of T1 MRI, one is t1_vibe_tra_4,and another is > > > t1_vibe_traGAD-5. which one is best? > > > 2.when I convert MRI from DICOM into CTF format,the vitamin E > > > marker > > > didn't be found. what can I do? > > > > > > Best Regards, > > > Jing Wang > > > > > > > > > > > > > > > ------------------------------ > > > ----The following is the content of the forwarded email---- > > > From?fieldtrip-request< fieldtrip-request at science.ru.nl > > > > To?fieldtrip< fieldtrip at science.ru.nl > > > > Date?2013-05-22 15:33:13 > > > Subject?fieldtrip Digest, Vol 30, Issue 31 > > > > > > 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: question About head model (Johanna Zumer) > > > > > > > > > ---------------------------------------------------------------------- > > > > > > Message: 1 > > > Date: Wed, 22 May 2013 09:30:17 +0200 > > > From: Johanna Zumer < johanna.zumer at donders.ru.nl > > > > To: FieldTrip discussion list < fieldtrip at science.ru.nl > > > > Subject: Re: [FieldTrip] question About head model > > > Message-ID: > > > > > HsAS_X0-w at mail.gmail.com > > > > Content-Type: text/plain; charset="utf-8" > > > > > > Dear Jing, > > > > > > It is best to use the T1 MRI rather than the other scans. To open > > > a DICOM > > > format file, you can try one of these options: > > > > > > % read the DICOM files > > > mri = ft_read_mri('single_file_of_DICOM_series.IMA'); > > > % or use a graphical file selection[f, p] = uigetfile > > > < > > > http://www.mathworks.com/access/helpdesk/help/techdoc/ref/uigetfile.html > > > >('*'); > > > mri = ft_read_mri(fullfile > > > < > > > http://www.mathworks.com/access/helpdesk/help/techdoc/ref/fullfile.html > > > >(p, > > > f)); > > > > > > > > > I copied the above from documentation on the FieldTrip wiki: > > > > > > http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_an_anatomical_mri_from_dicom_into_ctf_format > > > > > > > > > Then you can save the 'mri' into a *.mat file for future use with > > > FieldTrip. > > > > > > Best regards, > > > Johanna > > > > > > > > > 2013/5/22 WangJing < 13681530640 at 139.com > > > > > > > > Hi > > > > I am a freshman about field trip. > > > > I am trying to build the forward model. but my mri data is > > > > different from > > > > the data in the tutorial. So I don't know how to bulid the head > > > > model. I > > > > use the date which is from the paper "Open Database of Epileptic > > > > EEG with > > > > MRI and Postoperational Assessment of Foci?a Real World > > > > Verification for > > > > the EEG Inverse Solutions", http://eeg.pl/epi > > > . MRI recordings containing a > > > > > > > T1, T2 or fluid attenuated inversion recovery (FLAIR) weighted > > > > brain scans > > > > with morphologic substrate of the epilepsy (mostly cortical > > > > dysplasias, > > > > dysplastic tumors etc.). In some cases there is also a scan with > > > > the > > > > > > > gadolinium (GAD) contrast. The images were collected by Siemens > > > > Sonata 1.5T > > > > scanner. The data is stored in the Digital Imaging and > > > > Communications in > > > > Medicine (DICOM) format. The name of the scan?s folder indicates > > > > its > > > > weighting.The scans have the following resolutions: T1: 512 ? > > > > 512 pixels, > > > > pixel spacing 0.4687 mm, slice thickness 1.2 mm, T2: 256 ? 256 > > > > pixels, > > > > pixel spacing 0.9375 mm,slice thickness 2.5 mm. > > > > > > > In the tutorial,the mri data stored in only one file, while the > > > > data which > > > > > > > I used have many files, I don't know how to process. who can > > > > help me,Thanks1 > > > > Thanks very much! > > > > Best Reagards > > > > Jing Wang > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > ----The following is the content of the forwarded email---- > > > > From?fieldtrip-request< fieldtrip-request at science.ru.nl > > > > > To?fieldtrip< fieldtrip at science.ru.nl > > > > > Date?2013-05-21 23:59:18 > > > > Subject?fieldtrip Digest, Vol 30, Issue 29 > > > > > > > > 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: problem in connectivityanalysis (Gabriel Gonzalez > > > > Escamilla) > > > > > > > > > > > > ---------------------------------------------------------------------- > > > > > > > > Message: 1 > > > > Date: Tue, 21 May 2013 17:52:21 +0200 > > > > From: Gabriel Gonzalez Escamilla < ggonesc at upo.es > > > > > To: FieldTrip discussion list < fieldtrip at science.ru.nl > > > > > Subject: Re: [FieldTrip] problem in connectivityanalysis > > > > Message-ID: < 1348f6433edc26f9.519bb455 at upo.es > > > > > Content-Type: text/plain; charset="iso-8859-1" > > > > > > > > Thank you so much for your answer J?rn, > > > > > > > > > > > > > > > Now I got it, so, I will let the 'fourier' as input to > > > > ft_connectivityanalysis, because for some indices I will need > > > > the auto-spectrum, and if I fully undertood what you said, it > > > > will be the same, as they always take the phase information from > > > > the fourier transform. And fieltrip will automatically compute > > > > the csd if the input is the frequency data. > > > > > > > > > > > > > > > Nevertheless, it give me some error when I tried to use the > > > > output from 'powandcsd' of freqanalysis, always gives me a > > > > matrix dimensions error, and when I use the output 'fourier' > > > > from connectivityanalysis, it computes almost all indices to ok, > > > > raging from? -1 to 1 (I'm saw that they are signed, so this is > > > > ok), the problem are the ImC ranging from -inf to inf, and the > > > > PLV values ranging from 0 to inf, but when I use the 'fourier' > > > > the values are. Which for me is really weird. > > > > > > > > > > > > > > > > > > > I have checked internally, and even when I always use the > > > > 'fourier' as input, when it internally calculates cross-spectrum > > > > for the ImC and PLV, the data.crsspctrm is different, e.g: > > > > data.dimord = 'rpt_rpt_chan_chan_freq' > > > > ans size(data.crsspctrm) = [1 7 59 59]; > > > > > > > > > > > So, both are apparently the same, but the data inside this > > > > matrices is different, > > > > > > > > > > > > > > > for example, when calculating the ImC the first 7 columns for > > > > the first two rows are: > > > > val(:,:,1,1) > > > > ?[0.9323? 0.3679? 0.8629? 1.6436? 0.6404? 1.8782? 0.1139] > > > > val(:,:,1,2) > > > > > > > > > > > ?[0.8509-0.1555i? 0.2507-0.1066i? 0.8173-0.0290i? > > > > 1.4328-0.2427i? 0.5457-0.0500i? 1.6505-0.0161i? 0.0993+0.0016i] > > > > > > > > while when calculating the PLV are: > > > > val(:,:,1,1) > > > > ?[1? 1? 1? 1? 1? 1? 1] > > > > val(:,:,1,2) > > > > > > > > > > > ?[0.9694-0.2133i? 0.7011-0.3564i? 0.9951-0.0104i? > > > > 0.9014-0.3481i? 0.9781-0.0819i? 0.9982-0.0046i? 0.9507-0.0483i] > > > > > > > > > > > > > > > > > > > I'm pretty sure I'm doing something wrong here, but I don't > > > > really have a clue, > > > > > > > > > > > > > > > If I use the fourier transform to calculate the 'csd' in > > > > ft_connectivity analysis and use this csd as input to all other > > > > ft_connectivityanalysis indices all of them are set to NaN or 1, > > > > not ranging between any numbers. > > > > > > > > > > > > > > > > > > > > > > > > > > > On the other hand, I have seen searching on the net, that > > > > fieltrip is capable of create surrogate data, by shifting the > > > > phase information on every trial for only one electrode of each > > > > pair while using the original samples of each trials on the > > > > second channel, but I couldn't find on the manual how to do such > > > > a thing. Is there any way to compute this kind of surrogates for > > > > every sensor? or was it something that some one suggest to > > > > somebody? > > > > > > > > > > > > Many thanks in advanced, > > > > Gabriel. > > > > > > > > > > > > > > > > > > > > ----- Mensaje original ----- > > > > De: "J?rn M. Horschig" < jm.horschig at donders.ru.nl > > > > > Fecha: Martes, 21 de Mayo de 2013, 9:03 am > > > > Asunto: Re: [FieldTrip] problem in connectivityanalysis > > > > A: FieldTrip discussion list < fieldtrip at science.ru.nl > > > > > > > > > > > > > > > > > > > > > > > > > > Dear Gabriel, > > > > > > > > > > > > > > > > > A) As you see, this makes an average over the epochs of each > > > > > channel, and not over the samples (which in this case are the > > > > > 9 frequencies of the FFT), And I would like to have the > > > > > opposite, this is, to get the imaginary part of coherence for > > > > > each epoch (repetition) on all my channels and not for each > > > > > frequency, something like: chan_chan_rpt or chancbm_rpt, Is > > > > > this possible? > > > > > > > > > > > > > > > > > No. You should think of coherence more as a measure for the > > > > > consistency of the phase relation between channels across > > > > > trials, so coherence is just not defined per trial,neither > > > > > would it make sense to compute coherence for a single trial. > > > > > > > > > > > > > > > > > B) Another question I have is: for the Imaginary part of > > > > > Coherence is not necessary to compute the cross-spectrum with > > > > > 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is > > > > > that way too? I see some terminology issues here. Let me try > > > > > to explain in a simple (aka least-mathematical I can think of) > > > > > way: > > > > > > > > > > > > > > > > > For all these connectivity measures, we need the phase > > > > > information from the Fourier transform (FFT) to compute the > > > > > cross-spectral density matrix (CSD). The CSD can be regarded > > > > > as the equivalent in the frequency domain to the covariance > > > > > matrix in the time domain, thus it is a measures how a certain > > > > > channels activity is co-modulated with another channels > > > > > activity (for a particular frequency) - makes pretty much > > > > > sense to make use of this when computing connectivity, right? > > > > > :) > > > > > > > > > > > > As you might know, a Fourier transform returns complex > > > > > numbers, where the imaginary part of this number contains > > > > > phase information. When calling ft_freqanalysis, you can > > > > > decide if it shall only return the (squared) real part of the > > > > > frequency spectrum (cfg.output='pow'), or instead the full CSD > > > > > (cfg.output = 'powandcsd'). Alternatively, you can also let > > > > > ft_freqanalysis return the raw Fourier coefficients > > > > > (cfg.output='fourier'). From the Fourier coefficients, > > > > > however, you can easily obtain the CSD or the power spectrum > > > > > basically by multiplication the Fourier matrix with itself > > > > > (transposed). All of these measures quantify the phase > > > > > relation between channels across trials, and as phase > > > > > information is coded in the imaginary part of the fourier > > > > > output, thus for connectivityanalysis you need the CSD which > > > > > can be obtained either by 'powandcsd' or by 'fourier'. > > > > > > > > > > I hope that somehow clarifies your questions. > > > > > > > > > > Best, > > > > > J?rn > > > > > > > > > > On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote: > > > > > Dear Fieltrip experts, > > > > > > > > > > > > > > > > > I have my continuous data imported to fieldtrip with matlab, > > > > > I'm looking for performing connectivity analysis between pairs > > > > > of sensors, I have succed as: > > > > > > > > > > > > data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 > > > > > channels and 2000 samples > > > > > data.label {59x1}; > > > > > data.time {1xNepochs}; > > > > > > > > > > then, calculate only the FFT of all sensors as: > > > > > cfg=[]; > > > > > cfg.output='fourier'; > > > > > cfg.method='mtmfft'; > > > > > cfg.taper='hanning'; > > > > > cfg.foilim=[8.5 9.5]; > > > > > cfg.tapsmofrq=0; > > > > > cfg.trials='all'; > > > > > cfg.keeptrials='yes'; > > > > > cfg.channel='all'; > > > > > fourier=ft_freqanalysis(cfg, data) > > > > > as output I get: > > > > > dimord = 'rpttap_chan_freq' > > > > > freq= [1x9] > > > > > fourierspctrm=[7x59x9 double] > > > > > > > > > > Then compute the imaginary part of coherency as: > > > > > cfg=[]; > > > > > cfg.method ='cohe'; > > > > > cfg.complex='imag'; > > > > > cfg.channelcbm={'all' 'all'}; > > > > > coher = ft_connectivityanalysis (cfg, fourier) > > > > > as output get: > > > > > dimord='chan_chan_freq'; > > > > > cohspctrm=[59x59x9 double]; > > > > > dof=7; > > > > > > > > > > I have two main questions: > > > > > > > > > > > > > > > > > A) As you see, this makes an average over the epochs of each > > > > > channel, and not over the samples (which in this case are the > > > > > 9 frequencies of the FFT), And I would like to have the > > > > > opposite, this is, to get the imaginary part of coherence for > > > > > each epoch (repetition) on all my channels and not for each > > > > > frequency, something like: chan_chan_rpt or chancbm_rpt, Is > > > > > this possible? > > > > > > > > > > > > > > > > > > > > > > > > > > > B) Another question I have is: for the Imaginary part of > > > > > Coherence is not necessary to compute the cross-spectrum with > > > > > 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is > > > > > that way too? > > > > > > > > > > > > > > > > > > > > > > > > > Many thanks in advanced, > > > > > Gabriel. > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > fieldtrip > > > > > mailing list > > > > > fieldtrip at donders.ru.nl > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > > > > > > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for > > > > > Brain, Cognition and Behaviour > Centre for Cognitive > > > > > Neuroimaging > Radboud University Nijmegen > Neuronal > > > > > Oscillations Group > FieldTrip Development Team > > P.O. Box > > > > > 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > > > > > > E-Mail: > > > > jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: > > > > http://www.ru.nl/donders > > > > > > > > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > > > > > > > NL-6525 EN Nijmegen > The Netherlands > > > > > > > _______________________________________________ > > > > > fieldtrip mailing list > > > > > fieldtrip at donders.ru.nl > > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > > > > > > --------------------------
PhD. student > > > > Gabriel Gonz?lez-Escamilla
Laboratory of Functional > > > > Neuroscience
Department of Physiology, Anatomy, and Cell > > > > Biology
University Pablo de Olavide
Ctra. de Utrera, > > > > Km.1
41013 - Seville
- Spain -

Email: > > > > ggonesc at upo.es
http://www.upo.es/neuroaging/es/
> > > > > > > > > > > > -------------- next part -------------- > > > > An HTML attachment was scrubbed... > > > > URL: < > > > > > > > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130521/0886ac06/attachment.html > > > > > > > > > > > > > ------------------------------ > > > > > > > > _______________________________________________ > > > > fieldtrip mailing list > > > > fieldtrip at donders.ru.nl > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > End of fieldtrip Digest, Vol 30, Issue 29 > > > > ***************************************** > > > > > > > > _______________________________________________ > > > > 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/20130522/190aa246/attachment.html > > > > > > > > > > ------------------------------ > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > End of fieldtrip Digest, Vol 30, Issue 31 > > > ***************************************** > > > > > > _______________________________________________ > > > 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/20130525/4259b000/attachment.html > > > > > > > ------------------------------ > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > End of fieldtrip Digest, Vol 30, Issue 36 > > ***************************************** > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://people.ku.edu/~sjpa/ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From yukaokazaki at gmail.com Fri May 31 08:21:56 2013 From: yukaokazaki at gmail.com (Yuka Okazaki) Date: Fri, 31 May 2013 15:21:56 +0900 Subject: [FieldTrip] single subject headmodel and mni-transformed grid doesn't fit Message-ID: Dear all I have a problem that single subject headmodel and the warped its grid to template grid do not fit, as attached figure. I expected they are exactly fit each other but it seems not. I generated this figure by following steps. MEG system is yokogawa. Any advices I should check will be very helpful and appreciated. Yuka ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ load('~\fieldtrip\template\sourcemodel\standard_sourcemodel3d10mm.mat') template_grid = sourcemodel; % Read mri data mri2nifti('subject.mri', 'mri.nii'); mri_nifti = ft_read_mri('mri.nii'); % Define fiducial position in MRI coordinate cfg = []; cfg.method = 'interactive'; mri = ft_volumerealign(cfg, mri_nifti); % segment the anatomical MRI cfg = []; cfg.coordsys = 'ctf'; seg = ft_volumesegment(cfg, mri); % construct volume conductor model (i.e. head model) for each subject cfg = []; cfg.method = 'singleshell'; vol = ft_prepare_headmodel(cfg, seg); vol = ft_convert_units(vol, 'cm'); % create the subject specific grid, using the template grid that has just been created cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; %sourcemodel% cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.mri = mri; grid = ft_prepare_sourcemodel(cfg); % make a figure of the single subject headmodel, and grid positions figure; ft_plot_vol(vol, 'edgecolor', 'none'); alpha 0.4; ft_plot_mesh(grid.pos(grid.inside,:),'vertexcolor','r');[image: Inline image 1] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.jpeg Type: image/jpeg Size: 56475 bytes Desc: not available URL: From politzerahless at gmail.com Fri May 31 08:27:19 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Fri, 31 May 2013 01:27:19 -0500 Subject: [FieldTrip] fieldtrip Digest, Vol 30, Issue 45 In-Reply-To: References: Message-ID: Hi Arjen, Thanks for your message; I did indeed re-align to Talairach after reslicing, although I can't be sure it was "correct" (the page linked from the tutorial, http://neuroimage.usc.edu/brainstorm/CoordinateSystems, didn't give guidelines on how anterior/posteriorly to place the interhemispheric point, so I just placed it near the top of the head on about the same plane as the commisures). But it wasn't until the end of the anatomical processing that I noticed the issue, so I'm wondering if there's a way to re-align the source space and volume conduction model to each other without going back to the beginning of the pipeline. Best, Steve > Message: 1 > Date: Fri, 31 May 2013 08:11:23 +0200 (CEST) > From: "Stolk, A." > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Question about minimum norm estimate pipeline > Message-ID: > < 1914237354.1292588.1369980683984.JavaMail.root at sculptor.zimbra.ru.nl> > Content-Type: text/plain; charset="utf-8" > > Hi Steve, A quick guess; did you correctly align your resliced mri to Talairach space by indicating the commissures ( http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures ) and, if I'm correct, a point in the same place, e.g. between the hemispheres? This should update the transformation matrix. Best regards, Arjen ----- Oorspronkelijk bericht ----- > > Van: "Stephen Politzer-Ahles" > > Aan: fieldtrip at science.ru.nl > > Verzonden: Vrijdag 31 mei 2013 05:53:45 > > Onderwerp: [FieldTrip] Question about minimum norm estimate pipeline > > Hello all, > > I have not yet gotten a response to my question below, but in the > > meantime I have another question about the minimum norm estimate > > workflow--specifically, about the coordinate system for the > > skull-stripped anatomy in the step described at > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#preprocessing_of_the_anatomical_mrisave_to_disk > > . I'm confused by the following bit of code: > > % ensure that the skull-stripped anatomy is expressed in the same > > coordinate system as the anatomy > > seg.transform = mri_tal.transform; > > In my data, mri_tal.coordsys is 'spm' (I presume this is the result of > > re-aligning to Talairach in the previous step?) whereas seg.coordsys > > is 'ctf' (as a result of re-aligning to CTF several steps earlier). > > (But mri_tal also has a field mri_tal.transformorig, which seg does > > not have.) So should I really be using the same transform for both, as > > shown in the tutorial? > > Apologies if this question is pretty basic; I'm just trying to > > pinpoint where the mis-alignment described in my message below > > occurred, so I want to make sure I understand each step of the > > workflow correctly > > Best, > > Steve > > > Message: 1 > > > Date: Sat, 25 May 2013 08:11:18 -0500 > > > From: Stephen Politzer-Ahles < politzerahless at gmail.com > > > > To: fieldtrip at donders.ru.nl > > > Subject: [FieldTrip] Sourcespace and volume conductor misaligned > > > Message-ID: > > > > > > > > > Content-Type: text/plain; charset="utf-8" > > > > > > Hello all, > > > > > > I am going through the workflow at > > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate . After > > > making > > > the volume conduction model using ft_prepare_headmodel(), I noticed > > > that > > > although the volume conduction model and sourcespace have the same > > > orientation and overall size/shape (after I converted the volume > > > conduction > > > model to cm, which wasn't in the tutorial but my original model came > > > out in > > > mm), they don't quite line up, as you can see in this figure: > > > > > > http://i.imgur.com/mGEtLOa.png > > > > > > I did interactively re-align the data to CTF (twice--in step 2 of > > > "Preprocessing of the anatomical MRI" and in step 4 of "Source > > > model") > > > using fiducials, and to Talairach (step 5 of "Preprocessing of the > > > anatomical data"), so I'm not sure how it ended up this way. The > > > code I've > > > used at each step is basically the same as that in the tutorial. > > > > > > Is there any way to line up my volume conduction model and > > > sourcespace now, > > > without going back and re-running most of the workflow? > > > > > > Best, > > > Steve > > > > > > -- > > > Stephen Politzer-Ahles > > > University of Kansas > > > Linguistics Department > > > http://people.ku.edu/~sjpa/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan.debener at uni-oldenburg.de Fri May 31 09:18:51 2013 From: stefan.debener at uni-oldenburg.de (Stefan Debener) Date: Fri, 31 May 2013 09:18:51 +0200 Subject: [FieldTrip] Open ostdoc position Message-ID: <51A84EDB.6010408@uni-oldenburg.de> The cluster of excellence Hearing4all: Models, Technology and Solutions for Diagnostics, Restoration and Support of Hearing at the Carl von Ossietzky Universität Oldenburg (in collaboration with Medizinische Hochschule Hannover and Leibniz Universität Hannover) is seeking to fill the position of a *Postdoctoral Research Associate in the Field of Auditory Psychophysiology * in the Department of Psychology, Faculty of Medicine and Health Sciences. The position is available from 1 September 2013, for initially 2 years, with prospect for continuation for up to 2.5 more years. Payment is depending on previous experience (German TV-L E13, full time). A paramount goal of the cluster of excellence Hearing4all (www.hearing4all.de) is to transform audiology into an "exact" science based on the interplay between experiment and theory as well as between basic science and clinical research. In the framework provided by the cluster the successful candidate is expected to contribute to the research goals of task group 2 "Audioneurotechnology and theragnostics" or task group 7 "Brain-computer interface for hearing devices", e.g., by: - studying hearing disorder related maladaptive plasticity in the human auditory cortex with non-invasive techniques (EEG, MEG, NIRS); - electrophysiological characterisation of auditory cortex adaption to hearing device use (hearing aids, cochlear implants); - the role of auditory neurofeedback on speech comprehension; - the role of multisensory processes in auditory rehabilitation. Candidates are expected to have an academic university degree in the field of psychology, biology, neuroscience, or a related discipline and have shown their ability to perform excellent scientific work, usually demonstrated by the outstanding quality of their Doctorate/PhD research and a good publication record. We are seeking candidates with extensive knowledge in at least one of the following methods: advanced EEG recording and analysis; near-infrared spectroscopy. Excellent Matlab skills are mandatory and good knowledge of EEG analysis software suites (e.g., EEGLAB, Fieldtrip, BESA, LORETA) will be an asset. It is also necessary to have a background in experimental psychology, and knowledge of the German language is required. The Department of Psychology will offer an attractive scientific environment with access to research dedicated state-of-the-art approaches to human neurophysiological techniques (fMRI, NIRS, EEG, MEG, mobile EEG and mobile eye-tracking). The University of Oldenburg strives to increase the proportion of women in science, so we especially encourage female candidates to apply. Handicapped applicants will be given preference if equally qualified. Please send your application including a cover letter, CV, list of potential referees, links to recent publications, and copies of certificates for academic grades by email to Prof. Stefan Debener (Stefan.Debener at uni-oldenburg.de ). Feel free to contact Stefan Debener for further questions regarding the position. The application deadline is July 15, 2013. -- Prof. Dr. Stefan Debener Neuropsychology Lab Department of Psychology University of Oldenburg D-26111 Oldenburg Germany Office: A7 0-038 Phone: +49-441-798-4271 Fax: +49-441-798-5522 Email: stefan.debener at uni-oldenburg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From baharbahar395 at yahoo.com Fri May 31 09:48:25 2013 From: baharbahar395 at yahoo.com (Bahar Bahar) Date: Fri, 31 May 2013 15:48:25 +0800 (SGT) Subject: [FieldTrip] format conversion Message-ID: <1369986505.7865.YahooMailNeo@web192306.mail.sg3.yahoo.com> Hi dear all, I have a technical question about format converter module via sLORETA software (.slor file to .txt one). Can any one give me some information about the conversion procedure (and the meaning of the column and row of the output file)? Thanks, bahar -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbj0310 at gmail.com Fri May 31 11:11:33 2013 From: mbj0310 at gmail.com (Beom Jun Min) Date: Fri, 31 May 2013 18:11:33 +0900 Subject: [FieldTrip] ft_preprocessing error message during reading some files In-Reply-To: References: Message-ID: Dear respondent, Thank you for your advices. I will try these methods. Best regards 2013/5/30 Chungki Lee > Hi Min > > you'd better use ft_definetrial routine before ft_preprocessing. > > example) > > cfg = []; > cfg.dataset = filename; % string > cfg.trialdef.eventtype = your define text; % string > cfg.trialdef.eventvalue = your label value; % integer > cfg.trialdef.prestim = before onset time (sec); % positive > integer, not negative integer > cfg.trialdef.poststim = after onset time (sec); % positve integer > cfg = ft_definetrial(cfg); > data = ft_preprocessing(cfg); > > have fun ^^ > > > 2013/5/30 Beom Jun Min > >> Dear Julian Keil, >> >> Thank you for your reply. >> I agree with that your problem was similar with mine. >> My data was acquired by Neuroscan also. >> There might a problem associated with .CNT file in the newer version. >> >> Could you tell me the number of the older version you used? >> >> Best Regards >> >> >> >> 2013/5/29 Julian Keil >> >>> Dear BJ Min, >>> >>> what type of data are you trying to read in? >>> I had similar problems when reading in .CNT data. >>> Also, with some systems you have to specify the bit rate (e.g. >>> Neuroscan). >>> For me, reading in data with an older version of FieldTrip solved the >>> problem, but this was in 2011, so I cannot say if the problem with .CNT >>> files has been solved. >>> >>> Good Luck >>> >>> Julian >>> >>> ******************** >>> *Dr. Julian Keil* >>> * >>> * >>> AG Multisensorische Integration >>> Psychiatrische Universitätsklinik >>> der Charité im St. Hedwig-Krankenhaus >>> Große Hamburger Straße 5-11, Raum E 307 >>> 10115 Berlin >>> >>> Telefon: +49-30-2311-1879 >>> Fax: +49-30-2311-2209 >>> >>> http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration >>> >>> Am 29.05.2013 um 11:47 schrieb Beom Jun Min: >>> >>> Dear all, >>> >>> Hello, my name is BJ Min from Korea. >>> >>> I'm dealing with EEG data of many subjects. >>> >>> When I run ft_preprocessing, the error message below shows with only >>> some files of my data. (not all files) >>> >>> Warning: rounding "endsample" to the nearest integer >>> > In ft_read_data at 100 >>> In ft_preprocessing at 577 >>> ??? Error using ==> ft_read_data at 149 >>> cannot read data after the end of the file >>> >>> Error in ==> ft_preprocessing at 577 >>> dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', >>> begsample, 'endsample', endsample, 'chanindx', rawindx, >>> 'checkboundary', strcmp(cfg.continuous, 'no'), 'dataformat', >>> cfg.dataformat) >>> >>> I think that there might be a kind of problem in data acquisition, and I >>> modified below scripts in the ft_read_data function with comment %. >>> >>> % % test whether the requested data segment is not outside the file >>> % if any(begsample<1) >>> % error('FILEIO:InvalidBegSample', 'cannot read data before the begin >>> of the file'); >>> % elseif any(endsample>(hdr.nSamples*hdr.nTrials)) >>> % error('FILEIO:InvalidEndSample', 'cannot read data after the end of >>> the file'); >>> % end >>> >>> After that, the ft_preprocessing worked well. >>> >>> However, the files with the first problem showed additional warning >>> message while running ft_definetrial. (not error message) >>> >>> Warning: Integer operands are required for colon operator when used as >>> index >>> > In fileio\private\loadcnt at 464 >>> In ft_read_header at 1450 >>> In ft_preprocessing at 398 >>> >>> Warning: rounding "endsample" to the nearest integer >>> > In ft_read_data at 100 >>> In ft_preprocessing at 577 >>> >>> Also, during ft_redefinetrial, following warning message occurs.(not >>> error message) >>> >>> Warning: removing inconsistent sampleinfo >>> > In ft_datatype_raw at 97 >>> In ft_checkdata at 213 >>> In ft_redefinetrial at 104 >>> >>> Warning: the trial definition in the configuration is inconsistent with >>> the actual data >>> > In utilities\private\warning_once at 116 >>> In utilities\private\fixsampleinfo at 74 >>> In ft_datatype_raw at 154 >>> In ft_checkdata at 213 >>> In ft_redefinetrial at 206 >>> >>> Warning: reconstructing sampleinfo by assuming that the trials are >>> consecutive segments of a continuous recording >>> > In utilities\private\warning_once at 116 >>> In utilities\private\fixsampleinfo at 79 >>> In ft_datatype_raw at 154 >>> In ft_checkdata at 213 >>> In ft_redefinetrial at 206 >>> >>> I wonder if these messages during ft_redefinetrial mean wrong defining >>> trials. >>> Should I continue these process like this, modifying the >>> ft_preprocessing function? >>> Or, is it better to exclude some erroneous files? >>> >>> Best regards >>> >>> -- >>> BeomJun Min, M.D. >>> >>> Department of Medical System Engineering (DMSE) >>> Gwangju Institute of Science and Technology (GIST) >>> 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju >>> 500-712, Republic of Korea (South) >>> Phone: +82-62-715-3266 / Fax: +82-62-715-3244 >>> E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr >>> _______________________________________________ >>> 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 >>> >> >> >> >> -- >> BeomJun Min, M.D. >> >> Department of Medical System Engineering (DMSE) >> Gwangju Institute of Science and Technology (GIST) >> 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju >> 500-712, Republic of Korea (South) >> Phone: +82-62-715-3266 / Fax: +82-62-715-3244 >> E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > ---------------------------------------------------------------- > Chungki Lee, Ph.D. > Post-doc > Biomedical Research Institute > Korea Institute of Science and Technology > E-mail: chungki at kist.re.kr > Tel:+82-2-958-5636, C.P: +82-10-5223-7309 > ---------------------------------------------------------------- > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- BeomJun Min, M.D. Department of Medical System Engineering (DMSE) Gwangju Institute of Science and Technology (GIST) 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju 500-712, Republic of Korea (South) Phone: +82-62-715-3266 / Fax: +82-62-715-3244 E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.wunderle at esi-frankfurt.de Fri May 31 11:42:03 2013 From: thomas.wunderle at esi-frankfurt.de (Wunderle, Thomas) Date: Fri, 31 May 2013 09:42:03 +0000 Subject: [FieldTrip] channel combination problems Message-ID: <27E5CAD9145EEC41BB9B34C01716A1983046156B@UM-EXCDAG-A01.um.gwdg.de> Hi all, I'm new in fieldtrip and I try to get the cfg.channelcmb to work, because I want to plot the connectivity between the channels of different laminar electrodes, let's say the connectivity between channel 1:24 and 25:38 I tried the following: cfg = []; cfg.method = 'mtmfft'; cfg.taper = 'dpss'; cfg.output = 'fourier'; cfg.tapsmofrq = 1; freq = ft_freqanalysis(cfg, data) The output is: >> freq freq = label: {3x1 cell} dimord: 'rpttap_chan_freq' freq: [1x101 double] fourierspctrm: [500x3x101 double] cumsumcnt: [500x1 double] cumtapcnt: [500x1 double] cfg: [1x1 struct] I then run cfg = []; cfg.method = 'coh'; cfg.channelcmb = {freq.label{1} freq.label{2};freq.label{2} freq.label{1}}; coh= ft_connectivityanalysis(cfg, freq); And the output here is: >> coh coh = labelcmb: {2x2 cell} dimord: 'chan_freq' cohspctrm: [2x101 double] freq: [1x101 double] dof: 500 cfg: [1x1 struct] As you can seen, the output of dimord is 'chan_freq' so in the subsequent call of ft_connectivityplot I get an error message: cfg = []; cfg.parameter = 'cohspctrm'; ft_connectivityplot(cfg, coh); ??? Error using ==> ft_connectivityplot at 99 the data should have a dimord of chan_chan_freq or chancmb_freq If I use in ft_freqanalysis the cfg.method = 'powandcsd', cfg.channelcmb seems to have no effect at all, the coherence is computed for all possible pairs. I also don't understand the difference between "cfg.channelcmb" and "cfg.labelcmb" Can you help me in how I should correctly use the cannelcmb and labelcmb options? Thanks for your help, Thomas ----- Dr. Thomas Wunderle Ernst Strüngmann Institute (ESI) for Neuroscience in Cooperation with Max Planck Society Deutschordenstrasse 46 60528 Frankfurt am Main, Germany www.esi-frankfurt.de thomas.wunderle at esi-frankfurt.de Tel: +49 69 96769 519 Fax: +49 69 96769 555 Sitz der Gesellschaft: Frankfurt am Main Registergericht: Amtsgericht Frankfurt - HRB 84266 Geschäftsführer: Prof. Dr. Pascal Fries -------------- next part -------------- An HTML attachment was scrubbed... URL: From sid.kouider at gmail.com Fri May 31 11:56:19 2013 From: sid.kouider at gmail.com (Sid Kouider) Date: Fri, 31 May 2013 11:56:19 +0200 Subject: [FieldTrip] postdoctoral position on EEG/BCI in Paris Message-ID: <007701ce5de5$1b083620$5118a260$@gmail.com> The Department of Cognitive Science at the Ecole Normale Supérieure (Paris) invites applications for a postdoctoral position to work on Brain-Computer Interfaces and Virtual Reality in the framework of the CEEDs European project ( http://ceeds-project.eu/). The post-doc will mainly be in charge of : 1) setting a BCI loop between a virtual environment and an EEG system 2) optimize online detection of specific EEG patterns 3) participate in the design and elaboration of research protocols. The successful applicant will be affiliated to the Brain and Consciousness team of Pr Sid Kouider (http://www.lscp.net/persons/sidk/). The Department of Cognitive Science offers a rich research environment composed of a multidisciplinary set of research units on philosophy, cognitive psychology, cognitive neurosciences and computational neurosciences. Our research team, at the interface of these disciplines, is working on the cognitive and neural determinants of consciousness, with an emphasis on the distinction between unconscious perception and perceptual awareness. Our lab is located in central Paris, within the historical Quartier Latin. Candidates should have at least a PhD degree in a relevant domain and a solid training in EEG, Brain-Computer interfaces and machine learning. Experience with virtual reality is desirable but not a prerequisite. The position will start on September 1st, 2013. The appointment is for one year initially but can be extended later on. The net salary will range between 2 100 and 2 500 euros/month depending on qualifications. Consideration of applicants will commence June 1st, 2013 and will continue until the position is filled. Knowledge of French is not required as the team is international and verbal interactions are primarily in English. Please send a CV along with the names and contact information of two references to Sid Kouider (sid.kouider at ens dot fr) and Cécile Girard (cecilegirard20 @ gmail dot com) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Pr Sid Kouider, CNRS research director Ecole Normale Supérieure LSCP, Pavillon Jardin, 29 rue d'Ulm, 75005 Paris, France www.lscp.net/persons/sidk/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiteng.jiang at gmail.com Fri May 31 12:15:59 2013 From: haiteng.jiang at gmail.com (Haiteng Jiang) Date: Fri, 31 May 2013 12:15:59 +0200 Subject: [FieldTrip] time-domain granger causality in Fieldtrip? Message-ID: Hi all, is it possible to run time-domain granger causality in Fieldtrip? Best, Haiteng -- Haiteng Jiang PhD candidate Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Visiting address Room 2.32 Donders Centre for Cognitive Neuroimaging Kapittelweg 29 6525 EN Nijmegen the Netherlands Tel.: +31 (0)243668291 Web: https://sites.google.com/site/haitengjiang/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Fri May 31 15:49:03 2013 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Fri, 31 May 2013 15:49:03 +0200 (CEST) Subject: [FieldTrip] error when using ctf2grad In-Reply-To: <51A7A9A1.6020401@gmail.com> Message-ID: <2006439449.1303047.1370008143778.JavaMail.root@sculptor.zimbra.ru.nl> Hi Ye, Are you using a recent fieldtrip version? The ctf2grad function has recently updated improving its robustness. I don't have any clue why G3AR but it basically means that your CTF system has a specific gradiometer balancing. By the way, which CTF system are you using: CTF64, CTF151, CTF275? In any case, I could have a look if you file a bug and send to me the *.res4 file and we'll figure out what's happening (but please try with a recent Fieldtrip version and tell me) Regarding your gradiometer question, I asked Robert and this is the answer we can provide (please correct me if I'm wrong here), the CTF system sensors consist in first-order axial gradiometer that measure the magnetic field gradient change in the radial direction (orthogonal to the scalp). The following is taken from the CTF documentation "MEG File Formats - release 5.2.1" appendix C. --- Higher-order gradiometer formation is a noise-cancellation technique exclusive to the CTF MEG System. It permits the MEG detectors to be sensitive to the weak signals of the brain, yet impervious to the much stronger sources from the environment. This process, which is carried out in real time, allows the system to be run without the expense of magnetic shielding, or in combination with a standard shielded room for enhanced noise reduction. In order to calculate the forward solution, the same procedure must be performed on any field data calculated from a simulated dipole. The procedure consists of calculating the field at each coil in the sensor as well as each coil in a set of reference channels. The field values at the reference channels are then multiplied by the appropriate weight and subtracted from the MEG sensor channels. --- The data set on disk contains in the header the parameters that are used to convert the data between the original (raw) representation and the higher-order gradiometer representation. This conversion can be done in real-time during acquisition, but can also be done (and undone) afterwards using CTF DataEditor, or using ft_denoise_synthetic.m function. The grad structure included in the FieldTrip representation (i.e. hdr.grad or data.grad) should be consistent with the data, hence it contains grad.balance.current grad.balance.G1BR grad.balance.G2BR grad.balance.G3BR and potentially other "balancing" schemes (your "G3AR " for instance). The grad.balance.current describes which balancing was applied to the data and to the specification of the sensor array (grad.tra) for the forward computation. In order to provide a more intuitive description, I've made a wiki FAQ to explain How does the CTF higher-order gradiometer work: http://fieldtrip.fcdonders.nl/faq/how_does_the_ctf_higher-order_gradiometer_work All the best, Diego ----- Original Message ----- > From: "Ye Mei" > To: fieldtrip at science.ru.nl > Sent: Thursday, 30 May, 2013 9:33:53 PM > Subject: [FieldTrip] error when using ctf2grad > Hi All, > > I have some problem using ctf2grad. > > The program will set grad.balance.current = 'G3AR';, > and then do getfield(grad.balance, grad.balance.current) > but > grad.balance = G1BR: [1x1 struct] > G2BR: [1x1 struct] > G3BR: [1x1 struct] > > and has no G3AR in it. So an error will pop up. > > Can anyone help me with that? > > Also, What do G1BR, G2BR, G3BR, G3AR stand for? > > > thanks, > Ye > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Trigon, room 0.83 Kapittelweg 29 Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands E-Mail: d.lozanosoldevilla at fcdonders.ru.nl Tel: +31-(0)24-36-66274 Web: http://www.neuosc.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lkystra at hotmail.it Fri May 31 17:15:01 2013 From: lkystra at hotmail.it (lucia abbatantuoni) Date: Fri, 31 May 2013 17:15:01 +0200 Subject: [FieldTrip] distorsion of .edf file In-Reply-To: <4C650B52-1AFF-4CAE-9F28-D320B9E00C75@donders.ru.nl> References: , , , , <4C650B52-1AFF-4CAE-9F28-D320B9E00C75@donders.ru.nl> Message-ID: Hi Jan-Mathijs, the specifies that you asked to me, are: fieldtrip version: 20130401 operating system: windows 7 matlab version : I use R2011a (64bits) or R2007b (32bits) I want to read a portion of my EEG signal of 3600 sec * 500 Hz. When I used a previous version of fieldtrip (2011-12-14), the lenght of the window wasn't 3600*500 but less. " Warning: Integer operands are required for colon operator when used as index > In read_edf at 348 " With fieldtrip 20130401 the length of the window is right, but, when I plot the signal, I can see its distorsion. Thank you for your attention, Lucia From: jan.schoffelen at donders.ru.nl Date: Thu, 30 May 2013 18:31:22 +0200 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] distorsion of .edf file Hi Lucia, Perhaps you need to be a bit more specific. In particular with respect to the fieldtrip version, matlab version, operating system, and warning message.Otherwise all of us are shooting in the dark.Best wishes,Jan-Mathijs On May 30, 2013, at 5:33 PM, lucia abbatantuoni wrote:I try and... it's not a good solution. Date: Thu, 30 May 2013 15:43:59 +0200 From: zriouil.imane at gmail.com To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] distorsion of .edf file I have the same problem. if you want to read your data. it's possible to use ft_read_data(filename') 2013/5/30 lucia abbatantuoni Dear all, I'm analyzing EEG files in format .edf with matlab. Many files after the use of read_edf, have a distorsion. Matlab indicate a warning for the 348 row of read_edf . Can someone give to me a help? Best regards, Lucia _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Zriouil Imane _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip_______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics,Nijmegen, The Netherlands J.Schoffelen at donders.ru.nlTelephone: +31-24-3614793 http://www.hettaligebrein.nl _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From ebrahimi_nia at yahoo.com Fri May 31 17:56:55 2013 From: ebrahimi_nia at yahoo.com (Fatemeh Ebrahimi nia) Date: Fri, 31 May 2013 08:56:55 -0700 (PDT) Subject: [FieldTrip] loreta2fieldtrip function error In-Reply-To: <51A78CC1.6030906@berkeley.edu> References: <1369934092.15336.YahooMailNeo@web122405.mail.ne1.yahoo.com> <51A78CC1.6030906@berkeley.edu> Message-ID: <1370015815.5183.YahooMailNeo@web122402.mail.ne1.yahoo.com> Dear respondent, Thank you for your advices. I have used the function that you have updated. It works out. Can you give me information about the output structure (What do the matrixes refer to?) or advise a reference to study about that please?  Best, Fatemeh ________________________________ From: Ingrid Nieuwenhuis To: fieldtrip at science.ru.nl Sent: Thursday, May 30, 2013 10:30 AM Subject: Re: [FieldTrip] loreta2fieldtrip function error Hi Fatemeh, I had the same error recently when I did the same. I filed the bug, see http://bugzilla.fcdonders.nl/show_bug.cgi?id=2144 I did create a work around. In the LORETA program, you can export the source data as a text file. You can read that text file in with loreta2fieldtrip.m. It's a bit of a patch, but it worked for me. Hope this helps, Ingrid On 5/30/2013 10:14 AM, Fatemeh Ebrahimi nia wrote: Hi dear all, > > >I am analyzing EEG data. I have computed sLORETA (.slor) from ERP data. Now I want to read and convert LORETA source reconstruction into a >MATLAB data structure using "loreta2fieldtrip" function, But I have gotten the bellow error. > > >**** Error using fread > >Invalid precision. >Error in loreta2fieldtrip (line 85) >activity = fread(fid, [voxnumber Ntime], 'float = >single'); *** > > >Can someone give me a help? > > > >Best regards, >Fatemeh > > > > >_______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From robince at gmail.com Fri May 31 18:14:15 2013 From: robince at gmail.com (Robin) Date: Fri, 31 May 2013 17:14:15 +0100 Subject: [FieldTrip] some of the requested samples occur twice Message-ID: I have a problem in preprocessing where I am getting this error: """ some of the requested samples occur twice in the data Error in ft_artifact_zvalue (line 262) dat{trlop} = ft_fetch_data(data, 'header', hdr, 'begsample', trl(trlop,1)-fltpadding, 'endsample', trl(trlop,2)+fltpadding, 'chanindx', sgnind, 'checkboundary', strcmp(cfg.continuous,'no Error in ft_artifact_muscle (line 158) [tmpcfg, artifact] = ft_artifact_zvalue(tmpcfg, data); """ I think this is because I am manually adding some extra padding to the trials so that the artifact filtering can use that padding (I am doing the artifact filtering on data in memory which is output from ft_denoise_pca). So in this case it is not a problem if consecutive trials overlap a bit. I would therefore like to disable this error and wondered what is the best way to do it. I am a bit confused because ft_artifact_zvalue calls ft_fetch data with a "checkboundary" option which looks like it might be what I want (and set correctly), but ft_fetch_data doesn't seem to use that option. Instead it has an allowoverlap option. So for now I will manually add the allowoverlap option to the call in ft_artifact_zvalue, but I wondered what checkboundary doesn't appear in ft_fetch_data or if this might be a bug. Cheers Robin From eelke.spaak at donders.ru.nl Wed May 1 09:40:01 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 1 May 2013 09:40:01 +0200 Subject: [FieldTrip] beggining Help In-Reply-To: References: Message-ID: Dear Gabriel, Since you indicate that you are "completely new to fieldtrip and almost new to EEG analysis", I would recommend you get started by going through some of our tutorials: http://fieldtrip.fcdonders.nl/tutorial These will help get you acquainted with FieldTrip's work style, as well as teach you some basics of EEG analysis. Understanding of the basics is vital if you want to (sensibly) do connectivity analysis later on. There are also some tutorials on connectivity, which you will find on the same page. As for getting your data into FieldTrip, all FT data is encapsulated in a Matlab structure. Once your data is in Matlab, you can make a FT structure out of it by creating a structure that resembles the output of ft_preprocessing. Refer to the documentation for ft_datatype_raw for details on this (http://fieldtrip.fcdonders.nl/reference/ft_datatype_raw or "edit ft_datatype_raw" in matlab). Best, and good luck, Eelke On 29 April 2013 23:58, Gabriel Gonzalez Escamilla wrote: > Dear fieldtrip experts, > > > I'm completely new to fieldtrip and almost new to the EEG analysis, I have > resting-state EEG registers for my subjects in txt format, that I can load > into matlab into something like: #timeSamples x #sensors. And I know the > name and order of all sensors > > I want to calculate the imaginary coherence, the PPC, the PLI and WPLI from > my data, but I couldn't find how to do so in the manual. Can anyone help me > with the steps to achieve that goal? > I want to get those indices between all pairs of sensors, and chosen pairs > (sensors manually selected according to my hypothesis), I hope it be > posssible. > > Many thanks in advanced, > Gabriel. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jose.herrero66 at gmail.com Wed May 1 12:08:19 2013 From: jose.herrero66 at gmail.com (Jose Herrero) Date: Wed, 1 May 2013 06:08:19 -0400 Subject: [FieldTrip] ft_mvaranalysis with unequal length trials Message-ID: Hi, using ft_mvaranalysis with unequal length trials, i encountering the following error (see below). This error does not occur after commenting out line 241 where the data gets preprocessed. Is this ok? mdata = ft_mvaranalysis(cfg, trials) the input is raw data with 25 channels and 237 trials removing 234 trials in which no data was selected the call to "ft_redefinetrial" took 0 seconds preprocessing preprocessing trial 3 from 3 the call to "ft_preprocessing" took 0 seconds ??? Index exceeds matrix dimensions. Error in ==> ft_mvaranalysis at 293 maxtim = max(maxtim, data.time{k}(end)); -- Jose L Herrero, PhD Department of Psychiatry Columbia University College of Physicians and Surgeons Cognitive Neuroscience and Schizophrenia Program Nathan S. Kline Institute for Psychiatric Research -------------- next part -------------- An HTML attachment was scrubbed... URL: From robince at gmail.com Wed May 1 18:41:37 2013 From: robince at gmail.com (Robin) Date: Wed, 1 May 2013 17:41:37 +0100 Subject: [FieldTrip] MNE tutorial Message-ID: I am trying to run through the MNE tutorial here: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate Unfortunately after the volumetric processing in freesurfer my intermediate result looks wrong. I have followed the steps (including interactive alignment to Talairach) according to the tutorial. I wondered if anyone has any idea what could be wrong, or could point to some more possible diagnostic commands to run? The original Subject01.mgz file seems to have been saved correctly. But if I load the orig.mgz created with: mri_convert -c -oc 0 0 0 Subject01masked.mgz orig.mgz and plot it with ft_sourceplot it has the same offset and upside down position as the final incorrectly segments freesurfer image. Could this indicate a problem? Thanks for any help, Cheers Robin -------------- next part -------------- A non-text attachment was scrubbed... Name: freesurfer.png Type: image/png Size: 7963 bytes Desc: not available URL: From joerg.neuberg at tu-ilmenau.de Wed May 1 20:42:25 2013 From: joerg.neuberg at tu-ilmenau.de (=?utf-8?Q?J=C3=B6rg_Neuberg?=) Date: Wed, 1 May 2013 20:42:25 +0200 Subject: [FieldTrip] Error: requested samples occur twice in the data Message-ID: <27F2D05FEDC14EF9839BD48C5B218D24@JoergPC> Hi FieldTrippers, we are students using fieldtrip for a project at our university. Now, we have some trouble. We want to search for muscle artifacts and we receive an error message. We started our signal processing with “ft_definetrial” to define the trials and “ft_preprocessing” to become our data. Then we cut out the stimulus artifact and interpolated the gaps. The data is saved as mat-file. Now, we are looking for muscle artifacts with the following code: ---------- begin code -------- % channel selection, cutoff and padding cfg.artfctdef.zvalue.channel = 'MEG*'; cfg.artfctdef.zvalue.cutoff = 0.5; cfg.artfctdef.zvalue.trlpadding = 0; cfg.artfctdef.zvalue.fltpadding = 0; cfg.artfctdef.zvalue.artpadding = 0.1; cfg.artfctdef.muscle.bpfilter = 'yes'; cfg.artfctdef.muscle.bpfreq = [110 140]; cfg.artfctdef.muscle.bpfiltord = 2; cfg.artfctdef.muscle.bpfilttype = 'but'; cfg.artfctdef.muscle.hilbert = 'yes'; cfg.artfctdef.muscle.boxcar = 0.2; % make the process interactive cfg.artfctdef.zvalue.interactive = 'yes'; [cfg, artifact_muscle] = ft_artifact_zvalue(cfg, data); ---------- end code -------- Unfortunately there is an error and we haven’t an idea where is the problem. Maybe the overlap of the trials is a reason for this. But we can’t change this for our data because we need this trial length. Example: trial 1 from 100 to 120, trial 2 from 115 to 135. ---------- begin error -------- searching for artifacts in 306 channel searching trials.Error using ft_fetch_data (line 123) some of the requested samples occur twice in the data Error in ft_artifact_zvalue (line 260) dat{trlop} = ft_fetch_data(data, 'header', hdr, 'begsample', trl(trlop,1)-fltpadding, 'endsample', trl(trlop,2)+fltpadding, 'chanindx', sgnind, 'checkboundary', strcmp(cfg.continuous,'no Error in muscle_artifacts (line 53) [cfg, artifact_muscle] = ft_artifact_zvalue(cfg, data);” ---------- end error -------- Do you have any idea to help us? We would be grateful for any help. Greetings, Joerg -------------- next part -------------- An HTML attachment was scrubbed... URL: From robince at gmail.com Thu May 2 14:04:03 2013 From: robince at gmail.com (Robin) Date: Thu, 2 May 2013 13:04:03 +0100 Subject: [FieldTrip] MNE tutorial In-Reply-To: References: Message-ID: Running the full Freesurfer reconstruction pipeline (without the hybrid skull stripping and Talaraich alignment on the fieldtrip side) appears to have been successful. However, when I try to continue with the tutorial I find that my volume and source grid don't line up (even before any issues converting to sensor space): Figure: http://imgur.com/uo9uPUc (code below) Does anyone have any idea what could be wrong? What coordinate system is the sub-oct-6-src.fif file in (created by MNE suite)? If it is in talairach coordinates, how do I load the Talairach aligned image from the Freesurfer pipeline? (is it orig.mgz? I also tried nu.mgz) Do I need to manually include the transform from transform/talairach.xfm? To include that can I use it directly as mri.transform in fieldtrip or do I need to multiply it by the existing mri.transform which is there when loading the raw anatomy scan (.img)? Come to think of it what does that transform represent? Sorry if these are not fieldtrip questions but I am trying to follow the fieldtrip MNE tutorial so I was hoping someone might know. Thanks Robin % load freesurfer image mri_fs_tal = ft_read_mri(fullfile(fs_dir, sub.code, 'mri', 'orig.mgz')); mri_fs_tal = ft_convert_units(mri_fs_tal, 'cm'); % load MNE grid% computed with mne_setup_source_space --ico -6 bnd = ft_read_headshape(fullfile(fs_dir, sub.code, 'bem', [sub.code '-oct-6-src.fif']), 'format', 'mne_source'); sourcespace = ft_convert_units(bnd, 'cm'); % Volume conduction model cfg = [];cfg.coordsys = 'spm';cfg.output = {'brain'}; seg = ft_volumesegment(cfg, mri_fs_tal); cfg = [];cfg.method = 'singleshell'; vol = ft_prepare_headmodel(cfg, seg); % Check volume conduction figure; hold on ft_plot_vol(vol, 'facecolor', 'none'); alpha 0.5; ft_plot_mesh(sourcespace, 'edgecolor', 'none'); camlight On Wed, May 1, 2013 at 5:41 PM, Robin robince at gmail.com wrote: I am trying to run through the MNE tutorial here: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate Unfortunately after the volumetric processing in freesurfer my intermediate result looks wrong. I have followed the steps (including interactive alignment to Talairach) according to the tutorial. I wondered if anyone has any idea what could be wrong, or could point to some more possible diagnostic commands to run? The original Subject01.mgz file seems to have been saved correctly. But if I load the orig.mgz created with: mri_convert -c -oc 0 0 0 Subject01masked.mgz orig.mgz and plot it with ft_sourceplot it has the same offset and upside down position as the final incorrectly segments freesurfer image. Could this indicate a problem? Thanks for any help, Cheers Robin -------------- next part -------------- An HTML attachment was scrubbed... URL: From brungio at gmail.com Thu May 2 14:26:10 2013 From: brungio at gmail.com (Bruno L. Giordano) Date: Thu, 2 May 2013 08:26:10 -0400 Subject: [FieldTrip] MNE tutorial In-Reply-To: References: Message-ID: Hi Robin, I had a similar problem during the field trip course. In my case I found out that one set of coordinates was in mm and then other in m, so I just had to multiply one set of coordinates. Another thing you should be aware of is that you can segment your anatomical using procedures other than the default ones. For example, Spm12 has new, better procedures. Importing an already prepared segmentation in ft requires some hacking, but if you are interested I can tell you how as soon as I get a decent internet connection. Finally, remember that the single shell model is not that great. You should prepare a better volume conduction model. Bruno On May 2, 2013 8:05 AM, "Robin" wrote: > Running the full Freesurfer reconstruction pipeline (without the hybrid > skull stripping and Talaraich alignment on the fieldtrip side) appears to > have been successful. > > However, when I try to continue with the tutorial I find that my volume > and source grid don't line up (even before any issues converting to sensor > space): > > Figure: http://imgur.com/uo9uPUc (code below) > > Does anyone have any idea what could be wrong? > > What coordinate system is the sub-oct-6-src.fif file in (created by MNE > suite)? > If it is in talairach coordinates, how do I load the Talairach aligned > image from the Freesurfer pipeline? (is it orig.mgz? I also tried nu.mgz) > > Do I need to manually include the transform from transform/talairach.xfm? > To include that can I use it directly as mri.transform in fieldtrip or do I > need to multiply it by the existing mri.transform which is there when > loading the raw anatomy scan (.img)? Come to think of it what does that > transform represent? > > Sorry if these are not fieldtrip questions but I am trying to follow the > fieldtrip MNE tutorial so I was hoping someone might know. > > Thanks > > Robin > > % load freesurfer image > mri_fs_tal = ft_read_mri(fullfile(fs_dir, sub.code, 'mri', 'orig.mgz')); > mri_fs_tal = ft_convert_units(mri_fs_tal, 'cm'); > % load MNE grid% computed with mne_setup_source_space --ico -6 > bnd = ft_read_headshape(fullfile(fs_dir, sub.code, 'bem', [sub.code '-oct-6-src.fif']), 'format', 'mne_source'); > sourcespace = ft_convert_units(bnd, 'cm'); > % Volume conduction model > cfg = [];cfg.coordsys = 'spm';cfg.output = {'brain'}; > seg = ft_volumesegment(cfg, mri_fs_tal); > cfg = [];cfg.method = 'singleshell'; > vol = ft_prepare_headmodel(cfg, seg); > % Check volume conduction > figure; hold on > ft_plot_vol(vol, 'facecolor', 'none'); alpha 0.5; > ft_plot_mesh(sourcespace, 'edgecolor', 'none'); camlight > > On Wed, May 1, 2013 at 5:41 PM, Robin robince at gmail.com wrote: > > I am trying to run through the MNE tutorial here: > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate > > Unfortunately after the volumetric processing in freesurfer my > intermediate result looks wrong. > > I have followed the steps (including interactive alignment to > Talairach) according to the tutorial. I wondered if anyone has any > idea what could be wrong, or could point to some more possible > diagnostic commands to run? > > The original Subject01.mgz file seems to have been saved correctly. > But if I load the orig.mgz created with: > mri_convert -c -oc 0 0 0 Subject01masked.mgz orig.mgz > and plot it with ft_sourceplot it has the same offset and upside down > position as the final incorrectly segments freesurfer image. Could > this indicate a problem? > > Thanks for any help, > > Cheers > > Robin > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brungio at gmail.com Thu May 2 14:28:16 2013 From: brungio at gmail.com (Bruno L. Giordano) Date: Thu, 2 May 2013 08:28:16 -0400 Subject: [FieldTrip] MNE tutorial In-Reply-To: References: Message-ID: Ah, I just saw that your problem might be with the origin of the anatomical space. Have you tried to see what happens if you set its origin to the anterior commissure before giving it in input to field trip? On May 2, 2013 8:05 AM, "Robin" wrote: > Running the full Freesurfer reconstruction pipeline (without the hybrid > skull stripping and Talaraich alignment on the fieldtrip side) appears to > have been successful. > > However, when I try to continue with the tutorial I find that my volume > and source grid don't line up (even before any issues converting to sensor > space): > > Figure: http://imgur.com/uo9uPUc (code below) > > Does anyone have any idea what could be wrong? > > What coordinate system is the sub-oct-6-src.fif file in (created by MNE > suite)? > If it is in talairach coordinates, how do I load the Talairach aligned > image from the Freesurfer pipeline? (is it orig.mgz? I also tried nu.mgz) > > Do I need to manually include the transform from transform/talairach.xfm? > To include that can I use it directly as mri.transform in fieldtrip or do I > need to multiply it by the existing mri.transform which is there when > loading the raw anatomy scan (.img)? Come to think of it what does that > transform represent? > > Sorry if these are not fieldtrip questions but I am trying to follow the > fieldtrip MNE tutorial so I was hoping someone might know. > > Thanks > > Robin > > % load freesurfer image > mri_fs_tal = ft_read_mri(fullfile(fs_dir, sub.code, 'mri', 'orig.mgz')); > mri_fs_tal = ft_convert_units(mri_fs_tal, 'cm'); > % load MNE grid% computed with mne_setup_source_space --ico -6 > bnd = ft_read_headshape(fullfile(fs_dir, sub.code, 'bem', [sub.code '-oct-6-src.fif']), 'format', 'mne_source'); > sourcespace = ft_convert_units(bnd, 'cm'); > % Volume conduction model > cfg = [];cfg.coordsys = 'spm';cfg.output = {'brain'}; > seg = ft_volumesegment(cfg, mri_fs_tal); > cfg = [];cfg.method = 'singleshell'; > vol = ft_prepare_headmodel(cfg, seg); > % Check volume conduction > figure; hold on > ft_plot_vol(vol, 'facecolor', 'none'); alpha 0.5; > ft_plot_mesh(sourcespace, 'edgecolor', 'none'); camlight > > On Wed, May 1, 2013 at 5:41 PM, Robin robince at gmail.com wrote: > > I am trying to run through the MNE tutorial here: > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate > > Unfortunately after the volumetric processing in freesurfer my > intermediate result looks wrong. > > I have followed the steps (including interactive alignment to > Talairach) according to the tutorial. I wondered if anyone has any > idea what could be wrong, or could point to some more possible > diagnostic commands to run? > > The original Subject01.mgz file seems to have been saved correctly. > But if I load the orig.mgz created with: > mri_convert -c -oc 0 0 0 Subject01masked.mgz orig.mgz > and plot it with ft_sourceplot it has the same offset and upside down > position as the final incorrectly segments freesurfer image. Could > this indicate a problem? > > Thanks for any help, > > Cheers > > Robin > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brungio at gmail.com Thu May 2 14:42:08 2013 From: brungio at gmail.com (Bruno L. Giordano) Date: Thu, 2 May 2013 08:42:08 -0400 Subject: [FieldTrip] MNE tutorial In-Reply-To: References: Message-ID: Sorry, my replies were not meant for the list. On May 2, 2013 8:28 AM, "Bruno L. Giordano" wrote: > Ah, I just saw that your problem might be with the origin of the > anatomical space. Have you tried to see what happens if you set its origin > to the anterior commissure before giving it in input to field trip? > On May 2, 2013 8:05 AM, "Robin" wrote: > >> Running the full Freesurfer reconstruction pipeline (without the hybrid >> skull stripping and Talaraich alignment on the fieldtrip side) appears to >> have been successful. >> >> However, when I try to continue with the tutorial I find that my volume >> and source grid don't line up (even before any issues converting to sensor >> space): >> >> Figure: http://imgur.com/uo9uPUc (code below) >> >> Does anyone have any idea what could be wrong? >> >> What coordinate system is the sub-oct-6-src.fif file in (created by MNE >> suite)? >> If it is in talairach coordinates, how do I load the Talairach aligned >> image from the Freesurfer pipeline? (is it orig.mgz? I also tried nu.mgz) >> >> Do I need to manually include the transform from transform/talairach.xfm? >> To include that can I use it directly as mri.transform in fieldtrip or do I >> need to multiply it by the existing mri.transform which is there when >> loading the raw anatomy scan (.img)? Come to think of it what does that >> transform represent? >> >> Sorry if these are not fieldtrip questions but I am trying to follow the >> fieldtrip MNE tutorial so I was hoping someone might know. >> >> Thanks >> >> Robin >> >> % load freesurfer image >> mri_fs_tal = ft_read_mri(fullfile(fs_dir, sub.code, 'mri', 'orig.mgz')); >> mri_fs_tal = ft_convert_units(mri_fs_tal, 'cm'); >> % load MNE grid% computed with mne_setup_source_space --ico -6 >> bnd = ft_read_headshape(fullfile(fs_dir, sub.code, 'bem', [sub.code '-oct-6-src.fif']), 'format', 'mne_source'); >> sourcespace = ft_convert_units(bnd, 'cm'); >> % Volume conduction model >> cfg = [];cfg.coordsys = 'spm';cfg.output = {'brain'}; >> seg = ft_volumesegment(cfg, mri_fs_tal); >> cfg = [];cfg.method = 'singleshell'; >> vol = ft_prepare_headmodel(cfg, seg); >> % Check volume conduction >> figure; hold on >> ft_plot_vol(vol, 'facecolor', 'none'); alpha 0.5; >> ft_plot_mesh(sourcespace, 'edgecolor', 'none'); camlight >> >> On Wed, May 1, 2013 at 5:41 PM, Robin robince at gmail.com wrote: >> >> I am trying to run through the MNE tutorial here: >> >> http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate >> >> Unfortunately after the volumetric processing in freesurfer my >> intermediate result looks wrong. >> >> I have followed the steps (including interactive alignment to >> Talairach) according to the tutorial. I wondered if anyone has any >> idea what could be wrong, or could point to some more possible >> diagnostic commands to run? >> >> The original Subject01.mgz file seems to have been saved correctly. >> But if I load the orig.mgz created with: >> mri_convert -c -oc 0 0 0 Subject01masked.mgz orig.mgz >> and plot it with ft_sourceplot it has the same offset and upside down >> position as the final incorrectly segments freesurfer image. Could >> this indicate a problem? >> >> Thanks for any help, >> >> Cheers >> >> Robin >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From robince at gmail.com Thu May 2 15:46:22 2013 From: robince at gmail.com (Robin) Date: Thu, 2 May 2013 14:46:22 +0100 Subject: [FieldTrip] MNE tutorial In-Reply-To: References: Message-ID: By running from MNE suite: mne_setup_mri --subject BON02 --mri T1 to create a COR.fif image from the Freesurfer output (including Talaraich transformation) at least that COR.fir and the oct-6-src.fif mesh seem to line up. But now I am not sure which coordinate system they are in? (cordsys is 'neuromag' in fieldtrip) nor how to obtain the necessary inverse transform from this space to the raw anatomy voxel space (so I can build the transform from oct-6-src mesh to sensor space; I already have the transform to take the original raw anatomy .img to the sensor coordinate system). Thanks, Robin On Thu, May 2, 2013 at 1:04 PM, Robin wrote: > Running the full Freesurfer reconstruction pipeline (without the hybrid > skull stripping and Talaraich alignment on the fieldtrip side) appears to > have been successful. > > However, when I try to continue with the tutorial I find that my volume > and source grid don't line up (even before any issues converting to sensor > space): > > Figure: http://imgur.com/uo9uPUc (code below) > > Does anyone have any idea what could be wrong? > > What coordinate system is the sub-oct-6-src.fif file in (created by MNE > suite)? > If it is in talairach coordinates, how do I load the Talairach aligned > image from the Freesurfer pipeline? (is it orig.mgz? I also tried nu.mgz) > > Do I need to manually include the transform from transform/talairach.xfm? > To include that can I use it directly as mri.transform in fieldtrip or do I > need to multiply it by the existing mri.transform which is there when > loading the raw anatomy scan (.img)? Come to think of it what does that > transform represent? > > Sorry if these are not fieldtrip questions but I am trying to follow the > fieldtrip MNE tutorial so I was hoping someone might know. > > Thanks > > Robin > > % load freesurfer image > mri_fs_tal = ft_read_mri(fullfile(fs_dir, sub.code, 'mri', 'orig.mgz')); > mri_fs_tal = ft_convert_units(mri_fs_tal, 'cm'); > % load MNE grid% computed with mne_setup_source_space --ico -6 > bnd = ft_read_headshape(fullfile(fs_dir, sub.code, 'bem', [sub.code '-oct-6-src.fif']), 'format', 'mne_source'); > sourcespace = ft_convert_units(bnd, 'cm'); > % Volume conduction model > cfg = [];cfg.coordsys = 'spm';cfg.output = {'brain'}; > seg = ft_volumesegment(cfg, mri_fs_tal); > cfg = [];cfg.method = 'singleshell'; > vol = ft_prepare_headmodel(cfg, seg); > % Check volume conduction > figure; hold on > ft_plot_vol(vol, 'facecolor', 'none'); alpha 0.5; > ft_plot_mesh(sourcespace, 'edgecolor', 'none'); camlight > > On Wed, May 1, 2013 at 5:41 PM, Robin robince at gmail.com wrote: > > I am trying to run through the MNE tutorial here: > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate > > Unfortunately after the volumetric processing in freesurfer my > intermediate result looks wrong. > > I have followed the steps (including interactive alignment to > Talairach) according to the tutorial. I wondered if anyone has any > idea what could be wrong, or could point to some more possible > diagnostic commands to run? > > The original Subject01.mgz file seems to have been saved correctly. > But if I load the orig.mgz created with: > mri_convert -c -oc 0 0 0 Subject01masked.mgz orig.mgz > and plot it with ft_sourceplot it has the same offset and upside down > position as the final incorrectly segments freesurfer image. Could > this indicate a problem? > > Thanks for any help, > > Cheers > > Robin > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu May 2 15:57:00 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 2 May 2013 15:57:00 +0200 Subject: [FieldTrip] Only 1 and Inf as output of ft_connectivityanalysis In-Reply-To: References: Message-ID: <9A3D199E-0816-4CBC-AE43-65F768C84EA6@donders.ru.nl> Hi Lucia, Could you remove cfg.removemean = 'yes' and try again? Best, Jan-Mathijs On Apr 29, 2013, at 2:38 AM, Lucia Melloni wrote: > Hi! > I am trying to calculate coherence using ft_connectivityanalysis, but > I am getting only ones and infinity as output in cohspctrm with all of > my data sets. > > I first run ft_freqanalysis with > cfg.method = 'mtmfft'; > cfg.taper = 'dpss'; > cfg.output = 'fourier'; > cfg.foilim = [1 45]; > cfg.tapsmofrq = 1; > cfg.keeptrials = 'yes'; > cfg.keeptapers = 'yes'; > freq = ft_freqanalysis(cfg, data); > > Whether I do or I do not specify cfg.channel and cfg.channelcmb here > does not seem to make a difference for my problem later on. The > spectra look absolutely fine. > > I then run ft_connectivityanalysis with > cfg.method = 'coh'; > cfg.removemean= 'yes'; > cfg.trials = 'all'; > cfg.feedback = 'yes'; > cfg.complex = 'abs'; > coh = ft_connectivityanalysis(cfg, freq); > > The cohspctrm looks like this: > val(:,:,1,1) = > > 1 Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf > Inf Inf Inf (etc.) > > I get the following warning during ft_connectivityanalysis > > Warning: Divide by zero. >> In ft_connectivity_corr at 103 > In ft_connectivityanalysis at 524 > Warning: Divide by zero. >> In ft_connectivity_corr at 104 > In ft_connectivityanalysis at 524 > > The same happens if I try to calculate PLV through ft_connectivityanalysis. > This is with Fieldtrip version 20130422 and 20130427, Matlab R2009a, > Windows 7 (64bit). > > Any advice? > Thanks! > Lucia > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From lmelloni at gmail.com Thu May 2 18:56:19 2013 From: lmelloni at gmail.com (Lucia Melloni) Date: Thu, 2 May 2013 12:56:19 -0400 Subject: [FieldTrip] Only 1 and Inf as output of ft_connectivityanalysis In-Reply-To: <9A3D199E-0816-4CBC-AE43-65F768C84EA6@donders.ru.nl> References: <9A3D199E-0816-4CBC-AE43-65F768C84EA6@donders.ru.nl> Message-ID: <-7204743264059944684@unknownmsgid> Hi jan-mathijs Unfortunately I get the same result whether or not I remove the mean. Best, -- Lucía On May 2, 2013, at 9:57 AM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: Hi Lucia, Could you remove cfg.removemean = 'yes' and try again? Best, Jan-Mathijs On Apr 29, 2013, at 2:38 AM, Lucia Melloni wrote: Hi! I am trying to calculate coherence using ft_connectivityanalysis, but I am getting only ones and infinity as output in cohspctrm with all of my data sets. I first run ft_freqanalysis with cfg.method = 'mtmfft'; cfg.taper = 'dpss'; cfg.output = 'fourier'; cfg.foilim = [1 45]; cfg.tapsmofrq = 1; cfg.keeptrials = 'yes'; cfg.keeptapers = 'yes'; freq = ft_freqanalysis(cfg, data); Whether I do or I do not specify cfg.channel and cfg.channelcmb here does not seem to make a difference for my problem later on. The spectra look absolutely fine. I then run ft_connectivityanalysis with cfg.method = 'coh'; cfg.removemean= 'yes'; cfg.trials = 'all'; cfg.feedback = 'yes'; cfg.complex = 'abs'; coh = ft_connectivityanalysis(cfg, freq); The cohspctrm looks like this: val(:,:,1,1) = 1 Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf (etc.) I get the following warning during ft_connectivityanalysis Warning: Divide by zero. In ft_connectivity_corr at 103 In ft_connectivityanalysis at 524 Warning: Divide by zero. In ft_connectivity_corr at 104 In ft_connectivityanalysis at 524 The same happens if I try to calculate PLV through ft_connectivityanalysis. This is with Fieldtrip version 20130422 and 20130427, Matlab R2009a, Windows 7 (64bit). Any advice? Thanks! Lucia _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu May 2 21:12:22 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 2 May 2013 21:12:22 +0200 Subject: [FieldTrip] Only 1 and Inf as output of ft_connectivityanalysis In-Reply-To: <-7204743264059944684@unknownmsgid> References: <9A3D199E-0816-4CBC-AE43-65F768C84EA6@donders.ru.nl> <-7204743264059944684@unknownmsgid> Message-ID: <4B415E50-71DE-42C8-893D-54F991DC616A@donders.ru.nl> Hi Lucia, The warnings indicate that you are dividing by zero. Are you sure that your cfg is correct? Please try cfg = []; cfg.method = 'coh'; coh = ft_connectivityanalysis(cfg, freq); This should work. Best, Jan-Mathijs On May 2, 2013, at 6:56 PM, Lucia Melloni wrote: > Hi jan-mathijs > > Unfortunately I get the same result whether or not I remove the mean. > Best, > -- Lucía > > On May 2, 2013, at 9:57 AM, jan-mathijs schoffelen wrote: > >> Hi Lucia, >> >> Could you remove cfg.removemean = 'yes' and try again? >> >> Best, >> >> Jan-Mathijs >> >> On Apr 29, 2013, at 2:38 AM, Lucia Melloni wrote: >> >>> Hi! >>> I am trying to calculate coherence using ft_connectivityanalysis, but >>> I am getting only ones and infinity as output in cohspctrm with all of >>> my data sets. >>> >>> I first run ft_freqanalysis with >>> cfg.method = 'mtmfft'; >>> cfg.taper = 'dpss'; >>> cfg.output = 'fourier'; >>> cfg.foilim = [1 45]; >>> cfg.tapsmofrq = 1; >>> cfg.keeptrials = 'yes'; >>> cfg.keeptapers = 'yes'; >>> freq = ft_freqanalysis(cfg, data); >>> >>> Whether I do or I do not specify cfg.channel and cfg.channelcmb here >>> does not seem to make a difference for my problem later on. The >>> spectra look absolutely fine. >>> >>> I then run ft_connectivityanalysis with >>> cfg.method = 'coh'; >>> cfg.removemean= 'yes'; >>> cfg.trials = 'all'; >>> cfg.feedback = 'yes'; >>> cfg.complex = 'abs'; >>> coh = ft_connectivityanalysis(cfg, freq); >>> >>> The cohspctrm looks like this: >>> val(:,:,1,1) = >>> >>> 1 Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf >>> Inf Inf Inf (etc.) >>> >>> I get the following warning during ft_connectivityanalysis >>> >>> Warning: Divide by zero. >>>> In ft_connectivity_corr at 103 >>> In ft_connectivityanalysis at 524 >>> Warning: Divide by zero. >>>> In ft_connectivity_corr at 104 >>> In ft_connectivityanalysis at 524 >>> >>> The same happens if I try to calculate PLV through ft_connectivityanalysis. >>> This is with Fieldtrip version 20130422 and 20130427, Matlab R2009a, >>> Windows 7 (64bit). >>> >>> Any advice? >>> Thanks! >>> Lucia >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> _______________________________________________ >> 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 Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From evaladez at psych.udel.edu Thu May 2 23:07:51 2013 From: evaladez at psych.udel.edu (Emilio Valadez) Date: Thu, 2 May 2013 17:07:51 -0400 Subject: [FieldTrip] Phase-amplitude coupling (PAC) Message-ID: <10DBEA48DAE8BB4F8F588B1254C0D92E01B8763E014C@razor.psych.udel.edu> Dear FieldTrippers, I am trying to compute phase-amplitude coupling (PAC) between the phase of theta activity at one channel and the amplitude of gamma activity at another channel over a specific time window within trials. I have read that PAC is captured with a phase-locking value (PLV), which leads me to think that this might be computed with ft_connectivityanalysis. If this is true, what would the configuration structure and input data need to look like? Or, is there an alternative way to compute PAC using FieldTrip? Thank you in advance! All the best, Emilio -------------- next part -------------- An HTML attachment was scrubbed... URL: From lmelloni at gmail.com Fri May 3 00:56:30 2013 From: lmelloni at gmail.com (Lucia Melloni) Date: Thu, 2 May 2013 18:56:30 -0400 Subject: [FieldTrip] Only 1 and Inf as output of ft_connectivityanalysis In-Reply-To: <4B415E50-71DE-42C8-893D-54F991DC616A@donders.ru.nl> References: <9A3D199E-0816-4CBC-AE43-65F768C84EA6@donders.ru.nl> <-7204743264059944684@unknownmsgid> <4B415E50-71DE-42C8-893D-54F991DC616A@donders.ru.nl> Message-ID: Hi Jan-Mathijs, still the same result with the code that you suggested. selection fourierspctrm along dimension 2 averaging crsspctrm over rpt removing dimension rpt from crsspctrm Warning: PROGRESS is only a compatibility wrapper, which will soon be removed. Please instead call FT_PROGRESS. > In progress at 16 In ft_connectivity_corr at 87 In ft_connectivityanalysis at 524 Warning: PROGRESS is only a compatibility wrapper, which will soon be removed. Please instead call FT_PROGRESS. > In progress at 16 In ft_connectivity_corr at 89 In ft_connectivityanalysis at 524 Warning: PROGRESS is only a compatibility wrapper, which will soon be removed. Please instead call FT_PROGRESS. > In progress at 16 In ft_connectivity_corr at 106 In ft_connectivityanalysis at 524 the call to "ft_connectivityanalysis" took 0 seconds Lucia -- Lucia. On Thu, May 2, 2013 at 3:12 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Lucia, > > The warnings indicate that you are dividing by zero. Are you sure that > your cfg is correct? > > Please try > > cfg = []; > cfg.method = 'coh'; > coh = ft_connectivityanalysis(cfg, freq); > > This should work. > > Best, > Jan-Mathijs > > On May 2, 2013, at 6:56 PM, Lucia Melloni wrote: > > Hi jan-mathijs > > Unfortunately I get the same result whether or not I remove the mean. > Best, > -- Lucía > > On May 2, 2013, at 9:57 AM, jan-mathijs schoffelen < > jan.schoffelen at donders.ru.nl> wrote: > > Hi Lucia, > > Could you remove cfg.removemean = 'yes' and try again? > > Best, > > Jan-Mathijs > > On Apr 29, 2013, at 2:38 AM, Lucia Melloni wrote: > > Hi! > I am trying to calculate coherence using ft_connectivityanalysis, but > I am getting only ones and infinity as output in cohspctrm with all of > my data sets. > > I first run ft_freqanalysis with > cfg.method = 'mtmfft'; > cfg.taper = 'dpss'; > cfg.output = 'fourier'; > cfg.foilim = [1 45]; > cfg.tapsmofrq = 1; > cfg.keeptrials = 'yes'; > cfg.keeptapers = 'yes'; > freq = ft_freqanalysis(cfg, data); > > Whether I do or I do not specify cfg.channel and cfg.channelcmb here > does not seem to make a difference for my problem later on. The > spectra look absolutely fine. > > I then run ft_connectivityanalysis with > cfg.method = 'coh'; > cfg.removemean= 'yes'; > cfg.trials = 'all'; > cfg.feedback = 'yes'; > cfg.complex = 'abs'; > coh = ft_connectivityanalysis(cfg, freq); > > The cohspctrm looks like this: > val(:,:,1,1) = > > 1 Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf > Inf Inf Inf (etc.) > > I get the following warning during ft_connectivityanalysis > > Warning: Divide by zero. > > In ft_connectivity_corr at 103 > > In ft_connectivityanalysis at 524 > Warning: Divide by zero. > > In ft_connectivity_corr at 104 > > In ft_connectivityanalysis at 524 > > The same happens if I try to calculate PLV through ft_connectivityanalysis. > This is with Fieldtrip version 20130422 and 20130427, Matlab R2009a, > Windows 7 (64bit). > > Any advice? > Thanks! > Lucia > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > _______________________________________________ > 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 > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri May 3 08:32:30 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 03 May 2013 08:32:30 +0200 Subject: [FieldTrip] Only 1 and Inf as output of ft_connectivityanalysis In-Reply-To: References: <9A3D199E-0816-4CBC-AE43-65F768C84EA6@donders.ru.nl> <-7204743264059944684@unknownmsgid> <4B415E50-71DE-42C8-893D-54F991DC616A@donders.ru.nl> Message-ID: <518359FE.4070207@donders.ru.nl> Dear Lucia, could you try whether the error persists with a recent version? If it does, could you go test whether this code gives the same error: / % ************* code starts here / /%dummy data cfg = []; cfg.ntrials = 500; cfg.triallength = 1; cfg.fsample = 200; cfg.nsignal = 3; cfg.method = 'ar'; cfg.params(:,:,1) = [ 0.8 0 0; 0 0.9 0.5; 0.4 0 0.5]; cfg.params(:,:,2) = [-0.5 0 0; 0 -0.8 0; 0 0 -0.2]; cfg.noisecov = [0.3 0 0; 0 1 0; 0 0 0.2]; data = ft_connectivitysimulation(cfg); % freqanalysis cfgf = []; cfgf.method = 'mtmfft'; cfgf.output = 'fourier'; cfgf.tapsmofrq = 2; freq = ft_freqanalysis(cfgf, data); % connectivityanalysis cfgc = []; cfgc.method = 'coh'; c1 = ft_connectivityanalysis(cfgc, freq); c1.cohspctrm// % ************* code ends here / The code snippet above is part of our test suite for making sure that everything works fine. If it does work for you, but does not with your own data instead of simulated data, the error must be somewhere in your data, e.g. powspctrm consists of nans or 0s etc. Anyway, I assume that it will all work fine if you use an updated version of FieldTrip. Best, Jörn On 5/3/2013 12:56 AM, Lucia Melloni wrote: > Hi Jan-Mathijs, > still the same result with the code that you suggested. > > selection fourierspctrm along dimension 2 > averaging crsspctrm over rpt > removing dimension rpt from crsspctrm > Warning: PROGRESS is only a compatibility wrapper, which will soon be > removed. Please instead call FT_PROGRESS. > > In progress at 16 > In ft_connectivity_corr at 87 > In ft_connectivityanalysis at 524 > Warning: PROGRESS is only a compatibility wrapper, which will soon be > removed. Please instead call FT_PROGRESS. > > In progress at 16 > In ft_connectivity_corr at 89 > In ft_connectivityanalysis at 524 > Warning: PROGRESS is only a compatibility wrapper, which will soon be > removed. Please instead call FT_PROGRESS. > > In progress at 16 > In ft_connectivity_corr at 106 > In ft_connectivityanalysis at 524 > the call to "ft_connectivityanalysis" took 0 seconds > > > Lucia > > -- > Lucia. > > > On Thu, May 2, 2013 at 3:12 PM, jan-mathijs schoffelen > > > wrote: > > Hi Lucia, > > The warnings indicate that you are dividing by zero. Are you sure > that your cfg is correct? > > Please try > > cfg = []; > cfg.method = 'coh'; > coh = ft_connectivityanalysis(cfg, freq); > > This should work. > > Best, > Jan-Mathijs > > On May 2, 2013, at 6:56 PM, Lucia Melloni wrote: > >> Hi jan-mathijs >> >> Unfortunately I get the same result whether or not I remove the >> mean. >> Best, >> -- Lucía >> >> On May 2, 2013, at 9:57 AM, jan-mathijs schoffelen >> > > wrote: >> >>> Hi Lucia, >>> >>> Could you remove cfg.removemean = 'yes' and try again? >>> >>> Best, >>> >>> Jan-Mathijs >>> >>> On Apr 29, 2013, at 2:38 AM, Lucia Melloni wrote: >>> >>>> Hi! >>>> I am trying to calculate coherence using >>>> ft_connectivityanalysis, but >>>> I am getting only ones and infinity as output in cohspctrm with >>>> all of >>>> my data sets. >>>> >>>> I first run ft_freqanalysis with >>>> cfg.method = 'mtmfft'; >>>> cfg.taper = 'dpss'; >>>> cfg.output = 'fourier'; >>>> cfg.foilim = [1 45]; >>>> cfg.tapsmofrq = 1; >>>> cfg.keeptrials = 'yes'; >>>> cfg.keeptapers = 'yes'; >>>> freq = ft_freqanalysis(cfg, data); >>>> >>>> Whether I do or I do not specify cfg.channel and cfg.channelcmb >>>> here >>>> does not seem to make a difference for my problem later on. The >>>> spectra look absolutely fine. >>>> >>>> I then run ft_connectivityanalysis with >>>> cfg.method = 'coh'; >>>> cfg.removemean= 'yes'; >>>> cfg.trials = 'all'; >>>> cfg.feedback = 'yes'; >>>> cfg.complex = 'abs'; >>>> coh = ft_connectivityanalysis(cfg, freq); >>>> >>>> The cohspctrm looks like this: >>>> val(:,:,1,1) = >>>> >>>> 1 Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf >>>> Inf Inf Inf (etc.) >>>> >>>> I get the following warning during ft_connectivityanalysis >>>> >>>> Warning: Divide by zero. >>>>> In ft_connectivity_corr at 103 >>>> In ft_connectivityanalysis at 524 >>>> Warning: Divide by zero. >>>>> In ft_connectivity_corr at 104 >>>> In ft_connectivityanalysis at 524 >>>> >>>> The same happens if I try to calculate PLV through >>>> ft_connectivityanalysis. >>>> This is with Fieldtrip version 20130422 and 20130427, Matlab >>>> R2009a, >>>> Windows 7 (64bit). >>>> >>>> Any advice? >>>> Thanks! >>>> Lucia >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> _______________________________________________ >>> 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 > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > _______________________________________________ > 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 -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From gregor.volberg at psychologie.uni-regensburg.de Fri May 3 09:35:40 2013 From: gregor.volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Fri, 03 May 2013 09:35:40 +0200 Subject: [FieldTrip] Phase-amplitude coupling (PAC) In-Reply-To: <10DBEA48DAE8BB4F8F588B1254C0D92E01B8763E014C@razor.psych.udel.edu> References: <10DBEA48DAE8BB4F8F588B1254C0D92E01B8763E014C@razor.psych.udel.edu> Message-ID: <518368CC.9030102@psychologie.uni-regensburg.de> Dear Emilio, I might not be fully up to date with the functionality of ft_connectivityanalysis, but as much as I know there is some preprocessing necessary to get a phase-to-amplitude coupling. A common strategy is to compute a Hilbert transform on the upper frequency band. This can be used to get the 'analytic amplitude', which is essentially a waveform that connects the amplitude peaks of the higher frequency. If the gamma amplitude is driven by the theta phase, then the analytic waveform should be phase-locked with the theta cycle. The latter part of the analysis could be performed with the option 'plv' in ft_connectivityanalysis. For the processing steps you might want to have a look at an example script at http://fieldtrip.fcdonders.nl/example/crossfreq/phalow_amphigh. Best regards, Gregor Am 02.05.2013 23:07, schrieb Emilio Valadez: > Dear FieldTrippers, > > I am trying to compute phase-amplitude coupling (PAC) between the phase > of theta activity at one channel and the amplitude of gamma activity at > another channel over a specific time window within trials. I have read > that PAC is captured with a phase-locking value (PLV), which leads me to > think that this might be computed with ft_connectivityanalysis. If this > is true, what would the configuration structure and input data need to > look like? Or, is there an alternative way to compute PAC using > FieldTrip? Thank you in advance! > > All the best, > > Emilio > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Dr. rer. nat. Gregor Volberg Institut für Psychologie Universität Regensburg Universitätsstraße 31 D-93053 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 From lmelloni at gmail.com Fri May 3 14:48:01 2013 From: lmelloni at gmail.com (Lucia Melloni) Date: Fri, 3 May 2013 08:48:01 -0400 Subject: [FieldTrip] Only 1 and Inf as output of ft_connectivityanalysis In-Reply-To: <518359FE.4070207@donders.ru.nl> References: <9A3D199E-0816-4CBC-AE43-65F768C84EA6@donders.ru.nl> <-7204743264059944684@unknownmsgid> <4B415E50-71DE-42C8-893D-54F991DC616A@donders.ru.nl> <518359FE.4070207@donders.ru.nl> Message-ID: Hi Jörn, I downloaded version 20130502 and ran both my code and the test code that you had emailed. I get 1 and inf with both. The freq input seems to be ok, so ist must be an issue with ft_connectivityanalysis. Lucia -- Lucia. On Fri, May 3, 2013 at 2:32 AM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Lucia, > > could you try whether the error persists with a recent version? If it > does, could you go test whether this code gives the same error: > > * > % ************* code starts here * > *%dummy data > cfg = []; > cfg.ntrials = 500; > cfg.triallength = 1; > cfg.fsample = 200; > cfg.nsignal = 3; > cfg.method = 'ar'; > cfg.params(:,:,1) = [ 0.8 0 0; > 0 0.9 0.5; > 0.4 0 0.5]; > cfg.params(:,:,2) = [-0.5 0 0; > 0 -0.8 0; > 0 0 -0.2]; > cfg.noisecov = [0.3 0 0; > 0 1 0; > 0 0 0.2]; > > data = ft_connectivitysimulation(cfg); > > > % freqanalysis > cfgf = []; > cfgf.method = 'mtmfft'; > cfgf.output = 'fourier'; > cfgf.tapsmofrq = 2; > freq = ft_freqanalysis(cfgf, data); > > % connectivityanalysis > cfgc = []; > cfgc.method = 'coh'; > c1 = ft_connectivityanalysis(cfgc, freq); > > c1.cohspctrm** > % ************* code ends here > * > The code snippet above is part of our test suite for making sure that > everything works fine. If it does work for you, but does not with your own > data instead of simulated data, the error must be somewhere in your data, > e.g. powspctrm consists of nans or 0s etc. Anyway, I assume that it will > all work fine if you use an updated version of FieldTrip. > > Best, > Jörn > > > > On 5/3/2013 12:56 AM, Lucia Melloni wrote: > > Hi Jan-Mathijs, > still the same result with the code that you suggested. > > selection fourierspctrm along dimension 2 > averaging crsspctrm over rpt > removing dimension rpt from crsspctrm > Warning: PROGRESS is only a compatibility wrapper, which will soon be > removed. Please instead call FT_PROGRESS. > > In progress at 16 > In ft_connectivity_corr at 87 > In ft_connectivityanalysis at 524 > Warning: PROGRESS is only a compatibility wrapper, which will soon be > removed. Please instead call FT_PROGRESS. > > In progress at 16 > In ft_connectivity_corr at 89 > In ft_connectivityanalysis at 524 > Warning: PROGRESS is only a compatibility wrapper, which will soon be > removed. Please instead call FT_PROGRESS. > > In progress at 16 > In ft_connectivity_corr at 106 > In ft_connectivityanalysis at 524 > the call to "ft_connectivityanalysis" took 0 seconds > > > Lucia > > -- > Lucia. > > > On Thu, May 2, 2013 at 3:12 PM, jan-mathijs schoffelen < > jan.schoffelen at donders.ru.nl> wrote: > >> Hi Lucia, >> >> The warnings indicate that you are dividing by zero. Are you sure that >> your cfg is correct? >> >> Please try >> >> cfg = []; >> cfg.method = 'coh'; >> coh = ft_connectivityanalysis(cfg, freq); >> >> This should work. >> >> Best, >> Jan-Mathijs >> >> On May 2, 2013, at 6:56 PM, Lucia Melloni wrote: >> >> Hi jan-mathijs >> >> Unfortunately I get the same result whether or not I remove the mean. >> Best, >> -- Lucía >> >> On May 2, 2013, at 9:57 AM, jan-mathijs schoffelen < >> jan.schoffelen at donders.ru.nl> wrote: >> >> Hi Lucia, >> >> Could you remove cfg.removemean = 'yes' and try again? >> >> Best, >> >> Jan-Mathijs >> >> On Apr 29, 2013, at 2:38 AM, Lucia Melloni wrote: >> >> Hi! >> I am trying to calculate coherence using ft_connectivityanalysis, but >> I am getting only ones and infinity as output in cohspctrm with all of >> my data sets. >> >> I first run ft_freqanalysis with >> cfg.method = 'mtmfft'; >> cfg.taper = 'dpss'; >> cfg.output = 'fourier'; >> cfg.foilim = [1 45]; >> cfg.tapsmofrq = 1; >> cfg.keeptrials = 'yes'; >> cfg.keeptapers = 'yes'; >> freq = ft_freqanalysis(cfg, data); >> >> Whether I do or I do not specify cfg.channel and cfg.channelcmb here >> does not seem to make a difference for my problem later on. The >> spectra look absolutely fine. >> >> I then run ft_connectivityanalysis with >> cfg.method = 'coh'; >> cfg.removemean= 'yes'; >> cfg.trials = 'all'; >> cfg.feedback = 'yes'; >> cfg.complex = 'abs'; >> coh = ft_connectivityanalysis(cfg, freq); >> >> The cohspctrm looks like this: >> val(:,:,1,1) = >> >> 1 Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf >> Inf Inf Inf (etc.) >> >> I get the following warning during ft_connectivityanalysis >> >> Warning: Divide by zero. >> >> In ft_connectivity_corr at 103 >> >> In ft_connectivityanalysis at 524 >> Warning: Divide by zero. >> >> In ft_connectivity_corr at 104 >> >> In ft_connectivityanalysis at 524 >> >> The same happens if I try to calculate PLV through >> ft_connectivityanalysis. >> This is with Fieldtrip version 20130422 and 20130427, Matlab R2009a, >> Windows 7 (64bit). >> >> Any advice? >> Thanks! >> Lucia >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> _______________________________________________ >> 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 >> >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vale.niccolai at gmail.com Fri May 3 15:09:58 2013 From: vale.niccolai at gmail.com (Valentina Niccolai) Date: Fri, 3 May 2013 15:09:58 +0200 Subject: [FieldTrip] neuromag122_neighb Message-ID: Hallo! I would like to use the template neuromag122_neighb.mat to repair channels, but it seems to me that this template contains labels form the neuromag306 system. Is it right? And can I find the template somewhere? Best, Valentina -------------- next part -------------- An HTML attachment was scrubbed... URL: From Markus.Butz at uni-duesseldorf.de Fri May 3 16:06:24 2013 From: Markus.Butz at uni-duesseldorf.de (Markus Butz) Date: Fri, 03 May 2013 15:06:24 +0100 Subject: [FieldTrip] Problems reading in DICOM Message-ID: <75e09cb13160d.5183d270@uni-duesseldorf.de> Thanks for your replies and help Robert, Jörn, and Eelke! Finally it worked out, but the problem was rather on my side, as there where several series of different MRTs scans in one folder of which some did not work, some worked out strange as they had just some files (16-26), and some worked fine. Unfortunately I tried most intensively on the subject who came with no correct series at all. :-( To be fair, all the files appeared exactlty the same, but ft_read_mri is luckily mentioning which series it works on and how many files it include, which finally made me wonder. ;-) Thanks again and have a good weekend Markus ps: Sorry for the belated thanks! Am 13.03.13, schrieb Robert Oostenveld : > > > > > > > > > > > > Hi > > > DICOM files come with different extensions. I guess it depends on the scanner (Siemens/Philips/...). But the file format should be the same as it is a standard format, so the extension should not matter. The fileio/ft_filetype.m function detects both dcm and ima files as dicom. > > > > if the files have no extension, the autodetection fails and you should explicitly specify the format as > mri = ft_read_mri('single_file_of_DICOM_series', 'format', 'dicom'); > I now realize that to be a hidden option. I'll get that fixed in the function documentation. > > > > > > > I recommend that you specify a filename from somewhere in the middle of the stack of files. There are often a few localizer scans in the same directory, and these (due to the sorting of the file names) tend to end up at the beginning or end of the (alphabetical) directory listing. > > > cheers > Robert > > > > > > > > > > > On 13 Mar 2013, at 14:22, Jörn M. Horschig wrote: > > > > > > > > > Hi Markus, > > > > I kept on avoiding these errors by using MRIcron's dcm2nii functionality: http://www.mccauslandcenter.sc.edu/mricro/mricron/index.html > > But pay attention to the coordinate system when importing it into FieldTrip afterwards, it can be quite a hassle... > > > > Maybe Robert or JM know whether reading in .dcm files is possible, but I have to admit that I never tried ;) > > > > Best, > > Jörn > > > > On 3/13/2013 12:11 PM, Markus Butz wrote: > > > > > > > > > > > > > > > > Dear list, > > > > > > > > > I am experiencing problems reading in external MRI in DICOM format from a CD (doing it the first time though). > > > I wanted to do it the new and easy way as described here: > > > http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_an_anatomical_mri_from_dicom_into_ctf_format?s[]=dicom > > > > > > > > > % read the DICOM files > > > mri = ft_read_mri('single_file_of_DICOM_series.IMA'); > > > > > > > > > However, I have no single slices with extension *.ima but one dataset with the extension *.dcm and the other dataset with no extension for the single slice files. I am also not sure where to copy the DICOMDIR file. > > > > > > > > > When I try to open a single file of the *.dcm series I get: > > > > > > > > > mri = ft_read_mri('508652C3.dcm'); > > > > > > > > > ??? Undefined function or variable "hdr". > > > > > > > > > Error in ==> ft_read_mri at 216 > > > hdr = hdr(keep); > > > > > > > > > Trying to read in a single file of the no extension series I get: > > > > > > > > > mri = ft_read_mri('73850486'); > > > > > > > > > ??? Error using ==> dicominfo at 41 > > > The specified file is not in DICOM format > > > > > > > > > The Image Processing toolbox V 7.2 is installed and this is fieldtrip-20111101. > > > > > > > > > Any help appreciated! > > > > > > > > > Markus > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > > -- > > Jörn M. Horschig > > PhD Student > > Donders Institute for Brain, Cognition and Behaviour > > Centre for Cognitive Neuroimaging > > Radboud University Nijmegen > > Neuronal Oscillations Group > > FieldTrip Development Team > > > > P.O. Box 9101 > > NL-6500 HB Nijmegen > > The Netherlands > > > > Contact: > > E-Mail: jm.horschig at donders.ru.nl > > Tel: +31-(0)24-36-68493 > > Web: http://www.ru.nl/donders > > > > Visiting address: > > Trigon, room 2.30 > > Kapittelweg 29 > > NL-6525 EN Nijmegen > > The Netherlands > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jimparkinson at me.com Fri May 3 22:57:26 2013 From: jimparkinson at me.com (Jim Parkinson) Date: Fri, 03 May 2013 21:57:26 +0100 Subject: [FieldTrip] 2x2x3 Repeated Measures ANOVA in FT Message-ID: Hi All Sorry for the very simplistic question here but I am finding it difficult to construct an answer - if indeed there is one - from previous posts. I have a study which is a 2x2x3 repeated measures design, event-related using 64 channel EEG. The design is a culmination of a number of previous studies, so in that sense is justified, and eyeballing the data suggests that the effects are pulling in the directions we have hypothesised. I would really like to attempt to pull interaction effects, main effects and then specified (a priori and justified) contrasts from my EEG data. So, is it even possible using cluster permutation methods to report 3-way, 2-way and main effect stats from such a design, and if so, what is the best/most justifiable method? Secondly, considering the amount of *possible*n simple contrasts available in a 2x2x3 design - even if I don;t run them all because it is not meaningful to do so - what is the best method to correct for multiple comparisons in the simpel contrasts I do end up running? Thans for any help in this confusing matter! best, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: From chadwick.boulay at gmail.com Mon May 6 07:36:18 2013 From: chadwick.boulay at gmail.com (Chadwick Boulay) Date: Mon, 06 May 2013 14:36:18 +0900 Subject: [FieldTrip] Please help me get component dipole fitting results using custom anatomy into normalized template for EEGLAB clustering. Message-ID: <51874152.9090903@gmail.com> Dear Fieldtrip users, Using the subject's MRI and recorded EEG electrode locations, I've managed to segment the MRI, create the volume conduction model, align the electrodes, create a sourcemodel using a grid warped from the MNI template, create the leadfield, and perform ft_dipolefitting on IC weights (imported from EEGLAB). The geometry, electrode positions, and mri all line up (coordsys='ctf', unit='cm') and the calculated dipole positions are what I would expect. [Aside: All of my topoplots have the electrodes positioned correctly relative to each other but the nose and ears are 90 degrees from where I would expect them. Do the topoplot functions not know how to deal with ctf coordsys?] How can I normalize these dipole locations into the template brain so that I may perform component clustering in EEGLAB? I have some ideas but I don't know how to implement them. 1) Calculate the transformation matrix to normalize the original MRI to the template MRI, then apply that transformation to the dipole positions and momentums. I'm guessing I need to use mri_norm = ft_volumenormalize(cfg, mri); but then I don't know how to use mri_norm.transform and mri_norm.initial. Further, the output of ft_dipolefitting doesn't seem to be suitable for ft_transform_geometry. 2) Since the sourcemodel grid is warped from the template brain, I can find the sourcemodel grid index closest to the dipole location then set the new dipole location to be the location of the template grid at the same index. I don't know how to do this for the momentum but I probably don't need the momentum for clustering. 3) Start over from the beginning, normalizing the MRI and the electrode locations as soon as possible then performing all subsequent calculations using the normalized geometry. I searched the documentation and the list archives but I could not find an answer. I am surprised because I expected dipole normalisation to be a common requirement. Maybe I am missing something simple. Thank you in advance for any help. -Chad -- Chadwick Boulay JSPS Postdoctoral Fellow Keio University Yokohama Japan boulay at brain.bio.keio.ac.jp From mushfa.yousuf at googlemail.com Mon May 6 14:47:44 2013 From: mushfa.yousuf at googlemail.com (Mushfa Yousuf) Date: Mon, 6 May 2013 14:47:44 +0200 Subject: [FieldTrip] Source Reconstruction using Openmeeg method In-Reply-To: References: Message-ID: Hello; Yes you were right. I have defined the wrong sensors i.e 'grad' instead of 'elec' while calculating the Leadfield. Actually I am trying to calculate Combined source reconstruction from both EEG and MEG sensors. Do you have any idea, how to define both elec and grad definition while calculating first forward then inverse solution. Because in a fieldtrip either you can defined elec or grad at one time. Regards; Mushfa Yousuf Neurozentrum, Universitätsklinikum Schleswig-Holstein, Campus Kiel (UKSH), Deutschland On Tue, Apr 30, 2013 at 6:23 PM, Johanna Zumer wrote: > Hi Mushfa, > > My guess is that the channels that have you used to compute .csdspctrm are > not the same as the channels in cfg.elec. If you set cfg.channel = > freqPost.label, does that solve it? > > Cheers, > Johanna > > > 2013/4/30 Mushfa Yousuf > >> Hello Fieldtrippers, >> >> I am doing source reconstruction using EEG channels on a fieldtrip. >> >> I have computed Forward solution i.e head model using 'Openmeeg' and >> lead field successfully. >> >> For the inverse solution using 'dics' method, I wrote the following >> syntax >> >> >> >> >> >> cfg = []; >> cfg.method = 'dics'; >> cfg.frequency = 130; >> cfg.elec = dataFIC12.hdr.elec; >> cfg.grid = grid; >> cfg.vol = vol; >> >> sourcePost = ft_sourceanalysis(cfg, freqPost); >> >> >> and I have received the following error: >> >> >> ??? Error using ==> mtimes >> Inner matrix dimensions must agree. >> >> Error in ==> beamformer_dics at 314 >> filt = pinv(lf' * invCf * lf) * lf' * invCf; % >> Gross eqn. 3, use PINV/SVD to cover rank deficient >> leadfield >> >> Error in ==> ft_sourceanalysis at 595 >> dip(i) = beamformer_dics(grid, sens, vol, [], >> squeeze(Cf(i,:,:)), optarg{:}); >> >> Error in ==> newCode at 214 >> sourcePost = ft_sourceanalysis(cfg, freqPost); >> >> >> >> >> Any help would be appreciated. >> >> >> Regards; >> >> >> Mushfa Yousuf >> >> Neurozentrum, >> Universitätsklinikum Schleswig-Holstein, >> Campus Kiel (UKSH), Deutschland >> >> >> _______________________________________________ >> 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: From chaowang0704 at gmail.com Tue May 7 13:35:20 2013 From: chaowang0704 at gmail.com (Chao Wang) Date: Tue, 7 May 2013 14:35:20 +0300 Subject: [FieldTrip] Some Questions on the resample design Message-ID: I have been using field-trip. Recently, I tried to use it for statistic test by non-parametric method, e.g. bootstrap and permutation. As usual, the two method involve resample original data with or without replacement. I carefully inspected the code in the function *resampledesign* but I was quite confused by the method in the bootstrap section: 254resample = zeros(cfg.numrandomization, Nrepl); -------------- next part -------------- An HTML attachment was scrubbed... URL: From chaowang0704 at gmail.com Tue May 7 14:08:57 2013 From: chaowang0704 at gmail.com (Chao Wang) Date: Tue, 7 May 2013 15:08:57 +0300 Subject: [FieldTrip] Some Questions on the resample design In-Reply-To: References: Message-ID: I'm sorry to make a mistake just now. The previous message sent didn't fullfill my meaning. I carefully inspected the code in the function *resampledesign* but I was quite confused by the codes in the bootstrap section (For paired design, the design matrix should be like this, design(1,:)=[1:N 1:N], design(2,1:N)=1 and design(2,N+1:2*N)=2 and N is for example the subject number; and cfg.uvar=2): 91 Nvar = size(design,1); % number of factors or regressors 92 Nrepl = size(design,2); % number of replications ... ... 248 units = design(cfg.uvar,:); 249 for k = 1:length(unique(units)) 250 sel = find(units==k); 251 indx(:,k) = sel; 252 Nrep(k) = length(sel); 253 end 254 resample = zeros(cfg.numrandomization, Nrepl); ... ... 274 tmp = zeros(cfg.numrandomization*10, Nrepl/Nrep(1)); 275 for i=1:cfg.numrandomization*10 276 tmp(i,:) = *sort*(randsample(1:Nrepl/Nrep(1), Nrepl/Nrep(1))); 277 end 278 tmp = unique(tmp, 'rows'); 279 fprintf('found %d unique rows in bootstrap matrix of %d bootstraps', size(tmp,1), cfg.numrandomization*10); ... ... 292 for i=1:cfg.numrandomization 293 for k=1:size(indx,1) 294 resample(i,indx(k,:)) = indx(k,tmp(i,:)); 295 end 296 end My question was on the code in 276 line. These code was to generate a number of rand numbers (about cfg.numrandomization lines) in the range of 1 to Nrepl/Nrep(1), in which Nrepl is the number of replications in the design and Nrep is the number of repetition (Nrep(:)=2 for paired design). If the function '*sort*' is used, then every row of matrix tmp is the same, which will be 1,2,..., Nrepl/Nrep(1). And this will lead the 278 line to the result: temp=1:Nrepl/Nrep(1) (because of the function unique). This result is by no means what we want, I think. What we do want is several rows numbers with same range but with distinct orders. Only in this way, can we guarantee that each resample is not the same. On Tue, May 7, 2013 at 2:35 PM, Chao Wang wrote: > I > have been using field-trip. Recently, I tried to use it for statistic test > by non-parametric method, e.g. bootstrap and permutation. As usual, the two > method involve resample original data with or without replacement. I > carefully inspected the code in the function *resampledesign* but I was > quite confused by the method in the bootstrap section: > > 254resample = zeros(cfg.numrandomization, Nrepl); > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zriouil.imane at gmail.com Tue May 7 14:48:24 2013 From: zriouil.imane at gmail.com (z.imane) Date: Tue, 7 May 2013 14:48:24 +0200 Subject: [FieldTrip] convert .plx to .nex ? Message-ID: Hi i have a problem to read data with extension .plx and i want to convert this to .nex. it's possible or no? please respond me -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Tue May 7 14:53:40 2013 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Tue, 7 May 2013 14:53:40 +0200 Subject: [FieldTrip] Some Questions on the resample design In-Reply-To: References: Message-ID: Dear Chao, I'm not familiar with this piece of code, but I had a quick look. Line 276, with the 'sort' command, is testing for the number of unique 'rows' (line 278). It then uses this information to modify the value of cfg.numrandomization (line 283 which you have not displayed), which is reduced if not enough unique information to do the requested number of randomizations. Then (I think) the actual randomization should be occuring in subsequent lines of code (292-296). Note also that this part of code is only reached if max(design(cfg.uvar,:)) < 20. Does that help? Maybe someone else with more experience in this section of code can comment as well? Or if you still find that it indeed is not randomizing, you can file a bug here (http://bugzilla.fcdonders.nl/), ideally with a small test script. Cheers, Johanna 2013/5/7 Chao Wang > I'm sorry to make a mistake just now. The previous message sent didn't > fullfill my meaning. > > I carefully inspected the code in the function *resampledesign* but I was > quite confused by the codes in the bootstrap section (For paired design, > the design matrix should be like this, design(1,:)=[1:N 1:N], design(2,1:N)=1 > and design(2,N+1:2*N)=2 and N is for example the subject number; and > cfg.uvar=2): > 91 Nvar = size(design,1); % number of factors or regressors > 92 Nrepl = size(design,2); % number of replications > ... > ... > 248 units = design(cfg.uvar,:); > 249 for k = 1:length(unique(units)) > 250 sel = find(units==k); > 251 indx(:,k) = sel; > 252 Nrep(k) = length(sel); > 253 end > 254 resample = zeros(cfg.numrandomization, Nrepl); > ... > ... > 274 tmp = zeros(cfg.numrandomization*10, Nrepl/Nrep(1)); > 275 for i=1:cfg.numrandomization*10 > 276 tmp(i,:) = *sort*(randsample(1:Nrepl/Nrep(1), Nrepl/Nrep(1))); > 277 end > > 278 tmp = unique(tmp, 'rows'); > 279 fprintf('found %d unique rows in bootstrap matrix of %d bootstraps', > size(tmp,1), cfg.numrandomization*10); > ... > ... > 292 for i=1:cfg.numrandomization > 293 for k=1:size(indx,1) > 294 resample(i,indx(k,:)) = indx(k,tmp(i,:)); > 295 end > 296 end > > My question was on the code in 276 line. These code was to generate a > number of rand numbers (about cfg.numrandomization lines) in the range of 1 > to Nrepl/Nrep(1), in which Nrepl is the number of replications in the > design and Nrep is the number of repetition (Nrep(:)=2 for paired design). > If the function '*sort*' is used, then every row of matrix tmp is the > same, which will be 1,2,..., Nrepl/Nrep(1). And this will lead the 278 line > to the result: temp=1:Nrepl/Nrep(1) (because of the function unique). This > result is by no means what we want, I think. What we do want is several > rows numbers with same range but with distinct orders. Only in this way, > can we guarantee that each resample is not the same. > > > > On Tue, May 7, 2013 at 2:35 PM, Chao Wang wrote: > >> I >> have been using field-trip. Recently, I tried to use it for statistic >> test by non-parametric method, e.g. bootstrap and permutation. As usual, >> the two method involve resample original data with or without replacement. >> I carefully inspected the code in the function *resampledesign* but I >> was quite confused by the method in the bootstrap section: >> >> 254resample = zeros(cfg.numrandomization, Nrepl); >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From antony.passaro at gmail.com Wed May 8 23:17:21 2013 From: antony.passaro at gmail.com (Antony Passaro) Date: Wed, 8 May 2013 17:17:21 -0400 Subject: [FieldTrip] Clustering channel dimension of DTF Connectivity In-Reply-To: References: Message-ID: Hi Fieldtrippers, I am trying to perform a group-level comparison of 2 conditions across 10 subjects based on the DTF connectivity. For the time being, we are looking at the DTF for a subset of frequencies (alpha) and choosing the avgoverfreq option which gives us a 4096 x 1 matrix since we are looking at 64 x 64 channels. Using ft_freqstatistics, I noticed that it will throw an error explaining that there is not yet an implementation for data with channelcmb for a cluster analysis so I took it upon myself to identify channel pairs which should be considered neighbors and build a new neighbor structure prior to running ft_freqstatistics. To do that, I took the basic neighbor structure for 64 channels and then created a new neighbor structure of 4096 channel pairs based on the code below: for i=1:4096 label{i,1} = [dtf.labelcmb{i,1},'_',dtf.labelcmb{i,2}]; end labelcmb = dtf.labelcmb; chans=64; %Identify the channel pairs which are neighbors with the target channel NBtarget = {}; for ch=1:chans^2 NBtarget(ch).label = label{ch}; target = find(cellfun(@(x) strcmp(labelcmb{ch,1},x),{neighbours(:).label}) ==1) ; tempnb = cellfun(@(x) strcat(x,['_' labelcmb{ch,2}]),{neighbours( 1,target).neighblabel},'UniformOutput',0); NBtarget(ch).neighblabel = tempnb{:}; end %Identify the channel pairs which are neighbors with the reference channel NBref = {}; for ch=1:chans^2 NBref(ch).label = label{ch}; target = find(cellfun(@(x) strcmp(labelcmb{ch,2},x),{neighbours(:).label}) ==1) ; tempnb = cellfun(@(x) strcat([labelcmb{ch,1} '_'],x),{neighbours(1,target).neighblabel},'UniformOutput',0); NBref(ch).neighblabel = tempnb{:}; end %Append both sets of neighbors (ref and target) NBboth= {}; for ch=1:chans^2 NBboth(ch).label = label{ch}; NBboth(ch).neighblabel = [NBref(ch).neighblabel; NBtarget(ch).neighblabel]; end This seems to work and the clustering method proceeds without error. My question is the following: is this the proper way to utilize the clustering method using ft_freqstatistics on connectivity data or am I missing something? Thanks, -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From chaowang0704 at gmail.com Thu May 9 10:51:37 2013 From: chaowang0704 at gmail.com (Chao Wang) Date: Thu, 9 May 2013 11:51:37 +0300 Subject: [FieldTrip] Some Questions on the resample design (Johanna Zumer) Message-ID: Dear Johanna, Thank you! I understand your meaning and that's right that this part of code is only reached if max(design(cfg.uvar,:)) < 20, but what I do not understand is that for what reason, the '20' is set to test the max(design(cfg.uvar,:)). And besides, by using 'sort', each row of tmp will be the same, in ascending order, which will lead the 278 line using 'unique' to have tmp only one row. That is size(tmp,1)=1; this will lead to cfg.numrandomization=1 in 284 line. > 274 tmp = zeros(cfg.numrandomization*10, Nrepl/Nrep(1)); > 275 for i=1:cfg.numrandomization*10 > 276 tmp(i,:) = *sort*(randsample(1:Nrepl/Nrep(1), Nrepl/Nrep(1))); > 277 end > > 278 tmp = unique(tmp, 'rows'); Best regards! Chao Message: 4 > Date: Tue, 7 May 2013 14:53:40 +0200 > From: Johanna Zumer > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Some Questions on the resample design > Message-ID: > < > CAL4kA6d-WLuip_tUvBRbQr2JiYQ9vr0rb_FnOe18aK8tqEmadA at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Dear Chao, > > I'm not familiar with this piece of code, but I had a quick look. Line > 276, with the 'sort' command, is testing for the number of unique 'rows' > (line 278). It then uses this information to modify the value of > cfg.numrandomization (line 283 which you have not displayed), which is > reduced if not enough unique information to do the requested number of > randomizations. Then (I think) the actual randomization should be > occuring in subsequent lines of code (292-296). Note also that > > this part > of code is only reached if > > max(design(cfg.uvar,:)) < 20. > > Does that help? Maybe someone else with more experience in this section > of code can comment as well? > > Or if you still find that it indeed is not randomizing, you can file a bug > here (http://bugzilla.fcdonders.nl/), ideally with a small test script. > > Cheers, > > Johanna > > > > > 2013/5/7 Chao Wang > > > I'm sorry to make a mistake just now. The previous message sent didn't > > fullfill my meaning. > > > > I carefully inspected the code in the function *resampledesign* but I was > > quite confused by the codes in the bootstrap section (For paired design, > > the design matrix should be like this, design(1,:)=[1:N 1:N], > design(2,1:N)=1 > > and design(2,N+1:2*N)=2 and N is for example the subject number; and > > cfg.uvar=2): > > 91 Nvar = size(design,1); % number of factors or regressors > > 92 Nrepl = size(design,2); % number of replications > > ... > > ... > > 248 units = design(cfg.uvar,:); > > 249 for k = 1:length(unique(units)) > > 250 sel = find(units==k); > > 251 indx(:,k) = sel; > > 252 Nrep(k) = length(sel); > > 253 end > > 254 resample = zeros(cfg.numrandomization, Nrepl); > > ... > > ... > > 274 tmp = zeros(cfg.numrandomization*10, Nrepl/Nrep(1)); > > 275 for i=1:cfg.numrandomization*10 > > 276 tmp(i,:) = *sort*(randsample(1:Nrepl/Nrep(1), Nrepl/Nrep(1))); > > 277 end > > > > 278 tmp = unique(tmp, 'rows'); > > 279 fprintf('found %d unique rows in bootstrap matrix of %d > bootstraps', > > size(tmp,1), cfg.numrandomization*10); > > ... > > ... > > 292 for i=1:cfg.numrandomization > > 293 for k=1:size(indx,1) > > 294 resample(i,indx(k,:)) = indx(k,tmp(i,:)); > > 295 end > > 296 end > > > > My question was on the code in 276 line. These code was to generate a > > number of rand numbers (about cfg.numrandomization lines) in the range > of 1 > > to Nrepl/Nrep(1), in which Nrepl is the number of replications in the > > design and Nrep is the number of repetition (Nrep(:)=2 for paired > design). > > If the function '*sort*' is used, then every row of matrix tmp is the > > same, which will be 1,2,..., Nrepl/Nrep(1). And this will lead the 278 > line > > to the result: temp=1:Nrepl/Nrep(1) (because of the function unique). > This > > result is by no means what we want, I think. What we do want is several > > rows numbers with same range but with distinct orders. Only in this way, > > can we guarantee that each resample is not the same. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marianapbranco1 at gmail.com Fri May 10 10:08:41 2013 From: marianapbranco1 at gmail.com (Mariana Branco) Date: Fri, 10 May 2013 10:08:41 +0200 Subject: [FieldTrip] Real-time processing References: <9B1A8EA6-CCDE-4CED-83FD-C5D2F21607F5@student.tudelft.nl> Message-ID: <31275A3B-B8D6-4C46-8B30-5EF745AD13BA@gmail.com> Hello, I am new in the BCI research field, and I am starting to implement an online BCI system using the Fieldtrip toolbox to detect ERD/ERS features. I already did two offline experiments using this toolbox, but now I am having some doubts about how to adapt the offline signal processing functions into real-time; I started by simulating real-time data from a file. My questions are: 1) To process the data real-time using ft_preprocessing is it first necessary to define trials (with ft_definetrial)? If so, how can I define the trial if it is real-time? 2) Is it possible to still use the function ft_preprocessing and ft_resampledata in real-time with the same specifications of offline procedure? 3) When simulating data stream (with two matlab sessions) the function ft_realtime_powerestimate(cfg) reports an error related to the "arg 3 (overlap)" on the welch's method. How can I correct this? 4) Also, for synchronous/triggered data analysis it is available the function ft_realtime_average. Is it possible to explain how can this example function be used for implementation of my own feature processing and extraction function. Does it preprocess the data in an alternative way to ft_preprocessing? I am sorry for all the questions. Regards, Mariana Branco From mengtongxiao at gmail.com Fri May 10 11:39:29 2013 From: mengtongxiao at gmail.com (=?GB2312?B?s8LRqQ==?=) Date: Fri, 10 May 2013 17:39:29 +0800 Subject: [FieldTrip] cooradinate Message-ID: Dear all, I got some ROIs from MNE. But in MNE it use brain template that is *MNI152 . * I want use fieldtrip compute the spatial filter for ROIs. For this reason ,I want got the position in sourcemodel from template in fieldtrip. I see the fieldtrip seem to use *MNI305 ,*isn,t it? If fieldtrip use *MNI305 ,* this problem is making me question whether a transformation is really necessary ? The both "MNI" space cooradation * x ,y,z axis *represent right,anterior, superior.(+x=right,+y=anterior,+z=superior)?(MNI cooradation from http://imaging.mrc-cbu.cam.ac.uk/imaging/MniTalairach) I find infieldtrip (http://fieldtrip.fcdonders.nl/tutorial/connectivity) sourcemodel is that *x ,y,z axis *represent anterior, right,superior? If a transformation is really necessary ,how should I do? Then I am puzzed what do *x ,y,z axis *represent in stanard_1020.elc Thanks for your help, best, xiao -------------- next part -------------- An HTML attachment was scrubbed... URL: From mengtongxiao at gmail.com Mon May 13 03:30:06 2013 From: mengtongxiao at gmail.com (=?GB2312?B?s8LRqQ==?=) Date: Mon, 13 May 2013 09:30:06 +0800 Subject: [FieldTrip] grid-template Message-ID: Dear all, I want to konw what is the MNI-template that constructed 3D-grids in the fieldtrip (Template sourcemodels ) ? is it MNI305 ,clin27 ,MNI125 or something else? thanks, xiao -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon May 13 11:13:14 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 13 May 2013 11:13:14 +0200 Subject: [FieldTrip] Source Reconstruction using Openmeeg method In-Reply-To: References: Message-ID: <5190AEAA.3020301@donders.ru.nl> Dear Mushfa, I think you have to compute two leadfield matrices, one for EEG (elec) and one for MEG (grad), and then concatenate these (and make sure that the order of sensors won't get mixed up anywhere, because sourceanalysis just expects the leadfield matrix to be ordered like your data. If that's not the case, you either encounter the previous error you described or (if the number of channels matches, but order is mixed up) it will just return wrong source estimated activity. Best, Jörn On 5/6/2013 2:47 PM, Mushfa Yousuf wrote: > Hello; > > Yes you were right. I have defined the wrong sensors i.e 'grad' > instead of 'elec' while calculating the Leadfield. > > Actually I am trying to calculate Combined source reconstruction from > both EEG and MEG sensors. > > Do you have any idea, how to define both elec and grad definition > while calculating first forward then inverse solution. > > Because in a fieldtrip either you can defined elec or grad at one time. > > > Regards; > > > Mushfa Yousuf > > Neurozentrum, > Universitätsklinikum Schleswig-Holstein, > Campus Kiel (UKSH), Deutschland > > > On Tue, Apr 30, 2013 at 6:23 PM, Johanna Zumer > > wrote: > > Hi Mushfa, > > My guess is that the channels that have you used to compute > .csdspctrm are not the same as the channels in cfg.elec. If you > set cfg.channel = freqPost.label, does that solve it? > > Cheers, > Johanna > > > 2013/4/30 Mushfa Yousuf > > > Hello Fieldtrippers, > > I am doing source reconstruction using EEG channels on a > fieldtrip. > > I have computed Forward solution i.e head model using > 'Openmeeg' and lead field successfully. > > For the inverse solution using 'dics' method, I wrote the > following syntax > > > > > > cfg = []; > cfg.method = 'dics'; > cfg.frequency = 130; > cfg.elec = dataFIC12.hdr.elec; > cfg.grid = grid; > cfg.vol = vol; > > sourcePost = ft_sourceanalysis(cfg, freqPost); > > > and I have received the following error: > > > ??? Error using ==> mtimes > Inner matrix dimensions must agree. > > Error in ==> beamformer_dics at 314 > filt = pinv(lf' * invCf * lf) * lf' * invCf; % > Gross eqn. 3, use PINV/SVD to cover rank deficient > leadfield > > Error in ==> ft_sourceanalysis at 595 > dip(i) = beamformer_dics(grid, sens, vol, [], > squeeze(Cf(i,:,:)), optarg{:}); > > Error in ==> newCode at 214 > sourcePost = ft_sourceanalysis(cfg, freqPost); > > > > > Any help would be appreciated. > > > Regards; > > > Mushfa Yousuf > > Neurozentrum, > Universitätsklinikum Schleswig-Holstein, > Campus Kiel (UKSH), Deutschland > > > _______________________________________________ > 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 -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From naran.kutt at gmail.com Mon May 13 11:48:17 2013 From: naran.kutt at gmail.com (Narayanan Kutty) Date: Mon, 13 May 2013 05:48:17 -0400 Subject: [FieldTrip] Mutual Information Message-ID: Hello All, Are there any functions within fieldtrip to calculate mutual information between channels at the sensor level. I remember that eeglab used to have a plugin for that. Couldn't find anything in fieldtrip. Thank you, Naran. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon May 13 14:14:44 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 13 May 2013 14:14:44 +0200 Subject: [FieldTrip] Clustering channel dimension of DTF Connectivity In-Reply-To: References: Message-ID: <5190D934.5020407@donders.ru.nl> Dear Tony, I had a quick look at your code, and I think it is fine. However, I would define neighbours purely based on the target sensor, not on the reference, e.g. when computing cortico-muscular coherence on channel level, you are interested in spatial clusters near the cortex and not in cluster on the arm where the reference sensor is. Also check out this: data = ft_checkdata(data, 'cmbrepresentation', 'full'); This will turn chancmb (Nx1) into chan X chan (RxS, where R*S = N). Best, Jörn On 5/8/2013 11:17 PM, Antony Passaro wrote: > Hi Fieldtrippers, > I am trying to perform a group-level comparison of 2 conditions across > 10 subjects based on the DTF connectivity. For the time being, we are > looking at the DTF for a subset of frequencies (alpha) and choosing > the avgoverfreq option which gives us a 4096 x 1 matrix since we are > looking at 64 x 64 channels. Using ft_freqstatistics, I noticed that > it will throw an error explaining that there is not yet an > implementation for data with channelcmb for a cluster analysis so I > took it upon myself to identify channel pairs which should be > considered neighbors and build a new neighbor structure prior to > running ft_freqstatistics. To do that, I took the basic neighbor > structure for 64 channels and then created a new neighbor structure of > 4096 channel pairs based on the code below: > for i=1:4096 > label{i,1} = [dtf.labelcmb{i,1},'_',dtf.labelcmb{i,2}]; > end > labelcmb = dtf.labelcmb; > > chans=64; > %Identify the channel pairs which are neighbors with the target channel > NBtarget = {}; > for ch=1:chans^2 > NBtarget(ch).label = label{ch}; > target = find(cellfun(@(x) > strcmp(labelcmb{ch,1},x),{neighbours(:).label}) ==1) ; > tempnb = cellfun(@(x) strcat(x,['_' > labelcmb{ch,2}]),{neighbours(1,target).neighblabel},'UniformOutput',0); > NBtarget(ch).neighblabel = tempnb{:}; > end > > %Identify the channel pairs which are neighbors with the reference channel > NBref = {}; > for ch=1:chans^2 > NBref(ch).label = label{ch}; > target = find(cellfun(@(x) > strcmp(labelcmb{ch,2},x),{neighbours(:).label}) ==1) ; > tempnb = cellfun(@(x) strcat([labelcmb{ch,1} > '_'],x),{neighbours(1,target).neighblabel},'UniformOutput',0); > NBref(ch).neighblabel = tempnb{:}; > end > > > %Append both sets of neighbors (ref and target) > NBboth= {}; > for ch=1:chans^2 > NBboth(ch).label = label{ch}; > NBboth(ch).neighblabel = [NBref(ch).neighblabel; > NBtarget(ch).neighblabel]; > end > This seems to work and the clustering method proceeds without error. > My question is the following: is this the proper way to utilize the > clustering method using ft_freqstatistics on connectivity data or am I > missing something? > Thanks, > -Tony > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanbelluzo at gmail.com Mon May 13 21:13:08 2013 From: sanbelluzo at gmail.com (Santiago Belluzo) Date: Mon, 13 May 2013 16:13:08 -0300 Subject: [FieldTrip] Emotiv + FieldTrip + Matlab In-Reply-To: References: Message-ID: Hi, i´m trying to use emotiv2ft in a windows machine and Matlab return this message "Waiting for the device to become ready - press [Escape] to quit EDK: User added, will now start acquisition. Streaming 16 out of 22 channels Could not connect to buffer server at localhost:1972." In http://fieldtrip.fcdonders.nl/development/realtime/emotiv?s[]=emotiv said that "If port 1972 cannot be accessed on a Windows machine it may help to first initialize the port from matlab, e.g., via ft_realtime_fileproxy". But i´m not sure how to do it.... Someone can help me?. Santiago. 2013/3/4 Santiago Belluzo > *Hi, I'm new to FieldTrip and I'm interested in using it to capture **realtime data from the Emotiv headset using the function emotiv2ft.I`ve tried some examples like signalviewer andpowerviewer with random signal from signalproxy to check that the FieldTripBuffer works fine. Then i`ve tried to use emotiv2ft and have problems. * > > *I'm not sure about how to call to this interface from within **Matlab.* > > *I`ve read some messages from the mailinglist with similar problem but in there is not clear for me how they solve it. * > > *I´ll be waiting for any help!.* > > *Thanks.* > > -- > Santiago > -- Santiago Belluzo -------------- next part -------------- An HTML attachment was scrubbed... URL: From chenxiaogang1986 at 163.com Tue May 14 03:37:29 2013 From: chenxiaogang1986 at 163.com (Xiaogang Chen) Date: Tue, 14 May 2013 09:37:29 +0800 (CST) Subject: [FieldTrip] ft_topoplotCC of vector Message-ID: <5ef5e6c2.25f7.13ea0af63fd.Coremail.chenxiaogang1986@163.com> Hi all, I am trying to plot some results that are not the output from a ft function, using a ft_topoplotCC function. However, I don’t know how to use it. Would you send me some simple examples? Thanks very much. Best, Xiaogang Chen -------------- next part -------------- An HTML attachment was scrubbed... URL: From yoel.sher at mail.huji.ac.il Tue May 14 18:09:37 2013 From: yoel.sher at mail.huji.ac.il (Yoel Sher) Date: Tue, 14 May 2013 19:09:37 +0300 Subject: [FieldTrip] EEG -> Topographic Matrix Message-ID: <519261C1.3020002@mail.huji.ac.il> Dear FieldTrippers, I would like to know if there is an option to extract the Topographic map (Such as the scalp in ft_topoplotER) to a matrix. I've searched around the functions in fieldtrip and couldn't find any.. Many Thanks, Yoel From eelke.spaak at donders.ru.nl Tue May 14 19:25:40 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 14 May 2013 19:25:40 +0200 Subject: [FieldTrip] EEG -> Topographic Matrix In-Reply-To: <519261C1.3020002@mail.huji.ac.il> References: <519261C1.3020002@mail.huji.ac.il> Message-ID: Dear Yoel, I'm not sure if I understand what you mean exactly, but do you simply want the values plotted by ft_topoplotER in case of plotting the results of ft_timelockanalysis? In that case, you can look at the tl.avg field (if tl = ft_timelockanalysis(cfg, data)). But that seems rather trivial, so I think you must mean something else. Best, Eelke On 14 May 2013 18:09, Yoel Sher wrote: > Dear FieldTrippers, > > I would like to know if there is an option to extract the Topographic map > (Such as the scalp in ft_topoplotER) to a matrix. I've searched around the > functions in fieldtrip and couldn't find any.. > > Many Thanks, > Yoel > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From yoel.sher at mail.huji.ac.il Wed May 15 12:08:20 2013 From: yoel.sher at mail.huji.ac.il (Yoel Sher) Date: Wed, 15 May 2013 13:08:20 +0300 Subject: [FieldTrip] EEG -> Topographic Matrix In-Reply-To: References: <519261C1.3020002@mail.huji.ac.il> Message-ID: <51935E94.7090605@mail.huji.ac.il> Dear Eelke, First, thanks for you fast replay. Second, let me clarify my question. I'm looking for other result than the average ERP/ERF. I'm looking for a matrix that output the EEG value per each location (not just the electrodes) on the scalp. Of course that every location other than the electrode is an interpolated value. The plot of ft_topoplotER shows that matrix (but does not output, as far as I know). Regards, Yoel On 05/14/2013 08:25 PM, Eelke Spaak wrote: > Dear Yoel, > > I'm not sure if I understand what you mean exactly, but do you simply > want the values plotted by ft_topoplotER in case of plotting the > results of ft_timelockanalysis? In that case, you can look at the > tl.avg field (if tl = ft_timelockanalysis(cfg, data)). But that seems > rather trivial, so I think you must mean something else. > > Best, > Eelke > > On 14 May 2013 18:09, Yoel Sher wrote: >> Dear FieldTrippers, >> >> I would like to know if there is an option to extract the Topographic map >> (Such as the scalp in ft_topoplotER) to a matrix. I've searched around the >> functions in fieldtrip and couldn't find any.. >> >> Many Thanks, >> Yoel >> _______________________________________________ >> 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 > From eelke.spaak at donders.ru.nl Wed May 15 12:22:21 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 15 May 2013 12:22:21 +0200 Subject: [FieldTrip] EEG -> Topographic Matrix In-Reply-To: <51935E94.7090605@mail.huji.ac.il> References: <519261C1.3020002@mail.huji.ac.il> <51935E94.7090605@mail.huji.ac.il> Message-ID: Dear Yoel, Ah, I understand now; you want the interpolated matrix. This is not possible with standard FieldTrip code. However, it should not be very difficult to get this. I would recommend to set a breakpoint in plotting/ft_plot_topo.m, at line 220. Then, when the code breaks at that point, you can type in the command window assignin('base','Xi',Xi) and the same for Yi and Zi, that way you have the x and y coordinates and the data (z) in variables in your base workspace. Getting this matrix programmatically in a script should also be possible, but that would require custom hacks of ft_plot_topo (e.g. you could put this assignin call in your local copy of the function, or add Xi,Yi,Zi as output arguments, etc.) Good luck, best, Eelke On 15 May 2013 12:08, Yoel Sher wrote: > Dear Eelke, > > First, thanks for you fast replay. Second, let me clarify my question. I'm > looking for other result than the average ERP/ERF. I'm looking for a matrix > that output the EEG value per each location (not just the electrodes) on the > scalp. Of course that every location other than the electrode is an > interpolated value. The plot of ft_topoplotER shows that matrix (but does > not output, as far as I know). > > Regards, > Yoel > > > On 05/14/2013 08:25 PM, Eelke Spaak wrote: >> >> Dear Yoel, >> >> I'm not sure if I understand what you mean exactly, but do you simply >> want the values plotted by ft_topoplotER in case of plotting the >> results of ft_timelockanalysis? In that case, you can look at the >> tl.avg field (if tl = ft_timelockanalysis(cfg, data)). But that seems >> rather trivial, so I think you must mean something else. >> >> Best, >> Eelke >> >> On 14 May 2013 18:09, Yoel Sher wrote: >>> >>> Dear FieldTrippers, >>> >>> I would like to know if there is an option to extract the Topographic map >>> (Such as the scalp in ft_topoplotER) to a matrix. I've searched around >>> the >>> functions in fieldtrip and couldn't find any.. >>> >>> Many Thanks, >>> Yoel >>> _______________________________________________ >>> 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 >> > From yoel.sher at mail.huji.ac.il Wed May 15 12:47:06 2013 From: yoel.sher at mail.huji.ac.il (Yoel Sher) Date: Wed, 15 May 2013 13:47:06 +0300 Subject: [FieldTrip] EEG -> Topographic Matrix In-Reply-To: References: <519261C1.3020002@mail.huji.ac.il> <51935E94.7090605@mail.huji.ac.il> Message-ID: <519367AA.60204@mail.huji.ac.il> Dear Eelke, Many thanks, I'll try it out. Best, - Yoel On 05/15/2013 01:22 PM, Eelke Spaak wrote: > Dear Yoel, > > Ah, I understand now; you want the interpolated matrix. This is not > possible with standard FieldTrip code. > > However, it should not be very difficult to get this. I would > recommend to set a breakpoint in plotting/ft_plot_topo.m, at line 220. > Then, when the code breaks at that point, you can type in the command > window assignin('base','Xi',Xi) and the same for Yi and Zi, that way > you have the x and y coordinates and the data (z) in variables in your > base workspace. > > Getting this matrix programmatically in a script should also be > possible, but that would require custom hacks of ft_plot_topo (e.g. > you could put this assignin call in your local copy of the function, > or add Xi,Yi,Zi as output arguments, etc.) > > Good luck, > best, > > Eelke > > On 15 May 2013 12:08, Yoel Sher wrote: >> Dear Eelke, >> >> First, thanks for you fast replay. Second, let me clarify my question. I'm >> looking for other result than the average ERP/ERF. I'm looking for a matrix >> that output the EEG value per each location (not just the electrodes) on the >> scalp. Of course that every location other than the electrode is an >> interpolated value. The plot of ft_topoplotER shows that matrix (but does >> not output, as far as I know). >> >> Regards, >> Yoel >> >> >> On 05/14/2013 08:25 PM, Eelke Spaak wrote: >>> Dear Yoel, >>> >>> I'm not sure if I understand what you mean exactly, but do you simply >>> want the values plotted by ft_topoplotER in case of plotting the >>> results of ft_timelockanalysis? In that case, you can look at the >>> tl.avg field (if tl = ft_timelockanalysis(cfg, data)). But that seems >>> rather trivial, so I think you must mean something else. >>> >>> Best, >>> Eelke >>> >>> On 14 May 2013 18:09, Yoel Sher wrote: >>>> Dear FieldTrippers, >>>> >>>> I would like to know if there is an option to extract the Topographic map >>>> (Such as the scalp in ft_topoplotER) to a matrix. I've searched around >>>> the >>>> functions in fieldtrip and couldn't find any.. >>>> >>>> Many Thanks, >>>> Yoel >>>> _______________________________________________ >>>> 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 > From ggonesc at upo.es Wed May 15 19:37:11 2013 From: ggonesc at upo.es (Gabriel Gonzalez Escamilla) Date: Wed, 15 May 2013 19:37:11 +0200 Subject: [FieldTrip] PLV and ImC computation Message-ID: <8d77945c28ba0f58.5193e3e7@upo.es> An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: SpamAssassinReport.txt URL: From mbj0310 at gmail.com Thu May 16 08:28:13 2013 From: mbj0310 at gmail.com (Beom Jun Min) Date: Thu, 16 May 2013 15:28:13 +0900 Subject: [FieldTrip] About preprocessing and define trial Message-ID: <9F7D3012-ADFE-40C4-AC5F-AA3F320348AD@gmail.com> Dear all, Hello, my name is BJ Min from Korea. I am just a beginner in the Fieldtrip. Anyway, with the help of tutorials, I could make grand average ERP of my data finally. However, my question is about the order of preprocessing. According to the tutorials, and examples, it looks the ft_definetrial step is the first, then ft_preprocessing step is followed. But, is there any method to flip these two steps? What I want to do is preprocessing (filtering, notch filtering) first then to use ft_definetrial sequentially. Best regards BeomJun Min, M.D. Ph. D. student, Department of Medical System Engineering (DMSE) Gwangju Institute of Science and Technology (GIST) 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju 500-712, Republic of Korea (South) Phone: +82-62-715-3266 / Fax: +82-62-715-3244 E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu May 16 08:52:02 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 16 May 2013 08:52:02 +0200 Subject: [FieldTrip] About preprocessing and define trial In-Reply-To: <9F7D3012-ADFE-40C4-AC5F-AA3F320348AD@gmail.com> References: <9F7D3012-ADFE-40C4-AC5F-AA3F320348AD@gmail.com> Message-ID: Dear BeomJun, What you describe is definitely possible. If you specify: cfg = []; cfg.dataset = 'dataset'; data = ft_preprocessing(cfg); you will get one very big 'trial' in the data structure, representing just all your data. In the step above, you can also specify filter options. After this step, you can segment your data into trials by using ft_redefinetrial (rather than ft_definetrial). However, you still need a trl matrix containing the trial definition. The easiest way to obtain this is to still call ft_definetrial as you used to do: cfg = []; cfg.dataset = 'dataset'; cfg.trialdef..... % all the trial definition options go here cfgout = ft_definetrial(cfg); and then just save the output trl matrix: trl = cfgout.trl; now you can call ft_redefinetrial: cfg = []; cfg.trl = trl; data = ft_redefinetrial(cfg, data); and your data will be segmented. Hope this helps, Best, Eelke On 16 May 2013 08:28, Beom Jun Min wrote: > > Dear all, > > Hello, my name is BJ Min from Korea. > > I am just a beginner in the Fieldtrip. > Anyway, with the help of tutorials, I could make grand average ERP of my > data finally. > > However, my question is about the order of preprocessing. According to the > tutorials, and examples, it looks the ft_definetrial step is the first, then > ft_preprocessing step is followed. But, is there any method to flip these > two steps? What I want to do is preprocessing (filtering, notch filtering) > first then to use ft_definetrial sequentially. > > Best regards > > > BeomJun Min, M.D. > > Ph. D. student, Department of Medical System Engineering (DMSE) > Gwangju Institute of Science and Technology (GIST) > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > 500-712, Republic of Korea (South) > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From mbj0310 at gmail.com Thu May 16 10:06:51 2013 From: mbj0310 at gmail.com (Beom Jun Min) Date: Thu, 16 May 2013 17:06:51 +0900 Subject: [FieldTrip] About preprocessing and define trial In-Reply-To: References: <9F7D3012-ADFE-40C4-AC5F-AA3F320348AD@gmail.com> Message-ID: Dear Eelke Spaak Thank you very much. It works perfect! Best regards. 2013/5/16 Eelke Spaak > Dear BeomJun, > > What you describe is definitely possible. If you specify: > > cfg = []; > cfg.dataset = 'dataset'; > data = ft_preprocessing(cfg); > > you will get one very big 'trial' in the data structure, representing > just all your data. In the step above, you can also specify filter > options. > > After this step, you can segment your data into trials by using > ft_redefinetrial (rather than ft_definetrial). However, you still need > a trl matrix containing the trial definition. The easiest way to > obtain this is to still call ft_definetrial as you used to do: > > cfg = []; > cfg.dataset = 'dataset'; > cfg.trialdef..... > % all the trial definition options go here > cfgout = ft_definetrial(cfg); > > and then just save the output trl matrix: > > trl = cfgout.trl; > > now you can call ft_redefinetrial: > > cfg = []; > cfg.trl = trl; > data = ft_redefinetrial(cfg, data); > > and your data will be segmented. > > Hope this helps, > Best, > > Eelke > > > On 16 May 2013 08:28, Beom Jun Min wrote: > > > > Dear all, > > > > Hello, my name is BJ Min from Korea. > > > > I am just a beginner in the Fieldtrip. > > Anyway, with the help of tutorials, I could make grand average ERP of my > > data finally. > > > > However, my question is about the order of preprocessing. According to > the > > tutorials, and examples, it looks the ft_definetrial step is the first, > then > > ft_preprocessing step is followed. But, is there any method to flip > these > > two steps? What I want to do is preprocessing (filtering, notch > filtering) > > first then to use ft_definetrial sequentially. > > > > Best regards > > > > > > BeomJun Min, M.D. > > > > Ph. D. student, Department of Medical System Engineering (DMSE) > > Gwangju Institute of Science and Technology (GIST) > > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > > 500-712, Republic of Korea (South) > > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > > E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr > > > > > > _______________________________________________ > > 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 > -- BeomJun Min, M.D. Department of Medical System Engineering (DMSE) Gwangju Institute of Science and Technology (GIST) 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju 500-712, Republic of Korea (South) Phone: +82-62-715-3266 / Fax: +82-62-715-3244 E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu May 16 10:07:47 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 16 May 2013 10:07:47 +0200 Subject: [FieldTrip] Second-level one-sample t test with clustering Message-ID: Dear fellow FieldTrippers, At the moment, I want to do second-level source statistics on my data (but the question is the same for sensor statistics). I have computed two-sample t-scores for each subject, between the trials in conditions A and B. Now, the appropriate per-voxel test to do across subjects would be a one-sample t-test. This is rather easy to do, but I would like to use cluster permutations to correct for multiple comparisons. My idea is to generate fake data of all zeroes, the same size as my t-score descriptive data per subject, and then do a paired-samples t test between the real data and these zeroes (using ft_statfun_depsamplesT). The voxel-level t statistic of data vs 0 should be the same as a one-sample test of course. However, I am not sure the permutations of the data would give me a valid distribution of the cluster statistic. The test for the real data would be (comparing column 1 to column 2): dataA 0 dataB 0 dataC 0 dataD 0 whereas a permutation might look like so: 0 dataA dataB 0 dataC 0 0 dataD Intuitively, I think this makes sense, as the t score of 0 vs data will be the negative of t(data vs 0), I should get an appropriate randomization distribution. But I'm not completely sure of this. So, my question: does anyone see a problem with my approach? Or is this a valid way of cluster-correcting a one-sample T test? If not, what would be the right way to proceed? Many thanks, best, Eelke From e.maris at psych.ru.nl Thu May 16 16:31:15 2013 From: e.maris at psych.ru.nl (Eric Maris) Date: Thu, 16 May 2013 16:31:15 +0200 (CEST) Subject: [FieldTrip] fieldtrip Digest, Vol 30, Issue 20 In-Reply-To: Message-ID: <245706559.668339.1368714675557.JavaMail.root@draco.zimbra.ru.nl> Hi Eelke, This not valid. At the second level, you must use the condition means (per subject) as the observations about which you have a hypothesis and which therefore have to be permuted. Eric http://www.nphyscog.com/contact ----- fieldtrip-request at science.ru.nl schreef: > 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..." From eelke.spaak at donders.ru.nl Thu May 16 16:43:32 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 16 May 2013 16:43:32 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 30, Issue 20 In-Reply-To: <245706559.668339.1368714675557.JavaMail.root@draco.zimbra.ru.nl> References: <245706559.668339.1368714675557.JavaMail.root@draco.zimbra.ru.nl> Message-ID: Hi Eric, Thanks, that's what I expected. However, that approach does not take into account the different between-trial variances in the different subjects. What would you recommend to take those into account? Best, Eelke On 16 May 2013 16:31, Eric Maris wrote: > Hi Eelke, > > This not valid. At the second level, you must use the condition means (per subject) as the observations about which you have a hypothesis and which therefore have to be permuted. > > Eric > > > http://www.nphyscog.com/contact > ----- fieldtrip-request at science.ru.nl schreef: >> 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..." > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From e.maris at psych.ru.nl Thu May 16 17:28:36 2013 From: e.maris at psych.ru.nl (Eric Maris) Date: Thu, 16 May 2013 17:28:36 +0200 (CEST) Subject: [FieldTrip] fieldtrip Digest, Vol 30, Issue 20 In-Reply-To: References: <245706559.668339.1368714675557.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <022601ce524a$0c47c250$24d746f0$@maris@psych.ru.nl> Hi Eelke, It all depends on the null hypothesis that you want to test. It's better to discuss this with you in person or at some meeting with other colleagues (for non-Donders Discussion List readers, Eelke and I work at the same institute), because at the end it is a matter of deciding on what is an interesting null hypothesis (both for you and the reviewers of your paper). I remember a discussion with a colleague about the same issue (using first-level t-statistics at the second level), and he was quite unhappy when I questioned this approach (by asking whether this is really the null hypothesis he was interested in). At the end, it turned out that he also had tried the standard approach (using only condition means) but this did not result in a significant p-value. Best, Eric > -----Original Message----- > From: eelke.spaak at gmail.com [mailto:eelke.spaak at gmail.com] On Behalf Of > Eelke Spaak > Sent: donderdag 16 mei 2013 16:44 > To: Eric Maris; FieldTrip discussion list > Subject: Re: [FieldTrip] fieldtrip Digest, Vol 30, Issue 20 > > Hi Eric, > > Thanks, that's what I expected. However, that approach does not take > into account the different between-trial variances in the different > subjects. What would you recommend to take those into account? > > Best, > Eelke > > On 16 May 2013 16:31, Eric Maris wrote: > > Hi Eelke, > > > > This not valid. At the second level, you must use the condition means > (per subject) as the observations about which you have a hypothesis and > which therefore have to be permuted. > > > > Eric > > > > > > http://www.nphyscog.com/contact > > ----- fieldtrip-request at science.ru.nl schreef: > >> 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..." > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tim.curran at Colorado.EDU Fri May 17 14:36:54 2013 From: tim.curran at Colorado.EDU (Tim Curran) Date: Fri, 17 May 2013 06:36:54 -0600 Subject: [FieldTrip] Postdoctoral Position, Curran Lab, University of Colorado Boulder In-Reply-To: <022601ce524a$0c47c250$24d746f0$@maris@psych.ru.nl> References: <245706559.668339.1368714675557.JavaMail.root@draco.zimbra.ru.nl> <022601ce524a$0c47c250$24d746f0$@maris@psych.ru.nl> Message-ID: Postdoctoral Position Curran Lab, University of Colorado Boulder Postdoctoral research position available in the lab of Tim Curran at the Department of Psychology & Neuroscience, University of Colorado Boulder to work on NIH-funded ERP studies of memory and perceptual expertise. Desirable qualifications include research experience related to memory, perceptual expertise, ERP/EEG, and/or related domains. Anticipated start date is summer or fall of 2013. The University of Colorado is an Equal Opportunity/Affirmative Action employer. For further information contact, tim.curran at colorado.edu. Applicants must submit a CV, a statement of research experience/interests, and a cover letter including email addresses for at least three referees to contact for recommendation letters if needed. Applications will be accepted electronically at https://www.jobsatcu.com/postings/63602 http://psych.colorado.edu/~tcurran/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ggonesc at upo.es Fri May 17 17:45:40 2013 From: ggonesc at upo.es (Gabriel Gonzalez Escamilla) Date: Fri, 17 May 2013 17:45:40 +0200 Subject: [FieldTrip] problem in connectivityanalysis Message-ID: <9f89709b303dae2.51966cc4@upo.es> An HTML attachment was scrubbed... URL: From jessetinker at gmail.com Fri May 17 21:36:12 2013 From: jessetinker at gmail.com (Jesse Tinker) Date: Fri, 17 May 2013 12:36:12 -0700 Subject: [FieldTrip] Segmentation Memory Issue Message-ID: Hello Fieldtrippers! This is my first post ever and I just want to say thank you to everyone for promoting such a vibrant and supportive intellectual community. I have an issue which seems so simple but I am somewhat stymied by: using fieldtrip to accomplish the coregistration. The main points of my code are: mri = ft_read_mri( ); mri = ft_volumerealign(cfg, mri); % Mark fiducials mrireslice = ft_volumereslice(cfg,mri); %To apply the resultant transformation matrix segmentedmri = ft_volumesegment(cfg, mrireslice); First, if I skip the reslice step, everything works fine. However, if I do the reslice and then try to segment, spm_preproc tries to create a 1.8 Tb array. Although it bravely tries, my 24 Gb of RAM inevitably fails. The analogous array for the unsliced mri is 2Mb. I found this confusing as the quantity of information in the resliced image is the exact same. I traced through all the coding and the computation that fails is based on the transformation matrix of the MRI which, of course, changes with the reslicing. I am happy to provide details of that but won't at the moment. My question, has anyone else encountered this or developed a workaround? Very much appreciated, Jesse British Columbia Mental Health and Research Institute -------------- next part -------------- An HTML attachment was scrubbed... URL: From mengtongxiao at gmail.com Sat May 18 16:06:20 2013 From: mengtongxiao at gmail.com (=?GB2312?B?s8LRqQ==?=) Date: Sat, 18 May 2013 22:06:20 +0800 Subject: [FieldTrip] a .mat file about meg data do preprocessing Message-ID: Dear all, I have a .mat file about meg data(102*98800,channel*time,channel is 'MEG0111','MEG0121'.....'M*1' ); Then I use eeglab read it,got .set file;I want use ft_timelockanalysis then *cfg = []; cfg.dataset = 'megalpha.set'; cfg.grad=grad; data_org = ft_preprocessing(cfg)* >grad = chanori: [102x3 double] chanpos: [102x3 double] chantype: {102x1 cell} chanunit: {102x1 cell} coilori: [510x3 double] coilpos: [510x3 double] label: {102x1 cell} tra: [102x510 double] unit: 'cm' Warning: creating default channel names > In fileio\private\read_eeglabheader at 53 In ft_read_header at 572 In ft_preprocessing at 343 processing channel { 'chan001' 'chan002' 'chan003' 'chan004' 'chan005' 'chan006' 'chan007' 'chan008' 'chan009' 'chan010' 'chan011' 'chan012' 'chan013' 'chan014' 'chan015' 'chan016' 'chan017' 'chan018' 'chan019' 'chan020' 'chan021' 'chan022' 'chan023' 'chan024' 'chan025' 'chan026' 'chan027' 'chan028' 'chan029' 'chan030' 'chan031' 'chan032' 'chan033' 'chan034' 'chan035' 'chan036' 'chan037' 'chan038' 'chan039' 'chan040' 'chan041' 'chan042' 'chan043' 'chan044' 'chan045' 'chan046' 'chan047' 'chan048' 'chan049' 'chan050' 'chan051' 'chan052' 'chan053' 'chan054' 'chan055' 'chan056' 'chan057' 'chan058' 'chan059' 'chan060' 'chan061' 'chan062' 'chan063' 'chan064' 'chan065' 'chan066' 'chan067' 'chan068' 'chan069' 'chan070' 'chan071' 'chan072' 'chan073' 'chan074' 'chan075' 'chan076' 'chan077' 'chan078' 'chan079' 'chan080' 'chan081' 'chan082' 'chan083' 'chan084' 'chan085' 'chan086' 'chan087' 'chan088' 'chan089' 'chan090' 'chan091' 'chan092' 'chan093' 'chan094' 'chan095' 'chan096' 'chan097' 'chan098' 'chan099' 'chan100' 'chan101' 'chan102' } reading and preprocessing reading and preprocessing trial 1 from 1 data_org = hdr: [1x1 struct] label: {102x1 cell} time: {[1x98800 double]} trial: {[102x98800 double]} fsample: 1037 sampleinfo: [1 98800] cfg: [1x1 struct] *cfg = []; cfg.covariance = 'yes'; cfg.channel = 'M*1'; cfg.vartrllength = 2; cfg.covariancewindow = 'all'; timelock = ft_timelockanalysis(cfg, data_org);* timelock = avg: [0x98800 double] var: [0x98800 double] time: [1x98800 double] dof: [0x98800 double] label: {0x1 cell} dimord: 'chan_time' cov: [] cfg: [1x1 struct] there is no error displyed in command window but the timlock is empty,why? thanks for you help, best, xiao -------------- next part -------------- An HTML attachment was scrubbed... URL: From eeguser at hotmail.com Sat May 18 18:21:48 2013 From: eeguser at hotmail.com (Subramaniam Iyer) Date: Sat, 18 May 2013 19:21:48 +0300 Subject: [FieldTrip] computing threshold for PLV Message-ID: Dear FT Experts, I have calculated PLV for a set of EEG data from 5 different patients. Now I want to convert the PLV matrix of each patient into a binary matrix. For this I need a threshold PLV value below which I can assume the phase locking is zero. My question is, how do I compute this threshold. I know hard thresholding is one option ( for ex setting 0.1 or 0.2 as threshold), but I guess it is not a very good option. Can somebody suggest a better and robust (statistical) way of determining the threshold ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sherrykhan78 at gmail.com Sat May 18 18:37:28 2013 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Sat, 18 May 2013 12:37:28 -0400 Subject: [FieldTrip] computing threshold for PLV In-Reply-To: References: Message-ID: You can randomly shift in time the epochs, to compute null-distribution, and then threshold at some p-value say p < 0.01, you can even correct for multiple comparison in space and time using this principle. On Sat, May 18, 2013 at 12:21 PM, Subramaniam Iyer wrote: > Dear FT Experts, > > I have calculated PLV for a set of EEG data from 5 different patients. Now > I want to convert the PLV matrix of each patient into a binary matrix. For > this I need a threshold PLV value below which I can assume the phase > locking is zero. > My question is, how do I compute this threshold. I know hard thresholding > is one option ( for ex setting 0.1 or 0.2 as threshold), but I guess it is > not a very good option. > > Can somebody suggest a better and robust (statistical) way of determining > the threshold ? > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sat May 18 19:25:50 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 18 May 2013 19:25:50 +0200 Subject: [FieldTrip] computing threshold for PLV In-Reply-To: References: Message-ID: <4EDB7A1D-4484-454B-A9CE-5AE826E2AE98@donders.ru.nl> Dear all, Note that shuffling the epochs with respect to one another (where for one of the channels in the pair the epoch order stays fixed) usually yields a too liberal null-distribution. The reason is that the shuffling also destroys all structure in the data that is due to electromagnetic field spread. So, even if an observed pattern of PLV is caused by a single underlying neural generator, shuffling the epochs most likely makes this pattern 'significant'. However, it still does not reflect physiological interaction between sources. Best, Jan-Mathijs On May 18, 2013, at 6:37 PM, Sheraz Khan wrote: > You can randomly shift in time the epochs, to compute null-distribution, and then threshold at some p-value say p < 0.01, you can even correct for multiple comparison in space and time using this principle. > > > > On Sat, May 18, 2013 at 12:21 PM, Subramaniam Iyer wrote: > Dear FT Experts, > > I have calculated PLV for a set of EEG data from 5 different patients. Now I want to convert the PLV matrix of each patient into a binary matrix. For this I need a threshold PLV value below which I can assume the phase locking is zero. > My question is, how do I compute this threshold. I know hard thresholding is one option ( for ex setting 0.1 or 0.2 as threshold), but I guess it is not a very good option. > > Can somebody suggest a better and robust (statistical) way of determining the threshold ? > > _______________________________________________ > 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 Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From smoratti at psi.ucm.es Sat May 18 20:11:11 2013 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Sat, 18 May 2013 20:11:11 +0200 Subject: [FieldTrip] computing threshold for PLV In-Reply-To: References: Message-ID: Dear Sheraz, You might consult the following article: Lachaux, J. P. et al. 1999. Measuring Phase Synchrony in Brain Signal. Human Brain Mapping 8: 194-208. In principle you have to create surrogate data that represent the null hypothesis that there is no phase locking between your electrodes, sources, etc. Then you create hundreds or thousands of surrogate data sets and calculate each time you PLV. That way you create a distribution of your PLV values under the Null hypothesis. Then you check in what percentile your observed PLV lies (e. g. if its beyond the 95% percentile you would reject the Null hypothesis). Hope that helps, Stephan ________________________________________________________ Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Universidad Complutense de Madrid Facultad de Psicología Departamento de Psicología Básica I Campus de Somosaguas 28223 Pozuelo de Alarcón (Madrid) Spain and Center for Biomedical Technology Laboratory for Cognitive and Computational Neuroscience Parque Científico y Tecnológico de la Universidad Politecnica de Madrid Campus Montegancedo 28223 Pozuelo de Alarcón (Madrid) Spain email: smoratti at psi.ucm.es Tel.: +34 679219982 El 18/05/2013, a las 18:21, Subramaniam Iyer escribió: > Dear FT Experts, > > I have calculated PLV for a set of EEG data from 5 different patients. Now I want to convert the PLV matrix of each patient into a binary matrix. For this I need a threshold PLV value below which I can assume the phase locking is zero. > My question is, how do I compute this threshold. I know hard thresholding is one option ( for ex setting 0.1 or 0.2 as threshold), but I guess it is not a very good option. > > Can somebody suggest a better and robust (statistical) way of determining the threshold ? > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From eeguser at hotmail.com Sat May 18 21:42:05 2013 From: eeguser at hotmail.com (Subramaniam Iyer) Date: Sat, 18 May 2013 22:42:05 +0300 Subject: [FieldTrip] computing threshold for PLV In-Reply-To: References: , Message-ID: Dear FT Experts Thank you for your inputs. I should add here that I have continuous EEG data (so effectively single trial). The way I am computing PLV is by dividing my data into windows of 2 seconds each and computing PLV for each window and then I finally average the PLV values of all the windows. So when we talk of shuffling trials, in my case should i consider each of 2 second window as a trial ? Sorry if this sounds stupid as I am new to this kind of analysis. From: smoratti at psi.ucm.es Date: Sat, 18 May 2013 20:11:11 +0200 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] computing threshold for PLV Dear Sheraz, You might consult the following article: Lachaux, J. P. et al. 1999. Measuring Phase Synchrony in Brain Signal. Human Brain Mapping 8: 194-208. In principle you have to create surrogate data that represent the null hypothesis that there is no phase locking between your electrodes, sources, etc. Then you create hundreds or thousands of surrogate data sets and calculate each time you PLV. That way you create a distribution of your PLV values under the Null hypothesis. Then you check in what percentile your observed PLV lies (e. g. if its beyond the 95% percentile you would reject the Null hypothesis). Hope that helps, Stephan ________________________________________________________Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Universidad Complutense de MadridFacultad de PsicologíaDepartamento de Psicología Básica ICampus de Somosaguas28223 Pozuelo de Alarcón (Madrid)Spain and Center for Biomedical TechnologyLaboratory for Cognitive and Computational NeuroscienceParque Científico y Tecnológico de la Universidad Politecnica de Madrid Campus Montegancedo28223 Pozuelo de Alarcón (Madrid)Spain email: smoratti at psi.ucm.es Tel.: +34 679219982 El 18/05/2013, a las 18:21, Subramaniam Iyer escribió:Dear FT Experts, I have calculated PLV for a set of EEG data from 5 different patients. Now I want to convert the PLV matrix of each patient into a binary matrix. For this I need a threshold PLV value below which I can assume the phase locking is zero. My question is, how do I compute this threshold. I know hard thresholding is one option ( for ex setting 0.1 or 0.2 as threshold), but I guess it is not a very good option. Can somebody suggest a better and robust (statistical) way of determining the threshold ? _______________________________________________ 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: From sherrykhan78 at gmail.com Sun May 19 01:55:07 2013 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Sat, 18 May 2013 19:55:07 -0400 Subject: [FieldTrip] computing threshold for PLV In-Reply-To: References: Message-ID: Most of the previois discussion targeted toward event related plv for continous data may be look at Hipp 2012 Nature Neuroscience orthogonal correlation paper On May 18, 2013 3:42 PM, "Subramaniam Iyer" wrote: > Dear FT Experts > > Thank you for your inputs. I should add here that I have continuous EEG > data (so effectively single trial). The way I am computing PLV is by > dividing my data into windows of 2 seconds each and computing PLV for each > window and then I finally average the PLV values of all the windows. > > So when we talk of shuffling trials, in my case should i consider each of > 2 second window as a trial ? Sorry if this sounds stupid as I am new to > this kind of analysis. > > ------------------------------ > From: smoratti at psi.ucm.es > Date: Sat, 18 May 2013 20:11:11 +0200 > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] computing threshold for PLV > > Dear Sheraz, > > You might consult the following article: Lachaux, J. P. et al. 1999. > Measuring Phase Synchrony in Brain Signal. Human Brain Mapping 8: 194-208. > In principle you have to create surrogate data that represent the null > hypothesis that there is no phase locking between your electrodes, sources, > etc. Then you create hundreds or thousands of surrogate data sets and > calculate each time you PLV. That way you create a distribution of your PLV > values under the Null hypothesis. Then you check in what percentile your > observed PLV lies (e. g. if its beyond the 95% percentile you would reject > the Null hypothesis). > > Hope that helps, > > Stephan > > > > ________________________________________________________ > Stephan Moratti, PhD > > see also: http://web.me.com/smoratti/ > > Universidad Complutense de Madrid > Facultad de Psicología > Departamento de Psicología Básica I > Campus de Somosaguas > 28223 Pozuelo de Alarcón (Madrid) > Spain > > and > > Center for Biomedical Technology > Laboratory for Cognitive and Computational Neuroscience > Parque Científico y Tecnológico de la Universidad Politecnica de Madrid > Campus Montegancedo > 28223 Pozuelo de Alarcón (Madrid) > Spain > > > email: smoratti at psi.ucm.es > Tel.: +34 679219982 > > El 18/05/2013, a las 18:21, Subramaniam Iyer escribió: > > Dear FT Experts, > > I have calculated PLV for a set of EEG data from 5 different patients. Now > I want to convert the PLV matrix of each patient into a binary matrix. For > this I need a threshold PLV value below which I can assume the phase > locking is zero. > My question is, how do I compute this threshold. I know hard thresholding > is one option ( for ex setting 0.1 or 0.2 as threshold), but I guess it is > not a very good option. > > Can somebody suggest a better and robust (statistical) way of determining > the threshold ? > _______________________________________________ > 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: From mengtongxiao at gmail.com Sun May 19 09:32:37 2013 From: mengtongxiao at gmail.com (=?GB2312?B?s8LRqQ==?=) Date: Sun, 19 May 2013 15:32:37 +0800 Subject: [FieldTrip] help about ft_timelockanalysis Message-ID: Dear all, when I use ft_timelockanalysis like follow,there are some mistake. cfg = []; cfg.covariance = 'yes'; cfg.channel = 'all'; cfg.vartrllength = 2; cfg.covariancewindow = 'all'; timelock = ft_timelockanalysis(cfg, data_org); the input is raw data with 102 channels and 1 trials averaging trials averaging trial 1 of 1 the call to "ft_timelockanalysis" took 5 seconds ??? Error using ==> mxSerialize Error during serialization of (null) Error in ==> ft_postamble_provenance at 76 cfg.callinfo.outputhash = cellfun(@CalcMD5, cellfun(@mxSerialize, cellfun(@eval, ft_default.postamble, 'UniformOutput', false), 'UniformOutput', false), 'UniformOutput', false); Error in ==> ft_postamble at 55 evalin('caller', ['ft_postamble_' cmd]); Error in ==> ft_timelockanalysis at 401 ft_postamble provenance timelock Thank you so much for your help!! xiao -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: SpamAssassinReport.txt URL: From eeguser at hotmail.com Sun May 19 09:54:21 2013 From: eeguser at hotmail.com (Subramaniam Iyer) Date: Sun, 19 May 2013 10:54:21 +0300 Subject: [FieldTrip] computing threshold for PLV In-Reply-To: References: , , , Message-ID: So, does it mean that PLV method does not make much sense for continuous data ? To be more specific, I am trying to investigate synchrony from epileptic EEG recordings. Date: Sat, 18 May 2013 19:55:07 -0400 From: sherrykhan78 at gmail.com To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] computing threshold for PLV Most of the previois discussion targeted toward event related plv for continous data may be look at Hipp 2012 Nature Neuroscience orthogonal correlation paper On May 18, 2013 3:42 PM, "Subramaniam Iyer" wrote: Dear FT Experts Thank you for your inputs. I should add here that I have continuous EEG data (so effectively single trial). The way I am computing PLV is by dividing my data into windows of 2 seconds each and computing PLV for each window and then I finally average the PLV values of all the windows. So when we talk of shuffling trials, in my case should i consider each of 2 second window as a trial ? Sorry if this sounds stupid as I am new to this kind of analysis. From: smoratti at psi.ucm.es Date: Sat, 18 May 2013 20:11:11 +0200 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] computing threshold for PLV Dear Sheraz, You might consult the following article: Lachaux, J. P. et al. 1999. Measuring Phase Synchrony in Brain Signal. Human Brain Mapping 8: 194-208. In principle you have to create surrogate data that represent the null hypothesis that there is no phase locking between your electrodes, sources, etc. Then you create hundreds or thousands of surrogate data sets and calculate each time you PLV. That way you create a distribution of your PLV values under the Null hypothesis. Then you check in what percentile your observed PLV lies (e. g. if its beyond the 95% percentile you would reject the Null hypothesis). Hope that helps, Stephan ________________________________________________________Stephan Moratti, PhD see also: http://web.me.com/smoratti/ Universidad Complutense de MadridFacultad de PsicologíaDepartamento de Psicología Básica ICampus de Somosaguas28223 Pozuelo de Alarcón (Madrid)Spain and Center for Biomedical TechnologyLaboratory for Cognitive and Computational NeuroscienceParque Científico y Tecnológico de la Universidad Politecnica de Madrid Campus Montegancedo 28223 Pozuelo de Alarcón (Madrid)Spain email: smoratti at psi.ucm.es Tel.: +34 679219982 El 18/05/2013, a las 18:21, Subramaniam Iyer escribió: Dear FT Experts, I have calculated PLV for a set of EEG data from 5 different patients. Now I want to convert the PLV matrix of each patient into a binary matrix. For this I need a threshold PLV value below which I can assume the phase locking is zero. My question is, how do I compute this threshold. I know hard thresholding is one option ( for ex setting 0.1 or 0.2 as threshold), but I guess it is not a very good option. Can somebody suggest a better and robust (statistical) way of determining the threshold ? _______________________________________________ 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: From politzerahless at gmail.com Sun May 19 14:27:37 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sun, 19 May 2013 07:27:37 -0500 Subject: [FieldTrip] help about ft_timelockanalysis Message-ID: Hello Xiao, I don't know if this is what is causing the error, but I did notice that your dataset apparently only has one trial. Usually ft_timelockanalysis() would take a dataset consisting of multiple trials and average them; you may need to run ft_preprocessing() to divide your dataset into trials. Best, Steve > > Message: 1 > Date: Sun, 19 May 2013 15:32:37 +0800 > From: ?? > To: fieldtrip > Subject: [FieldTrip] help about ft_timelockanalysis > Message-ID: > < CADiddyWhMO7vgM2ZjV8xABCVe8WS4d2eXNwvY92hcj2oA0piFQ at mail.gmail.com> > Content-Type: text/plain; charset="gb2312" > > Dear all? > when I use ft_timelockanalysis like follow,there are some mistake. > > cfg = []; > cfg.covariance = 'yes'; > cfg.channel = 'all'; > cfg.vartrllength = 2; > cfg.covariancewindow = 'all'; > timelock = ft_timelockanalysis(cfg, data_org); > the input is raw data with 102 channels and 1 trials > averaging trials > averaging trial 1 of 1 > > the call to "ft_timelockanalysis" took 5 seconds > ??? Error using ==> mxSerialize > Error during serialization of (null) > > Error in ==> ft_postamble_provenance at 76 > cfg.callinfo.outputhash = cellfun(@CalcMD5, cellfun(@mxSerialize, > cellfun(@eval, ft_default.postamble, 'UniformOutput', false), > 'UniformOutput', false), 'UniformOutput', false); > > Error in ==> ft_postamble at 55 > evalin('caller', ['ft_postamble_' cmd]); > Error in ==> ft_timelockanalysis at 401 > ft_postamble provenance timelock > > Thank you so much for your help!! > xiao > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130519/5cd3ca08/attachment-0001.html > > -------------- next part -------------- > An embedded and charset-unspecified text was scrubbed... > Name: SpamAssassinReport.txt > URL: < http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130519/5cd3ca08/attachment-0001.txt > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://people.ku.edu/~sjpa/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephanie.ries at berkeley.edu Mon May 20 06:32:49 2013 From: stephanie.ries at berkeley.edu (Stephanie Kathleen Ries-cornou) Date: Sun, 19 May 2013 21:32:49 -0700 Subject: [FieldTrip] dipole modeling using field trip Message-ID: Hi, I would like to know if it possible to reject horizontal eye movements from scalp EEG signal using equivalent dipole modeling in Fieldtrip. I have tried doing this using ICA but it was not possible to identify a component reflecting saccades for all subjects. Has anyone ever done this? If yes, any suggestion would be great! I am trying to learn about source reconstruction using two dipoles thinking this might be a good start and have started going through the tutorial. I got the following error messages: >> data = ft_dipolesimulation(cfg); using headmodel specified in the configuration using gradiometers specified in the configuration computing simulated data Error using .* Matrix dimensions must agree. Error in ft_dipolesimulation (line 203) simulated.trial{trial} = simulated.trial{trial} + lf(:,i:3:end) * ... This was fixed when I removed the "..." but then I got this message: Error using ft_fetch_vol (line 76) no headmodel specified Error in prepare_headmodel (line 51) vol = ft_fetch_vol(cfg, data); Error in ft_dipolesimulation (line 106) [vol, sens, cfg] = prepare_headmodel(cfg, []); The "vol" parameter is defined, so I do not know where the error is coming from. Best, Stephanie Stephanie Ries, PhD Knight Lab - Helen Wills Neuroscience Institute University of California at Berkeley -------------- next part -------------- An HTML attachment was scrubbed... URL: From ggonesc at upo.es Mon May 20 09:28:55 2013 From: ggonesc at upo.es (Gabriel Gonzalez Escamilla) Date: Mon, 20 May 2013 09:28:55 +0200 Subject: [FieldTrip] problem with PLV and ImC computing Message-ID: <1115d37d2b1643b.5199ecd7@upo.es> I'm re-sending this, becasue searching at the fieldtrip archives, I've notice that my message was scrubbed... Dear Fieltrip experts, I have my continuous data imported to fieldtrip with matlab, I'm looking for performing connectivity analysis between pairs of sensors, I have succed as: data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels and 2000 samples data.label {59x1}; data.time {1xNepochs}; then, calculate only the FFT of all sensors as: cfg=[]; cfg.output='fourier'; cfg.method='mtmfft'; cfg.taper='hanning'; cfg.foilim=[8.5 9.5]; cfg.tapsmofrq=0; cfg.trials='all'; cfg.keeptrials='yes'; cfg.channel='all'; fourier=ft_freqanalysis(cfg, data) as output I get: dimord = 'rpttap_chan_freq' freq= [1x9] fourierspctrm=[7x59x9 double] Then compute the imaginary part of coherency as: cfg=[]; cfg.method ='cohe'; cfg.complex='imag'; cfg.channelcbm={'all' 'all'}; coher = ft_connectivityanalysis (cfg, fourier) as output get: dimord='chan_chan_freq'; cohspctrm=[59x59x9 double]; dof=7; I have two main questions: A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? Many thanks in advanced, Gabriel. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue May 21 08:24:48 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 21 May 2013 08:24:48 +0200 Subject: [FieldTrip] computing threshold for PLV In-Reply-To: References: Message-ID: Hi all, PLV is in principle a perfectly valid method to investigate synchrony, also in continuous data. Jörg (Hipp)'s paper introduces a connectivity metric that is insensitive to the effects of electromagnetic field spread, but it is a measure whose relationship to synchrony is hard to interpret; it quantifies amplitude envelope correlations after explicit removal of the instantaneous mixing, and does not quantify the consistency of phase relationships, as does PLV. If you are after interpreting the connectivity in terms of synchrony, you could look into using the imaginary part of coherency, or the weighted phase lag index, although neither of these methods are easy in their interpretation, either. Best, Jan-Mathijs On May 19, 2013, at 1:55 AM, Sheraz Khan wrote: > Most of the previois discussion targeted toward event related plv for continous data may be look at Hipp 2012 Nature Neuroscience orthogonal correlation paper > > On May 18, 2013 3:42 PM, "Subramaniam Iyer" wrote: > Dear FT Experts > > Thank you for your inputs. I should add here that I have continuous EEG data (so effectively single trial). The way I am computing PLV is by dividing my data into windows of 2 seconds each and computing PLV for each window and then I finally average the PLV values of all the windows. > > So when we talk of shuffling trials, in my case should i consider each of 2 second window as a trial ? Sorry if this sounds stupid as I am new to this kind of analysis. > > From: smoratti at psi.ucm.es > Date: Sat, 18 May 2013 20:11:11 +0200 > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] computing threshold for PLV > > Dear Sheraz, > > You might consult the following article: Lachaux, J. P. et al. 1999. Measuring Phase Synchrony in Brain Signal. Human Brain Mapping 8: 194-208. In principle you have to create surrogate data that represent the null hypothesis that there is no phase locking between your electrodes, sources, etc. Then you create hundreds or thousands of surrogate data sets and calculate each time you PLV. That way you create a distribution of your PLV values under the Null hypothesis. Then you check in what percentile your observed PLV lies (e. g. if its beyond the 95% percentile you would reject the Null hypothesis). > > Hope that helps, > > Stephan > > > > ________________________________________________________ > Stephan Moratti, PhD > > see also: http://web.me.com/smoratti/ > > Universidad Complutense de Madrid > Facultad de Psicología > Departamento de Psicología Básica I > Campus de Somosaguas > 28223 Pozuelo de Alarcón (Madrid) > Spain > > and > > Center for Biomedical Technology > Laboratory for Cognitive and Computational Neuroscience > Parque Científico y Tecnológico de la Universidad Politecnica de Madrid > Campus Montegancedo > 28223 Pozuelo de Alarcón (Madrid) > Spain > > > email: smoratti at psi.ucm.es > Tel.: +34 679219982 > > El 18/05/2013, a las 18:21, Subramaniam Iyer escribió: > > Dear FT Experts, > > I have calculated PLV for a set of EEG data from 5 different patients. Now I want to convert the PLV matrix of each patient into a binary matrix. For this I need a threshold PLV value below which I can assume the phase locking is zero. > My question is, how do I compute this threshold. I know hard thresholding is one option ( for ex setting 0.1 or 0.2 as threshold), but I guess it is not a very good option. > > Can somebody suggest a better and robust (statistical) way of determining the threshold ? > _______________________________________________ > 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 Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue May 21 08:31:22 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 21 May 2013 08:31:22 +0200 Subject: [FieldTrip] problem in connectivityanalysis In-Reply-To: <9f89709b303dae2.51966cc4@upo.es> References: <9f89709b303dae2.51966cc4@upo.es> Message-ID: <519B14BA.9030908@donders.ru.nl> Dear Gabriel, > A) As you see, this makes an average over the epochs of each channel, > and not over the samples (which in this case are the 9 frequencies of > the FFT), And I would like to have the opposite, this is, to get the > imaginary part of coherence for each epoch (repetition) on all my > channels and not for each frequency, something like: chan_chan_rpt or > chancbm_rpt, Is this possible? No. You should think of coherence more as a measure for the consistency of the phase relation between channels across trials, so coherence is just not defined per trial,neither would it make sense to compute coherence for a single trial. > B) Another question I have is: for the Imaginary part of Coherence is > not necessary to compute the cross-spectrum with 'powandcsd', only the > FFT, but for the PLV, PPC or WPLI is that way too? I see some terminology issues here. Let me try to explain in a simple (aka least-mathematical I can think of) way: For all these connectivity measures, we need the phase information from the Fourier transform (FFT) to compute the cross-spectral density matrix (CSD). The CSD can be regarded as the equivalent in the frequency domain to the covariance matrix in the time domain, thus it is a measures how a certain channels activity is co-modulated with another channels activity (for a particular frequency) - makes pretty much sense to make use of this when computing connectivity, right? :) As you might know, a Fourier transform returns complex numbers, where the imaginary part of this number contains phase information. When calling ft_freqanalysis, you can decide if it shall only return the (squared) real part of the frequency spectrum (cfg.output='pow'), or instead the full CSD (cfg.output = 'powandcsd'). Alternatively, you can also let ft_freqanalysis return the raw Fourier coefficients (cfg.output='fourier'). From the Fourier coefficients, however, you can easily obtain the CSD or the power spectrum basically by multiplication the Fourier matrix with itself (transposed). All of these measures quantify the phase relation between channels across trials, and as phase information is coded in the imaginary part of the fourier output, thus for connectivityanalysis you need the CSD which can be obtained either by 'powandcsd' or by 'fourier'. I hope that somehow clarifies your questions. Best, Jörn On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote: > Dear Fieltrip experts, > > I have my continuous data imported to fieldtrip with matlab, I'm > looking for performing connectivity analysis between pairs of sensors, > I have succed as: > data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels > and 2000 samples > data.label {59x1}; > data.time {1xNepochs}; > > then, calculate only the FFT of all sensors as: > cfg=[]; > cfg.output='fourier'; > cfg.method='mtmfft'; > cfg.taper='hanning'; > cfg.foilim=[8.5 9.5]; > cfg.tapsmofrq=0; > cfg.trials='all'; > cfg.keeptrials='yes'; > cfg.channel='all'; > fourier=ft_freqanalysis(cfg, data) > as output I get: > dimord = 'rpttap_chan_freq' > freq= [1x9] > fourierspctrm=[7x59x9 double] > > Then compute the imaginary part of coherency as: > cfg=[]; > cfg.method ='cohe'; > cfg.complex='imag'; > cfg.channelcbm={'all' 'all'}; > coher = ft_connectivityanalysis (cfg, fourier) > as output get: > dimord='chan_chan_freq'; > cohspctrm=[59x59x9 double]; > dof=7; > > I have two main questions: > > A) As you see, this makes an average over the epochs of each channel, > and not over the samples (which in this case are the 9 frequencies of > the FFT), And I would like to have the opposite, this is, to get the > imaginary part of coherence for each epoch (repetition) on all my > channels and not for each frequency, something like: chan_chan_rpt or > chancbm_rpt, Is this possible? > > > > B) Another question I have is: for the Imaginary part of Coherence is > not necessary to compute the cross-spectrum with 'powandcsd', only the > FFT, but for the PLV, PPC or WPLI is that way too? > > > > > Many thanks in advanced, > Gabriel. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue May 21 08:39:14 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 21 May 2013 08:39:14 +0200 Subject: [FieldTrip] a .mat file about meg data do preprocessing In-Reply-To: References: Message-ID: <519B1692.3080101@donders.ru.nl> Dear Xiao, Somehow your channel names seem to not be recognized by FieldTrip, and then it reverts to default channel names (chan001, chan002, ...). You will see that data_org.label will have those channel labels. Subsequently, you define in the cfg for timelockanalysis channel names that are not in your data (your channels are called chanXXX, not MEGXXXX now), and FieldTrip thus does not perform the operation on any channel. I don't know much about EEGLAB and how it is integrated with FieldTrip - there should be an eeglab2fieldtrip function though in fieldtrip/external/eeglab. Maybe you can try this, or maybe someone else here knows why your channel labels do not get copied over to FieldTrip correctly. Good luck :) Best, Jörn On 5/18/2013 4:06 PM, ?? wrote: > Dear all, > I have a .mat file about meg data(102*98800,channel*time,channel is > 'MEG0111','MEG0121'.....'M*1' ); > Then I use eeglab read it,got .set file;I want use ft_timelockanalysis > then > /cfg = []; > cfg.dataset = 'megalpha.set'; > cfg.grad=grad; > data_org = ft_preprocessing(cfg)/ > >grad = > chanori: [102x3 double] > chanpos: [102x3 double] > chantype: {102x1 cell} > chanunit: {102x1 cell} > coilori: [510x3 double] > coilpos: [510x3 double] > label: {102x1 cell} > tra: [102x510 double] > unit: 'cm' > Warning: creating default channel names > > In fileio\private\read_eeglabheader at 53 > In ft_read_header at 572 > In ft_preprocessing at 343 > processing channel { 'chan001' 'chan002' 'chan003' 'chan004' 'chan005' > 'chan006' 'chan007' 'chan008' 'chan009' 'chan010' 'chan011' 'chan012' > 'chan013' 'chan014' 'chan015' 'chan016' 'chan017' 'chan018' 'chan019' > 'chan020' 'chan021' 'chan022' 'chan023' 'chan024' 'chan025' 'chan026' > 'chan027' 'chan028' 'chan029' 'chan030' 'chan031' 'chan032' 'chan033' > 'chan034' 'chan035' 'chan036' 'chan037' 'chan038' 'chan039' 'chan040' > 'chan041' 'chan042' 'chan043' 'chan044' 'chan045' 'chan046' 'chan047' > 'chan048' 'chan049' 'chan050' 'chan051' 'chan052' 'chan053' 'chan054' > 'chan055' 'chan056' 'chan057' 'chan058' 'chan059' 'chan060' 'chan061' > 'chan062' 'chan063' 'chan064' 'chan065' 'chan066' 'chan067' 'chan068' > 'chan069' 'chan070' 'chan071' 'chan072' 'chan073' 'chan074' 'chan075' > 'chan076' 'chan077' 'chan078' 'chan079' 'chan080' 'chan081' 'chan082' > 'chan083' 'chan084' 'chan085' 'chan086' 'chan087' 'chan088' 'chan089' > 'chan090' 'chan091' 'chan092' 'chan093' 'chan094' 'chan095' 'chan096' > 'chan097' 'chan098' 'chan099' 'chan100' 'chan101' 'chan102' } > reading and preprocessing > reading and preprocessing trial 1 from 1 > data_org = > hdr: [1x1 struct] > label: {102x1 cell} > time: {[1x98800 double]} > trial: {[102x98800 double]} > fsample: 1037 > sampleinfo: [1 98800] > cfg: [1x1 struct] > /cfg = []; > cfg.covariance = 'yes'; > cfg.channel = 'M*1'; > cfg.vartrllength = 2; > cfg.covariancewindow = 'all'; > timelock = ft_timelockanalysis(cfg, data_org);/ > timelock = > avg: [0x98800 double] > var: [0x98800 double] > time: [1x98800 double] > dof: [0x98800 double] > label: {0x1 cell} > dimord: 'chan_time' > cov: [] > cfg: [1x1 struct] > there is no error displyed in command window but the timlock is empty,why? > thanks for you help, > best, > xiao > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From zriouil.imane at gmail.com Tue May 21 10:18:58 2013 From: zriouil.imane at gmail.com (z.imane) Date: Tue, 21 May 2013 10:18:58 +0200 Subject: [FieldTrip] ft_read_event Message-ID: Hello, i have a problems in ft_read_event. if you help me please I try to follow all instructions on the tutorial: 'Preprocessing and analysis of spike and local field potential data' >> spike=ft_read_spike(filename) spike = label: {'Elec_1_Neuron_1' 'Elec_2_Neuron_1' 'Elec_3_Neuron_1'} timestamp: {[1x20246 int32] [1x9126 int32] [1x74291 int32]} waveform: {[0x20246 double] [0x9126 double] [0x74291 double]} unit: {[1x20246 double] [1x9126 double] [1x74291 double]} hdr: [1x1 struct] dimord: '{chan}_lead_time_spike' >> header=ft_read_header(filename) header = nChans: 94 Fs: 781.2500 nSamples: 862310 nTrials: 1 nSamplesPre: 0 label: {94x1 cell} FirstTimeStamp: 70433310 TimeStampPerSample: 32 orig: [1x1 struct] chantype: {94x1 cell} chanunit: {94x1 cell} >>cfg=[]; cfg.dataset=filename; cfg.trialfun='trialfun_stimon_samples'; cfg=ft_definetrial(cfg) evaluating trialfunction 'trialfun_stimon_samples' ??? Error using ==> fseek Not enough input arguments. Error in ==> read_nex_event at 49 status = fseek(fid,hdr.varheader(mrkvarnum).offset,'bof'); Error in ==> ft_read_event at 1528 event = read_nex_event(filename); Error in ==> trialfun_stimon_samples at 3 event = ft_read_event(cfg.dataset); Error in ==> ft_definetrial at 157 trl = feval(cfg.trialfun, cfg); -------------- next part -------------- An HTML attachment was scrubbed... URL: From ggonesc at upo.es Tue May 21 17:52:21 2013 From: ggonesc at upo.es (Gabriel Gonzalez Escamilla) Date: Tue, 21 May 2013 17:52:21 +0200 Subject: [FieldTrip] problem in connectivityanalysis In-Reply-To: <519B14BA.9030908@donders.ru.nl> References: <9f89709b303dae2.51966cc4@upo.es> <519B14BA.9030908@donders.ru.nl> Message-ID: <1348f6433edc26f9.519bb455@upo.es> Thank you so much for your answer Jörn, Now I got it, so, I will let the 'fourier' as input to ft_connectivityanalysis, because for some indices I will need the auto-spectrum, and if I fully undertood what you said, it will be the same, as they always take the phase information from the fourier transform. And fieltrip will automatically compute the csd if the input is the frequency data. Nevertheless, it give me some error when I tried to use the output from 'powandcsd' of freqanalysis, always gives me a matrix dimensions error, and when I use the output 'fourier' from connectivityanalysis, it computes almost all indices to ok, raging from  -1 to 1 (I'm saw that they are signed, so this is ok), the problem are the ImC ranging from -inf to inf, and the PLV values ranging from 0 to inf, but when I use the 'fourier' the values are. Which for me is really weird. I have checked internally, and even when I always use the 'fourier' as input, when it internally calculates cross-spectrum for the ImC and PLV, the data.crsspctrm is different, e.g: data.dimord = 'rpt_rpt_chan_chan_freq' ans size(data.crsspctrm) = [1 7 59 59]; So, both are apparently the same, but the data inside this matrices is different, for example, when calculating the ImC the first 7 columns for the first two rows are: val(:,:,1,1)  [0.9323  0.3679  0.8629  1.6436  0.6404  1.8782  0.1139] val(:,:,1,2)  [0.8509-0.1555i  0.2507-0.1066i  0.8173-0.0290i  1.4328-0.2427i  0.5457-0.0500i  1.6505-0.0161i  0.0993+0.0016i] while when calculating the PLV are: val(:,:,1,1)  [1  1  1  1  1  1  1] val(:,:,1,2)  [0.9694-0.2133i  0.7011-0.3564i  0.9951-0.0104i  0.9014-0.3481i  0.9781-0.0819i  0.9982-0.0046i  0.9507-0.0483i] I'm pretty sure I'm doing something wrong here, but I don't really have a clue, If I use the fourier transform to calculate the 'csd' in ft_connectivity analysis and use this csd as input to all other ft_connectivityanalysis indices all of them are set to NaN or 1, not ranging between any numbers. On the other hand, I have seen searching on the net, that fieltrip is capable of create surrogate data, by shifting the phase information on every trial for only one electrode of each pair while using the original samples of each trials on the second channel, but I couldn't find on the manual how to do such a thing. Is there any way to compute this kind of surrogates for every sensor? or was it something that some one suggest to somebody? Many thanks in advanced, Gabriel. ----- Mensaje original ----- De: "Jörn M. Horschig" Fecha: Martes, 21 de Mayo de 2013, 9:03 am Asunto: Re: [FieldTrip] problem in connectivityanalysis A: FieldTrip discussion list > Dear Gabriel, > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > No. You should think of coherence more as a measure for the consistency of the phase relation between channels across trials, so coherence is just not defined per trial,neither would it make sense to compute coherence for a single trial. > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? I see some terminology issues here. Let me try to explain in a simple (aka least-mathematical I can think of) way: > > For all these connectivity measures, we need the phase information from the Fourier transform (FFT) to compute the cross-spectral density matrix (CSD). The CSD can be regarded as the equivalent in the frequency domain to the covariance matrix in the time domain, thus it is a measures how a certain channels activity is co-modulated with another channels activity (for a particular frequency) - makes pretty much sense to make use of this when computing connectivity, right? :) > As you might know, a Fourier transform returns complex numbers, where the imaginary part of this number contains phase information. When calling ft_freqanalysis, you can decide if it shall only return the (squared) real part of the frequency spectrum (cfg.output='pow'), or instead the full CSD (cfg.output = 'powandcsd'). Alternatively, you can also let ft_freqanalysis return the raw Fourier coefficients (cfg.output='fourier'). From the Fourier coefficients, however, you can easily obtain the CSD or the power spectrum basically by multiplication the Fourier matrix with itself (transposed). All of these measures quantify the phase relation between channels across trials, and as phase information is coded in the imaginary part of the fourier output, thus for connectivityanalysis you need the CSD which can be obtained either by 'powandcsd' or by 'fourier'. > > I hope that somehow clarifies your questions. > > Best, > Jörn > > On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote: > Dear Fieltrip experts, > > I have my continuous data imported to fieldtrip with matlab, I'm looking for performing connectivity analysis between pairs of sensors, I have succed as: > data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels and 2000 samples > data.label {59x1}; > data.time {1xNepochs}; > > then, calculate only the FFT of all sensors as: > cfg=[]; > cfg.output='fourier'; > cfg.method='mtmfft'; > cfg.taper='hanning'; > cfg.foilim=[8.5 9.5]; > cfg.tapsmofrq=0; > cfg.trials='all'; > cfg.keeptrials='yes'; > cfg.channel='all'; > fourier=ft_freqanalysis(cfg, data) > as output I get: > dimord = 'rpttap_chan_freq' > freq= [1x9] > fourierspctrm=[7x59x9 double] > > Then compute the imaginary part of coherency as: > cfg=[]; > cfg.method ='cohe'; > cfg.complex='imag'; > cfg.channelcbm={'all' 'all'}; > coher = ft_connectivityanalysis (cfg, fourier) > as output get: > dimord='chan_chan_freq'; > cohspctrm=[59x59x9 double]; > dof=7; > > I have two main questions: > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? > > > > > Many thanks in advanced, > Gabriel. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip --------------------------
PhD. student Gabriel González-Escamilla
Laboratory of Functional Neuroscience
Department of Physiology, Anatomy, and Cell Biology
University Pablo de Olavide
Ctra. de Utrera, Km.1
41013 - Seville
- Spain -

Email: ggonesc at upo.es
http://www.upo.es/neuroaging/es/
-------------- next part -------------- An HTML attachment was scrubbed... URL: From antony.passaro at gmail.com Tue May 21 18:13:28 2013 From: antony.passaro at gmail.com (Antony Passaro) Date: Tue, 21 May 2013 12:13:28 -0400 Subject: [FieldTrip] Subject-level Statistics on mvar connectivity measures Message-ID: Hi everyone, I have had some success processing the subject-level differences between two conditions for phase-based measures such as coherence and plv but I was wondering what the approach would be for the directed or mvar-based measures such as dtf, granger, or pdc? Since there are no trials to shuffle as you normally would for the phase-based connectivity measures, what would be the optimal statistical approach? I thought about shuffling the trials and recomputing the mvar over and over again for each condition as a simulation but this doesn't seem practical as it would be too computationally intensive. Thank you, -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From 13681530640 at 139.com Wed May 22 04:20:45 2013 From: 13681530640 at 139.com (WangJing) Date: Wed, 22 May 2013 10:20:45 +0800 (CST) Subject: [FieldTrip] question About head model References: Message-ID: <2b26519c1b85ee0-0001c.Richmail.00022806623245833658@139.com> Hi I am a freshman about field trip. I am trying to build the forward model. but my mri data is different from the data in the tutorial. So I don't know how to bulid the head model. I use the date which is from the paper "Open Database of Epileptic EEG with MRI and Postoperational Assessment of Foci—a Real World Verification for the EEG Inverse Solutions",http://eeg.pl/epi. MRI recordings containing a T1, T2 or fluid attenuated inversion recovery (FLAIR) weighted brain scans with morphologic substrate of the epilepsy (mostly cortical dysplasias, dysplastic tumors etc.). In some cases there is also a scan with the gadolinium (GAD) contrast. The images were collected by Siemens Sonata 1.5T scanner. The data is stored in the Digital Imaging and Communications in Medicine (DICOM) format. The name of the scan’s folder indicates its weighting.The scans have the following resolutions: T1: 512 × 512 pixels, pixel spacing 0.4687 mm, slice thickness 1.2 mm, T2: 256 × 256 pixels, pixel spacing 0.9375 mm,slice thickness 2.5 mm. In the tutorial,the mri data stored in only one file, while the data which I used have many files, I don't know how to process. who can help me,Thanks1 Thanks very much! Best Reagards Jing Wang -------------------------------------------------------------------------------- ----The following is the content of the forwarded email---- From:fieldtrip-request To:fieldtrip Date:2013-05-21 23:59:18 Subject:fieldtrip Digest, Vol 30, Issue 29 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: problem in connectivityanalysis (Gabriel Gonzalez Escamilla) ---------------------------------------------------------------------- Message: 1 Date: Tue, 21 May 2013 17:52:21 +0200 From: Gabriel Gonzalez Escamilla To: FieldTrip discussion list Subject: Re: [FieldTrip] problem in connectivityanalysis Message-ID: <1348f6433edc26f9.519bb455 at upo.es> Content-Type: text/plain; charset="iso-8859-1" Thank you so much for your answer J?rn, Now I got it, so, I will let the 'fourier' as input to ft_connectivityanalysis, because for some indices I will need the auto-spectrum, and if I fully undertood what you said, it will be the same, as they always take the phase information from the fourier transform. And fieltrip will automatically compute the csd if the input is the frequency data. Nevertheless, it give me some error when I tried to use the output from 'powandcsd' of freqanalysis, always gives me a matrix dimensions error, and when I use the output 'fourier' from connectivityanalysis, it computes almost all indices to ok, raging from? -1 to 1 (I'm saw that they are signed, so this is ok), the problem are the ImC ranging from -inf to inf, and the PLV values ranging from 0 to inf, but when I use the 'fourier' the values are. Which for me is really weird. I have checked internally, and even when I always use the 'fourier' as input, when it internally calculates cross-spectrum for the ImC and PLV, the data.crsspctrm is different, e.g: data.dimord = 'rpt_rpt_chan_chan_freq' ans size(data.crsspctrm) = [1 7 59 59]; So, both are apparently the same, but the data inside this matrices is different, for example, when calculating the ImC the first 7 columns for the first two rows are: val(:,:,1,1) ?[0.9323? 0.3679? 0.8629? 1.6436? 0.6404? 1.8782? 0.1139] val(:,:,1,2) ?[0.8509-0.1555i? 0.2507-0.1066i? 0.8173-0.0290i? 1.4328-0.2427i? 0.5457-0.0500i? 1.6505-0.0161i? 0.0993+0.0016i] while when calculating the PLV are: val(:,:,1,1) ?[1? 1? 1? 1? 1? 1? 1] val(:,:,1,2) ?[0.9694-0.2133i? 0.7011-0.3564i? 0.9951-0.0104i? 0.9014-0.3481i? 0.9781-0.0819i? 0.9982-0.0046i? 0.9507-0.0483i] I'm pretty sure I'm doing something wrong here, but I don't really have a clue, If I use the fourier transform to calculate the 'csd' in ft_connectivity analysis and use this csd as input to all other ft_connectivityanalysis indices all of them are set to NaN or 1, not ranging between any numbers. On the other hand, I have seen searching on the net, that fieltrip is capable of create surrogate data, by shifting the phase information on every trial for only one electrode of each pair while using the original samples of each trials on the second channel, but I couldn't find on the manual how to do such a thing. Is there any way to compute this kind of surrogates for every sensor? or was it something that some one suggest to somebody? Many thanks in advanced, Gabriel. ----- Mensaje original ----- De: "J?rn M. Horschig" Fecha: Martes, 21 de Mayo de 2013, 9:03 am Asunto: Re: [FieldTrip] problem in connectivityanalysis A: FieldTrip discussion list > Dear Gabriel, > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > No. You should think of coherence more as a measure for the consistency of the phase relation between channels across trials, so coherence is just not defined per trial,neither would it make sense to compute coherence for a single trial. > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? I see some terminology issues here. Let me try to explain in a simple (aka least-mathematical I can think of) way: > > For all these connectivity measures, we need the phase information from the Fourier transform (FFT) to compute the cross-spectral density matrix (CSD). The CSD can be regarded as the equivalent in the frequency domain to the covariance matrix in the time domain, thus it is a measures how a certain channels activity is co-modulated with another channels activity (for a particular frequency) - makes pretty much sense to make use of this when computing connectivity, right? :) > As you might know, a Fourier transform returns complex numbers, where the imaginary part of this number contains phase information. When calling ft_freqanalysis, you can decide if it shall only return the (squared) real part of the frequency spectrum (cfg.output='pow'), or instead the full CSD (cfg.output = 'powandcsd'). Alternatively, you can also let ft_freqanalysis return the raw Fourier coefficients (cfg.output='fourier'). From the Fourier coefficients, however, you can easily obtain the CSD or the power spectrum basically by multiplication the Fourier matrix with itself (transposed). All of these measures quantify the phase relation between channels across trials, and as phase information is coded in the imaginary part of the fourier output, thus for connectivityanalysis you need the CSD which can be obtained either by 'powandcsd' or by 'fourier'. > > I hope that somehow clarifies your questions. > > Best, > J?rn > > On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote: > Dear Fieltrip experts, > > I have my continuous data imported to fieldtrip with matlab, I'm looking for performing connectivity analysis between pairs of sensors, I have succed as: > data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels and 2000 samples > data.label {59x1}; > data.time {1xNepochs}; > > then, calculate only the FFT of all sensors as: > cfg=[]; > cfg.output='fourier'; > cfg.method='mtmfft'; > cfg.taper='hanning'; > cfg.foilim=[8.5 9.5]; > cfg.tapsmofrq=0; > cfg.trials='all'; > cfg.keeptrials='yes'; > cfg.channel='all'; > fourier=ft_freqanalysis(cfg, data) > as output I get: > dimord = 'rpttap_chan_freq' > freq= [1x9] > fourierspctrm=[7x59x9 double] > > Then compute the imaginary part of coherency as: > cfg=[]; > cfg.method ='cohe'; > cfg.complex='imag'; > cfg.channelcbm={'all' 'all'}; > coher = ft_connectivityanalysis (cfg, fourier) > as output get: > dimord='chan_chan_freq'; > cohspctrm=[59x59x9 double]; > dof=7; > > I have two main questions: > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? > > > > > Many thanks in advanced, > Gabriel. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip --------------------------
PhD. student Gabriel Gonz?lez-Escamilla
Laboratory of Functional Neuroscience
Department of Physiology, Anatomy, and Cell Biology
University Pablo de Olavide
Ctra. de Utrera, Km.1
41013 - Seville
- Spain -

Email: ggonesc at upo.es
http://www.upo.es/neuroaging/es/
-------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 30, Issue 29 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Wed May 22 09:30:17 2013 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Wed, 22 May 2013 09:30:17 +0200 Subject: [FieldTrip] question About head model In-Reply-To: <2b26519c1b85ee0-0001c.Richmail.00022806623245833658@139.com> References: <2b26519c1b85ee0-0001c.Richmail.00022806623245833658@139.com> Message-ID: Dear Jing, It is best to use the T1 MRI rather than the other scans. To open a DICOM format file, you can try one of these options: % read the DICOM files mri = ft_read_mri('single_file_of_DICOM_series.IMA'); % or use a graphical file selection[f, p] = uigetfile ('*'); mri = ft_read_mri(fullfile (p, f)); I copied the above from documentation on the FieldTrip wiki: http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_an_anatomical_mri_from_dicom_into_ctf_format Then you can save the 'mri' into a *.mat file for future use with FieldTrip. Best regards, Johanna 2013/5/22 WangJing <13681530640 at 139.com> > Hi > I am a freshman about field trip. > I am trying to build the forward model. but my mri data is different from > the data in the tutorial. So I don't know how to bulid the head model. I > use the date which is from the paper "Open Database of Epileptic EEG with > MRI and Postoperational Assessment of Foci—a Real World Verification for > the EEG Inverse Solutions",http://eeg.pl/epi. MRI recordings containing a > T1, T2 or fluid attenuated inversion recovery (FLAIR) weighted brain scans > with morphologic substrate of the epilepsy (mostly cortical dysplasias, > dysplastic tumors etc.). In some cases there is also a scan with the > gadolinium (GAD) contrast. The images were collected by Siemens Sonata 1.5T > scanner. The data is stored in the Digital Imaging and Communications in > Medicine (DICOM) format. The name of the scan’s folder indicates its > weighting.The scans have the following resolutions: T1: 512 × 512 pixels, > pixel spacing 0.4687 mm, slice thickness 1.2 mm, T2: 256 × 256 pixels, > pixel spacing 0.9375 mm,slice thickness 2.5 mm. > In the tutorial,the mri data stored in only one file, while the data which > I used have many files, I don't know how to process. who can help me,Thanks1 > Thanks very much! > Best Reagards > Jing Wang > > > > > > ------------------------------ > ----The following is the content of the forwarded email---- > From:fieldtrip-request > To:fieldtrip > Date:2013-05-21 23:59:18 > Subject:fieldtrip Digest, Vol 30, Issue 29 > > 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: problem in connectivityanalysis (Gabriel Gonzalez Escamilla) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 21 May 2013 17:52:21 +0200 > From: Gabriel Gonzalez Escamilla > To: FieldTrip discussion list > Subject: Re: [FieldTrip] problem in connectivityanalysis > Message-ID: <1348f6433edc26f9.519bb455 at upo.es> > Content-Type: text/plain; charset="iso-8859-1" > > Thank you so much for your answer J?rn, > > > Now I got it, so, I will let the 'fourier' as input to ft_connectivityanalysis, because for some indices I will need the auto-spectrum, and if I fully undertood what you said, it will be the same, as they always take the phase information from the fourier transform. And fieltrip will automatically compute the csd if the input is the frequency data. > > > Nevertheless, it give me some error when I tried to use the output from 'powandcsd' of freqanalysis, always gives me a matrix dimensions error, and when I use the output 'fourier' from connectivityanalysis, it computes almost all indices to ok, raging from? -1 to 1 (I'm saw that they are signed, so this is ok), the problem are the ImC ranging from -inf to inf, and the PLV values ranging from 0 to inf, but when I use the 'fourier' the values are. Which for me is really weird. > > > > I have checked internally, and even when I always use the 'fourier' as input, when it internally calculates cross-spectrum for the ImC and PLV, the data.crsspctrm is different, e.g: > data.dimord = 'rpt_rpt_chan_chan_freq' > ans size(data.crsspctrm) = [1 7 59 59]; > > So, both are apparently the same, but the data inside this matrices is different, > > > for example, when calculating the ImC the first 7 columns for the first two rows are: > val(:,:,1,1) > ?[0.9323? 0.3679? 0.8629? 1.6436? 0.6404? 1.8782? 0.1139] > val(:,:,1,2) > > ?[0.8509-0.1555i? 0.2507-0.1066i? 0.8173-0.0290i? 1.4328-0.2427i? 0.5457-0.0500i? 1.6505-0.0161i? 0.0993+0.0016i] > > while when calculating the PLV are: > val(:,:,1,1) > ?[1? 1? 1? 1? 1? 1? 1] > val(:,:,1,2) > > ?[0.9694-0.2133i? 0.7011-0.3564i? 0.9951-0.0104i? 0.9014-0.3481i? 0.9781-0.0819i? 0.9982-0.0046i? 0.9507-0.0483i] > > > > I'm pretty sure I'm doing something wrong here, but I don't really have a clue, > > > If I use the fourier transform to calculate the 'csd' in ft_connectivity analysis and use this csd as input to all other ft_connectivityanalysis indices all of them are set to NaN or 1, not ranging between any numbers. > > > > > > On the other hand, I have seen searching on the net, that fieltrip is capable of create surrogate data, by shifting the phase information on every trial for only one electrode of each pair while using the original samples of each trials on the second channel, but I couldn't find on the manual how to do such a thing. Is there any way to compute this kind of surrogates for every sensor? or was it something that some one suggest to somebody? > > > Many thanks in advanced, > Gabriel. > > > > > ----- Mensaje original ----- > De: "J?rn M. Horschig" > Fecha: Martes, 21 de Mayo de 2013, 9:03 am > Asunto: Re: [FieldTrip] problem in connectivityanalysis > A: FieldTrip discussion list > > > > > > > Dear Gabriel, > > > > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > > No. You should think of coherence more as a measure for the consistency of the phase relation between channels across trials, so coherence is just not defined per trial,neither would it make sense to compute coherence for a single trial. > > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? I see some terminology issues here. Let me try to explain in a simple (aka least-mathematical I can think of) way: > > > > > For all these connectivity measures, we need the phase information from the Fourier transform (FFT) to compute the cross-spectral density matrix (CSD). The CSD can be regarded as the equivalent in the frequency domain to the covariance matrix in the time domain, thus it is a measures how a certain channels activity is co-modulated with another channels activity (for a particular frequency) - makes pretty much sense to make use of this when computing connectivity, right? :) > > > As you might know, a Fourier transform returns complex numbers, where the imaginary part of this number contains phase information. When calling ft_freqanalysis, you can decide if it shall only return the (squared) real part of the frequency spectrum (cfg.output='pow'), or instead the full CSD (cfg.output = 'powandcsd'). Alternatively, you can also let ft_freqanalysis return the raw Fourier coefficients (cfg.output='fourier'). From the Fourier coefficients, however, you can easily obtain the CSD or the power spectrum basically by multiplication the Fourier matrix with itself (transposed). All of these measures quantify the phase relation between channels across trials, and as phase information is coded in the imaginary part of the fourier output, thus for connectivityanalysis you need the CSD which can be obtained either by 'powandcsd' or by 'fourier'. > > > > I hope that somehow clarifies your questions. > > > > Best, > > J?rn > > > > On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote: > > Dear Fieltrip experts, > > > > > I have my continuous data imported to fieldtrip with matlab, I'm looking for performing connectivity analysis between pairs of sensors, I have succed as: > > > data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels and 2000 samples > > data.label {59x1}; > > data.time {1xNepochs}; > > > > then, calculate only the FFT of all sensors as: > > cfg=[]; > > cfg.output='fourier'; > > cfg.method='mtmfft'; > > cfg.taper='hanning'; > > cfg.foilim=[8.5 9.5]; > > cfg.tapsmofrq=0; > > cfg.trials='all'; > > cfg.keeptrials='yes'; > > cfg.channel='all'; > > fourier=ft_freqanalysis(cfg, data) > > as output I get: > > dimord = 'rpttap_chan_freq' > > freq= [1x9] > > fourierspctrm=[7x59x9 double] > > > > Then compute the imaginary part of coherency as: > > cfg=[]; > > cfg.method ='cohe'; > > cfg.complex='imag'; > > cfg.channelcbm={'all' 'all'}; > > coher = ft_connectivityanalysis (cfg, fourier) > > as output get: > > dimord='chan_chan_freq'; > > cohspctrm=[59x59x9 double]; > > dof=7; > > > > I have two main questions: > > > > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > > > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? > > > > > > > > > > Many thanks in advanced, > > Gabriel. > > > > > > > > > _______________________________________________ > fieldtrip mailing list > > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: > jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: > http://www.ru.nl/donders > > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > --------------------------
PhD. student Gabriel Gonz?lez-Escamilla
Laboratory of Functional Neuroscience
Department of Physiology, Anatomy, and Cell Biology
University Pablo de Olavide
Ctra. de Utrera, Km.1
41013 - Seville
- Spain -

Email: > ggonesc at upo.es
http://www.upo.es/neuroaging/es/
> > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130521/0886ac06/attachment.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 30, Issue 29 > ***************************************** > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mushfa.yousuf at googlemail.com Wed May 22 12:13:56 2013 From: mushfa.yousuf at googlemail.com (Mushfa Yousuf) Date: Wed, 22 May 2013 12:13:56 +0200 Subject: [FieldTrip] Source Reconstruction using Openmeeg method In-Reply-To: <5190AEAA.3020301@donders.ru.nl> References: <5190AEAA.3020301@donders.ru.nl> Message-ID: Hello Jörn; I have calculated an indiviual leadfield for both EEG and MEG. The structure of EEg and MEG shows the following variable grid_meg = xgrid: [1x20 double] ygrid: [-8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8] zgrid: [-2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13] dim: [20 17 16] pos: [5440x3 double] unit: 'cm' inside: [1x3177 double] outside: [1x2263 double] cfg: [1x1 struct] leadfield: {1x5440 cell} grid_eeg = xgrid: [-6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9] ygrid: [-6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6] zgrid: [2 3 4 5 6 7 8 9 10 11] dim: [16 13 10] pos: [2080x3 double] unit: 'cm' inside: [1x1331 double] outside: [1x749 double] cfg: [1x1 struct] leadfield: {1x2080 cell} Can you please give me a rough idea that how to concatenate the variables from both structure ? Thank you Regards ; Mushfa Yousuf On Mon, May 13, 2013 at 11:13 AM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Mushfa, > > I think you have to compute two leadfield matrices, one for EEG (elec) and > one for MEG (grad), and then concatenate these (and make sure that the > order of sensors won't get mixed up anywhere, because sourceanalysis just > expects the leadfield matrix to be ordered like your data. If that's not > the case, you either encounter the previous error you described or (if the > number of channels matches, but order is mixed up) it will just return > wrong source estimated activity. > > Best, > Jörn > > > On 5/6/2013 2:47 PM, Mushfa Yousuf wrote: > > Hello; > > Yes you were right. I have defined the wrong sensors i.e 'grad' instead > of 'elec' while calculating the Leadfield. > > Actually I am trying to calculate Combined source reconstruction from > both EEG and MEG sensors. > > Do you have any idea, how to define both elec and grad definition while > calculating first forward then inverse solution. > > Because in a fieldtrip either you can defined elec or grad at one time. > > > Regards; > > > Mushfa Yousuf > > Neurozentrum, > Universitätsklinikum Schleswig-Holstein, > Campus Kiel (UKSH), Deutschland > > > On Tue, Apr 30, 2013 at 6:23 PM, Johanna Zumer wrote: > >> Hi Mushfa, >> >> My guess is that the channels that have you used to compute .csdspctrm >> are not the same as the channels in cfg.elec. If you set cfg.channel = >> freqPost.label, does that solve it? >> >> Cheers, >> Johanna >> >> >> 2013/4/30 Mushfa Yousuf >> >>> Hello Fieldtrippers, >>> >>> I am doing source reconstruction using EEG channels on a fieldtrip. >>> >>> I have computed Forward solution i.e head model using 'Openmeeg' and >>> lead field successfully. >>> >>> For the inverse solution using 'dics' method, I wrote the following >>> syntax >>> >>> >>> >>> >>> >>> cfg = []; >>> cfg.method = 'dics'; >>> cfg.frequency = 130; >>> cfg.elec = dataFIC12.hdr.elec; >>> cfg.grid = grid; >>> cfg.vol = vol; >>> >>> sourcePost = ft_sourceanalysis(cfg, freqPost); >>> >>> >>> and I have received the following error: >>> >>> >>> ??? Error using ==> mtimes >>> Inner matrix dimensions must agree. >>> >>> Error in ==> beamformer_dics at 314 >>> filt = pinv(lf' * invCf * lf) * lf' * invCf; % >>> Gross eqn. 3, use PINV/SVD to cover rank deficient >>> leadfield >>> >>> Error in ==> ft_sourceanalysis at 595 >>> dip(i) = beamformer_dics(grid, sens, vol, [], >>> squeeze(Cf(i,:,:)), optarg{:}); >>> >>> Error in ==> newCode at 214 >>> sourcePost = ft_sourceanalysis(cfg, freqPost); >>> >>> >>> >>> >>> Any help would be appreciated. >>> >>> >>> Regards; >>> >>> >>> Mushfa Yousuf >>> >>> Neurozentrum, >>> Universitätsklinikum Schleswig-Holstein, >>> Campus Kiel (UKSH), Deutschland >>> >>> >>> _______________________________________________ >>> 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 listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ggonesc at upo.es Wed May 22 19:36:08 2013 From: ggonesc at upo.es (Gabriel Gonzalez Escamilla) Date: Wed, 22 May 2013 19:36:08 +0200 Subject: [FieldTrip] connectivity problem Message-ID: <596f90904ed40d3b.519d1e28@upo.es> Dear Fieldtrip experts, I finally understood how fieltrip computes the plv, so, my last e-mail has no sense now. Given say this, I have one question: I've followed the fieltrip implementation to compute the PLV, and found that it takes the CSD, and normalizes it for the amplitude of the replicates, this is to divide the csd by the absolute of the same csd, then makes an average of the normalized csd's, to finally take the absolute of the average-normalized-csd as the PLV.  I think it can be summarized to something like, PLV = |E( csd/abs(csd) )| I do not see the similarity with the clasical formula that appears in the papers PLV=| E{exp(i*I{X})} |, where I{X} is the imaginary of the cross-spectrum, and E|.| is the expected value; I cannot find the relationship between the implementation on fieltrip of the PLV and the formula on the papers. Can anyone explain to me the relationship between the two approaches? or tell me the paper where it is explained? Many thanks in advanced, Gabriel -------------- next part -------------- An HTML attachment was scrubbed... URL: From 13681530640 at 139.com Thu May 23 03:38:08 2013 From: 13681530640 at 139.com (WangJing) Date: Thu, 23 May 2013 09:38:08 +0800 (CST) Subject: [FieldTrip] fieldtrip Digest, Vol 30, Issue 31 References: Message-ID: <2b26519d65c97b6-0000c.Richmail.00022826124215434628@139.com> Dear Johanna, Thank you for your suggestion. 1.I have two folder of T1 MRI, one is t1_vibe_tra_4,and another is t1_vibe_traGAD-5. which one is best? 2.when I convert MRI from DICOM into CTF format,the vitamin E marker didn't be found. what can I do? Best Regards, Jing Wang -------------------------------------------------------------------------------- ----The following is the content of the forwarded email---- From:fieldtrip-request To:fieldtrip Date:2013-05-22 15:33:13 Subject:fieldtrip Digest, Vol 30, Issue 31 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: question About head model (Johanna Zumer) ---------------------------------------------------------------------- Message: 1 Date: Wed, 22 May 2013 09:30:17 +0200 From: Johanna Zumer To: FieldTrip discussion list Subject: Re: [FieldTrip] question About head model Message-ID: Content-Type: text/plain; charset="utf-8" Dear Jing, It is best to use the T1 MRI rather than the other scans. To open a DICOM format file, you can try one of these options: % read the DICOM files mri = ft_read_mri('single_file_of_DICOM_series.IMA'); % or use a graphical file selection[f, p] = uigetfile ('*'); mri = ft_read_mri(fullfile (p, f)); I copied the above from documentation on the FieldTrip wiki: http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_an_anatomical_mri_from_dicom_into_ctf_format Then you can save the 'mri' into a *.mat file for future use with FieldTrip. Best regards, Johanna 2013/5/22 WangJing <13681530640 at 139.com> > Hi > I am a freshman about field trip. > I am trying to build the forward model. but my mri data is different from > the data in the tutorial. So I don't know how to bulid the head model. I > use the date which is from the paper "Open Database of Epileptic EEG with > MRI and Postoperational Assessment of Foci?a Real World Verification for > the EEG Inverse Solutions",http://eeg.pl/epi. MRI recordings containing a > T1, T2 or fluid attenuated inversion recovery (FLAIR) weighted brain scans > with morphologic substrate of the epilepsy (mostly cortical dysplasias, > dysplastic tumors etc.). In some cases there is also a scan with the > gadolinium (GAD) contrast. The images were collected by Siemens Sonata 1.5T > scanner. The data is stored in the Digital Imaging and Communications in > Medicine (DICOM) format. The name of the scan?s folder indicates its > weighting.The scans have the following resolutions: T1: 512 ? 512 pixels, > pixel spacing 0.4687 mm, slice thickness 1.2 mm, T2: 256 ? 256 pixels, > pixel spacing 0.9375 mm,slice thickness 2.5 mm. > In the tutorial,the mri data stored in only one file, while the data which > I used have many files, I don't know how to process. who can help me,Thanks1 > Thanks very much! > Best Reagards > Jing Wang > > > > > > ------------------------------ > ----The following is the content of the forwarded email---- > From?fieldtrip-request > To?fieldtrip > Date?2013-05-21 23:59:18 > Subject?fieldtrip Digest, Vol 30, Issue 29 > > 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: problem in connectivityanalysis (Gabriel Gonzalez Escamilla) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 21 May 2013 17:52:21 +0200 > From: Gabriel Gonzalez Escamilla > To: FieldTrip discussion list > Subject: Re: [FieldTrip] problem in connectivityanalysis > Message-ID: <1348f6433edc26f9.519bb455 at upo.es> > Content-Type: text/plain; charset="iso-8859-1" > > Thank you so much for your answer J?rn, > > > Now I got it, so, I will let the 'fourier' as input to ft_connectivityanalysis, because for some indices I will need the auto-spectrum, and if I fully undertood what you said, it will be the same, as they always take the phase information from the fourier transform. And fieltrip will automatically compute the csd if the input is the frequency data. > > > Nevertheless, it give me some error when I tried to use the output from 'powandcsd' of freqanalysis, always gives me a matrix dimensions error, and when I use the output 'fourier' from connectivityanalysis, it computes almost all indices to ok, raging from? -1 to 1 (I'm saw that they are signed, so this is ok), the problem are the ImC ranging from -inf to inf, and the PLV values ranging from 0 to inf, but when I use the 'fourier' the values are. Which for me is really weird. > > > > I have checked internally, and even when I always use the 'fourier' as input, when it internally calculates cross-spectrum for the ImC and PLV, the data.crsspctrm is different, e.g: > data.dimord = 'rpt_rpt_chan_chan_freq' > ans size(data.crsspctrm) = [1 7 59 59]; > > So, both are apparently the same, but the data inside this matrices is different, > > > for example, when calculating the ImC the first 7 columns for the first two rows are: > val(:,:,1,1) > ?[0.9323? 0.3679? 0.8629? 1.6436? 0.6404? 1.8782? 0.1139] > val(:,:,1,2) > > ?[0.8509-0.1555i? 0.2507-0.1066i? 0.8173-0.0290i? 1.4328-0.2427i? 0.5457-0.0500i? 1.6505-0.0161i? 0.0993+0.0016i] > > while when calculating the PLV are: > val(:,:,1,1) > ?[1? 1? 1? 1? 1? 1? 1] > val(:,:,1,2) > > ?[0.9694-0.2133i? 0.7011-0.3564i? 0.9951-0.0104i? 0.9014-0.3481i? 0.9781-0.0819i? 0.9982-0.0046i? 0.9507-0.0483i] > > > > I'm pretty sure I'm doing something wrong here, but I don't really have a clue, > > > If I use the fourier transform to calculate the 'csd' in ft_connectivity analysis and use this csd as input to all other ft_connectivityanalysis indices all of them are set to NaN or 1, not ranging between any numbers. > > > > > > On the other hand, I have seen searching on the net, that fieltrip is capable of create surrogate data, by shifting the phase information on every trial for only one electrode of each pair while using the original samples of each trials on the second channel, but I couldn't find on the manual how to do such a thing. Is there any way to compute this kind of surrogates for every sensor? or was it something that some one suggest to somebody? > > > Many thanks in advanced, > Gabriel. > > > > > ----- Mensaje original ----- > De: "J?rn M. Horschig" > Fecha: Martes, 21 de Mayo de 2013, 9:03 am > Asunto: Re: [FieldTrip] problem in connectivityanalysis > A: FieldTrip discussion list > > > > > > > Dear Gabriel, > > > > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > > No. You should think of coherence more as a measure for the consistency of the phase relation between channels across trials, so coherence is just not defined per trial,neither would it make sense to compute coherence for a single trial. > > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? I see some terminology issues here. Let me try to explain in a simple (aka least-mathematical I can think of) way: > > > > > For all these connectivity measures, we need the phase information from the Fourier transform (FFT) to compute the cross-spectral density matrix (CSD). The CSD can be regarded as the equivalent in the frequency domain to the covariance matrix in the time domain, thus it is a measures how a certain channels activity is co-modulated with another channels activity (for a particular frequency) - makes pretty much sense to make use of this when computing connectivity, right? :) > > > As you might know, a Fourier transform returns complex numbers, where the imaginary part of this number contains phase information. When calling ft_freqanalysis, you can decide if it shall only return the (squared) real part of the frequency spectrum (cfg.output='pow'), or instead the full CSD (cfg.output = 'powandcsd'). Alternatively, you can also let ft_freqanalysis return the raw Fourier coefficients (cfg.output='fourier'). From the Fourier coefficients, however, you can easily obtain the CSD or the power spectrum basically by multiplication the Fourier matrix with itself (transposed). All of these measures quantify the phase relation between channels across trials, and as phase information is coded in the imaginary part of the fourier output, thus for connectivityanalysis you need the CSD which can be obtained either by 'powandcsd' or by 'fourier'. > > > > I hope that somehow clarifies your questions. > > > > Best, > > J?rn > > > > On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote: > > Dear Fieltrip experts, > > > > > I have my continuous data imported to fieldtrip with matlab, I'm looking for performing connectivity analysis between pairs of sensors, I have succed as: > > > data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels and 2000 samples > > data.label {59x1}; > > data.time {1xNepochs}; > > > > then, calculate only the FFT of all sensors as: > > cfg=[]; > > cfg.output='fourier'; > > cfg.method='mtmfft'; > > cfg.taper='hanning'; > > cfg.foilim=[8.5 9.5]; > > cfg.tapsmofrq=0; > > cfg.trials='all'; > > cfg.keeptrials='yes'; > > cfg.channel='all'; > > fourier=ft_freqanalysis(cfg, data) > > as output I get: > > dimord = 'rpttap_chan_freq' > > freq= [1x9] > > fourierspctrm=[7x59x9 double] > > > > Then compute the imaginary part of coherency as: > > cfg=[]; > > cfg.method ='cohe'; > > cfg.complex='imag'; > > cfg.channelcbm={'all' 'all'}; > > coher = ft_connectivityanalysis (cfg, fourier) > > as output get: > > dimord='chan_chan_freq'; > > cohspctrm=[59x59x9 double]; > > dof=7; > > > > I have two main questions: > > > > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > > > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? > > > > > > > > > > Many thanks in advanced, > > Gabriel. > > > > > > > > > _______________________________________________ > fieldtrip mailing list > > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: > jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: > http://www.ru.nl/donders > > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > --------------------------
PhD. student Gabriel Gonz?lez-Escamilla
Laboratory of Functional Neuroscience
Department of Physiology, Anatomy, and Cell Biology
University Pablo de Olavide
Ctra. de Utrera, Km.1
41013 - Seville
- Spain -

Email: > ggonesc at upo.es
http://www.upo.es/neuroaging/es/
> > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130521/0886ac06/attachment.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 30, Issue 29 > ***************************************** > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 30, Issue 31 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu May 23 10:09:17 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 23 May 2013 10:09:17 +0200 Subject: [FieldTrip] connectivity problem In-Reply-To: <596f90904ed40d3b.519d1e28@upo.es> References: <596f90904ed40d3b.519d1e28@upo.es> Message-ID: Dear Gabriel, If I am not mistaken, the classical formula in Lachaux et al. (1999) Human Brain Mapping is PLV = 1/N * | sum(exp(i * theta(t,n))) | . This is almost the same as the formula you mention, except, importantly, that theta is the phase difference between two signals, so the angle of the CSD, and *not* the imaginary part. Note furthermore that 1 * exp(i*angle(z)) is equal to z/abs(z) for any complex z, and you see that the implementation computes the classical formula. Hope this helps, Best, Eelke On 22 May 2013 19:36, Gabriel Gonzalez Escamilla wrote: > Dear Fieldtrip experts, > > I finally understood how fieltrip computes the plv, so, my last e-mail has > no sense now. Given say this, I have one question: > > I've followed the fieltrip implementation to compute the PLV, and found that > it takes the CSD, and normalizes it for the amplitude of the replicates, > this is to divide the csd by the absolute of the same csd, then makes an > average of the normalized csd's, to finally take the absolute of the > average-normalized-csd as the PLV. I think it can be summarized to > something like, PLV = |E( csd/abs(csd) )| > > I do not see the similarity with the clasical formula that appears in the > papers PLV=| E{exp(i*I{X})} |, where I{X} is the imaginary of the > cross-spectrum, and E|.| is the expected value; I cannot find the > relationship between the implementation on fieltrip of the PLV and the > formula on the papers. > > Can anyone explain to me the relationship between the two approaches? or > tell me the paper where it is explained? > > Many thanks in advanced, > Gabriel > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jeremiemattout at yahoo.fr Thu May 23 10:19:09 2013 From: jeremiemattout at yahoo.fr (Jeremie MATTOUT) Date: Thu, 23 May 2013 09:19:09 +0100 (BST) Subject: [FieldTrip] DCM for fMRI and EEG/MEG course - Seattle June 2013 Message-ID: <1369297149.1995.YahooMailNeo@web133005.mail.ir2.yahoo.com> Dear Colleagues, We are pleased to announce DCM for fMRI and MEG/EEG, an intermediate-level, 3-day workshop designed for investigators having familiarity with the fundamental principles of fMRI or MEG/EEG data acquisition and analysis.. It will be held at the University of Washington in Seattle, WA from JUN 21-23, 2013, immediately following the OHBM 2013 meeting. This course will bring together investigators interested in using quantitative biophysical models to identify brain connectivity and dynamics using the tools of imaging neuroscience, including fMRI, EEG/MEG, and LFP. Presentations will include: overviews of brain connectivity methods and models descriptions of specifics of DCM for fMRI, EEG/MEG and LFP data explanations of Bayesian analysis at both single-subject and group levels explorations of DCM experimental design and other advanced issues Each afternoon will include a laboratory session, in which participants will gather in small groups to work with the faculty through the stages of analyzing data from example experiments. Further details can be found at: http://www.neurometrika.org/DCM2013 Kind Regards, Tom Zeffiro, Jean Daunizeau & Jeremie Mattout -------------- next part -------------- An HTML attachment was scrubbed... URL: From marianapbranco1 at gmail.com Thu May 23 10:25:45 2013 From: marianapbranco1 at gmail.com (Mariana Branco) Date: Thu, 23 May 2013 10:25:45 +0200 Subject: [FieldTrip] Online preprocessing Message-ID: <1FDFE75C-E4A5-4F6D-B860-76647C558465@gmail.com> Hello, I am new in the BCI research field, and I am starting to implement an online BCI system using the Fieldtrip toolbox to detect ERD/ERS features. I already did two offline experiments using this toolbox, but now I am having some doubts about how to adapt the offline signal processing functions into real-time; I started by simulating real-time data from a file. My questions are: 1) To process the data real-time using ft_preprocessing is it first necessary to define trials (with ft_definetrial)? If so, how can I define the trial if it is real-time? 2) Is it possible to still use the function ft_preprocessing and ft_resampledata in real-time with the same specifications of offline procedure? 3) When simulating data stream (with two matlab sessions) the function ft_realtime_powerestimate(cfg) reports an error related to the "arg 3 (overlap)" on the welch's method. How can I correct this? 4) Also, for synchronous/triggered data analysis it is available the function ft_realtime_average. Is it possible to explain how can this example function be used for implementation of my own feature processing and extraction function. Does it preprocess the data in an alternative way to ft_preprocessing? I am sorry for all the questions. Regards, Mariana Branco From jm.horschig at donders.ru.nl Thu May 23 11:37:59 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 23 May 2013 11:37:59 +0200 Subject: [FieldTrip] Online preprocessing In-Reply-To: <1FDFE75C-E4A5-4F6D-B860-76647C558465@gmail.com> References: <1FDFE75C-E4A5-4F6D-B860-76647C558465@gmail.com> Message-ID: <519DE377.1020805@donders.ru.nl> Hi Mariana, On 5/23/2013 10:25 AM, Mariana Branco wrote: > Hello, > > I am new in the BCI research field, and I am starting to implement an online BCI system using the Fieldtrip toolbox to detect ERD/ERS features. I already did two offline experiments using this toolbox, but now I am having some doubts about how to adapt the offline signal processing functions into real-time; I started by simulating real-time data from a file. > My questions are: > 1) To process the data real-time using ft_preprocessing is it first necessary to define trials (with ft_definetrial)? If so, how can I define the trial if it is real-time? no, you should use ft_read_data directly. The way to go is to check the header of your buffer for new events using ft_read_event. Upon detection of a relevant trigger, you need to use the returned event sample to compute your beginning and endsample manually (this is what ft_definetrial, or more precisely, your trialfun, usually does). Then you can use ft_read_data to read data from the buffer into memory. ft_read_data returns a datamatrix that can be used to create your data.trial field. Also, you need to manually create the rest of the data-structure. > 2) Is it possible to still use the function ft_preprocessing and ft_resampledata in real-time with the same specifications of offline procedure? It is definitely possible, once you converted the matrix to a regular fieldtrip structure. However, since it is about speed in online processing, you can think about using low-level functions of FieldTrip directly. Note that for resampling, you can also set up the shared memory (eg. acq2ftx) such that is downsamples right from the start. > 3) When simulating data stream (with two matlab sessions) the function ft_realtime_powerestimate(cfg) reports an error related to the "arg 3 (overlap)" on the welch's method. How can I correct this? Do not use Welch's method, use another function. I don't know about this particular example function, but I think you would greatly benefit from finding out where the error is yourself. Note that online streaming od data *is* complicated and requires *you* to have knowledge about this. > 4) Also, for synchronous/triggered data analysis it is available the function ft_realtime_average. Is it possible to explain how can this example function be used for implementation of my own feature processing and extraction function. Does it preprocess the data in an alternative way to ft_preprocessing? It should be an example, yes. Usually, there should be, as explained above, some ft_read_event statement to read the trigger value(s). In that particular example, the trialfun is used rather than ft_read_data directly, but trialfun is basically a wrapper around ft_read_data. Also, in that example a bunch of trials is read in, not just one. The thing you need to do to adjust this is to filter out the event structure such that only in case of the trigger of interest some data processing is done (you can use ft_filter_event for this). My best advise for you is to read all (most) example functions and adjust them so that they run in your lab. Then sketch a flow diagram how triggers/data will be sent and read, try to implement this yourself (by copy&pasting relevant parts out of the example functions). If you have specific questions, feel free to always ask, but as this stage (please excuse my bluntnessI think you do not really know what needs to be done. I could write a lot about this, but I think you will benefit more if you first try yourself (especially because I do not know how your lab is set up and how things needs to be adjusted). But, as just said, feel free to write again when you have other questions. Good luck! Best, Jörn > > I am sorry for all the questions. No problem, no way to know everything :) > Regards, > > Mariana Branco > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From marianapbranco1 at gmail.com Thu May 23 11:57:27 2013 From: marianapbranco1 at gmail.com (Mariana Branco) Date: Thu, 23 May 2013 11:57:27 +0200 Subject: [FieldTrip] Online preprocessing In-Reply-To: <519DE377.1020805@donders.ru.nl> References: <1FDFE75C-E4A5-4F6D-B860-76647C558465@gmail.com> <519DE377.1020805@donders.ru.nl> Message-ID: Hi Jörn, Thank you very much for answering. I definitely still have a lot to understand about online implementation, which I will do. Another specific doubt came up when I was trying to understand the function ft_preprocessing. My offline data is composed of 40 trials of approx. 9-10s paradigms. I have a cued motor task at 3s (lasting 5s) and I use 0s until 3s as baseline to each trial. In the examples used in fieldtrip it is possible to chose the 'demean' option and specify the baseline period in seconds. My question is how exactly does the ft_preprocessing function corrects the baseline? Also, the examples define the baseline window with negative time, but I defined the baselinewindow=[0 3]. Is it wrong? Thank you again for all the advices, I will definitely pose more question in the future. Mariana Branco On 23 May 2013, at 11:37, "Jörn M. Horschig" wrote: > Hi Mariana, > > On 5/23/2013 10:25 AM, Mariana Branco wrote: >> Hello, >> >> I am new in the BCI research field, and I am starting to implement an online BCI system using the Fieldtrip toolbox to detect ERD/ERS features. I already did two offline experiments using this toolbox, but now I am having some doubts about how to adapt the offline signal processing functions into real-time; I started by simulating real-time data from a file. >> My questions are: >> 1) To process the data real-time using ft_preprocessing is it first necessary to define trials (with ft_definetrial)? If so, how can I define the trial if it is real-time? > > no, you should use ft_read_data directly. The way to go is to check the header of your buffer for new events using ft_read_event. Upon detection of a relevant trigger, you need to use the returned event sample to compute your beginning and endsample manually (this is what ft_definetrial, or more precisely, your trialfun, usually does). Then you can use ft_read_data to read data from the buffer into memory. ft_read_data returns a datamatrix that can be used to create your data.trial field. Also, you need to manually create the rest of the data-structure. >> 2) Is it possible to still use the function ft_preprocessing and ft_resampledata in real-time with the same specifications of offline procedure? > It is definitely possible, once you converted the matrix to a regular fieldtrip structure. However, since it is about speed in online processing, you can think about using low-level functions of FieldTrip directly. Note that for resampling, you can also set up the shared memory (eg. acq2ftx) such that is downsamples right from the start. > >> 3) When simulating data stream (with two matlab sessions) the function ft_realtime_powerestimate(cfg) reports an error related to the "arg 3 (overlap)" on the welch's method. How can I correct this? > Do not use Welch's method, use another function. I don't know about this particular example function, but I think you would greatly benefit from finding out where the error is yourself. Note that online streaming od data *is* complicated and requires *you* to have knowledge about this. >> 4) Also, for synchronous/triggered data analysis it is available the function ft_realtime_average. Is it possible to explain how can this example function be used for implementation of my own feature processing and extraction function. Does it preprocess the data in an alternative way to ft_preprocessing? > It should be an example, yes. Usually, there should be, as explained above, some ft_read_event statement to read the trigger value(s). In that particular example, the trialfun is used rather than ft_read_data directly, but trialfun is basically a wrapper around ft_read_data. Also, in that example a bunch of trials is read in, not just one. The thing you need to do to adjust this is to filter out the event structure such that only in case of the trigger of interest some data processing is done (you can use ft_filter_event for this). > > My best advise for you is to read all (most) example functions and adjust them so that they run in your lab. Then sketch a flow diagram how triggers/data will be sent and read, try to implement this yourself (by copy&pasting relevant parts out of the example functions). If you have specific questions, feel free to always ask, but as this stage (please excuse my bluntnessI think you do not really know what needs to be done. I could write a lot about this, but I think you will benefit more if you first try yourself (especially because I do not know how your lab is set up and how things needs to be adjusted). But, as just said, feel free to write again when you have other questions. > > Good luck! > Best, > Jörn > >> >> I am sorry for all the questions. > > No problem, no way to know everything :) > >> Regards, >> >> Mariana Branco >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Thu May 23 12:08:33 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 23 May 2013 12:08:33 +0200 Subject: [FieldTrip] Online preprocessing In-Reply-To: References: <1FDFE75C-E4A5-4F6D-B860-76647C558465@gmail.com> <519DE377.1020805@donders.ru.nl> Message-ID: <519DEAA1.5030402@donders.ru.nl> Hi Mariana, ft_preprocessing demeans by the whole time window, in your 0s to 5s. The baseline window you specify depends on the time axis itself, if it goes from 0s to 5s, then defining [0 3] is fine. If it goes from -3 to 2s, then you need to define [-3 0]. Time is relative :) Also, please check ft_timelockbaseline. But such a simple thing as subtracting a number from a matrix can also easily be done without relying on a fieldtrip function :) Best, Jörn On 5/23/2013 11:57 AM, Mariana Branco wrote: > Hi Jörn, > > Thank you very much for answering. I definitely still have a lot to understand about online implementation, which I will do. > > Another specific doubt came up when I was trying to understand the function ft_preprocessing. My offline data is composed of 40 trials of approx. 9-10s paradigms. I have a cued motor task at 3s (lasting 5s) and I use 0s until 3s as baseline to each trial. > In the examples used in fieldtrip it is possible to chose the 'demean' option and specify the baseline period in seconds. My question is how exactly does the ft_preprocessing function corrects the baseline? Also, the examples define the baseline window with negative time, but I defined the baselinewindow=[0 3]. Is it wrong? > > Thank you again for all the advices, I will definitely pose more question in the future. > > Mariana Branco > > On 23 May 2013, at 11:37, "Jörn M. Horschig" wrote: > >> Hi Mariana, >> >> On 5/23/2013 10:25 AM, Mariana Branco wrote: >>> Hello, >>> >>> I am new in the BCI research field, and I am starting to implement an online BCI system using the Fieldtrip toolbox to detect ERD/ERS features. I already did two offline experiments using this toolbox, but now I am having some doubts about how to adapt the offline signal processing functions into real-time; I started by simulating real-time data from a file. >>> My questions are: >>> 1) To process the data real-time using ft_preprocessing is it first necessary to define trials (with ft_definetrial)? If so, how can I define the trial if it is real-time? >> no, you should use ft_read_data directly. The way to go is to check the header of your buffer for new events using ft_read_event. Upon detection of a relevant trigger, you need to use the returned event sample to compute your beginning and endsample manually (this is what ft_definetrial, or more precisely, your trialfun, usually does). Then you can use ft_read_data to read data from the buffer into memory. ft_read_data returns a datamatrix that can be used to create your data.trial field. Also, you need to manually create the rest of the data-structure. >>> 2) Is it possible to still use the function ft_preprocessing and ft_resampledata in real-time with the same specifications of offline procedure? >> It is definitely possible, once you converted the matrix to a regular fieldtrip structure. However, since it is about speed in online processing, you can think about using low-level functions of FieldTrip directly. Note that for resampling, you can also set up the shared memory (eg. acq2ftx) such that is downsamples right from the start. >> >>> 3) When simulating data stream (with two matlab sessions) the function ft_realtime_powerestimate(cfg) reports an error related to the "arg 3 (overlap)" on the welch's method. How can I correct this? >> Do not use Welch's method, use another function. I don't know about this particular example function, but I think you would greatly benefit from finding out where the error is yourself. Note that online streaming od data *is* complicated and requires *you* to have knowledge about this. >>> 4) Also, for synchronous/triggered data analysis it is available the function ft_realtime_average. Is it possible to explain how can this example function be used for implementation of my own feature processing and extraction function. Does it preprocess the data in an alternative way to ft_preprocessing? >> It should be an example, yes. Usually, there should be, as explained above, some ft_read_event statement to read the trigger value(s). In that particular example, the trialfun is used rather than ft_read_data directly, but trialfun is basically a wrapper around ft_read_data. Also, in that example a bunch of trials is read in, not just one. The thing you need to do to adjust this is to filter out the event structure such that only in case of the trigger of interest some data processing is done (you can use ft_filter_event for this). >> >> My best advise for you is to read all (most) example functions and adjust them so that they run in your lab. Then sketch a flow diagram how triggers/data will be sent and read, try to implement this yourself (by copy&pasting relevant parts out of the example functions). If you have specific questions, feel free to always ask, but as this stage (please excuse my bluntnessI think you do not really know what needs to be done. I could write a lot about this, but I think you will benefit more if you first try yourself (especially because I do not know how your lab is set up and how things needs to be adjusted). But, as just said, feel free to write again when you have other questions. >> >> Good luck! >> Best, >> Jörn >> >>> I am sorry for all the questions. >> No problem, no way to know everything :) >> >>> Regards, >>> >>> Mariana Branco >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> _______________________________________________ >> 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 -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From andmib at gmail.com Thu May 23 16:29:07 2013 From: andmib at gmail.com (Andrew Brooks) Date: Thu, 23 May 2013 10:29:07 -0400 Subject: [FieldTrip] Format for ft_volumewrite? Message-ID: Hello all, I am new to FieldTrip, so this is a very basic question I was hoping someone might know an answer to. I am using ft_read_data to read the first EPI volume after dummy scans are thrown out. I want to write this volume to a .nii file to my disk. For some reason, I am unable to figure out the correct structure that ft_volumewrite wants. Using the output from ft_read_data ('dat') does not seem to work. Does anybody have any suggestions? [ For a longer explanation of exactly what I am aiming to do, in case you have any suggestions: I have ROI that is defined in Talairach space. This is the ROI I would like to pull my real-time data from for each subject in my study. To do this, I plan to register a talairach template brain to individual subject-space, and then apply that transformation to my ROI so that it is in subject space. I was going to simply write out the subject's EPI to an .nii file, and then run SPM's co-registration step which allows for a 'child dataset' to be set (my ROI), with the source file being the template, and the reference being the individual ROI]. Thanks Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: From ggonesc at upo.es Thu May 23 16:46:53 2013 From: ggonesc at upo.es (Gabriel Gonzalez Escamilla) Date: Thu, 23 May 2013 16:46:53 +0200 Subject: [FieldTrip] connectivity problem Message-ID: An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Fri May 24 10:21:24 2013 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Fri, 24 May 2013 10:21:24 +0200 Subject: [FieldTrip] Format for ft_volumewrite? In-Reply-To: References: Message-ID: Dear Andrew, To read EPI (MRI) data, you should use ft_read_mri instead. Then hopefully the format will match what ft_volumewrite wants. Cheers, Johanna 2013/5/23 Andrew Brooks > Hello all, > > I am new to FieldTrip, so this is a very basic question I was hoping > someone might know an answer to. > > I am using ft_read_data to read the first EPI volume after dummy scans are > thrown out. I want to write this volume to a .nii file to my disk. For some > reason, I am unable to figure out the correct structure that ft_volumewrite > wants. Using the output from ft_read_data ('dat') does not seem to work. > Does anybody have any suggestions? > > [ For a longer explanation of exactly what I am aiming to do, in case you > have any suggestions: I have ROI that is defined in Talairach space. This > is the ROI I would like to pull my real-time data from for each subject in > my study. To do this, I plan to register a talairach template brain to > individual subject-space, and then apply that transformation to my ROI so > that it is in subject space. I was going to simply write out the subject's > EPI to an .nii file, and then run SPM's co-registration step which allows > for a 'child dataset' to be set (my ROI), with the source file being the > template, and the reference being the individual ROI]. > > Thanks > Andrew > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andmib at gmail.com Fri May 24 15:15:09 2013 From: andmib at gmail.com (Andrew Brooks) Date: Fri, 24 May 2013 09:15:09 -0400 Subject: [FieldTrip] Format for ft_volumewrite? In-Reply-To: References: Message-ID: Thanks Johanna. Ft_read_mri only pulls from a file, correct? I'm trying to pull a single volume from the buffer using ft_read_data, and then write it out to a nifti file using ft_volumewrite, but ft_read_data does not output the volume in a structure that ft_volumewrite wants. On Fri, May 24, 2013 at 4:21 AM, Johanna Zumer wrote: > Dear Andrew, > > To read EPI (MRI) data, you should use ft_read_mri instead. Then > hopefully the format will match what ft_volumewrite wants. > > Cheers, > Johanna > > > 2013/5/23 Andrew Brooks > >> Hello all, >> >> I am new to FieldTrip, so this is a very basic question I was hoping >> someone might know an answer to. >> >> I am using ft_read_data to read the first EPI volume after dummy scans >> are thrown out. I want to write this volume to a .nii file to my disk. For >> some reason, I am unable to figure out the correct structure that >> ft_volumewrite wants. Using the output from ft_read_data ('dat') does not >> seem to work. Does anybody have any suggestions? >> >> [ For a longer explanation of exactly what I am aiming to do, in case you >> have any suggestions: I have ROI that is defined in Talairach space. This >> is the ROI I would like to pull my real-time data from for each subject in >> my study. To do this, I plan to register a talairach template brain to >> individual subject-space, and then apply that transformation to my ROI so >> that it is in subject space. I was going to simply write out the subject's >> EPI to an .nii file, and then run SPM's co-registration step which allows >> for a 'child dataset' to be set (my ROI), with the source file being the >> template, and the reference being the individual ROI]. >> >> Thanks >> Andrew >> >> _______________________________________________ >> 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: From johanna.zumer at gmail.com Fri May 24 16:29:00 2013 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Fri, 24 May 2013 16:29:00 +0200 Subject: [FieldTrip] Format for ft_volumewrite? In-Reply-To: References: Message-ID: I'm not familiar with the buffer, but if you can read in your data successfully, then to convert it to the structure that ft_volumewrite wants, you can get some information inside ft_datatype_volume for what are required or optional fields. 2013/5/24 Andrew Brooks > Thanks Johanna. Ft_read_mri only pulls from a file, correct? I'm trying to > pull a single volume from the buffer using ft_read_data, and then write it > out to a nifti file using ft_volumewrite, but ft_read_data does not output > the volume in a structure that ft_volumewrite wants. > > > On Fri, May 24, 2013 at 4:21 AM, Johanna Zumer < > johanna.zumer at donders.ru.nl> wrote: > >> Dear Andrew, >> >> To read EPI (MRI) data, you should use ft_read_mri instead. Then >> hopefully the format will match what ft_volumewrite wants. >> >> Cheers, >> Johanna >> >> >> 2013/5/23 Andrew Brooks >> >>> Hello all, >>> >>> I am new to FieldTrip, so this is a very basic question I was hoping >>> someone might know an answer to. >>> >>> I am using ft_read_data to read the first EPI volume after dummy scans >>> are thrown out. I want to write this volume to a .nii file to my disk. For >>> some reason, I am unable to figure out the correct structure that >>> ft_volumewrite wants. Using the output from ft_read_data ('dat') does not >>> seem to work. Does anybody have any suggestions? >>> >>> [ For a longer explanation of exactly what I am aiming to do, in case >>> you have any suggestions: I have ROI that is defined in Talairach space. >>> This is the ROI I would like to pull my real-time data from for each >>> subject in my study. To do this, I plan to register a talairach template >>> brain to individual subject-space, and then apply that transformation to my >>> ROI so that it is in subject space. I was going to simply write out the >>> subject's EPI to an .nii file, and then run SPM's co-registration step >>> which allows for a 'child dataset' to be set (my ROI), with the source file >>> being the template, and the reference being the individual ROI]. >>> >>> Thanks >>> Andrew >>> >>> _______________________________________________ >>> 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: From politzerahless at gmail.com Sat May 25 15:11:18 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 25 May 2013 08:11:18 -0500 Subject: [FieldTrip] Sourcespace and volume conductor misaligned Message-ID: Hello all, I am going through the workflow at http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate. After making the volume conduction model using ft_prepare_headmodel(), I noticed that although the volume conduction model and sourcespace have the same orientation and overall size/shape (after I converted the volume conduction model to cm, which wasn't in the tutorial but my original model came out in mm), they don't quite line up, as you can see in this figure: http://i.imgur.com/mGEtLOa.png I did interactively re-align the data to CTF (twice--in step 2 of "Preprocessing of the anatomical MRI" and in step 4 of "Source model") using fiducials, and to Talairach (step 5 of "Preprocessing of the anatomical data"), so I'm not sure how it ended up this way. The code I've used at each step is basically the same as that in the tutorial. Is there any way to line up my volume conduction model and sourcespace now, without going back and re-running most of the workflow? Best, Steve -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://people.ku.edu/~sjpa/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Sat May 25 20:54:59 2013 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Sat, 25 May 2013 20:54:59 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 30, Issue 31 In-Reply-To: <2b26519d65c97b6-0000c.Richmail.00022826124215434628@139.com> References: <2b26519d65c97b6-0000c.Richmail.00022826124215434628@139.com> Message-ID: Dear Jing, 1. Every MRI scanner is different, so I'm not familiar with that naming scheme, but it seems the 'GAD' at the end of the file name indicates that was with the Gadolinium contrast agent, so I would suggest to not use that, but instead use the first (plain) T1. 2. I'm not sure what to suggest. I assume you can see the vitamin E marker clearly when viewing the DICOM file? Is the issue that some slices are missing in the conversion, or that the contrast on the image is not the same? or right/left flipped? Best, Johanna 2013/5/23 WangJing <13681530640 at 139.com> > Dear Johanna, > > Thank you for your suggestion. > 1.I have two folder of T1 MRI, one is t1_vibe_tra_4,and another is > t1_vibe_traGAD-5. which one is best? > 2.when I convert MRI from DICOM into CTF format,the vitamin E marker > didn't be found. what can I do? > > Best Regards, > Jing Wang > > > > > ------------------------------ > ----The following is the content of the forwarded email---- > From:fieldtrip-request > To:fieldtrip > Date:2013-05-22 15:33:13 > Subject:fieldtrip Digest, Vol 30, Issue 31 > > 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: question About head model (Johanna Zumer) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 22 May 2013 09:30:17 +0200 > From: Johanna Zumer > To: FieldTrip discussion list > Subject: Re: [FieldTrip] question About head model > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Dear Jing, > > It is best to use the T1 MRI rather than the other scans. To open a DICOM > format file, you can try one of these options: > > % read the DICOM files > mri = ft_read_mri('single_file_of_DICOM_series.IMA'); > % or use a graphical file selection[f, p] = uigetfile > >('*'); > mri = ft_read_mri(fullfile > >(p, > f)); > > > I copied the above from documentation on the FieldTrip wiki: > > http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_an_anatomical_mri_from_dicom_into_ctf_format > > > Then you can save the 'mri' into a *.mat file for future use with FieldTrip. > > Best regards, > Johanna > > > 2013/5/22 WangJing <13681530640 at 139.com> > > > Hi > > I am a freshman about field trip. > > I am trying to build the forward model. but my mri data is different from > > the data in the tutorial. So I don't know how to bulid the head model. I > > use the date which is from the paper "Open Database of Epileptic EEG with > > MRI and Postoperational Assessment of Foci?a Real World Verification for > > the EEG Inverse Solutions",http://eeg.pl/epi > . MRI recordings containing a > > > T1, T2 or fluid attenuated inversion recovery (FLAIR) weighted brain scans > > with morphologic substrate of the epilepsy (mostly cortical dysplasias, > > dysplastic tumors etc.). In some cases there is also a scan with the > > > gadolinium (GAD) contrast. The images were collected by Siemens Sonata 1.5T > > scanner. The data is stored in the Digital Imaging and Communications in > > Medicine (DICOM) format. The name of the scan?s folder indicates its > > weighting.The scans have the following resolutions: T1: 512 ? 512 pixels, > > pixel spacing 0.4687 mm, slice thickness 1.2 mm, T2: 256 ? 256 pixels, > > pixel spacing 0.9375 mm,slice thickness 2.5 mm. > > > In the tutorial,the mri data stored in only one file, while the data which > > > I used have many files, I don't know how to process. who can help me,Thanks1 > > Thanks very much! > > Best Reagards > > Jing Wang > > > > > > > > > > > > ------------------------------ > > ----The following is the content of the forwarded email---- > > From?fieldtrip-request > > To?fieldtrip > > Date?2013-05-21 23:59:18 > > Subject?fieldtrip Digest, Vol 30, Issue 29 > > > > 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: problem in connectivityanalysis (Gabriel Gonzalez Escamilla) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Tue, 21 May 2013 17:52:21 +0200 > > From: Gabriel Gonzalez Escamilla > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] problem in connectivityanalysis > > Message-ID: <1348f6433edc26f9.519bb455 at upo.es> > > Content-Type: text/plain; charset="iso-8859-1" > > > > Thank you so much for your answer J?rn, > > > > > > > Now I got it, so, I will let the 'fourier' as input to ft_connectivityanalysis, because for some indices I will need the auto-spectrum, and if I fully undertood what you said, it will be the same, as they always take the phase information from the fourier transform. And fieltrip will automatically compute the csd if the input is the frequency data. > > > > > > > Nevertheless, it give me some error when I tried to use the output from 'powandcsd' of freqanalysis, always gives me a matrix dimensions error, and when I use the output 'fourier' from connectivityanalysis, it computes almost all indices to ok, raging from? -1 to 1 (I'm saw that they are signed, so this is ok), the problem are the ImC ranging from -inf to inf, and the PLV values ranging from 0 to inf, but when I use the 'fourier' the values are. Which for me is really weird. > > > > > > > > > I have checked internally, and even when I always use the 'fourier' as input, when it internally calculates cross-spectrum for the ImC and PLV, the data.crsspctrm is different, e.g: > > data.dimord = 'rpt_rpt_chan_chan_freq' > > ans size(data.crsspctrm) = [1 7 59 59]; > > > > > So, both are apparently the same, but the data inside this matrices is different, > > > > > > > for example, when calculating the ImC the first 7 columns for the first two rows are: > > val(:,:,1,1) > > ?[0.9323? 0.3679? 0.8629? 1.6436? 0.6404? 1.8782? 0.1139] > > val(:,:,1,2) > > > > > ?[0.8509-0.1555i? 0.2507-0.1066i? 0.8173-0.0290i? 1.4328-0.2427i? 0.5457-0.0500i? 1.6505-0.0161i? 0.0993+0.0016i] > > > > while when calculating the PLV are: > > val(:,:,1,1) > > ?[1? 1? 1? 1? 1? 1? 1] > > val(:,:,1,2) > > > > > ?[0.9694-0.2133i? 0.7011-0.3564i? 0.9951-0.0104i? 0.9014-0.3481i? 0.9781-0.0819i? 0.9982-0.0046i? 0.9507-0.0483i] > > > > > > > > > I'm pretty sure I'm doing something wrong here, but I don't really have a clue, > > > > > > > If I use the fourier transform to calculate the 'csd' in ft_connectivity analysis and use this csd as input to all other ft_connectivityanalysis indices all of them are set to NaN or 1, not ranging between any numbers. > > > > > > > > > > > > > On the other hand, I have seen searching on the net, that fieltrip is capable of create surrogate data, by shifting the phase information on every trial for only one electrode of each pair while using the original samples of each trials on the second channel, but I couldn't find on the manual how to do such a thing. Is there any way to compute this kind of surrogates for every sensor? or was it something that some one suggest to somebody? > > > > > > Many thanks in advanced, > > Gabriel. > > > > > > > > > > ----- Mensaje original ----- > > De: "J?rn M. Horschig" > > Fecha: Martes, 21 de Mayo de 2013, 9:03 am > > Asunto: Re: [FieldTrip] problem in connectivityanalysis > > A: FieldTrip discussion list > > > > > > > > > > > > > Dear Gabriel, > > > > > > > > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > > > > > > No. You should think of coherence more as a measure for the consistency of the phase relation between channels across trials, so coherence is just not defined per trial,neither would it make sense to compute coherence for a single trial. > > > > > > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? I see some terminology issues here. Let me try to explain in a simple (aka least-mathematical I can think of) way: > > > > > > > > > For all these connectivity measures, we need the phase information from the Fourier transform (FFT) to compute the cross-spectral density matrix (CSD). The CSD can be regarded as the equivalent in the frequency domain to the covariance matrix in the time domain, thus it is a measures how a certain channels activity is co-modulated with another channels activity (for a particular frequency) - makes pretty much sense to make use of this when computing connectivity, right? :) > > > > > > As you might know, a Fourier transform returns complex numbers, where the imaginary part of this number contains phase information. When calling ft_freqanalysis, you can decide if it shall only return the (squared) real part of the frequency spectrum (cfg.output='pow'), or instead the full CSD (cfg.output = 'powandcsd'). Alternatively, you can also let ft_freqanalysis return the raw Fourier coefficients (cfg.output='fourier'). From the Fourier coefficients, however, you can easily obtain the CSD or the power spectrum basically by multiplication the Fourier matrix with itself (transposed). All of these measures quantify the phase relation between channels across trials, and as phase information is coded in the imaginary part of the fourier output, thus for connectivityanalysis you need the CSD which can be obtained either by 'powandcsd' or by 'fourier'. > > > > > > I hope that somehow clarifies your questions. > > > > > > Best, > > > J?rn > > > > > > On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote: > > > Dear Fieltrip experts, > > > > > > > > > I have my continuous data imported to fieldtrip with matlab, I'm looking for performing connectivity analysis between pairs of sensors, I have succed as: > > > > > > data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels and 2000 samples > > > data.label {59x1}; > > > data.time {1xNepochs}; > > > > > > then, calculate only the FFT of all sensors as: > > > cfg=[]; > > > cfg.output='fourier'; > > > cfg.method='mtmfft'; > > > cfg.taper='hanning'; > > > cfg.foilim=[8.5 9.5]; > > > cfg.tapsmofrq=0; > > > cfg.trials='all'; > > > cfg.keeptrials='yes'; > > > cfg.channel='all'; > > > fourier=ft_freqanalysis(cfg, data) > > > as output I get: > > > dimord = 'rpttap_chan_freq' > > > freq= [1x9] > > > fourierspctrm=[7x59x9 double] > > > > > > Then compute the imaginary part of coherency as: > > > cfg=[]; > > > cfg.method ='cohe'; > > > cfg.complex='imag'; > > > cfg.channelcbm={'all' 'all'}; > > > coher = ft_connectivityanalysis (cfg, fourier) > > > as output get: > > > dimord='chan_chan_freq'; > > > cohspctrm=[59x59x9 double]; > > > dof=7; > > > > > > I have two main questions: > > > > > > > > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > > > > > > > > > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? > > > > > > > > > > > > > > > Many thanks in advanced, > > > Gabriel. > > > > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: > > jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: > > http://www.ru.nl/donders > > > > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > --------------------------
PhD. student Gabriel Gonz?lez-Escamilla
Laboratory of Functional Neuroscience
Department of Physiology, Anatomy, and Cell Biology
University Pablo de Olavide
Ctra. de Utrera, Km.1
41013 - Seville
- Spain -

Email: > > ggonesc at upo.es
http://www.upo.es/neuroaging/es/
> > > > > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130521/0886ac06/attachment.html > > > > > > > ------------------------------ > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > End of fieldtrip Digest, Vol 30, Issue 29 > > ***************************************** > > > > _______________________________________________ > > 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/20130522/190aa246/attachment.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 30, Issue 31 > ***************************************** > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From 13681530640 at 139.com Sun May 26 11:26:07 2013 From: 13681530640 at 139.com (WangJing) Date: Sun, 26 May 2013 17:26:07 +0800 (CST) Subject: [FieldTrip] Question about Memory requirement Of Head model References: Message-ID: <2b1851a17ca79ab-00017.Richmail.00027836529255037638@139.com> Hello Everyone, I want to know what's the requiement of fieldtrip to hardware and software. My computer 's CPU is 3GHz, and RAM is 8GB. the OS is windows sever 2003, and the matlab is 2011a(32bit).I often encounter the problem of out of Memery. for example 1: > mri = ft_read_mri('IM-0001-0001.dcm'); % the dim of data is [512 512 144] cfg = []; ft_sourceplot(cfg,mri); the result is: ??? Out of memory. Type HELP MEMORY for your options. Error in ==> ft_sourceplot at 368 ana = (ana-dmin)./(dmax-dmin); example 2: clear all mri = ft_read_mri('IM-0001-0001.dcm'); cfg = []; cfg.method = 'interactive'; cfg.coordsys = 'ctf'; mri_realigned = ft_volumerealign(cfg,mri); clear mri cfg=[]; mrirs = ft_volumereslice(cfg,mri_realigned); when run to the last code, I face the same problem. Thank you! Best Regards! Jing Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Sun May 26 12:23:34 2013 From: julian.keil at gmail.com (Julian Keil) Date: Sun, 26 May 2013 12:23:34 +0200 Subject: [FieldTrip] Question about Memory requirement Of Head model In-Reply-To: <2b1851a17ca79ab-00017.Richmail.00027836529255037638@139.com> References: <2b1851a17ca79ab-00017.Richmail.00027836529255037638@139.com> Message-ID: <95C94C42-6516-4536-AD5A-66FA5041E3F3@gmail.com> Dear Jing Wang, this might be due to you using a 32bit System. As far as I know, 32bit Windows can only use ~3 GB of Memory. At least that's what I experienced using Win XP, maybe it's different for the server. However, I'd advise you to switch to a 64bit System and try again. Best, Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum E 307 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 26.05.2013 um 11:26 schrieb WangJing: > Hello Everyone, > I want to know what's the requiement of fieldtrip to hardware and software. My computer 's CPU is 3GHz, and RAM is 8GB. the OS is windows sever 2003, and the matlab is 2011a(32bit).I often encounter the problem of out of Memery. > for example 1: > > mri = ft_read_mri('IM-0001-0001.dcm'); % the dim of data is [512 512 144] > cfg = []; > ft_sourceplot(cfg,mri); > > the result is: > ??? Out of memory. Type HELP MEMORY for your options. > Error in ==> ft_sourceplot at 368 > ana = (ana-dmin)./(dmax-dmin); > > example 2: > clear all > mri = ft_read_mri('IM-0001-0001.dcm'); > cfg = []; > cfg.method = 'interactive'; > cfg.coordsys = 'ctf'; > mri_realigned = ft_volumerealign(cfg,mri); > clear mri > cfg=[]; > mrirs = ft_volumereslice(cfg,mri_realigned); > > when run to the last code, I face the same problem. > > Thank you! > Best Regards! > Jing Wang > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From 13681530640 at 139.com Sun May 26 17:01:10 2013 From: 13681530640 at 139.com (WangJing) Date: Sun, 26 May 2013 23:01:10 +0800 (CST) Subject: [FieldTrip] fieldtrip Digest, Vol 30, Issue 37 References: Message-ID: <2b1851a22104e22-00005.Richmail.00025896525295133618@139.com> Hello Everyone, I have resolved the problem when I ran it in computer with 64 bit OS, thanks. Best Regards, Jing Wang -------------------------------------------------------------------------------- ----The following is the content of the forwarded email---- From:fieldtrip-request To:fieldtrip Date:2013-05-26 18:00:05 Subject:fieldtrip Digest, Vol 30, Issue 37 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. Question about Memory requirement Of Head model (WangJing) ---------------------------------------------------------------------- Message: 1 Date: Sun, 26 May 2013 17:26:07 +0800 (CST) From: WangJing <13681530640 at 139.com> To: fieldtrip Subject: [FieldTrip] Question about Memory requirement Of Head model Message-ID: <2b1851a17ca79ab-00017.Richmail.00027836529255037638 at 139.com> Content-Type: text/plain; charset="utf-8" Hello Everyone, I want to know what's the requiement of fieldtrip to hardware and software. My computer 's CPU is 3GHz, and RAM is 8GB. the OS is windows sever 2003, and the matlab is 2011a(32bit).I often encounter the problem of out of Memery. for example 1: > mri = ft_read_mri('IM-0001-0001.dcm'); % the dim of data is [512 512 144] cfg = []; ft_sourceplot(cfg,mri); the result is: ??? Out of memory. Type HELP MEMORY for your options. Error in ==> ft_sourceplot at 368 ana = (ana-dmin)./(dmax-dmin); example 2: clear all mri = ft_read_mri('IM-0001-0001.dcm'); cfg = []; cfg.method = 'interactive'; cfg.coordsys = 'ctf'; mri_realigned = ft_volumerealign(cfg,mri); clear mri cfg=[]; mrirs = ft_volumereslice(cfg,mri_realigned); when run to the last code, I face the same problem. Thank you! Best Regards! Jing Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 30, Issue 37 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon May 27 11:54:00 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 27 May 2013 11:54:00 +0200 Subject: [FieldTrip] Question about Memory requirement Of Head model In-Reply-To: <95C94C42-6516-4536-AD5A-66FA5041E3F3@gmail.com> References: <2b1851a17ca79ab-00017.Richmail.00027836529255037638@139.com> <95C94C42-6516-4536-AD5A-66FA5041E3F3@gmail.com> Message-ID: <51A32D38.3060908@donders.ru.nl> Hi all, Julian is right, that's a limit of the 32bit system (the OS does not matter, just the number of bits). FieldTrip itself does not have any requirements other than Matlab does, however the size of your data matters. If you want to put data with more than 3gigs into memory, it's just not possible with a 32bit OS or Matlab (note that even if you have a 64bit OS but 32bit Matlab then the 3GB limit hold). So the only way for you to go is to clear variables from memory or reduce the size of the data you want to read it (or, go to 64bit). Maybe closing background tasks or other programs that are running will help as well. Best, Jörn On 5/26/2013 12:23 PM, Julian Keil wrote: > Dear Jing Wang, > > this might be due to you using a 32bit System. > As far as I know, 32bit Windows can only use ~3 GB of Memory. At least > that's what I experienced using Win XP, maybe it's different for the > server. > However, I'd advise you to switch to a 64bit System and try again. > > Best, > > Julian > > ******************** > *Dr. Julian Keil* > * > * > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum E 307 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 26.05.2013 um 11:26 schrieb WangJing: > >> Hello Everyone, >> I want to know what's the requiement of fieldtrip to hardware >> and software. My computer 's CPU is 3GHz, and RAM is 8GB. the OS is >> windows sever 2003, and the matlab is 2011a(32bit).I often encounter >> the problem of out of Memery. >> for example 1: >> > mri = ft_read_mri('IM-0001-0001.dcm'); % the dim of data is [512 >> 512 144] >> cfg = []; >> ft_sourceplot(cfg,mri); >> the result is: >> ??? Out of memory. Type HELP MEMORY for your options. >> Error in ==> ft_sourceplot at 368 >> ana = (ana-dmin)./(dmax-dmin); >> example 2: >> clear all >> mri = ft_read_mri('IM-0001-0001.dcm'); >> cfg = []; >> cfg.method = 'interactive'; >> cfg.coordsys = 'ctf'; >> mri_realigned = ft_volumerealign(cfg,mri); >> clear mri >> cfg=[]; >> mrirs = ft_volumereslice(cfg,mri_realigned); >> when run to the last code, I face the same problem. >> Thank you! >> Best Regards! >> Jing Wang >> _______________________________________________ >> 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 -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From member at linkedin.com Mon May 27 14:14:43 2013 From: member at linkedin.com (Stavros Dimitriadis) Date: Mon, 27 May 2013 12:14:43 +0000 (UTC) Subject: [FieldTrip] Invitation to connect on LinkedIn Message-ID: <1730678420.35398857.1369656883124.JavaMail.app@ela4-app0128.prod> LinkedIn ------------ Stavros Dimitriadis requested to add you as a connection on LinkedIn: ------------------------------------------ Diego, I'd like to add you to my professional network on LinkedIn. - Stavros Accept invitation from Stavros Dimitriadis http://www.linkedin.com/e/-kyqm8y-hh7mceqk-4t/o2zr3wMN-KUziWnbF0JpKw1y-MN7WW_ZDEc0/blk/I248853902_185/e39SrCAJoS5vrCAJoyRJtCVFnSRJrScJr6RBfnhv9ClRsDgZp6lQs6lzoQ5AomZIpn8_djwNnP8MejcRe3wQcAALhmRzm4IQqQALdzcNcj0Scj8ScP4LrCBxbOYWrSlI/eml-comm_invm-b-in_ac-inv28/?hs=false&tok=2VrJfyqClukBM1 View profile of Stavros Dimitriadis http://www.linkedin.com/e/-kyqm8y-hh7mceqk-4t/rso/258301386/VLXI/name/188663824_I248853902_185/?hs=false&tok=09C8hmgc9ukBM1 ------------------------------------------ You are receiving Invitation emails. This email was intended for Diego Lozano-Soldevilla. Learn why this is included: http://www.linkedin.com/e/-kyqm8y-hh7mceqk-4t/plh/http%3A%2F%2Fhelp%2Elinkedin%2Ecom%2Fapp%2Fanswers%2Fdetail%2Fa_id%2F4788/-GXI/?hs=false&tok=11g45aA75ukBM1 (c) 2012, LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA. -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at gmail.com Mon May 27 15:12:27 2013 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Mon, 27 May 2013 15:12:27 +0200 Subject: [FieldTrip] Source Reconstruction using Openmeeg method In-Reply-To: References: <5190AEAA.3020301@donders.ru.nl> Message-ID: Hi Mushfa, The values inside grid_*.leadfield are the ones that need to be concatenated, per grid position. So the first thing to do is figure out which rows in grid_eeg.pos match up with which rows in grid_meg.pos, and then only for those that match, concatenate so that the *.leadfield is of size [(number of eeg channels + number of meg channels) X 3]. It might be easier to first ensure that the grid used to create these leadfields have the same 'inside' positions (inside the volume conductor). Best, Johanna 2013/5/22 Mushfa Yousuf > Hello Jörn; > > I have calculated an indiviual leadfield for both EEG and MEG. The > structure of EEg and MEG shows the following variable > > grid_meg = > > xgrid: [1x20 double] > ygrid: [-8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8] > zgrid: [-2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13] > dim: [20 17 16] > pos: [5440x3 double] > unit: 'cm' > inside: [1x3177 double] > outside: [1x2263 double] > cfg: [1x1 struct] > leadfield: {1x5440 cell} > > > grid_eeg = > > xgrid: [-6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9] > ygrid: [-6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6] > zgrid: [2 3 4 5 6 7 8 9 10 11] > dim: [16 13 10] > pos: [2080x3 double] > unit: 'cm' > inside: [1x1331 double] > outside: [1x749 double] > cfg: [1x1 struct] > leadfield: {1x2080 cell} > > > Can you please give me a rough idea that how to concatenate the variables > from both structure ? > > > Thank you > > Regards ; > > Mushfa Yousuf > > > On Mon, May 13, 2013 at 11:13 AM, "Jörn M. Horschig" < > jm.horschig at donders.ru.nl> wrote: > >> Dear Mushfa, >> >> I think you have to compute two leadfield matrices, one for EEG (elec) >> and one for MEG (grad), and then concatenate these (and make sure that the >> order of sensors won't get mixed up anywhere, because sourceanalysis just >> expects the leadfield matrix to be ordered like your data. If that's not >> the case, you either encounter the previous error you described or (if the >> number of channels matches, but order is mixed up) it will just return >> wrong source estimated activity. >> >> Best, >> Jörn >> >> >> On 5/6/2013 2:47 PM, Mushfa Yousuf wrote: >> >> Hello; >> >> Yes you were right. I have defined the wrong sensors i.e 'grad' instead >> of 'elec' while calculating the Leadfield. >> >> Actually I am trying to calculate Combined source reconstruction from >> both EEG and MEG sensors. >> >> Do you have any idea, how to define both elec and grad definition >> while calculating first forward then inverse solution. >> >> Because in a fieldtrip either you can defined elec or grad at one time. >> >> >> Regards; >> >> >> Mushfa Yousuf >> >> Neurozentrum, >> Universitätsklinikum Schleswig-Holstein, >> Campus Kiel (UKSH), Deutschland >> >> >> On Tue, Apr 30, 2013 at 6:23 PM, Johanna Zumer wrote: >> >>> Hi Mushfa, >>> >>> My guess is that the channels that have you used to compute .csdspctrm >>> are not the same as the channels in cfg.elec. If you set cfg.channel = >>> freqPost.label, does that solve it? >>> >>> Cheers, >>> Johanna >>> >>> >>> 2013/4/30 Mushfa Yousuf >>> >>>> Hello Fieldtrippers, >>>> >>>> I am doing source reconstruction using EEG channels on a fieldtrip. >>>> >>>> I have computed Forward solution i.e head model using 'Openmeeg' and >>>> lead field successfully. >>>> >>>> For the inverse solution using 'dics' method, I wrote the following >>>> syntax >>>> >>>> >>>> >>>> >>>> >>>> cfg = []; >>>> cfg.method = 'dics'; >>>> cfg.frequency = 130; >>>> cfg.elec = dataFIC12.hdr.elec; >>>> cfg.grid = grid; >>>> cfg.vol = vol; >>>> >>>> sourcePost = ft_sourceanalysis(cfg, freqPost); >>>> >>>> >>>> and I have received the following error: >>>> >>>> >>>> ??? Error using ==> mtimes >>>> Inner matrix dimensions must agree. >>>> >>>> Error in ==> beamformer_dics at 314 >>>> filt = pinv(lf' * invCf * lf) * lf' * invCf; % >>>> Gross eqn. 3, use PINV/SVD to cover rank deficient >>>> leadfield >>>> >>>> Error in ==> ft_sourceanalysis at 595 >>>> dip(i) = beamformer_dics(grid, sens, vol, [], >>>> squeeze(Cf(i,:,:)), optarg{:}); >>>> >>>> Error in ==> newCode at 214 >>>> sourcePost = ft_sourceanalysis(cfg, freqPost); >>>> >>>> >>>> >>>> >>>> Any help would be appreciated. >>>> >>>> >>>> Regards; >>>> >>>> >>>> Mushfa Yousuf >>>> >>>> Neurozentrum, >>>> Universitätsklinikum Schleswig-Holstein, >>>> Campus Kiel (UKSH), Deutschland >>>> >>>> >>>> _______________________________________________ >>>> 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 listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail: jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web: http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> >> _______________________________________________ >> 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: From mbj0310 at gmail.com Wed May 29 11:47:14 2013 From: mbj0310 at gmail.com (Beom Jun Min) Date: Wed, 29 May 2013 18:47:14 +0900 Subject: [FieldTrip] ft_preprocessing error message during reading some files Message-ID: Dear all, Hello, my name is BJ Min from Korea. I'm dealing with EEG data of many subjects. When I run ft_preprocessing, the error message below shows with only some files of my data. (not all files) Warning: rounding "endsample" to the nearest integer > In ft_read_data at 100 In ft_preprocessing at 577 ??? Error using ==> ft_read_data at 149 cannot read data after the end of the file Error in ==> ft_preprocessing at 577 dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx, 'checkboundary', strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat) I think that there might be a kind of problem in data acquisition, and I modified below scripts in the ft_read_data function with comment %. % % test whether the requested data segment is not outside the file % if any(begsample<1) % error('FILEIO:InvalidBegSample', 'cannot read data before the begin of the file'); % elseif any(endsample>(hdr.nSamples*hdr.nTrials)) % error('FILEIO:InvalidEndSample', 'cannot read data after the end of the file'); % end After that, the ft_preprocessing worked well. However, the files with the first problem showed additional warning message while running ft_definetrial. (not error message) Warning: Integer operands are required for colon operator when used as index > In fileio\private\loadcnt at 464 In ft_read_header at 1450 In ft_preprocessing at 398 Warning: rounding "endsample" to the nearest integer > In ft_read_data at 100 In ft_preprocessing at 577 Also, during ft_redefinetrial, following warning message occurs.(not error message) Warning: removing inconsistent sampleinfo > In ft_datatype_raw at 97 In ft_checkdata at 213 In ft_redefinetrial at 104 Warning: the trial definition in the configuration is inconsistent with the actual data > In utilities\private\warning_once at 116 In utilities\private\fixsampleinfo at 74 In ft_datatype_raw at 154 In ft_checkdata at 213 In ft_redefinetrial at 206 Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording > In utilities\private\warning_once at 116 In utilities\private\fixsampleinfo at 79 In ft_datatype_raw at 154 In ft_checkdata at 213 In ft_redefinetrial at 206 I wonder if these messages during ft_redefinetrial mean wrong defining trials. Should I continue these process like this, modifying the ft_preprocessing function? Or, is it better to exclude some erroneous files? Best regards -- BeomJun Min, M.D. Department of Medical System Engineering (DMSE) Gwangju Institute of Science and Technology (GIST) 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju 500-712, Republic of Korea (South) Phone: +82-62-715-3266 / Fax: +82-62-715-3244 E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Wed May 29 12:01:31 2013 From: julian.keil at gmail.com (Julian Keil) Date: Wed, 29 May 2013 12:01:31 +0200 Subject: [FieldTrip] ft_preprocessing error message during reading some files In-Reply-To: References: Message-ID: Dear BJ Min, what type of data are you trying to read in? I had similar problems when reading in .CNT data. Also, with some systems you have to specify the bit rate (e.g. Neuroscan). For me, reading in data with an older version of FieldTrip solved the problem, but this was in 2011, so I cannot say if the problem with .CNT files has been solved. Good Luck Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum E 307 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 29.05.2013 um 11:47 schrieb Beom Jun Min: > Dear all, > > Hello, my name is BJ Min from Korea. > > I'm dealing with EEG data of many subjects. > > When I run ft_preprocessing, the error message below shows with only some files of my data. (not all files) > > Warning: rounding "endsample" to the nearest integer > > In ft_read_data at 100 > In ft_preprocessing at 577 > ??? Error using ==> ft_read_data at 149 > cannot read data after the end of the file > > Error in ==> ft_preprocessing at 577 > dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx, > 'checkboundary', strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat) > > I think that there might be a kind of problem in data acquisition, and I modified below scripts in the ft_read_data function with comment %. > > % % test whether the requested data segment is not outside the file > % if any(begsample<1) > % error('FILEIO:InvalidBegSample', 'cannot read data before the begin of the file'); > % elseif any(endsample>(hdr.nSamples*hdr.nTrials)) > % error('FILEIO:InvalidEndSample', 'cannot read data after the end of the file'); > % end > > After that, the ft_preprocessing worked well. > > However, the files with the first problem showed additional warning message while running ft_definetrial. (not error message) > > Warning: Integer operands are required for colon operator when used as index > > In fileio\private\loadcnt at 464 > In ft_read_header at 1450 > In ft_preprocessing at 398 > > Warning: rounding "endsample" to the nearest integer > > In ft_read_data at 100 > In ft_preprocessing at 577 > > Also, during ft_redefinetrial, following warning message occurs.(not error message) > > Warning: removing inconsistent sampleinfo > > In ft_datatype_raw at 97 > In ft_checkdata at 213 > In ft_redefinetrial at 104 > > Warning: the trial definition in the configuration is inconsistent with the actual data > > In utilities\private\warning_once at 116 > In utilities\private\fixsampleinfo at 74 > In ft_datatype_raw at 154 > In ft_checkdata at 213 > In ft_redefinetrial at 206 > > Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording > > In utilities\private\warning_once at 116 > In utilities\private\fixsampleinfo at 79 > In ft_datatype_raw at 154 > In ft_checkdata at 213 > In ft_redefinetrial at 206 > > I wonder if these messages during ft_redefinetrial mean wrong defining trials. > Should I continue these process like this, modifying the ft_preprocessing function? > Or, is it better to exclude some erroneous files? > > Best regards > > -- > BeomJun Min, M.D. > > Department of Medical System Engineering (DMSE) > Gwangju Institute of Science and Technology (GIST) > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > 500-712, Republic of Korea (South) > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbj0310 at gmail.com Thu May 30 10:15:31 2013 From: mbj0310 at gmail.com (Beom Jun Min) Date: Thu, 30 May 2013 17:15:31 +0900 Subject: [FieldTrip] ft_preprocessing error message during reading some files In-Reply-To: References: Message-ID: Dear Julian Keil, Thank you for your reply. I agree with that your problem was similar with mine. My data was acquired by Neuroscan also. There might a problem associated with .CNT file in the newer version. Could you tell me the number of the older version you used? Best Regards 2013/5/29 Julian Keil > Dear BJ Min, > > what type of data are you trying to read in? > I had similar problems when reading in .CNT data. > Also, with some systems you have to specify the bit rate (e.g. Neuroscan). > For me, reading in data with an older version of FieldTrip solved the > problem, but this was in 2011, so I cannot say if the problem with .CNT > files has been solved. > > Good Luck > > Julian > > ******************** > *Dr. Julian Keil* > * > * > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum E 307 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 29.05.2013 um 11:47 schrieb Beom Jun Min: > > Dear all, > > Hello, my name is BJ Min from Korea. > > I'm dealing with EEG data of many subjects. > > When I run ft_preprocessing, the error message below shows with only some > files of my data. (not all files) > > Warning: rounding "endsample" to the nearest integer > > In ft_read_data at 100 > In ft_preprocessing at 577 > ??? Error using ==> ft_read_data at 149 > cannot read data after the end of the file > > Error in ==> ft_preprocessing at 577 > dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', > begsample, 'endsample', endsample, 'chanindx', rawindx, > 'checkboundary', strcmp(cfg.continuous, 'no'), 'dataformat', > cfg.dataformat) > > I think that there might be a kind of problem in data acquisition, and I > modified below scripts in the ft_read_data function with comment %. > > % % test whether the requested data segment is not outside the file > % if any(begsample<1) > % error('FILEIO:InvalidBegSample', 'cannot read data before the begin of > the file'); > % elseif any(endsample>(hdr.nSamples*hdr.nTrials)) > % error('FILEIO:InvalidEndSample', 'cannot read data after the end of > the file'); > % end > > After that, the ft_preprocessing worked well. > > However, the files with the first problem showed additional warning > message while running ft_definetrial. (not error message) > > Warning: Integer operands are required for colon operator when used as > index > > In fileio\private\loadcnt at 464 > In ft_read_header at 1450 > In ft_preprocessing at 398 > > Warning: rounding "endsample" to the nearest integer > > In ft_read_data at 100 > In ft_preprocessing at 577 > > Also, during ft_redefinetrial, following warning message occurs.(not error > message) > > Warning: removing inconsistent sampleinfo > > In ft_datatype_raw at 97 > In ft_checkdata at 213 > In ft_redefinetrial at 104 > > Warning: the trial definition in the configuration is inconsistent with > the actual data > > In utilities\private\warning_once at 116 > In utilities\private\fixsampleinfo at 74 > In ft_datatype_raw at 154 > In ft_checkdata at 213 > In ft_redefinetrial at 206 > > Warning: reconstructing sampleinfo by assuming that the trials are > consecutive segments of a continuous recording > > In utilities\private\warning_once at 116 > In utilities\private\fixsampleinfo at 79 > In ft_datatype_raw at 154 > In ft_checkdata at 213 > In ft_redefinetrial at 206 > > I wonder if these messages during ft_redefinetrial mean wrong defining > trials. > Should I continue these process like this, modifying the ft_preprocessing > function? > Or, is it better to exclude some erroneous files? > > Best regards > > -- > BeomJun Min, M.D. > > Department of Medical System Engineering (DMSE) > Gwangju Institute of Science and Technology (GIST) > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > 500-712, Republic of Korea (South) > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr > _______________________________________________ > 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 > -- BeomJun Min, M.D. Department of Medical System Engineering (DMSE) Gwangju Institute of Science and Technology (GIST) 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju 500-712, Republic of Korea (South) Phone: +82-62-715-3266 / Fax: +82-62-715-3244 E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Thu May 30 11:45:09 2013 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 30 May 2013 11:45:09 +0200 Subject: [FieldTrip] ft_preprocessing error message during reading some files In-Reply-To: References: Message-ID: <80EC72EF-2296-47F5-97EC-197F91402C79@gmail.com> Dear BJ Min, I used the field trip version 20111101. I don't know if it's still available though. To set the bitrate, you have to specify cfg.headerformat='ns_cnt32'; cfg.dataformat='ns_cnt32'; cfg.eventformat='ns_cnt32'; in ft_preprocessing One way to check this (and also if you set your bitrate correctly), is to see if you can find easily detectable ERPs, like the visual or auditory N1 in your data. If you can't see this component, then your settings are wrong, even if data has been read into Matlab. Good Luck, Julian Am 30.05.2013 um 10:15 schrieb Beom Jun Min: > Dear Julian Keil, > > Thank you for your reply. > I agree with that your problem was similar with mine. > My data was acquired by Neuroscan also. > There might a problem associated with .CNT file in the newer version. > > Could you tell me the number of the older version you used? > > Best Regards > > > > 2013/5/29 Julian Keil > Dear BJ Min, > > what type of data are you trying to read in? > I had similar problems when reading in .CNT data. > Also, with some systems you have to specify the bit rate (e.g. Neuroscan). > For me, reading in data with an older version of FieldTrip solved the problem, but this was in 2011, so I cannot say if the problem with .CNT files has been solved. > > Good Luck > > Julian > > ******************** > Dr. Julian Keil > > AG Multisensorische Integration > Psychiatrische Universitätsklinik > der Charité im St. Hedwig-Krankenhaus > Große Hamburger Straße 5-11, Raum E 307 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 29.05.2013 um 11:47 schrieb Beom Jun Min: > >> Dear all, >> >> Hello, my name is BJ Min from Korea. >> >> I'm dealing with EEG data of many subjects. >> >> When I run ft_preprocessing, the error message below shows with only some files of my data. (not all files) >> >> Warning: rounding "endsample" to the nearest integer >> > In ft_read_data at 100 >> In ft_preprocessing at 577 >> ??? Error using ==> ft_read_data at 149 >> cannot read data after the end of the file >> >> Error in ==> ft_preprocessing at 577 >> dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', rawindx, >> 'checkboundary', strcmp(cfg.continuous, 'no'), 'dataformat', cfg.dataformat) >> >> I think that there might be a kind of problem in data acquisition, and I modified below scripts in the ft_read_data function with comment %. >> >> % % test whether the requested data segment is not outside the file >> % if any(begsample<1) >> % error('FILEIO:InvalidBegSample', 'cannot read data before the begin of the file'); >> % elseif any(endsample>(hdr.nSamples*hdr.nTrials)) >> % error('FILEIO:InvalidEndSample', 'cannot read data after the end of the file'); >> % end >> >> After that, the ft_preprocessing worked well. >> >> However, the files with the first problem showed additional warning message while running ft_definetrial. (not error message) >> >> Warning: Integer operands are required for colon operator when used as index >> > In fileio\private\loadcnt at 464 >> In ft_read_header at 1450 >> In ft_preprocessing at 398 >> >> Warning: rounding "endsample" to the nearest integer >> > In ft_read_data at 100 >> In ft_preprocessing at 577 >> >> Also, during ft_redefinetrial, following warning message occurs.(not error message) >> >> Warning: removing inconsistent sampleinfo >> > In ft_datatype_raw at 97 >> In ft_checkdata at 213 >> In ft_redefinetrial at 104 >> >> Warning: the trial definition in the configuration is inconsistent with the actual data >> > In utilities\private\warning_once at 116 >> In utilities\private\fixsampleinfo at 74 >> In ft_datatype_raw at 154 >> In ft_checkdata at 213 >> In ft_redefinetrial at 206 >> >> Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording >> > In utilities\private\warning_once at 116 >> In utilities\private\fixsampleinfo at 79 >> In ft_datatype_raw at 154 >> In ft_checkdata at 213 >> In ft_redefinetrial at 206 >> >> I wonder if these messages during ft_redefinetrial mean wrong defining trials. >> Should I continue these process like this, modifying the ft_preprocessing function? >> Or, is it better to exclude some erroneous files? >> >> Best regards >> >> -- >> BeomJun Min, M.D. >> >> Department of Medical System Engineering (DMSE) >> Gwangju Institute of Science and Technology (GIST) >> 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju >> 500-712, Republic of Korea (South) >> Phone: +82-62-715-3266 / Fax: +82-62-715-3244 >> E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr >> _______________________________________________ >> 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 > > > > -- > BeomJun Min, M.D. > > Department of Medical System Engineering (DMSE) > Gwangju Institute of Science and Technology (GIST) > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > 500-712, Republic of Korea (South) > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From dr.chungki.lee at gmail.com Thu May 30 11:56:02 2013 From: dr.chungki.lee at gmail.com (Chungki Lee) Date: Thu, 30 May 2013 18:56:02 +0900 Subject: [FieldTrip] ft_preprocessing error message during reading some files In-Reply-To: References: Message-ID: Hi Min you'd better use ft_definetrial routine before ft_preprocessing. example) cfg = []; cfg.dataset = filename; % string cfg.trialdef.eventtype = your define text; % string cfg.trialdef.eventvalue = your label value; % integer cfg.trialdef.prestim = before onset time (sec); % positive integer, not negative integer cfg.trialdef.poststim = after onset time (sec); % positve integer cfg = ft_definetrial(cfg); data = ft_preprocessing(cfg); have fun ^^ 2013/5/30 Beom Jun Min > Dear Julian Keil, > > Thank you for your reply. > I agree with that your problem was similar with mine. > My data was acquired by Neuroscan also. > There might a problem associated with .CNT file in the newer version. > > Could you tell me the number of the older version you used? > > Best Regards > > > > 2013/5/29 Julian Keil > >> Dear BJ Min, >> >> what type of data are you trying to read in? >> I had similar problems when reading in .CNT data. >> Also, with some systems you have to specify the bit rate (e.g. Neuroscan). >> For me, reading in data with an older version of FieldTrip solved the >> problem, but this was in 2011, so I cannot say if the problem with .CNT >> files has been solved. >> >> Good Luck >> >> Julian >> >> ******************** >> *Dr. Julian Keil* >> * >> * >> AG Multisensorische Integration >> Psychiatrische Universitätsklinik >> der Charité im St. Hedwig-Krankenhaus >> Große Hamburger Straße 5-11, Raum E 307 >> 10115 Berlin >> >> Telefon: +49-30-2311-1879 >> Fax: +49-30-2311-2209 >> >> http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration >> >> Am 29.05.2013 um 11:47 schrieb Beom Jun Min: >> >> Dear all, >> >> Hello, my name is BJ Min from Korea. >> >> I'm dealing with EEG data of many subjects. >> >> When I run ft_preprocessing, the error message below shows with only some >> files of my data. (not all files) >> >> Warning: rounding "endsample" to the nearest integer >> > In ft_read_data at 100 >> In ft_preprocessing at 577 >> ??? Error using ==> ft_read_data at 149 >> cannot read data after the end of the file >> >> Error in ==> ft_preprocessing at 577 >> dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', >> begsample, 'endsample', endsample, 'chanindx', rawindx, >> 'checkboundary', strcmp(cfg.continuous, 'no'), 'dataformat', >> cfg.dataformat) >> >> I think that there might be a kind of problem in data acquisition, and I >> modified below scripts in the ft_read_data function with comment %. >> >> % % test whether the requested data segment is not outside the file >> % if any(begsample<1) >> % error('FILEIO:InvalidBegSample', 'cannot read data before the begin >> of the file'); >> % elseif any(endsample>(hdr.nSamples*hdr.nTrials)) >> % error('FILEIO:InvalidEndSample', 'cannot read data after the end of >> the file'); >> % end >> >> After that, the ft_preprocessing worked well. >> >> However, the files with the first problem showed additional warning >> message while running ft_definetrial. (not error message) >> >> Warning: Integer operands are required for colon operator when used as >> index >> > In fileio\private\loadcnt at 464 >> In ft_read_header at 1450 >> In ft_preprocessing at 398 >> >> Warning: rounding "endsample" to the nearest integer >> > In ft_read_data at 100 >> In ft_preprocessing at 577 >> >> Also, during ft_redefinetrial, following warning message occurs.(not >> error message) >> >> Warning: removing inconsistent sampleinfo >> > In ft_datatype_raw at 97 >> In ft_checkdata at 213 >> In ft_redefinetrial at 104 >> >> Warning: the trial definition in the configuration is inconsistent with >> the actual data >> > In utilities\private\warning_once at 116 >> In utilities\private\fixsampleinfo at 74 >> In ft_datatype_raw at 154 >> In ft_checkdata at 213 >> In ft_redefinetrial at 206 >> >> Warning: reconstructing sampleinfo by assuming that the trials are >> consecutive segments of a continuous recording >> > In utilities\private\warning_once at 116 >> In utilities\private\fixsampleinfo at 79 >> In ft_datatype_raw at 154 >> In ft_checkdata at 213 >> In ft_redefinetrial at 206 >> >> I wonder if these messages during ft_redefinetrial mean wrong defining >> trials. >> Should I continue these process like this, modifying the ft_preprocessing >> function? >> Or, is it better to exclude some erroneous files? >> >> Best regards >> >> -- >> BeomJun Min, M.D. >> >> Department of Medical System Engineering (DMSE) >> Gwangju Institute of Science and Technology (GIST) >> 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju >> 500-712, Republic of Korea (South) >> Phone: +82-62-715-3266 / Fax: +82-62-715-3244 >> E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr >> _______________________________________________ >> 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 >> > > > > -- > BeomJun Min, M.D. > > Department of Medical System Engineering (DMSE) > Gwangju Institute of Science and Technology (GIST) > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju > 500-712, Republic of Korea (South) > Phone: +82-62-715-3266 / Fax: +82-62-715-3244 > E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- ---------------------------------------------------------------- Chungki Lee, Ph.D. Post-doc Biomedical Research Institute Korea Institute of Science and Technology E-mail: chungki at kist.re.kr Tel:+82-2-958-5636, C.P: +82-10-5223-7309 ---------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From lkystra at hotmail.it Thu May 30 12:39:16 2013 From: lkystra at hotmail.it (lucia abbatantuoni) Date: Thu, 30 May 2013 12:39:16 +0200 Subject: [FieldTrip] distorsion of .edf file Message-ID: Dear all, I'm analyzing EEG files in format .edf with matlab. Many files after the use of read_edf, have a distorsion. Matlab indicate a warning for the 348 row of read_edf . Can someone give to me a help? Best regards, Lucia -------------- next part -------------- An HTML attachment was scrubbed... URL: From zriouil.imane at gmail.com Thu May 30 15:43:59 2013 From: zriouil.imane at gmail.com (z.imane) Date: Thu, 30 May 2013 15:43:59 +0200 Subject: [FieldTrip] distorsion of .edf file In-Reply-To: References: Message-ID: I have the same problem. if you want to read your data. it's possible to use ft_read_data(filename') 2013/5/30 lucia abbatantuoni > Dear all, > I'm analyzing EEG files in format .edf with matlab. Many files after the > use of read_edf, have a distorsion. Matlab indicate a warning for the 348 > row of read_edf . Can someone give to me a help? > > Best regards, > Lucia > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Zriouil Imane -------------- next part -------------- An HTML attachment was scrubbed... URL: From lkystra at hotmail.it Thu May 30 17:33:55 2013 From: lkystra at hotmail.it (lucia abbatantuoni) Date: Thu, 30 May 2013 17:33:55 +0200 Subject: [FieldTrip] distorsion of .edf file In-Reply-To: References: , Message-ID: I try and... it's not a good solution. Date: Thu, 30 May 2013 15:43:59 +0200 From: zriouil.imane at gmail.com To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] distorsion of .edf file I have the same problem. if you want to read your data. it's possible to use ft_read_data(filename') 2013/5/30 lucia abbatantuoni Dear all, I'm analyzing EEG files in format .edf with matlab. Many files after the use of read_edf, have a distorsion. Matlab indicate a warning for the 348 row of read_edf . Can someone give to me a help? Best regards, Lucia _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Zriouil Imane _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu May 30 18:31:22 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 30 May 2013 18:31:22 +0200 Subject: [FieldTrip] distorsion of .edf file In-Reply-To: References: , Message-ID: <4C650B52-1AFF-4CAE-9F28-D320B9E00C75@donders.ru.nl> Hi Lucia, Perhaps you need to be a bit more specific. In particular with respect to the fieldtrip version, matlab version, operating system, and warning message. Otherwise all of us are shooting in the dark. Best wishes, Jan-Mathijs On May 30, 2013, at 5:33 PM, lucia abbatantuoni wrote: > I try and... it's not a good solution. > > Date: Thu, 30 May 2013 15:43:59 +0200 > From: zriouil.imane at gmail.com > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] distorsion of .edf file > > I have the same problem. > > if you want to read your data. it's possible to use ft_read_data(filename') > > > > 2013/5/30 lucia abbatantuoni > Dear all, > I'm analyzing EEG files in format .edf with matlab. Many files after the use of read_edf, have a distorsion. Matlab indicate a warning for the 348 row of read_edf . Can someone give to me a help? > > Best regards, > Lucia > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > > > Zriouil Imane > > > > > _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From ebrahimi_nia at yahoo.com Thu May 30 19:14:52 2013 From: ebrahimi_nia at yahoo.com (Fatemeh Ebrahimi nia) Date: Thu, 30 May 2013 10:14:52 -0700 (PDT) Subject: [FieldTrip] loreta2fieldtrip function error Message-ID: <1369934092.15336.YahooMailNeo@web122405.mail.ne1.yahoo.com> Hi dear all, I am analyzing EEG data. I have computed sLORETA (.slor) from ERP data. Now I want to read and convert LORETA source reconstruction into a MATLAB data structure using "loreta2fieldtrip" function, But I have gotten the bellow error. **** Error using fread Invalid precision. Error in loreta2fieldtrip (line 85) activity = fread(fid, [voxnumber Ntime], 'float = >single'); *** Can someone give me a help? Best regards, Fatemeh -------------- next part -------------- An HTML attachment was scrubbed... URL: From inieuwenhuis at berkeley.edu Thu May 30 19:30:41 2013 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Thu, 30 May 2013 10:30:41 -0700 Subject: [FieldTrip] loreta2fieldtrip function error In-Reply-To: <1369934092.15336.YahooMailNeo@web122405.mail.ne1.yahoo.com> References: <1369934092.15336.YahooMailNeo@web122405.mail.ne1.yahoo.com> Message-ID: <51A78CC1.6030906@berkeley.edu> Hi Fatemeh, I had the same error recently when I did the same. I filed the bug, see http://bugzilla.fcdonders.nl/show_bug.cgi?id=2144 I did create a work around. In the LORETA program, you can export the source data as a text file. You can read that text file in with loreta2fieldtrip.m. It's a bit of a patch, but it worked for me. Hope this helps, Ingrid On 5/30/2013 10:14 AM, Fatemeh Ebrahimi nia wrote: > Hi dear all, > > I am analyzing EEG data. I have computed sLORETA (.slor) from ERP > data. Now I want to read and convert LORETA source reconstruction into a > MATLAB data structure using "loreta2fieldtrip" function, But I have > gotten the bellow error. > > **** Error using fread > Invalid precision. > Error in loreta2fieldtrip (line 85) > activity = fread(fid, [voxnumber Ntime], 'float = >single'); *** > > Can someone give me a help? > > Best regards, > Fatemeh > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 -------------- next part -------------- An HTML attachment was scrubbed... URL: From frank.ye.mei at gmail.com Thu May 30 21:33:53 2013 From: frank.ye.mei at gmail.com (Ye Mei) Date: Thu, 30 May 2013 15:33:53 -0400 Subject: [FieldTrip] error when using ctf2grad Message-ID: <51A7A9A1.6020401@gmail.com> Hi All, I have some problem using ctf2grad. The program will set grad.balance.current = 'G3AR';, and then do getfield(grad.balance, grad.balance.current) but grad.balance = G1BR: [1x1 struct] G2BR: [1x1 struct] G3BR: [1x1 struct] and has no G3AR in it. So an error will pop up. Can anyone help me with that? Also, What do G1BR, G2BR, G3BR, G3AR stand for? thanks, Ye From politzerahless at gmail.com Fri May 31 05:53:45 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Thu, 30 May 2013 22:53:45 -0500 Subject: [FieldTrip] Question about minimum norm estimate pipeline Message-ID: Hello all, I have not yet gotten a response to my question below, but in the meantime I have another question about the minimum norm estimate workflow--specifically, about the coordinate system for the skull-stripped anatomy in the step described at http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#preprocessing_of_the_anatomical_mrisave_to_disk. I'm confused by the following bit of code: % ensure that the skull-stripped anatomy is expressed in the same coordinate system as the anatomy seg.transform = mri_tal.transform; In my data, mri_tal.coordsys is 'spm' (I presume this is the result of re-aligning to Talairach in the previous step?) whereas seg.coordsys is 'ctf' (as a result of re-aligning to CTF several steps earlier). (But mri_tal also has a field mri_tal.transformorig, which seg does not have.) So should I really be using the same transform for both, as shown in the tutorial? Apologies if this question is pretty basic; I'm just trying to pinpoint where the mis-alignment described in my message below occurred, so I want to make sure I understand each step of the workflow correctly Best, Steve > Message: 1 > Date: Sat, 25 May 2013 08:11:18 -0500 > From: Stephen Politzer-Ahles > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Sourcespace and volume conductor misaligned > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Hello all, > > I am going through the workflow at > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate. After making > the volume conduction model using ft_prepare_headmodel(), I noticed that > although the volume conduction model and sourcespace have the same > orientation and overall size/shape (after I converted the volume conduction > model to cm, which wasn't in the tutorial but my original model came out in > mm), they don't quite line up, as you can see in this figure: > > http://i.imgur.com/mGEtLOa.png > > I did interactively re-align the data to CTF (twice--in step 2 of > "Preprocessing of the anatomical MRI" and in step 4 of "Source model") > using fiducials, and to Talairach (step 5 of "Preprocessing of the > anatomical data"), so I'm not sure how it ended up this way. The code I've > used at each step is basically the same as that in the tutorial. > > Is there any way to line up my volume conduction model and sourcespace now, > without going back and re-running most of the workflow? > > Best, > Steve > > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://people.ku.edu/~sjpa/ On Sat, May 25, 2013 at 1:56 PM, wrote: > > 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. Sourcespace and volume conductor misaligned > (Stephen Politzer-Ahles) > 2. Re: fieldtrip Digest, Vol 30, Issue 31 (Johanna Zumer) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sat, 25 May 2013 08:11:18 -0500 > From: Stephen Politzer-Ahles > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Sourcespace and volume conductor misaligned > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Hello all, > > I am going through the workflow at > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate. After making > the volume conduction model using ft_prepare_headmodel(), I noticed that > although the volume conduction model and sourcespace have the same > orientation and overall size/shape (after I converted the volume conduction > model to cm, which wasn't in the tutorial but my original model came out in > mm), they don't quite line up, as you can see in this figure: > > http://i.imgur.com/mGEtLOa.png > > I did interactively re-align the data to CTF (twice--in step 2 of > "Preprocessing of the anatomical MRI" and in step 4 of "Source model") > using fiducials, and to Talairach (step 5 of "Preprocessing of the > anatomical data"), so I'm not sure how it ended up this way. The code I've > used at each step is basically the same as that in the tutorial. > > Is there any way to line up my volume conduction model and sourcespace now, > without going back and re-running most of the workflow? > > Best, > Steve > > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://people.ku.edu/~sjpa/ > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130525/561df14f/attachment-0001.html > > > ------------------------------ > > Message: 2 > Date: Sat, 25 May 2013 20:54:59 +0200 > From: Johanna Zumer > To: FieldTrip discussion list > Subject: Re: [FieldTrip] fieldtrip Digest, Vol 30, Issue 31 > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Dear Jing, > > 1. Every MRI scanner is different, so I'm not familiar with that naming > scheme, but it seems the 'GAD' at the end of the file name indicates that > was with the Gadolinium contrast agent, so I would suggest to not use that, > but instead use the first (plain) T1. > > 2. I'm not sure what to suggest. I assume you can see the vitamin E marker > clearly when viewing the DICOM file? Is the issue that some slices are > missing in the conversion, or that the contrast on the image is not the > same? or right/left flipped? > > Best, > Johanna > > > 2013/5/23 WangJing <13681530640 at 139.com> > > > Dear Johanna, > > > > Thank you for your suggestion. > > 1.I have two folder of T1 MRI, one is t1_vibe_tra_4,and another is > > t1_vibe_traGAD-5. which one is best? > > 2.when I convert MRI from DICOM into CTF format,the vitamin E marker > > didn't be found. what can I do? > > > > Best Regards, > > Jing Wang > > > > > > > > > > ------------------------------ > > ----The following is the content of the forwarded email---- > > From?fieldtrip-request > > To?fieldtrip > > Date?2013-05-22 15:33:13 > > Subject?fieldtrip Digest, Vol 30, Issue 31 > > > > 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: question About head model (Johanna Zumer) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Wed, 22 May 2013 09:30:17 +0200 > > From: Johanna Zumer > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] question About head model > > Message-ID: > > > > Content-Type: text/plain; charset="utf-8" > > > > Dear Jing, > > > > It is best to use the T1 MRI rather than the other scans. To open a DICOM > > format file, you can try one of these options: > > > > % read the DICOM files > > mri = ft_read_mri('single_file_of_DICOM_series.IMA'); > > % or use a graphical file selection[f, p] = uigetfile > > < http://www.mathworks.com/access/helpdesk/help/techdoc/ref/uigetfile.html > > >('*'); > > mri = ft_read_mri(fullfile > > > >(p, > > f)); > > > > > > I copied the above from documentation on the FieldTrip wiki: > > > > http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_an_anatomical_mri_from_dicom_into_ctf_format > > > > > > Then you can save the 'mri' into a *.mat file for future use with FieldTrip. > > > > Best regards, > > Johanna > > > > > > 2013/5/22 WangJing <13681530640 at 139.com> > > > > > Hi > > > I am a freshman about field trip. > > > I am trying to build the forward model. but my mri data is different from > > > the data in the tutorial. So I don't know how to bulid the head model. I > > > use the date which is from the paper "Open Database of Epileptic EEG with > > > MRI and Postoperational Assessment of Foci?a Real World Verification for > > > the EEG Inverse Solutions",http://eeg.pl/epi > > . MRI recordings containing a > > > > > T1, T2 or fluid attenuated inversion recovery (FLAIR) weighted brain scans > > > with morphologic substrate of the epilepsy (mostly cortical dysplasias, > > > dysplastic tumors etc.). In some cases there is also a scan with the > > > > > gadolinium (GAD) contrast. The images were collected by Siemens Sonata 1.5T > > > scanner. The data is stored in the Digital Imaging and Communications in > > > Medicine (DICOM) format. The name of the scan?s folder indicates its > > > weighting.The scans have the following resolutions: T1: 512 ? 512 pixels, > > > pixel spacing 0.4687 mm, slice thickness 1.2 mm, T2: 256 ? 256 pixels, > > > pixel spacing 0.9375 mm,slice thickness 2.5 mm. > > > > > In the tutorial,the mri data stored in only one file, while the data which > > > > > I used have many files, I don't know how to process. who can help me,Thanks1 > > > Thanks very much! > > > Best Reagards > > > Jing Wang > > > > > > > > > > > > > > > > > > ------------------------------ > > > ----The following is the content of the forwarded email---- > > > From?fieldtrip-request > > > To?fieldtrip > > > Date?2013-05-21 23:59:18 > > > Subject?fieldtrip Digest, Vol 30, Issue 29 > > > > > > 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: problem in connectivityanalysis (Gabriel Gonzalez Escamilla) > > > > > > > > > ---------------------------------------------------------------------- > > > > > > Message: 1 > > > Date: Tue, 21 May 2013 17:52:21 +0200 > > > From: Gabriel Gonzalez Escamilla > > > To: FieldTrip discussion list > > > Subject: Re: [FieldTrip] problem in connectivityanalysis > > > Message-ID: <1348f6433edc26f9.519bb455 at upo.es> > > > Content-Type: text/plain; charset="iso-8859-1" > > > > > > Thank you so much for your answer J?rn, > > > > > > > > > > > Now I got it, so, I will let the 'fourier' as input to ft_connectivityanalysis, because for some indices I will need the auto-spectrum, and if I fully undertood what you said, it will be the same, as they always take the phase information from the fourier transform. And fieltrip will automatically compute the csd if the input is the frequency data. > > > > > > > > > > > Nevertheless, it give me some error when I tried to use the output from 'powandcsd' of freqanalysis, always gives me a matrix dimensions error, and when I use the output 'fourier' from connectivityanalysis, it computes almost all indices to ok, raging from? -1 to 1 (I'm saw that they are signed, so this is ok), the problem are the ImC ranging from -inf to inf, and the PLV values ranging from 0 to inf, but when I use the 'fourier' the values are. Which for me is really weird. > > > > > > > > > > > > > > I have checked internally, and even when I always use the 'fourier' as input, when it internally calculates cross-spectrum for the ImC and PLV, the data.crsspctrm is different, e.g: > > > data.dimord = 'rpt_rpt_chan_chan_freq' > > > ans size(data.crsspctrm) = [1 7 59 59]; > > > > > > > > So, both are apparently the same, but the data inside this matrices is different, > > > > > > > > > > > for example, when calculating the ImC the first 7 columns for the first two rows are: > > > val(:,:,1,1) > > > ?[0.9323? 0.3679? 0.8629? 1.6436? 0.6404? 1.8782? 0.1139] > > > val(:,:,1,2) > > > > > > > > ?[0.8509-0.1555i? 0.2507-0.1066i? 0.8173-0.0290i? 1.4328-0.2427i? 0.5457-0.0500i? 1.6505-0.0161i? 0.0993+0.0016i] > > > > > > while when calculating the PLV are: > > > val(:,:,1,1) > > > ?[1? 1? 1? 1? 1? 1? 1] > > > val(:,:,1,2) > > > > > > > > ?[0.9694-0.2133i? 0.7011-0.3564i? 0.9951-0.0104i? 0.9014-0.3481i? 0.9781-0.0819i? 0.9982-0.0046i? 0.9507-0.0483i] > > > > > > > > > > > > > > I'm pretty sure I'm doing something wrong here, but I don't really have a clue, > > > > > > > > > > > If I use the fourier transform to calculate the 'csd' in ft_connectivity analysis and use this csd as input to all other ft_connectivityanalysis indices all of them are set to NaN or 1, not ranging between any numbers. > > > > > > > > > > > > > > > > > > > > On the other hand, I have seen searching on the net, that fieltrip is capable of create surrogate data, by shifting the phase information on every trial for only one electrode of each pair while using the original samples of each trials on the second channel, but I couldn't find on the manual how to do such a thing. Is there any way to compute this kind of surrogates for every sensor? or was it something that some one suggest to somebody? > > > > > > > > > Many thanks in advanced, > > > Gabriel. > > > > > > > > > > > > > > > ----- Mensaje original ----- > > > De: "J?rn M. Horschig" > > > Fecha: Martes, 21 de Mayo de 2013, 9:03 am > > > Asunto: Re: [FieldTrip] problem in connectivityanalysis > > > A: FieldTrip discussion list > > > > > > > > > > > > > > > > > > > Dear Gabriel, > > > > > > > > > > > > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > > > > > > > > > > No. You should think of coherence more as a measure for the consistency of the phase relation between channels across trials, so coherence is just not defined per trial,neither would it make sense to compute coherence for a single trial. > > > > > > > > > > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? I see some terminology issues here. Let me try to explain in a simple (aka least-mathematical I can think of) way: > > > > > > > > > > > > > For all these connectivity measures, we need the phase information from the Fourier transform (FFT) to compute the cross-spectral density matrix (CSD). The CSD can be regarded as the equivalent in the frequency domain to the covariance matrix in the time domain, thus it is a measures how a certain channels activity is co-modulated with another channels activity (for a particular frequency) - makes pretty much sense to make use of this when computing connectivity, right? :) > > > > > > > > > As you might know, a Fourier transform returns complex numbers, where the imaginary part of this number contains phase information. When calling ft_freqanalysis, you can decide if it shall only return the (squared) real part of the frequency spectrum (cfg.output='pow'), or instead the full CSD (cfg.output = 'powandcsd'). Alternatively, you can also let ft_freqanalysis return the raw Fourier coefficients (cfg.output='fourier'). From the Fourier coefficients, however, you can easily obtain the CSD or the power spectrum basically by multiplication the Fourier matrix with itself (transposed). All of these measures quantify the phase relation between channels across trials, and as phase information is coded in the imaginary part of the fourier output, thus for connectivityanalysis you need the CSD which can be obtained either by 'powandcsd' or by 'fourier'. > > > > > > > > I hope that somehow clarifies your questions. > > > > > > > > Best, > > > > J?rn > > > > > > > > On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote: > > > > Dear Fieltrip experts, > > > > > > > > > > > > > I have my continuous data imported to fieldtrip with matlab, I'm looking for performing connectivity analysis between pairs of sensors, I have succed as: > > > > > > > > > data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 channels and 2000 samples > > > > data.label {59x1}; > > > > data.time {1xNepochs}; > > > > > > > > then, calculate only the FFT of all sensors as: > > > > cfg=[]; > > > > cfg.output='fourier'; > > > > cfg.method='mtmfft'; > > > > cfg.taper='hanning'; > > > > cfg.foilim=[8.5 9.5]; > > > > cfg.tapsmofrq=0; > > > > cfg.trials='all'; > > > > cfg.keeptrials='yes'; > > > > cfg.channel='all'; > > > > fourier=ft_freqanalysis(cfg, data) > > > > as output I get: > > > > dimord = 'rpttap_chan_freq' > > > > freq= [1x9] > > > > fourierspctrm=[7x59x9 double] > > > > > > > > Then compute the imaginary part of coherency as: > > > > cfg=[]; > > > > cfg.method ='cohe'; > > > > cfg.complex='imag'; > > > > cfg.channelcbm={'all' 'all'}; > > > > coher = ft_connectivityanalysis (cfg, fourier) > > > > as output get: > > > > dimord='chan_chan_freq'; > > > > cohspctrm=[59x59x9 double]; > > > > dof=7; > > > > > > > > I have two main questions: > > > > > > > > > > > > > A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the opposite, this is, to get the imaginary part of coherence for each epoch (repetition) on all my channels and not for each frequency, something like: chan_chan_rpt or chancbm_rpt, Is this possible? > > > > > > > > > > > > > > > > > > > > > B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too? > > > > > > > > > > > > > > > > > > > > Many thanks in advanced, > > > > Gabriel. > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: > > > jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: > > > http://www.ru.nl/donders > > > > > > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________ > > > > fieldtrip mailing list > > > > fieldtrip at donders.ru.nl > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > > --------------------------
PhD. student Gabriel Gonz?lez-Escamilla
Laboratory of Functional Neuroscience
Department of Physiology, Anatomy, and Cell Biology
University Pablo de Olavide
Ctra. de Utrera, Km.1
41013 - Seville
- Spain -

Email: > > > ggonesc at upo.es
http://www.upo.es/neuroaging/es/
> > > > > > > > > -------------- next part -------------- > > > An HTML attachment was scrubbed... > > > URL: < > > > > > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130521/0886ac06/attachment.html > > > > > > > > > > ------------------------------ > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > End of fieldtrip Digest, Vol 30, Issue 29 > > > ***************************************** > > > > > > _______________________________________________ > > > 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/20130522/190aa246/attachment.html > > > > > > > ------------------------------ > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > End of fieldtrip Digest, Vol 30, Issue 31 > > ***************************************** > > > > _______________________________________________ > > 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/20130525/4259b000/attachment.html > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 30, Issue 36 > ***************************************** -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://people.ku.edu/~sjpa/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Fri May 31 08:11:23 2013 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Fri, 31 May 2013 08:11:23 +0200 (CEST) Subject: [FieldTrip] Question about minimum norm estimate pipeline In-Reply-To: Message-ID: <1914237354.1292588.1369980683984.JavaMail.root@sculptor.zimbra.ru.nl> Hi Steve, A quick guess; did you correctly align your resliced mri to Talairach space by indicating the commissures ( http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures ) and, if I'm correct, a point in the same place, e.g. between the hemispheres? This should update the transformation matrix. Best regards, Arjen ----- Oorspronkelijk bericht ----- > Van: "Stephen Politzer-Ahles" > Aan: fieldtrip at science.ru.nl > Verzonden: Vrijdag 31 mei 2013 05:53:45 > Onderwerp: [FieldTrip] Question about minimum norm estimate pipeline > Hello all, > I have not yet gotten a response to my question below, but in the > meantime I have another question about the minimum norm estimate > workflow--specifically, about the coordinate system for the > skull-stripped anatomy in the step described at > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#preprocessing_of_the_anatomical_mrisave_to_disk > . I'm confused by the following bit of code: > % ensure that the skull-stripped anatomy is expressed in the same > coordinate system as the anatomy > seg.transform = mri_tal.transform; > In my data, mri_tal.coordsys is 'spm' (I presume this is the result of > re-aligning to Talairach in the previous step?) whereas seg.coordsys > is 'ctf' (as a result of re-aligning to CTF several steps earlier). > (But mri_tal also has a field mri_tal.transformorig, which seg does > not have.) So should I really be using the same transform for both, as > shown in the tutorial? > Apologies if this question is pretty basic; I'm just trying to > pinpoint where the mis-alignment described in my message below > occurred, so I want to make sure I understand each step of the > workflow correctly > Best, > Steve > > Message: 1 > > Date: Sat, 25 May 2013 08:11:18 -0500 > > From: Stephen Politzer-Ahles < politzerahless at gmail.com > > > To: fieldtrip at donders.ru.nl > > Subject: [FieldTrip] Sourcespace and volume conductor misaligned > > Message-ID: > > > > > > Content-Type: text/plain; charset="utf-8" > > > > Hello all, > > > > I am going through the workflow at > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate . After > > making > > the volume conduction model using ft_prepare_headmodel(), I noticed > > that > > although the volume conduction model and sourcespace have the same > > orientation and overall size/shape (after I converted the volume > > conduction > > model to cm, which wasn't in the tutorial but my original model came > > out in > > mm), they don't quite line up, as you can see in this figure: > > > > http://i.imgur.com/mGEtLOa.png > > > > I did interactively re-align the data to CTF (twice--in step 2 of > > "Preprocessing of the anatomical MRI" and in step 4 of "Source > > model") > > using fiducials, and to Talairach (step 5 of "Preprocessing of the > > anatomical data"), so I'm not sure how it ended up this way. The > > code I've > > used at each step is basically the same as that in the tutorial. > > > > Is there any way to line up my volume conduction model and > > sourcespace now, > > without going back and re-running most of the workflow? > > > > Best, > > Steve > > > > -- > > Stephen Politzer-Ahles > > University of Kansas > > Linguistics Department > > http://people.ku.edu/~sjpa/ > On Sat, May 25, 2013 at 1:56 PM, < fieldtrip-request at science.ru.nl > > wrote: > > > > 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. Sourcespace and volume conductor misaligned > > (Stephen Politzer-Ahles) > > 2. Re: fieldtrip Digest, Vol 30, Issue 31 (Johanna Zumer) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Sat, 25 May 2013 08:11:18 -0500 > > From: Stephen Politzer-Ahles < politzerahless at gmail.com > > > To: fieldtrip at donders.ru.nl > > Subject: [FieldTrip] Sourcespace and volume conductor misaligned > > Message-ID: > > > > > > Content-Type: text/plain; charset="utf-8" > > > > Hello all, > > > > I am going through the workflow at > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate . After > > making > > the volume conduction model using ft_prepare_headmodel(), I noticed > > that > > although the volume conduction model and sourcespace have the same > > orientation and overall size/shape (after I converted the volume > > conduction > > model to cm, which wasn't in the tutorial but my original model came > > out in > > mm), they don't quite line up, as you can see in this figure: > > > > http://i.imgur.com/mGEtLOa.png > > > > I did interactively re-align the data to CTF (twice--in step 2 of > > "Preprocessing of the anatomical MRI" and in step 4 of "Source > > model") > > using fiducials, and to Talairach (step 5 of "Preprocessing of the > > anatomical data"), so I'm not sure how it ended up this way. The > > code I've > > used at each step is basically the same as that in the tutorial. > > > > Is there any way to line up my volume conduction model and > > sourcespace now, > > without going back and re-running most of the workflow? > > > > Best, > > Steve > > > > -- > > Stephen Politzer-Ahles > > University of Kansas > > Linguistics Department > > http://people.ku.edu/~sjpa/ > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130525/561df14f/attachment-0001.html > > > > > > > ------------------------------ > > > > Message: 2 > > Date: Sat, 25 May 2013 20:54:59 +0200 > > From: Johanna Zumer < johanna.zumer at donders.ru.nl > > > To: FieldTrip discussion list < fieldtrip at science.ru.nl > > > Subject: Re: [FieldTrip] fieldtrip Digest, Vol 30, Issue 31 > > Message-ID: > > > > > > Content-Type: text/plain; charset="utf-8" > > > > Dear Jing, > > > > 1. Every MRI scanner is different, so I'm not familiar with that > > naming > > scheme, but it seems the 'GAD' at the end of the file name indicates > > that > > was with the Gadolinium contrast agent, so I would suggest to not > > use that, > > but instead use the first (plain) T1. > > > > 2. I'm not sure what to suggest. I assume you can see the vitamin E > > marker > > clearly when viewing the DICOM file? Is the issue that some slices > > are > > missing in the conversion, or that the contrast on the image is not > > the > > same? or right/left flipped? > > > > Best, > > Johanna > > > > > > 2013/5/23 WangJing < 13681530640 at 139.com > > > > > > Dear Johanna, > > > > > > Thank you for your suggestion. > > > 1.I have two folder of T1 MRI, one is t1_vibe_tra_4,and another is > > > t1_vibe_traGAD-5. which one is best? > > > 2.when I convert MRI from DICOM into CTF format,the vitamin E > > > marker > > > didn't be found. what can I do? > > > > > > Best Regards, > > > Jing Wang > > > > > > > > > > > > > > > ------------------------------ > > > ----The following is the content of the forwarded email---- > > > From?fieldtrip-request< fieldtrip-request at science.ru.nl > > > > To?fieldtrip< fieldtrip at science.ru.nl > > > > Date?2013-05-22 15:33:13 > > > Subject?fieldtrip Digest, Vol 30, Issue 31 > > > > > > 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: question About head model (Johanna Zumer) > > > > > > > > > ---------------------------------------------------------------------- > > > > > > Message: 1 > > > Date: Wed, 22 May 2013 09:30:17 +0200 > > > From: Johanna Zumer < johanna.zumer at donders.ru.nl > > > > To: FieldTrip discussion list < fieldtrip at science.ru.nl > > > > Subject: Re: [FieldTrip] question About head model > > > Message-ID: > > > > > HsAS_X0-w at mail.gmail.com > > > > Content-Type: text/plain; charset="utf-8" > > > > > > Dear Jing, > > > > > > It is best to use the T1 MRI rather than the other scans. To open > > > a DICOM > > > format file, you can try one of these options: > > > > > > % read the DICOM files > > > mri = ft_read_mri('single_file_of_DICOM_series.IMA'); > > > % or use a graphical file selection[f, p] = uigetfile > > > < > > > http://www.mathworks.com/access/helpdesk/help/techdoc/ref/uigetfile.html > > > >('*'); > > > mri = ft_read_mri(fullfile > > > < > > > http://www.mathworks.com/access/helpdesk/help/techdoc/ref/fullfile.html > > > >(p, > > > f)); > > > > > > > > > I copied the above from documentation on the FieldTrip wiki: > > > > > > http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_an_anatomical_mri_from_dicom_into_ctf_format > > > > > > > > > Then you can save the 'mri' into a *.mat file for future use with > > > FieldTrip. > > > > > > Best regards, > > > Johanna > > > > > > > > > 2013/5/22 WangJing < 13681530640 at 139.com > > > > > > > > Hi > > > > I am a freshman about field trip. > > > > I am trying to build the forward model. but my mri data is > > > > different from > > > > the data in the tutorial. So I don't know how to bulid the head > > > > model. I > > > > use the date which is from the paper "Open Database of Epileptic > > > > EEG with > > > > MRI and Postoperational Assessment of Foci?a Real World > > > > Verification for > > > > the EEG Inverse Solutions", http://eeg.pl/epi > > > . MRI recordings containing a > > > > > > > T1, T2 or fluid attenuated inversion recovery (FLAIR) weighted > > > > brain scans > > > > with morphologic substrate of the epilepsy (mostly cortical > > > > dysplasias, > > > > dysplastic tumors etc.). In some cases there is also a scan with > > > > the > > > > > > > gadolinium (GAD) contrast. The images were collected by Siemens > > > > Sonata 1.5T > > > > scanner. The data is stored in the Digital Imaging and > > > > Communications in > > > > Medicine (DICOM) format. The name of the scan?s folder indicates > > > > its > > > > weighting.The scans have the following resolutions: T1: 512 ? > > > > 512 pixels, > > > > pixel spacing 0.4687 mm, slice thickness 1.2 mm, T2: 256 ? 256 > > > > pixels, > > > > pixel spacing 0.9375 mm,slice thickness 2.5 mm. > > > > > > > In the tutorial,the mri data stored in only one file, while the > > > > data which > > > > > > > I used have many files, I don't know how to process. who can > > > > help me,Thanks1 > > > > Thanks very much! > > > > Best Reagards > > > > Jing Wang > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > ----The following is the content of the forwarded email---- > > > > From?fieldtrip-request< fieldtrip-request at science.ru.nl > > > > > To?fieldtrip< fieldtrip at science.ru.nl > > > > > Date?2013-05-21 23:59:18 > > > > Subject?fieldtrip Digest, Vol 30, Issue 29 > > > > > > > > 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: problem in connectivityanalysis (Gabriel Gonzalez > > > > Escamilla) > > > > > > > > > > > > ---------------------------------------------------------------------- > > > > > > > > Message: 1 > > > > Date: Tue, 21 May 2013 17:52:21 +0200 > > > > From: Gabriel Gonzalez Escamilla < ggonesc at upo.es > > > > > To: FieldTrip discussion list < fieldtrip at science.ru.nl > > > > > Subject: Re: [FieldTrip] problem in connectivityanalysis > > > > Message-ID: < 1348f6433edc26f9.519bb455 at upo.es > > > > > Content-Type: text/plain; charset="iso-8859-1" > > > > > > > > Thank you so much for your answer J?rn, > > > > > > > > > > > > > > > Now I got it, so, I will let the 'fourier' as input to > > > > ft_connectivityanalysis, because for some indices I will need > > > > the auto-spectrum, and if I fully undertood what you said, it > > > > will be the same, as they always take the phase information from > > > > the fourier transform. And fieltrip will automatically compute > > > > the csd if the input is the frequency data. > > > > > > > > > > > > > > > Nevertheless, it give me some error when I tried to use the > > > > output from 'powandcsd' of freqanalysis, always gives me a > > > > matrix dimensions error, and when I use the output 'fourier' > > > > from connectivityanalysis, it computes almost all indices to ok, > > > > raging from? -1 to 1 (I'm saw that they are signed, so this is > > > > ok), the problem are the ImC ranging from -inf to inf, and the > > > > PLV values ranging from 0 to inf, but when I use the 'fourier' > > > > the values are. Which for me is really weird. > > > > > > > > > > > > > > > > > > > I have checked internally, and even when I always use the > > > > 'fourier' as input, when it internally calculates cross-spectrum > > > > for the ImC and PLV, the data.crsspctrm is different, e.g: > > > > data.dimord = 'rpt_rpt_chan_chan_freq' > > > > ans size(data.crsspctrm) = [1 7 59 59]; > > > > > > > > > > > So, both are apparently the same, but the data inside this > > > > matrices is different, > > > > > > > > > > > > > > > for example, when calculating the ImC the first 7 columns for > > > > the first two rows are: > > > > val(:,:,1,1) > > > > ?[0.9323? 0.3679? 0.8629? 1.6436? 0.6404? 1.8782? 0.1139] > > > > val(:,:,1,2) > > > > > > > > > > > ?[0.8509-0.1555i? 0.2507-0.1066i? 0.8173-0.0290i? > > > > 1.4328-0.2427i? 0.5457-0.0500i? 1.6505-0.0161i? 0.0993+0.0016i] > > > > > > > > while when calculating the PLV are: > > > > val(:,:,1,1) > > > > ?[1? 1? 1? 1? 1? 1? 1] > > > > val(:,:,1,2) > > > > > > > > > > > ?[0.9694-0.2133i? 0.7011-0.3564i? 0.9951-0.0104i? > > > > 0.9014-0.3481i? 0.9781-0.0819i? 0.9982-0.0046i? 0.9507-0.0483i] > > > > > > > > > > > > > > > > > > > I'm pretty sure I'm doing something wrong here, but I don't > > > > really have a clue, > > > > > > > > > > > > > > > If I use the fourier transform to calculate the 'csd' in > > > > ft_connectivity analysis and use this csd as input to all other > > > > ft_connectivityanalysis indices all of them are set to NaN or 1, > > > > not ranging between any numbers. > > > > > > > > > > > > > > > > > > > > > > > > > > > On the other hand, I have seen searching on the net, that > > > > fieltrip is capable of create surrogate data, by shifting the > > > > phase information on every trial for only one electrode of each > > > > pair while using the original samples of each trials on the > > > > second channel, but I couldn't find on the manual how to do such > > > > a thing. Is there any way to compute this kind of surrogates for > > > > every sensor? or was it something that some one suggest to > > > > somebody? > > > > > > > > > > > > Many thanks in advanced, > > > > Gabriel. > > > > > > > > > > > > > > > > > > > > ----- Mensaje original ----- > > > > De: "J?rn M. Horschig" < jm.horschig at donders.ru.nl > > > > > Fecha: Martes, 21 de Mayo de 2013, 9:03 am > > > > Asunto: Re: [FieldTrip] problem in connectivityanalysis > > > > A: FieldTrip discussion list < fieldtrip at science.ru.nl > > > > > > > > > > > > > > > > > > > > > > > > > > Dear Gabriel, > > > > > > > > > > > > > > > > > A) As you see, this makes an average over the epochs of each > > > > > channel, and not over the samples (which in this case are the > > > > > 9 frequencies of the FFT), And I would like to have the > > > > > opposite, this is, to get the imaginary part of coherence for > > > > > each epoch (repetition) on all my channels and not for each > > > > > frequency, something like: chan_chan_rpt or chancbm_rpt, Is > > > > > this possible? > > > > > > > > > > > > > > > > > No. You should think of coherence more as a measure for the > > > > > consistency of the phase relation between channels across > > > > > trials, so coherence is just not defined per trial,neither > > > > > would it make sense to compute coherence for a single trial. > > > > > > > > > > > > > > > > > B) Another question I have is: for the Imaginary part of > > > > > Coherence is not necessary to compute the cross-spectrum with > > > > > 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is > > > > > that way too? I see some terminology issues here. Let me try > > > > > to explain in a simple (aka least-mathematical I can think of) > > > > > way: > > > > > > > > > > > > > > > > > For all these connectivity measures, we need the phase > > > > > information from the Fourier transform (FFT) to compute the > > > > > cross-spectral density matrix (CSD). The CSD can be regarded > > > > > as the equivalent in the frequency domain to the covariance > > > > > matrix in the time domain, thus it is a measures how a certain > > > > > channels activity is co-modulated with another channels > > > > > activity (for a particular frequency) - makes pretty much > > > > > sense to make use of this when computing connectivity, right? > > > > > :) > > > > > > > > > > > > As you might know, a Fourier transform returns complex > > > > > numbers, where the imaginary part of this number contains > > > > > phase information. When calling ft_freqanalysis, you can > > > > > decide if it shall only return the (squared) real part of the > > > > > frequency spectrum (cfg.output='pow'), or instead the full CSD > > > > > (cfg.output = 'powandcsd'). Alternatively, you can also let > > > > > ft_freqanalysis return the raw Fourier coefficients > > > > > (cfg.output='fourier'). From the Fourier coefficients, > > > > > however, you can easily obtain the CSD or the power spectrum > > > > > basically by multiplication the Fourier matrix with itself > > > > > (transposed). All of these measures quantify the phase > > > > > relation between channels across trials, and as phase > > > > > information is coded in the imaginary part of the fourier > > > > > output, thus for connectivityanalysis you need the CSD which > > > > > can be obtained either by 'powandcsd' or by 'fourier'. > > > > > > > > > > I hope that somehow clarifies your questions. > > > > > > > > > > Best, > > > > > J?rn > > > > > > > > > > On 5/17/2013 5:45 PM, Gabriel Gonzalez Escamilla wrote: > > > > > Dear Fieltrip experts, > > > > > > > > > > > > > > > > > I have my continuous data imported to fieldtrip with matlab, > > > > > I'm looking for performing connectivity analysis between pairs > > > > > of sensors, I have succed as: > > > > > > > > > > > > data.trials {1xNepochs}; % Nepochs = 7, each epoch with 59 > > > > > channels and 2000 samples > > > > > data.label {59x1}; > > > > > data.time {1xNepochs}; > > > > > > > > > > then, calculate only the FFT of all sensors as: > > > > > cfg=[]; > > > > > cfg.output='fourier'; > > > > > cfg.method='mtmfft'; > > > > > cfg.taper='hanning'; > > > > > cfg.foilim=[8.5 9.5]; > > > > > cfg.tapsmofrq=0; > > > > > cfg.trials='all'; > > > > > cfg.keeptrials='yes'; > > > > > cfg.channel='all'; > > > > > fourier=ft_freqanalysis(cfg, data) > > > > > as output I get: > > > > > dimord = 'rpttap_chan_freq' > > > > > freq= [1x9] > > > > > fourierspctrm=[7x59x9 double] > > > > > > > > > > Then compute the imaginary part of coherency as: > > > > > cfg=[]; > > > > > cfg.method ='cohe'; > > > > > cfg.complex='imag'; > > > > > cfg.channelcbm={'all' 'all'}; > > > > > coher = ft_connectivityanalysis (cfg, fourier) > > > > > as output get: > > > > > dimord='chan_chan_freq'; > > > > > cohspctrm=[59x59x9 double]; > > > > > dof=7; > > > > > > > > > > I have two main questions: > > > > > > > > > > > > > > > > > A) As you see, this makes an average over the epochs of each > > > > > channel, and not over the samples (which in this case are the > > > > > 9 frequencies of the FFT), And I would like to have the > > > > > opposite, this is, to get the imaginary part of coherence for > > > > > each epoch (repetition) on all my channels and not for each > > > > > frequency, something like: chan_chan_rpt or chancbm_rpt, Is > > > > > this possible? > > > > > > > > > > > > > > > > > > > > > > > > > > > B) Another question I have is: for the Imaginary part of > > > > > Coherence is not necessary to compute the cross-spectrum with > > > > > 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is > > > > > that way too? > > > > > > > > > > > > > > > > > > > > > > > > > Many thanks in advanced, > > > > > Gabriel. > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > fieldtrip > > > > > mailing list > > > > > fieldtrip at donders.ru.nl > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > > > > > > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for > > > > > Brain, Cognition and Behaviour > Centre for Cognitive > > > > > Neuroimaging > Radboud University Nijmegen > Neuronal > > > > > Oscillations Group > FieldTrip Development Team > > P.O. Box > > > > > 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > > > > > > E-Mail: > > > > jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: > > > > http://www.ru.nl/donders > > > > > > > > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > > > > > > > NL-6525 EN Nijmegen > The Netherlands > > > > > > > _______________________________________________ > > > > > fieldtrip mailing list > > > > > fieldtrip at donders.ru.nl > > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > > > > > > --------------------------
PhD. student > > > > Gabriel Gonz?lez-Escamilla
Laboratory of Functional > > > > Neuroscience
Department of Physiology, Anatomy, and Cell > > > > Biology
University Pablo de Olavide
Ctra. de Utrera, > > > > Km.1
41013 - Seville
- Spain -

Email: > > > > ggonesc at upo.es
http://www.upo.es/neuroaging/es/
> > > > > > > > > > > > -------------- next part -------------- > > > > An HTML attachment was scrubbed... > > > > URL: < > > > > > > > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130521/0886ac06/attachment.html > > > > > > > > > > > > > ------------------------------ > > > > > > > > _______________________________________________ > > > > fieldtrip mailing list > > > > fieldtrip at donders.ru.nl > > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > End of fieldtrip Digest, Vol 30, Issue 29 > > > > ***************************************** > > > > > > > > _______________________________________________ > > > > 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/20130522/190aa246/attachment.html > > > > > > > > > > ------------------------------ > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > End of fieldtrip Digest, Vol 30, Issue 31 > > > ***************************************** > > > > > > _______________________________________________ > > > 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/20130525/4259b000/attachment.html > > > > > > > ------------------------------ > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > End of fieldtrip Digest, Vol 30, Issue 36 > > ***************************************** > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://people.ku.edu/~sjpa/ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From yukaokazaki at gmail.com Fri May 31 08:21:56 2013 From: yukaokazaki at gmail.com (Yuka Okazaki) Date: Fri, 31 May 2013 15:21:56 +0900 Subject: [FieldTrip] single subject headmodel and mni-transformed grid doesn't fit Message-ID: Dear all I have a problem that single subject headmodel and the warped its grid to template grid do not fit, as attached figure. I expected they are exactly fit each other but it seems not. I generated this figure by following steps. MEG system is yokogawa. Any advices I should check will be very helpful and appreciated. Yuka ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ load('~\fieldtrip\template\sourcemodel\standard_sourcemodel3d10mm.mat') template_grid = sourcemodel; % Read mri data mri2nifti('subject.mri', 'mri.nii'); mri_nifti = ft_read_mri('mri.nii'); % Define fiducial position in MRI coordinate cfg = []; cfg.method = 'interactive'; mri = ft_volumerealign(cfg, mri_nifti); % segment the anatomical MRI cfg = []; cfg.coordsys = 'ctf'; seg = ft_volumesegment(cfg, mri); % construct volume conductor model (i.e. head model) for each subject cfg = []; cfg.method = 'singleshell'; vol = ft_prepare_headmodel(cfg, seg); vol = ft_convert_units(vol, 'cm'); % create the subject specific grid, using the template grid that has just been created cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; %sourcemodel% cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.mri = mri; grid = ft_prepare_sourcemodel(cfg); % make a figure of the single subject headmodel, and grid positions figure; ft_plot_vol(vol, 'edgecolor', 'none'); alpha 0.4; ft_plot_mesh(grid.pos(grid.inside,:),'vertexcolor','r');[image: Inline image 1] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.jpeg Type: image/jpeg Size: 56475 bytes Desc: not available URL: From politzerahless at gmail.com Fri May 31 08:27:19 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Fri, 31 May 2013 01:27:19 -0500 Subject: [FieldTrip] fieldtrip Digest, Vol 30, Issue 45 In-Reply-To: References: Message-ID: Hi Arjen, Thanks for your message; I did indeed re-align to Talairach after reslicing, although I can't be sure it was "correct" (the page linked from the tutorial, http://neuroimage.usc.edu/brainstorm/CoordinateSystems, didn't give guidelines on how anterior/posteriorly to place the interhemispheric point, so I just placed it near the top of the head on about the same plane as the commisures). But it wasn't until the end of the anatomical processing that I noticed the issue, so I'm wondering if there's a way to re-align the source space and volume conduction model to each other without going back to the beginning of the pipeline. Best, Steve > Message: 1 > Date: Fri, 31 May 2013 08:11:23 +0200 (CEST) > From: "Stolk, A." > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Question about minimum norm estimate pipeline > Message-ID: > < 1914237354.1292588.1369980683984.JavaMail.root at sculptor.zimbra.ru.nl> > Content-Type: text/plain; charset="utf-8" > > Hi Steve, A quick guess; did you correctly align your resliced mri to Talairach space by indicating the commissures ( http://imaging.mrc-cbu.cam.ac.uk/imaging/FindingCommissures ) and, if I'm correct, a point in the same place, e.g. between the hemispheres? This should update the transformation matrix. Best regards, Arjen ----- Oorspronkelijk bericht ----- > > Van: "Stephen Politzer-Ahles" > > Aan: fieldtrip at science.ru.nl > > Verzonden: Vrijdag 31 mei 2013 05:53:45 > > Onderwerp: [FieldTrip] Question about minimum norm estimate pipeline > > Hello all, > > I have not yet gotten a response to my question below, but in the > > meantime I have another question about the minimum norm estimate > > workflow--specifically, about the coordinate system for the > > skull-stripped anatomy in the step described at > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate#preprocessing_of_the_anatomical_mrisave_to_disk > > . I'm confused by the following bit of code: > > % ensure that the skull-stripped anatomy is expressed in the same > > coordinate system as the anatomy > > seg.transform = mri_tal.transform; > > In my data, mri_tal.coordsys is 'spm' (I presume this is the result of > > re-aligning to Talairach in the previous step?) whereas seg.coordsys > > is 'ctf' (as a result of re-aligning to CTF several steps earlier). > > (But mri_tal also has a field mri_tal.transformorig, which seg does > > not have.) So should I really be using the same transform for both, as > > shown in the tutorial? > > Apologies if this question is pretty basic; I'm just trying to > > pinpoint where the mis-alignment described in my message below > > occurred, so I want to make sure I understand each step of the > > workflow correctly > > Best, > > Steve > > > Message: 1 > > > Date: Sat, 25 May 2013 08:11:18 -0500 > > > From: Stephen Politzer-Ahles < politzerahless at gmail.com > > > > To: fieldtrip at donders.ru.nl > > > Subject: [FieldTrip] Sourcespace and volume conductor misaligned > > > Message-ID: > > > > > > > > > Content-Type: text/plain; charset="utf-8" > > > > > > Hello all, > > > > > > I am going through the workflow at > > > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate . After > > > making > > > the volume conduction model using ft_prepare_headmodel(), I noticed > > > that > > > although the volume conduction model and sourcespace have the same > > > orientation and overall size/shape (after I converted the volume > > > conduction > > > model to cm, which wasn't in the tutorial but my original model came > > > out in > > > mm), they don't quite line up, as you can see in this figure: > > > > > > http://i.imgur.com/mGEtLOa.png > > > > > > I did interactively re-align the data to CTF (twice--in step 2 of > > > "Preprocessing of the anatomical MRI" and in step 4 of "Source > > > model") > > > using fiducials, and to Talairach (step 5 of "Preprocessing of the > > > anatomical data"), so I'm not sure how it ended up this way. The > > > code I've > > > used at each step is basically the same as that in the tutorial. > > > > > > Is there any way to line up my volume conduction model and > > > sourcespace now, > > > without going back and re-running most of the workflow? > > > > > > Best, > > > Steve > > > > > > -- > > > Stephen Politzer-Ahles > > > University of Kansas > > > Linguistics Department > > > http://people.ku.edu/~sjpa/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan.debener at uni-oldenburg.de Fri May 31 09:18:51 2013 From: stefan.debener at uni-oldenburg.de (Stefan Debener) Date: Fri, 31 May 2013 09:18:51 +0200 Subject: [FieldTrip] Open ostdoc position Message-ID: <51A84EDB.6010408@uni-oldenburg.de> The cluster of excellence Hearing4all: Models, Technology and Solutions for Diagnostics, Restoration and Support of Hearing at the Carl von Ossietzky Universität Oldenburg (in collaboration with Medizinische Hochschule Hannover and Leibniz Universität Hannover) is seeking to fill the position of a *Postdoctoral Research Associate in the Field of Auditory Psychophysiology * in the Department of Psychology, Faculty of Medicine and Health Sciences. The position is available from 1 September 2013, for initially 2 years, with prospect for continuation for up to 2.5 more years. Payment is depending on previous experience (German TV-L E13, full time). A paramount goal of the cluster of excellence Hearing4all (www.hearing4all.de) is to transform audiology into an "exact" science based on the interplay between experiment and theory as well as between basic science and clinical research. In the framework provided by the cluster the successful candidate is expected to contribute to the research goals of task group 2 "Audioneurotechnology and theragnostics" or task group 7 "Brain-computer interface for hearing devices", e.g., by: - studying hearing disorder related maladaptive plasticity in the human auditory cortex with non-invasive techniques (EEG, MEG, NIRS); - electrophysiological characterisation of auditory cortex adaption to hearing device use (hearing aids, cochlear implants); - the role of auditory neurofeedback on speech comprehension; - the role of multisensory processes in auditory rehabilitation. Candidates are expected to have an academic university degree in the field of psychology, biology, neuroscience, or a related discipline and have shown their ability to perform excellent scientific work, usually demonstrated by the outstanding quality of their Doctorate/PhD research and a good publication record. We are seeking candidates with extensive knowledge in at least one of the following methods: advanced EEG recording and analysis; near-infrared spectroscopy. Excellent Matlab skills are mandatory and good knowledge of EEG analysis software suites (e.g., EEGLAB, Fieldtrip, BESA, LORETA) will be an asset. It is also necessary to have a background in experimental psychology, and knowledge of the German language is required. The Department of Psychology will offer an attractive scientific environment with access to research dedicated state-of-the-art approaches to human neurophysiological techniques (fMRI, NIRS, EEG, MEG, mobile EEG and mobile eye-tracking). The University of Oldenburg strives to increase the proportion of women in science, so we especially encourage female candidates to apply. Handicapped applicants will be given preference if equally qualified. Please send your application including a cover letter, CV, list of potential referees, links to recent publications, and copies of certificates for academic grades by email to Prof. Stefan Debener (Stefan.Debener at uni-oldenburg.de ). Feel free to contact Stefan Debener for further questions regarding the position. The application deadline is July 15, 2013. -- Prof. Dr. Stefan Debener Neuropsychology Lab Department of Psychology University of Oldenburg D-26111 Oldenburg Germany Office: A7 0-038 Phone: +49-441-798-4271 Fax: +49-441-798-5522 Email: stefan.debener at uni-oldenburg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From baharbahar395 at yahoo.com Fri May 31 09:48:25 2013 From: baharbahar395 at yahoo.com (Bahar Bahar) Date: Fri, 31 May 2013 15:48:25 +0800 (SGT) Subject: [FieldTrip] format conversion Message-ID: <1369986505.7865.YahooMailNeo@web192306.mail.sg3.yahoo.com> Hi dear all, I have a technical question about format converter module via sLORETA software (.slor file to .txt one). Can any one give me some information about the conversion procedure (and the meaning of the column and row of the output file)? Thanks, bahar -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbj0310 at gmail.com Fri May 31 11:11:33 2013 From: mbj0310 at gmail.com (Beom Jun Min) Date: Fri, 31 May 2013 18:11:33 +0900 Subject: [FieldTrip] ft_preprocessing error message during reading some files In-Reply-To: References: Message-ID: Dear respondent, Thank you for your advices. I will try these methods. Best regards 2013/5/30 Chungki Lee > Hi Min > > you'd better use ft_definetrial routine before ft_preprocessing. > > example) > > cfg = []; > cfg.dataset = filename; % string > cfg.trialdef.eventtype = your define text; % string > cfg.trialdef.eventvalue = your label value; % integer > cfg.trialdef.prestim = before onset time (sec); % positive > integer, not negative integer > cfg.trialdef.poststim = after onset time (sec); % positve integer > cfg = ft_definetrial(cfg); > data = ft_preprocessing(cfg); > > have fun ^^ > > > 2013/5/30 Beom Jun Min > >> Dear Julian Keil, >> >> Thank you for your reply. >> I agree with that your problem was similar with mine. >> My data was acquired by Neuroscan also. >> There might a problem associated with .CNT file in the newer version. >> >> Could you tell me the number of the older version you used? >> >> Best Regards >> >> >> >> 2013/5/29 Julian Keil >> >>> Dear BJ Min, >>> >>> what type of data are you trying to read in? >>> I had similar problems when reading in .CNT data. >>> Also, with some systems you have to specify the bit rate (e.g. >>> Neuroscan). >>> For me, reading in data with an older version of FieldTrip solved the >>> problem, but this was in 2011, so I cannot say if the problem with .CNT >>> files has been solved. >>> >>> Good Luck >>> >>> Julian >>> >>> ******************** >>> *Dr. Julian Keil* >>> * >>> * >>> AG Multisensorische Integration >>> Psychiatrische Universitätsklinik >>> der Charité im St. Hedwig-Krankenhaus >>> Große Hamburger Straße 5-11, Raum E 307 >>> 10115 Berlin >>> >>> Telefon: +49-30-2311-1879 >>> Fax: +49-30-2311-2209 >>> >>> http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration >>> >>> Am 29.05.2013 um 11:47 schrieb Beom Jun Min: >>> >>> Dear all, >>> >>> Hello, my name is BJ Min from Korea. >>> >>> I'm dealing with EEG data of many subjects. >>> >>> When I run ft_preprocessing, the error message below shows with only >>> some files of my data. (not all files) >>> >>> Warning: rounding "endsample" to the nearest integer >>> > In ft_read_data at 100 >>> In ft_preprocessing at 577 >>> ??? Error using ==> ft_read_data at 149 >>> cannot read data after the end of the file >>> >>> Error in ==> ft_preprocessing at 577 >>> dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', >>> begsample, 'endsample', endsample, 'chanindx', rawindx, >>> 'checkboundary', strcmp(cfg.continuous, 'no'), 'dataformat', >>> cfg.dataformat) >>> >>> I think that there might be a kind of problem in data acquisition, and I >>> modified below scripts in the ft_read_data function with comment %. >>> >>> % % test whether the requested data segment is not outside the file >>> % if any(begsample<1) >>> % error('FILEIO:InvalidBegSample', 'cannot read data before the begin >>> of the file'); >>> % elseif any(endsample>(hdr.nSamples*hdr.nTrials)) >>> % error('FILEIO:InvalidEndSample', 'cannot read data after the end of >>> the file'); >>> % end >>> >>> After that, the ft_preprocessing worked well. >>> >>> However, the files with the first problem showed additional warning >>> message while running ft_definetrial. (not error message) >>> >>> Warning: Integer operands are required for colon operator when used as >>> index >>> > In fileio\private\loadcnt at 464 >>> In ft_read_header at 1450 >>> In ft_preprocessing at 398 >>> >>> Warning: rounding "endsample" to the nearest integer >>> > In ft_read_data at 100 >>> In ft_preprocessing at 577 >>> >>> Also, during ft_redefinetrial, following warning message occurs.(not >>> error message) >>> >>> Warning: removing inconsistent sampleinfo >>> > In ft_datatype_raw at 97 >>> In ft_checkdata at 213 >>> In ft_redefinetrial at 104 >>> >>> Warning: the trial definition in the configuration is inconsistent with >>> the actual data >>> > In utilities\private\warning_once at 116 >>> In utilities\private\fixsampleinfo at 74 >>> In ft_datatype_raw at 154 >>> In ft_checkdata at 213 >>> In ft_redefinetrial at 206 >>> >>> Warning: reconstructing sampleinfo by assuming that the trials are >>> consecutive segments of a continuous recording >>> > In utilities\private\warning_once at 116 >>> In utilities\private\fixsampleinfo at 79 >>> In ft_datatype_raw at 154 >>> In ft_checkdata at 213 >>> In ft_redefinetrial at 206 >>> >>> I wonder if these messages during ft_redefinetrial mean wrong defining >>> trials. >>> Should I continue these process like this, modifying the >>> ft_preprocessing function? >>> Or, is it better to exclude some erroneous files? >>> >>> Best regards >>> >>> -- >>> BeomJun Min, M.D. >>> >>> Department of Medical System Engineering (DMSE) >>> Gwangju Institute of Science and Technology (GIST) >>> 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju >>> 500-712, Republic of Korea (South) >>> Phone: +82-62-715-3266 / Fax: +82-62-715-3244 >>> E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr >>> _______________________________________________ >>> 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 >>> >> >> >> >> -- >> BeomJun Min, M.D. >> >> Department of Medical System Engineering (DMSE) >> Gwangju Institute of Science and Technology (GIST) >> 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju >> 500-712, Republic of Korea (South) >> Phone: +82-62-715-3266 / Fax: +82-62-715-3244 >> E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > ---------------------------------------------------------------- > Chungki Lee, Ph.D. > Post-doc > Biomedical Research Institute > Korea Institute of Science and Technology > E-mail: chungki at kist.re.kr > Tel:+82-2-958-5636, C.P: +82-10-5223-7309 > ---------------------------------------------------------------- > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- BeomJun Min, M.D. Department of Medical System Engineering (DMSE) Gwangju Institute of Science and Technology (GIST) 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju 500-712, Republic of Korea (South) Phone: +82-62-715-3266 / Fax: +82-62-715-3244 E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.wunderle at esi-frankfurt.de Fri May 31 11:42:03 2013 From: thomas.wunderle at esi-frankfurt.de (Wunderle, Thomas) Date: Fri, 31 May 2013 09:42:03 +0000 Subject: [FieldTrip] channel combination problems Message-ID: <27E5CAD9145EEC41BB9B34C01716A1983046156B@UM-EXCDAG-A01.um.gwdg.de> Hi all, I'm new in fieldtrip and I try to get the cfg.channelcmb to work, because I want to plot the connectivity between the channels of different laminar electrodes, let's say the connectivity between channel 1:24 and 25:38 I tried the following: cfg = []; cfg.method = 'mtmfft'; cfg.taper = 'dpss'; cfg.output = 'fourier'; cfg.tapsmofrq = 1; freq = ft_freqanalysis(cfg, data) The output is: >> freq freq = label: {3x1 cell} dimord: 'rpttap_chan_freq' freq: [1x101 double] fourierspctrm: [500x3x101 double] cumsumcnt: [500x1 double] cumtapcnt: [500x1 double] cfg: [1x1 struct] I then run cfg = []; cfg.method = 'coh'; cfg.channelcmb = {freq.label{1} freq.label{2};freq.label{2} freq.label{1}}; coh= ft_connectivityanalysis(cfg, freq); And the output here is: >> coh coh = labelcmb: {2x2 cell} dimord: 'chan_freq' cohspctrm: [2x101 double] freq: [1x101 double] dof: 500 cfg: [1x1 struct] As you can seen, the output of dimord is 'chan_freq' so in the subsequent call of ft_connectivityplot I get an error message: cfg = []; cfg.parameter = 'cohspctrm'; ft_connectivityplot(cfg, coh); ??? Error using ==> ft_connectivityplot at 99 the data should have a dimord of chan_chan_freq or chancmb_freq If I use in ft_freqanalysis the cfg.method = 'powandcsd', cfg.channelcmb seems to have no effect at all, the coherence is computed for all possible pairs. I also don't understand the difference between "cfg.channelcmb" and "cfg.labelcmb" Can you help me in how I should correctly use the cannelcmb and labelcmb options? Thanks for your help, Thomas ----- Dr. Thomas Wunderle Ernst Strüngmann Institute (ESI) for Neuroscience in Cooperation with Max Planck Society Deutschordenstrasse 46 60528 Frankfurt am Main, Germany www.esi-frankfurt.de thomas.wunderle at esi-frankfurt.de Tel: +49 69 96769 519 Fax: +49 69 96769 555 Sitz der Gesellschaft: Frankfurt am Main Registergericht: Amtsgericht Frankfurt - HRB 84266 Geschäftsführer: Prof. Dr. Pascal Fries -------------- next part -------------- An HTML attachment was scrubbed... URL: From sid.kouider at gmail.com Fri May 31 11:56:19 2013 From: sid.kouider at gmail.com (Sid Kouider) Date: Fri, 31 May 2013 11:56:19 +0200 Subject: [FieldTrip] postdoctoral position on EEG/BCI in Paris Message-ID: <007701ce5de5$1b083620$5118a260$@gmail.com> The Department of Cognitive Science at the Ecole Normale Supérieure (Paris) invites applications for a postdoctoral position to work on Brain-Computer Interfaces and Virtual Reality in the framework of the CEEDs European project ( http://ceeds-project.eu/). The post-doc will mainly be in charge of : 1) setting a BCI loop between a virtual environment and an EEG system 2) optimize online detection of specific EEG patterns 3) participate in the design and elaboration of research protocols. The successful applicant will be affiliated to the Brain and Consciousness team of Pr Sid Kouider (http://www.lscp.net/persons/sidk/). The Department of Cognitive Science offers a rich research environment composed of a multidisciplinary set of research units on philosophy, cognitive psychology, cognitive neurosciences and computational neurosciences. Our research team, at the interface of these disciplines, is working on the cognitive and neural determinants of consciousness, with an emphasis on the distinction between unconscious perception and perceptual awareness. Our lab is located in central Paris, within the historical Quartier Latin. Candidates should have at least a PhD degree in a relevant domain and a solid training in EEG, Brain-Computer interfaces and machine learning. Experience with virtual reality is desirable but not a prerequisite. The position will start on September 1st, 2013. The appointment is for one year initially but can be extended later on. The net salary will range between 2 100 and 2 500 euros/month depending on qualifications. Consideration of applicants will commence June 1st, 2013 and will continue until the position is filled. Knowledge of French is not required as the team is international and verbal interactions are primarily in English. Please send a CV along with the names and contact information of two references to Sid Kouider (sid.kouider at ens dot fr) and Cécile Girard (cecilegirard20 @ gmail dot com) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Pr Sid Kouider, CNRS research director Ecole Normale Supérieure LSCP, Pavillon Jardin, 29 rue d'Ulm, 75005 Paris, France www.lscp.net/persons/sidk/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiteng.jiang at gmail.com Fri May 31 12:15:59 2013 From: haiteng.jiang at gmail.com (Haiteng Jiang) Date: Fri, 31 May 2013 12:15:59 +0200 Subject: [FieldTrip] time-domain granger causality in Fieldtrip? Message-ID: Hi all, is it possible to run time-domain granger causality in Fieldtrip? Best, Haiteng -- Haiteng Jiang PhD candidate Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Visiting address Room 2.32 Donders Centre for Cognitive Neuroimaging Kapittelweg 29 6525 EN Nijmegen the Netherlands Tel.: +31 (0)243668291 Web: https://sites.google.com/site/haitengjiang/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Fri May 31 15:49:03 2013 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Fri, 31 May 2013 15:49:03 +0200 (CEST) Subject: [FieldTrip] error when using ctf2grad In-Reply-To: <51A7A9A1.6020401@gmail.com> Message-ID: <2006439449.1303047.1370008143778.JavaMail.root@sculptor.zimbra.ru.nl> Hi Ye, Are you using a recent fieldtrip version? The ctf2grad function has recently updated improving its robustness. I don't have any clue why G3AR but it basically means that your CTF system has a specific gradiometer balancing. By the way, which CTF system are you using: CTF64, CTF151, CTF275? In any case, I could have a look if you file a bug and send to me the *.res4 file and we'll figure out what's happening (but please try with a recent Fieldtrip version and tell me) Regarding your gradiometer question, I asked Robert and this is the answer we can provide (please correct me if I'm wrong here), the CTF system sensors consist in first-order axial gradiometer that measure the magnetic field gradient change in the radial direction (orthogonal to the scalp). The following is taken from the CTF documentation "MEG File Formats - release 5.2.1" appendix C. --- Higher-order gradiometer formation is a noise-cancellation technique exclusive to the CTF MEG System. It permits the MEG detectors to be sensitive to the weak signals of the brain, yet impervious to the much stronger sources from the environment. This process, which is carried out in real time, allows the system to be run without the expense of magnetic shielding, or in combination with a standard shielded room for enhanced noise reduction. In order to calculate the forward solution, the same procedure must be performed on any field data calculated from a simulated dipole. The procedure consists of calculating the field at each coil in the sensor as well as each coil in a set of reference channels. The field values at the reference channels are then multiplied by the appropriate weight and subtracted from the MEG sensor channels. --- The data set on disk contains in the header the parameters that are used to convert the data between the original (raw) representation and the higher-order gradiometer representation. This conversion can be done in real-time during acquisition, but can also be done (and undone) afterwards using CTF DataEditor, or using ft_denoise_synthetic.m function. The grad structure included in the FieldTrip representation (i.e. hdr.grad or data.grad) should be consistent with the data, hence it contains grad.balance.current grad.balance.G1BR grad.balance.G2BR grad.balance.G3BR and potentially other "balancing" schemes (your "G3AR " for instance). The grad.balance.current describes which balancing was applied to the data and to the specification of the sensor array (grad.tra) for the forward computation. In order to provide a more intuitive description, I've made a wiki FAQ to explain How does the CTF higher-order gradiometer work: http://fieldtrip.fcdonders.nl/faq/how_does_the_ctf_higher-order_gradiometer_work All the best, Diego ----- Original Message ----- > From: "Ye Mei" > To: fieldtrip at science.ru.nl > Sent: Thursday, 30 May, 2013 9:33:53 PM > Subject: [FieldTrip] error when using ctf2grad > Hi All, > > I have some problem using ctf2grad. > > The program will set grad.balance.current = 'G3AR';, > and then do getfield(grad.balance, grad.balance.current) > but > grad.balance = G1BR: [1x1 struct] > G2BR: [1x1 struct] > G3BR: [1x1 struct] > > and has no G3AR in it. So an error will pop up. > > Can anyone help me with that? > > Also, What do G1BR, G2BR, G3BR, G3AR stand for? > > > thanks, > Ye > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Trigon, room 0.83 Kapittelweg 29 Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands E-Mail: d.lozanosoldevilla at fcdonders.ru.nl Tel: +31-(0)24-36-66274 Web: http://www.neuosc.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lkystra at hotmail.it Fri May 31 17:15:01 2013 From: lkystra at hotmail.it (lucia abbatantuoni) Date: Fri, 31 May 2013 17:15:01 +0200 Subject: [FieldTrip] distorsion of .edf file In-Reply-To: <4C650B52-1AFF-4CAE-9F28-D320B9E00C75@donders.ru.nl> References: , , , , <4C650B52-1AFF-4CAE-9F28-D320B9E00C75@donders.ru.nl> Message-ID: Hi Jan-Mathijs, the specifies that you asked to me, are: fieldtrip version: 20130401 operating system: windows 7 matlab version : I use R2011a (64bits) or R2007b (32bits) I want to read a portion of my EEG signal of 3600 sec * 500 Hz. When I used a previous version of fieldtrip (2011-12-14), the lenght of the window wasn't 3600*500 but less. " Warning: Integer operands are required for colon operator when used as index > In read_edf at 348 " With fieldtrip 20130401 the length of the window is right, but, when I plot the signal, I can see its distorsion. Thank you for your attention, Lucia From: jan.schoffelen at donders.ru.nl Date: Thu, 30 May 2013 18:31:22 +0200 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] distorsion of .edf file Hi Lucia, Perhaps you need to be a bit more specific. In particular with respect to the fieldtrip version, matlab version, operating system, and warning message.Otherwise all of us are shooting in the dark.Best wishes,Jan-Mathijs On May 30, 2013, at 5:33 PM, lucia abbatantuoni wrote:I try and... it's not a good solution. Date: Thu, 30 May 2013 15:43:59 +0200 From: zriouil.imane at gmail.com To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] distorsion of .edf file I have the same problem. if you want to read your data. it's possible to use ft_read_data(filename') 2013/5/30 lucia abbatantuoni Dear all, I'm analyzing EEG files in format .edf with matlab. Many files after the use of read_edf, have a distorsion. Matlab indicate a warning for the 348 row of read_edf . Can someone give to me a help? Best regards, Lucia _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Zriouil Imane _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip_______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics,Nijmegen, The Netherlands J.Schoffelen at donders.ru.nlTelephone: +31-24-3614793 http://www.hettaligebrein.nl _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From ebrahimi_nia at yahoo.com Fri May 31 17:56:55 2013 From: ebrahimi_nia at yahoo.com (Fatemeh Ebrahimi nia) Date: Fri, 31 May 2013 08:56:55 -0700 (PDT) Subject: [FieldTrip] loreta2fieldtrip function error In-Reply-To: <51A78CC1.6030906@berkeley.edu> References: <1369934092.15336.YahooMailNeo@web122405.mail.ne1.yahoo.com> <51A78CC1.6030906@berkeley.edu> Message-ID: <1370015815.5183.YahooMailNeo@web122402.mail.ne1.yahoo.com> Dear respondent, Thank you for your advices. I have used the function that you have updated. It works out. Can you give me information about the output structure (What do the matrixes refer to?) or advise a reference to study about that please?  Best, Fatemeh ________________________________ From: Ingrid Nieuwenhuis To: fieldtrip at science.ru.nl Sent: Thursday, May 30, 2013 10:30 AM Subject: Re: [FieldTrip] loreta2fieldtrip function error Hi Fatemeh, I had the same error recently when I did the same. I filed the bug, see http://bugzilla.fcdonders.nl/show_bug.cgi?id=2144 I did create a work around. In the LORETA program, you can export the source data as a text file. You can read that text file in with loreta2fieldtrip.m. It's a bit of a patch, but it worked for me. Hope this helps, Ingrid On 5/30/2013 10:14 AM, Fatemeh Ebrahimi nia wrote: Hi dear all, > > >I am analyzing EEG data. I have computed sLORETA (.slor) from ERP data. Now I want to read and convert LORETA source reconstruction into a >MATLAB data structure using "loreta2fieldtrip" function, But I have gotten the bellow error. > > >**** Error using fread > >Invalid precision. >Error in loreta2fieldtrip (line 85) >activity = fread(fid, [voxnumber Ntime], 'float = >single'); *** > > >Can someone give me a help? > > > >Best regards, >Fatemeh > > > > >_______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From robince at gmail.com Fri May 31 18:14:15 2013 From: robince at gmail.com (Robin) Date: Fri, 31 May 2013 17:14:15 +0100 Subject: [FieldTrip] some of the requested samples occur twice Message-ID: I have a problem in preprocessing where I am getting this error: """ some of the requested samples occur twice in the data Error in ft_artifact_zvalue (line 262) dat{trlop} = ft_fetch_data(data, 'header', hdr, 'begsample', trl(trlop,1)-fltpadding, 'endsample', trl(trlop,2)+fltpadding, 'chanindx', sgnind, 'checkboundary', strcmp(cfg.continuous,'no Error in ft_artifact_muscle (line 158) [tmpcfg, artifact] = ft_artifact_zvalue(tmpcfg, data); """ I think this is because I am manually adding some extra padding to the trials so that the artifact filtering can use that padding (I am doing the artifact filtering on data in memory which is output from ft_denoise_pca). So in this case it is not a problem if consecutive trials overlap a bit. I would therefore like to disable this error and wondered what is the best way to do it. I am a bit confused because ft_artifact_zvalue calls ft_fetch data with a "checkboundary" option which looks like it might be what I want (and set correctly), but ft_fetch_data doesn't seem to use that option. Instead it has an allowoverlap option. So for now I will manually add the allowoverlap option to the call in ft_artifact_zvalue, but I wondered what checkboundary doesn't appear in ft_fetch_data or if this might be a bug. Cheers Robin