I often use the source estimates from the library, but I would like to know exactly how the sources are computed?
I would have expected the final dataset to be a 3D matrix but I see it’s only a 2D (n_dipoles, n_times). Could you explain the processing carried out from an evoked dataset to a source estimate one ?
As for why the result is 2D: that is because the SourceEstimate object only stores vertex number and the time-series of activation associated with that vertex number; their locations in 3D space are stored separately. Quoting from this tutorial:
An STC object contains the amplitudes of the sources over time. It only stores the amplitudes of activations but not the locations of the sources. To get access to the locations you need to have the source space (often abbreviated src) used to compute the forward operator (often abbreviated fwd).