Print

Print


Dear John,

You can do:

fid = D.fiducials;

% any changes you need

D = fiducials(D, fid);

save(D);

fid is just a struct that you can easily modify.

Also I think there is code in checkmeeg that does this rearrangement automatically. Try

help meeg/check 

and look at the options there.

Best,

Vladimir



On 25 Jul 2012, at 11:27, "John D. Griffiths" <[log in to unmask]> wrote:

> Dear List, 
> 
>                 I've come up against an error when running an meg analysis using scripts and function calls rather than the  batch manager: the fiducials are not listed in the same order in every subject (some subs it is 'Nasion', 'LPA', 'RPA', some it is 'LPA', 'Nasion', 'RPA'). When I then try to do a grandmean on the coregistered average subject I get the error:
> 
>   ??? Error using ==> ft_average_sens at 178
>  all fiducials should have the same labels for averaging
> 
> Which I assume is because they are in a different order, since the labels themselves are identical. 
> 
> The D object won't let me manually change the elements of the D.fiducials.fid structure. The batch and gui are definitely doing this somehow as they change order after coregistration done this way (hence no problems with averaging); could you tell me how to do this manually?
> 
> (FYI: the script I am using is a modification of the head model + coregistration parts of this one: 
> http://imaging.mrc-cbu.cam.ac.uk/meg/SPM8SourceEstimation)
> 
> 
> Thanks, 
>                 John