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

Help for NEUROMEG Archives


NEUROMEG Archives

NEUROMEG Archives


NEUROMEG@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

NEUROMEG Home

NEUROMEG Home

NEUROMEG  October 2007

NEUROMEG October 2007

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: Problem with MaxMove transformations

From:

Jukka Nenonen <[log in to unmask]>

Reply-To:

Jukka Nenonen <[log in to unmask]>

Date:

Wed, 31 Oct 2007 12:40:47 +0200

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (230 lines)

Hi Jason,

thanks for the questions. Now I am sitting in the new office and busily
debugging maxfilter 2.1.

Just a remainder to the readers to avoid extra confusion:
this reply concerns only the problem when using the option  '-trans 
default'.

Options '-trans default' and '-origin x y z -frame head' are mean to be 
independent
of each other. Using them together just  provides a workaround for a 
'trans' bug
in maxfilter 2.0.

When composing the 'default' transformation between device frame and 
reference
head frame, the program picks the translation part from the SSS sphere 
origin.
Unfortunately, the program constructs this transformation before
fitting the sphere, and therefore the translation may become (0,0,0). 
However,
if you set the origin manually, the translation part becomes OK.

I agree with your suggestion below: generally it is better to process 
all (raw)
data first using the subject's own head position. If you wish to compare
multiple recordings, use the '-trans' option as a last step (typically 
for evoked
format data files). In this way you can avoid extra work of re-processing
all raw data if the translation to the target head position is erroneous.

NOTE: maxfilter may report an error "Output file exists" if SSS was already
done. Then you need to set another output filename, or use option 'force'.
SSS is an idempotent operation, thus it can be repeated several times 
without
affecting the result.

I also suggest to check the program output if you are using the default
settings, because fitting the sphere to isotrak depends on how the
digitizations are done. Sometimes the sphere fit fails and reports
errors like "sphere fitted to isotrak extends outside of the sensors" or
(a more obscure one) "Simplex: nr of eval exceeds maximum".
Also, you need to be suspicious if the program reports that the origin
becomes close to (0,0,0) in the head coordinate frame.

If you are still confused how to use '-trans default', I advice to 
select one of
the measurements as a target head position (e.g. file <target_meas.fif>),
and use it instead of 'default', i.e. set '-trans <target_meas.fif>'.

Best regards, Jukka


