Print

Print


Hi,

thanks everyone for the helpful suggestions! 

Yes, I believe the problem has something to do with the way I specified the 
origin, because if I try running -trans default in MF 2.1 without 
specifying any origin, the signal looks more equally distributed. 
Transforming to another file from the same subject also looks more normal.

I tried fitting a sphere and using that centre with the correction as 
transform origin in one step as described on the wiki (i.e. <x> <y-13> 
<z+6> where x y z is the centre of the best fitting sphere to the digitised 
head points of that individual). However if it is unsuitable to do the 
correction and transform in one step that could be the explanation for my 
weird results.

I'm currently trying to run it in separate steps as suggested by Danny and 
looking into the issue in a bit more detail, so will report back to the 
list with my findings.

Thanks again,

Zara






On Oct 28 2010, Danny Mitchell wrote:

>Hi,
>
> I think this problem occurs if the virtual sensors resulting from the 
> transformation end up too close to the subject's head. This might happen 
> for example when using -trans <target.fif> where target.fif corresponds 
> to a subject with a smaller head (so higher in the true helmet) but the 
> data being maxfiltered come from a subject with a larger head. (Or 
> similarly when using a non-subject-specific origin such as 0 0 40.)
>
>So I would recommend using a subject-specific origin (such as the centre of
>the best-fitting sphere to the digitised scalp points). I also use the
>"small correction" that Zara mentioned, which originates from the following
>statement in the VectorView manual:
>
>"in the case of Elekta Neuromag, the optimal device origin is at 0, 13, -6
>mm"
>
>However...I don't think this can be done in a single step as implied in the
>link in Zara's email:
>
>maxfilter ... -o <new_output_file> ... -trans default -frame head -origin
><x> <y-13> <z+6> ...
>
> This is because -origin defines both the SSS expansion origin AND the 
> target device origin in head coordinates. Therefore the expansion origin 
> always ends up at the device origin, and the head centre gets translated 
> away from this, so that the SSS expansion origin is no longer at the 
> centre of the head, or at the "optimal" position.
>
> So to move both the centre of the head sphere and the SSS expansion 
> origin to this "optimal" point seems to require two steps: 1) maxfilter 
> ... -f <infile> -o <tempfile> -trans default -frame head -origin x y-13 
> z+6 2) maxfilter ... -f <infile> -o <outfile> -trans <tempfile> -frame 
> head -origin x y z (where x,y,z are the coordinates of the centre of the 
> sphere fit to the head points.)
>
> The first step is similar to above, aligning the head and virtual sensors 
> as desired, but the expansion origin is "wrong". So the output is a 
> temporary file which can then be used as the target of a second 
> transformation (of the original data), in which the expansion origin can 
> now be specified independently of the transformation origin.
>
>Hope that makes sense!
>
>Danny
>
>2010/10/28 Olaf Hauk <[log in to unmask]>
>
>> Hi,
>>
>> Do you get the same problem when you use another fiff-file for -trans 
>> (rather than default)? For example, if you use the identical fiff-file, 
>> or one from the same subject but another session (if available)? This 
>> may allow you to determine whether the problem is the distance to the 
>> default sensor configuration, or something more fundamental. I would 
>> recommend using some "average sensor configuration" across subjects for 
>> -trans (see e.g. 
>> http://imaging.mrc-cbu.cam.ac.uk/meg/StandardSensorArray), in order to 
>> minimise extrapolation errors.
>>
>> Olaf
>>
>>
>>
>> ---
>> Olaf Hauk, PhD
>> MRC Cognition and Brain Sciences Unit
>> Phone: +44(0)1223 273702
>> Fax: +44(0)1223 359062
>>
>> -----Original Message----- From: Announcement for the Neuro MEG list 
>> [mailto:[log in to unmask]] On Behalf Of Zara Bergström Sent: 28 
>> October 2010 16:21 To: [log in to unmask] Subject: Re: problem with 
>> maxfilter
>>
>> Hi David and Neuromeg list,
>>
>> I seem to have the same problem, although I get this for all my files. 
>> I run the -trans default step in a separate stage without any other 
>> concurrent processing as specified here: 
>> http://imaging.mrc-cbu.cam.ac.uk/meg/maxpreproc
>>
>> I have tried specifying the origin either as [0,0,40] or as the 
>> subject-specific origin from a previous sss while applying a small 
>> correction as recommended on the web page above. In all cases, the 
>> transform seems to redistribute almost all of the variance to a few 
>> channels, and wiping out signal at other channels. As an MEG newbie, I 
>> am unsure of whether this is the expected output or an error, but it 
>> looks kind of strange? Furthermore, the result looks the same with 
>> Maxfilter 2.1, which supposedly should have that particular bug fixed.
>>
>> I have attached two figures which show average MEG magnetometer data with
>> or without -trans (sorry I can't plot this topographically since the
>> transform also strips the data of coordinates).
>>
>> Any suggestions would be very much appreciated!
>>
>> Thanks,
>>
>> Zara
>>
>>
>>
>> On Oct 28 2010, David Ziegler wrote:
>>
>> >Hello Neuromeg users,
>> >
>> >I am having a problem running maxfilter 2.0 on my MEG data to
>> >auto-detect bad channels and transform each subject's head position. In
>> >about half of the cases, the results look good, but occasionally the
>> >resulting data seem to be noisier than the original data. I am aware of
>> >the known bug where using "-trans default" w/o specifying -frame and
>> >-origin results in noise at the vertex.  This is exactly what I am
>> >seeing, but I did specify these two parameters in my command.
>> >
>> >I am attaching two figures, one with maxfiltering and one w/o (the data
>> >have been read into fieldtrip and I am displaying only the gradiometer
>> >data.  also, the channels are plotted numerically, but the sensors with
>> >the noise tend to be close to the vertex).  Does anyone have an idea as
>> >to what might be going on and what I can do to remedy the problem?
>> >
>> >The command I ran is:
>> >
>> >maxfilter -f $f_i{each subjects fif file} -origin 0 0 40 -frame head
>> >-autobad 30 -badlimit 7 -in 8 -out 3 -trans default
>> >
>> >Thanks!
>> >David
>> >
>> >
>> >
>>
>> --
>> Dr Zara Bergström
>>
>> Postdoctoral Research Associate Behavioural and Clinical Neuroscience 
>> Institute and Department of Experimental Psychology University of 
>> Cambridge Downing Street Cambridge CB2 3EB UK
>>
>> Tel: + 44 1223 333535
>> http://www.neuroscience.cam.ac.uk/directory/profile.php?zmb25
>> http://research.psychol.cam.ac.uk/~memlab/index.html
>>
>

-- 
Dr Zara Bergström

Postdoctoral Research Associate
Behavioural and Clinical Neuroscience Institute
and Department of Experimental Psychology
University of Cambridge
Downing Street
Cambridge CB2 3EB  UK

Tel: + 44 1223 333535
http://www.neuroscience.cam.ac.uk/directory/profile.php?zmb25
http://research.psychol.cam.ac.uk/~memlab/index.html