mne-tools/mne-python — pull request #438 by joewalter (2013-02-06 13:05:29+00:00)
Title: change simulation of stc to have sorted vertno

There was a problem with our simulator:

When we created a simulated stc, we did this is the order of the labels. However, if the label.vertices in a later label are smaller compared to earlier labels, this results in a unsorted stc.vertno array.

In 'apply_forward' , we assume that stc.vertno is sorted. So with the old code it was possible that the wrong time courses were taken for the different sources when computing the evoked data.

What i did, is to sort the stc.vertno and accordingly change the order in stc.data.