Jason Taylor wrote:
> (Forgive me if you receive this twice -- I received an error the first 
> time I sent it.)
> 
> Hi Jukka and list recipients,
> 
> Thanks again for further clarifying these MaxMove options (especially 
> while you are packing up your office!). I'm still a little confused 
> about the use of -frame, -origin, and -trans options in combination. 
> Here is why:
> 
> In the manual, -frame and -origin are described in terms of defining, 
> for the purposes of SSS computation, the origin of the sphere containing 
> the brain (s[in]). If these options are not specified, MaxFilter fits a 
> sphere to the isotrak-digitised headshape. Jukka (and Erika and 
> Burkhard) pointed out that the centre of this sphere is typically ~40mm 
> higher than the 'head' coordinate origin (defined by the three cardinal 
> ear-nose-ear points). So, my understanding is: If I specify [ -frame 
> head -origin 0 0 40 ], the sphere s[in] used in SSS will be centred on 
> that point defined in the 'head' coordinate system.
> 
> Not in the manual, but in the chain of emails above, -frame and -origin 
> are described in terms of the -trans default option, to designate a 
> point in 'head' coordinates that should correspond with the 'device' 
> origin when the head is virtually transformed to a target position and 
> the 'head' and 'device' coordinate systems are aligned. So, my 
> understanding is: If I specify [ -frame head -origin 0 0 40 -trans 
> default ], the 'virtual sensors' in the output data are aligned to the 
> head coordinate system as though that point (0,0,40) in the subject's 
> head had been in the centre of the sensor sphere.
> 
> These two issues -- defining the optimal s[in] sphere for SSS and 
> setting origin for head/device coordinate alignment -- seem to be 
> independent. Unless I'm mistaken, it is desirable to (1) compute and 
> separate signals originating from s[out] and s[in] centred on the 
> *actual* head position (using -frame head -origin X Y Z), then (2) 
> transform the data as if the head were in the *same* position for the 
> whole block (using -movecomp), then (2) optionally transform the data as 
> if the head were in the *ideal* position for comparison across blocks or 
> subjects or devices or whatever (using -trans default -frame head 
> -origin X Y Z). Is this what maxfilter does if I specify all options [ 
> -frame head -origin X Y Z -trans default -movecomp ] at once?
> 
> Also, what if the origin desired for transformation is different from 
> the origin that best defines the s[in] sphere, as might be the case when 
> comparing across subjects? Wouldn't it be necessary to do this in two 
> steps?
> 
> Cheers, and good weekends to all.
> - Jason.
> 
> 
> 
> 
> On 10/26/07, *Jukka Nenonen* <[log in to unmask] <mailto:[log in to unmask]>> 
> wrote:
> 
>     Dear Rik,
> 
>     I am writing a quick reply in the middle of moving boxes, our
>     computers will shut down soon and I cannot do more work with
>     MaxFilter before Tuesday.
> 
>     First, in your commands below the option 'nosss' is obsolete. It is
>     meant only for maintenance purposes and should not be used in
>     any data analysis. It may even produce ssome unwanted effects, but here
>     it is simple overrode by option 'trans' (which is in fact doing another
>     SSS).
> 
>     Yoy can realign the blocks in one run, please try:
> 
>     /neuro/bin/util/maxfilter \
>       -f ./raw_block1.fif \ -o ./raw_block1_sss.fif \
>       -autobad off  -movecomp -hp ./raw_block1_hpi.pos \
>     -trans target.fif
> 
>     /neuro/bin/util/maxfilter \
>       -f ./raw_block2.fif \ -o ./raw_block2_sss.fif \
>       -autobad off  -movecomp -hp ./raw_block2_hpi.pos \
>     -trans target.fif
> 
>     Here target.fif is a measurement where the head should
>     be in a 'good' position.
> 
>     If you wish to use 'trans default' instead, I recommend to
>     find an optimal origin for each subject first, e.g. using the
>     mri data, or fitting to isotrak. In my opinion, the best alignment
>     is to have individual head sphere origins at the same point,
>     and the coordinate exes directions aligned with the device
>     coordinate axes. (Please let me know if you have better ideas!)
> 
>     If you don't have that information, default (0,0,40)
>     may position a large head too low and a small head too
>     high.  In such cases using a file (target.fif) may be better
>     for a group analysis.
> 
>     We haven't performed extensive analyses for transforming raw data
>     into a common head position, so I recommend to run some pilot testing
>     with maxmove for finding a good 'protocol' before carrying on extensive
>     analyses over multiple recordings and subjects.
> 
>     With best regards, Jukka Nenonen
> 
>     Rik Henson wrote:
>      > Jukka -
>      >
>      > Please forgive our slowness, but could you confirm that the following
>      > two stages would achieve our desired goal of 1) compensating for
>      > movement within each of two blocks, and then 2) transforming each
>     block
>      > to the same space:
>      >
>      > Step 1 (apply SSS and movement compensation):
>      >
>      > /neuro/bin/util/maxfilter \
>      > -f ./raw_block1.fif \ -o ./raw_block1_sss.fif \
>      > -ctc /neuro/databases/ctc/ct_sparse.fif \ -cal
>      > /neuro/databases/sss/sss_cal.dat \
>      > -autobad off \
>      > -movecomp -hpistep 200 -hpisubt amp -hp ./raw_block1_hpi.pos
>      >
>      > /neuro/bin/util/maxfilter \
>      > -f ./raw_block2.fif \ -o ./raw_block2_sss.fif \
>      > -ctc /neuro/databases/ctc/ct_sparse.fif \ -cal
>      > /neuro/databases/sss/sss_cal.dat \
>      > -autobad off \
>      > -movecomp -hpistep 200 -hpisubt amp -hp ./raw_block2_hpi.pos
>      >
>      >
>      > Step 2 (realign two blocks):
>      >
>      > /neuro/bin/util/maxfilter \
>      > -f ./raw_block1_sss.fif \ -o ./raw_block1_sss_trans.fif \
>      > -nosss \
>      > -autobad off \
>      > -frame head -origin 0 0 40 -trans default
>      >
>      > /neuro/bin/util/maxfilter \
>      > -f ./raw_block2_sss.fif \ -o ./raw_block2_sss_trans.fif \
>      > -nosss \
>      > -autobad off \
>      > -frame head -origin 0 0 40 -trans default
>      >
>      > If these are not correct, please edit the above maxfilter
>     commands to be
>      > correct.
>      >
>      > If these are correct, can we finally confirm that if we plotted the
>      > sensor locations in headspace for the two blocks, they would overlap
>      > exactly? In other words, would two different initial head
>     positions be
>      > transformed such that their centres are now identical, and such
>     that the
>      > point [0 0 40] in that common headspace would correspond to [0 0
>     0] in
>      > device space?
>      >
>      > Rik
>      >
>      > PS Would it also help generally to put "-frame head -origin 0 0
>     40" in
>      > the first two maxfilter calls, ie during the SSS computation?
> 


================================
Dr. Jukka Nenonen
Manager, Method development
Elekta Neuromag Oy
Street address:  Siltasaarenkatu 18-20A, Helsinki, Finland
Mailing address: P.O. Box 68, FIN-00511 HELSINKI, Finland
Tel: +358 9 756 240 85 (office), +358 400 249 557 (mobile),
      +358 9 756 240 11 (fax),    +358 9 756 2400 (operator)
E-mail: [log in to unmask]
http://www.neuromag.com

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

April 2024
May 2023
January 2023
March 2022
January 2022
December 2021
November 2021
May 2021
September 2020
August 2020
July 2020
May 2020
April 2020
January 2020
December 2019
June 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
May 2018
April 2018
March 2018
February 2018
January 2018
November 2017
October 2017
September 2017
August 2017
March 2017
December 2016
September 2016
July 2016
April 2016
January 2016
August 2015
July 2015
June 2015
March 2015
December 2014
August 2014
May 2014
April 2014
January 2014
December 2013
November 2013
October 2013
September 2013
June 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
July 2012
May 2012
March 2012
February 2012
September 2011
July 2011
June 2011
May 2011
April 2011
March 2011
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
February 2010
January 2010
December 2009
November 2009
October 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
March 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007


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

For help and support help@jisc.ac.uk

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