Speeding up mne_make_movie

Hi MNE-ers

I am using mne_make_movie (mne version 2.7.3) to simultaneously apply an
inverse operator to my sensor data, and morph the data to an 'average' brain
using pre-computed morph maps. This works fine, but unfortunately I am doing
this for 500 single trials, and for 20 subjects, and mne_make_movie applies
the operator very slowly, to every millisecond (each trial is 2500 ms, and I
can't temporally downsample using --tstep as I need this high sample rate).
In order to speed things up I was going to first use the
mne_ex_compute_inverse matlab command (as this seems to create the stcs a
lot quicker) and then morph this stc data to the average using the matlab
function 'mne_morph_data'. The only problem is that mne_morph_data.m is very
slow (specifically lines 39-49) - indeed it seems much, much slower than
the equivalent morphing step in mne_make_movie - largely cancelling out any
gains made using mne_ex_compute_inverse! I suppose this might be something
to do with matlab - in which case, is there a faster morphing function
somewhere else I can call, for instance from the command line (ie not
through mne_make_movie)? Or should I be abandoning the command line/matlab
environment altogether, and use the python versions for all these commands
(ie. mne.morph_data_precomputed?) (although I don't know python so would
rather avoid this for the present).

Thanks for any help,

Andy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20130117/eef86eb6/attachment.html

hi Andy,

it's likely that my matlab code for morphing is too naive for such a use case.
The python code is likely to be much more efficient (including
parallel computation)
I would give it a try.

here is an example of stc morphing in python:

http://martinos.org/mne/auto_examples/inverse/plot_morph_data.html#example-inverse-plot-morph-data-py

hope this helps,

Alex

Cheers Alex, I'll give this a go.

Hi Alex,

I can confirm that creating-an-inverse-solution-and-morphing-to-average
using the python code is much faster than trying to do the same thing with
the mne_make_movie command or using the matlab functions when doing many
single trials.

Thanks for your suggestion,

Andy