JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for SPM Archives


SPM Archives

SPM Archives


SPM@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

SPM Home

SPM Home

SPM  November 2011

SPM November 2011

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: MEEG_ convertion of FieldTrip data into GUI-readable SPM data.

From:

Vladimir Litvak <[log in to unmask]>

Reply-To:

Vladimir Litvak <[log in to unmask]>

Date:

Mon, 14 Nov 2011 12:49:22 +0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (301 lines)

Dear Charline,

Removing ICA components changes the way your channels relate to your
sensors. One of the consequences is for instance that your data is
rank deficient. The lead field computation should be 'aware' of this
to work correctly and for MEG this updating is done by the montage
function. For EEG the problem is not solved in SPM8 but will be solved
in SPM12. In general if you have a lot of channels and remove just a
few components which are not coming from the brain anyway the problem
is not very severe but it's better to be on the safe side, especially
since it also solves your other problems.

Best,

Vladimir

On Mon, Nov 14, 2011 at 12:38 PM, Urbain Charline <[log in to unmask]> wrote:
> Dear Vladimir,
>
> Sorry again for the delay...
>
> According to your advises, we applied the ICA montage on our data. Now, we
> do not have anymore troubles with the GUI. Thank you!
> If it's not to complicated, could you just explain us why without the ICA
> montage our last solution (copied the *.mat file from previous steps and
> pointed his header to the new *.dat file containing the ICA analysis) could
> provokes some problem to do source reconstruction?
>
> Best regards,
>
> Charline
>
>
> 2011/10/26 Vladimir Litvak <[log in to unmask]>
>>
>> Dear Charline,
>>
>> Indeed the problem is with channel types as the BTI system cannot be
>> recognized just based on labels. What you can do (assuming that Dold
>> is the object before ICA and Dnew is the object after) is:
>>
>> Dnew.origchantypes = Dold.origchantypes;
>> save(Dnew);
>> S = [];
>> S.task = 'defaulttype';
>> S.D = D;
>> S.save = 1;
>> D = spm_eeg_prep(S);
>>
>>
>> That still doesn't solve the problem of updating sensors.
>>
>> Vladimir
>>
>> On Tue, Oct 25, 2011 at 5:27 PM, Urbain Charline <[log in to unmask]>
>> wrote:
>> > Dear Vladimir,
>> >
>> > Thank you very much for your proposition :
>> >
>> > please find in attachment:
>> > -'XI' the mat file with ICA and uncorrected header
>> > - 'I' the mat file with ICA and the corrected header (with the solution
>> > previously describe to indirectly resolve our problem of function
>> > spm_eeg_ft2spm GUI readable)
>> > - 'abe...' the mat file before ICA (in case you need it)
>> >
>> > We plan to do sources reconstruction then we need to find a solution
>> > indeed..
>> > I will read about the montage matrix in the manual because I didn't now
>> > it
>> > yet..
>> >
>> > Many thanks,
>> >
>> > Charline
>> >
>> >
>> >
>> >
>> > 2011/10/25 Vladimir Litvak <[log in to unmask]>
>> >>
>> >> Dear Charline,
>> >>
>> >> The fact that this solution works indicates that the problem is indeed
>> >> something in the header, probably channel types as I thought. If you
>> >> want, send me the problematic header and I'll look at it. One problem
>> >> with your solution is that the sensor representation is not updated to
>> >> reflect the fact that you removed some dimensions from your data. If
>> >> you only do sensor-level analysis it's not a problem but if you want
>> >> to do source reconstruction or DCM that can be a problem so applying
>> >> the ICA montage as I suggested is still a better way to go.
>> >>
>> >> Best,
>> >>
>> >> Vladimir
>> >>
>> >> On Tue, Oct 25, 2011 at 2:56 PM, Urbain Charline <[log in to unmask]>
>> >> wrote:
>> >> > Dear Vladimir,
>> >> >
>> >> > sorry for this late answer I was out of the lab for several days..
>> >> > We do not get any error messages when we try to open the GUI. We also
>> >> > looked
>> >> > in other MEG tab but didn't find the data.
>> >> > Fortunatly, we found a way to solve the problem:
>> >> > we copied the *.mat file from previous steps and pointed his header
>> >> > to
>> >> > the
>> >> > new *.dat file (containing the ICA analysis) using this command:
>> >> >
>> >> > % Correct the header
>> >> >
>> >> > disp('UPDATING THE HEADER...')
>> >> >
>> >> > D.fname=[outspm '.mat'];
>> >> > D.data.fnamedat=[outspm '.dat'];
>> >> > D.data.y.fname=fullfile(path,D.data.fnamedat);
>> >> >
>> >> > then the function spm_eeg_ft2spm was used and the data could be read
>> >> > in
>> >> > the
>> >> > GUI!
>> >> >
>> >> >
>> >> > Thank you very much for help,
>> >> >
>> >> > Charline
>> >> >
>> >> > UR2NF - Neuropsychology and Functional Neuroimaging Research Unit,
>> >> > Université Libre de Bruxelles
>> >> > LCFC - Laboratoire de Cartographie Fonctionnelle du Cerveau, Hôpital
>> >> > Érasme
>> >> >
>> >> > Campus du Solbosch CP191avenue F.D. Roosevelt 50 B-1050 Bruxelles
>> >> > Belgium
>> >> > Tel. +32 (0)2 650 45 49  Fax +32 (0)2 650 22 09
>> >> >
>> >> >
>> >> >
>> >> > 2011/10/12 Vladimir Litvak <[log in to unmask]>:
>> >> >> These are not errors, these messages always appear. When you are
>> >> >> saying that you cannot view the dataset in the reviewing tool, what
>> >> >> exactly happens? Do you get any error messages when you try to open
>> >> >> it
>> >> >> or do you just not see the data in the 'MEG' tab? Have you tried
>> >> >> looking in the 'Other' tab?
>> >> >>
>> >> >> Vladimir
>> >> >>
>> >> >> On Wed, Oct 12, 2011 at 3:44 PM, Urbain Charline <[log in to unmask]>
>> >> >> wrote:
>> >> >>> Yes, here are the details:
>> >> >>>
>> >> >>> spmdat=spm_eeg_load('spmdataname');
>> >> >>> data=ftraw(spmdat,0);
>> >> >>> D=spm_eeg_ft2spm(data,'newspmdataname');
>> >> >>>
>> >> >>> The errors we get are:
>> >> >>>
>> >> >>> checkmeeg: no channel type, assigning default
>> >> >>> checkmeeg: no units, assigning default
>> >> >>> checkmeeg: transform type missing, assigning default
>> >> >>> checkmeeg: data scale missing, assigning default
>> >> >>> checkmeeg: data type is missing or incorrect, assigning default
>> >> >>>
>> >> >>> Best,
>> >> >>> Charline
>> >> >>>
>> >> >>>
>> >> >>> 2011/10/12 Vladimir Litvak <[log in to unmask]>
>> >> >>>>
>> >> >>>> Are you getting any error messages when trying to display the
>> >> >>>> dataset?
>> >> >>>> The problem with channel types is not related to ICA so can also
>> >> >>>> happen just with converting back and forth, but if you apply the
>> >> >>>> montage as I suggested it shouldn't happen.
>> >> >>>>
>> >> >>>> Best,
>> >> >>>>
>> >> >>>> Vladimir
>> >> >>>>
>> >> >>>> On Wed, Oct 12, 2011 at 2:54 PM, Urbain Charline
>> >> >>>> <[log in to unmask]>
>> >> >>>> wrote:
>> >> >>>> > Dear Vladimir,
>> >> >>>> >
>> >> >>>> > Just to let you know, I just tried the following: I converted as
>> >> >>>> > before
>> >> >>>> > SPM
>> >> >>>> > data into a Fieldtrip data structure using the function ftraw,
>> >> >>>> > and
>> >> >>>> > then
>> >> >>>> > directly applied the opposite conversion spm_eeg_ft2spm (so
>> >> >>>> > without
>> >> >>>> > ICA
>> >> >>>> > artifact rejection) and the problem is still present. It is
>> >> >>>> > therefore
>> >> >>>> > not
>> >> >>>> > likely related to my ICA procedures, but more probably to some
>> >> >>>> > sort
>> >> >>>> > of
>> >> >>>> > compatibily problem between the two functions I mentionned.
>> >> >>>> >
>> >> >>>> > Do you know if other poeple used this procedure (ftraw and
>> >> >>>> > spm_eeg_ft2spm)
>> >> >>>> > and reported that it worked correctly?
>> >> >>>> >
>> >> >>>> > Best,
>> >> >>>> > Charline
>> >> >>>> >
>> >> >>>> >
>> >> >>>> > 2011/10/12 Vladimir Litvak <[log in to unmask]>
>> >> >>>> >>
>> >> >>>> >> The montage I mentioned is generated around line 150 of
>> >> >>>> >> ft_rejectcomponent. So you can just put  a breakpoint there or
>> >> >>>> >> add
>> >> >>>> >> your bit of code saving it to a .mat file and then use that
>> >> >>>> >> file
>> >> >>>> >> for
>> >> >>>> >> SPM montage function.
>> >> >>>> >>
>> >> >>>> >> Vladimir
>> >> >>>> >>
>> >> >>>> >> On Wed, Oct 12, 2011 at 2:39 PM, Vladimir Litvak
>> >> >>>> >> <[log in to unmask]> wrote:
>> >> >>>> >> > Dear Charline,
>> >> >>>> >> >
>> >> >>>> >> > I don't know for sure but one possibility is that your
>> >> >>>> >> > channel
>> >> >>>> >> > types
>> >> >>>> >> > are not set correctly any more and all the channels appear in
>> >> >>>> >> > the
>> >> >>>> >> > 'Other' tab. In general I would suggest you instead of
>> >> >>>> >> > converting
>> >> >>>> >> > your
>> >> >>>> >> > clean data back to SPM to get from FT the montage matrix
>> >> >>>> >> > representing
>> >> >>>> >> > ICA component removal and apply it to your SPM dataset using
>> >> >>>> >> > spm_eeg_montage.
>> >> >>>> >> >
>> >> >>>> >> > Best,
>> >> >>>> >> >
>> >> >>>> >> > Vladimir
>> >> >>>> >> >
>> >> >>>> >> > On Wed, Oct 12, 2011 at 2:20 PM, Urbain Charline
>> >> >>>> >> > <[log in to unmask]>
>> >> >>>> >> > wrote:
>> >> >>>> >> >> Dear Vladimir,Dear SPMers,
>> >> >>>> >> >>
>> >> >>>> >> >> I have a problem concerning the convertion of FieldTrip data
>> >> >>>> >> >> into
>> >> >>>> >> >> GUI-readable SPM data.
>> >> >>>> >> >>
>> >> >>>> >> >> Specifically, the problem is the following: I successfully
>> >> >>>> >> >> converted
>> >> >>>> >> >> SPM
>> >> >>>> >> >> data (preprocessed with SPM *.beffspm.mat)
>> >> >>>> >> >>
>> >> >>>> >> >>
>> >> >>>> >> >>
>> >> >>>> >> >> into Fieldtrip data to perform an ICA analysis. After
>> >> >>>> >> >> removing
>> >> >>>> >> >> the
>> >> >>>> >> >> artifactual ICs from the data,
>> >> >>>> >> >> I converted the resulting Fieldtrip data structure into SPM
>> >> >>>> >> >> structures
>> >> >>>> >> >> .dat
>> >> >>>> >> >> and .mat using the function
>> >> >>>> >> >> spm_eeg_ft2spm, which seems to work.
>> >> >>>> >> >>
>> >> >>>> >> >>
>> >> >>>> >> >>
>> >> >>>> >> >>
>> >> >>>> >> >> However, I am now unable to display the data into the GUI.
>> >> >>>> >> >> Do
>> >> >>>> >> >> you
>> >> >>>> >> >> know
>> >> >>>> >> >> why?
>> >> >>>> >> >>
>> >> >>>> >> >> Thank you very much for help!
>> >> >>>> >> >>
>> >> >>>> >> >> Charline
>> >> >>>> >> >>
>> >> >>>> >> >>
>> >> >>>> >> >>
>> >> >>>> >> >>
>> >> >>>> >> >>
>> >> >>>> >> >
>> >> >>>> >
>> >> >>>> >
>> >> >>>
>> >> >>>
>> >> >>
>> >> >
>> >> >
>> >
>> >
>
>

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
2006
2005
2004
2003
2002
2001
2000
1999
1998


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager