The goal of using this error measure is that for the single dipolar source scenario as considered here, this is a good measure to identify whether the largest activity corresponds to the actual simulated activity. However, in a real data scenario it is unknown as to the actual number of sources being active within the brain at a particular instant in time. For this reason, a second error measure was used which penalizes each solution for the number of resulting 'ghost' maxima. A ghost maxima is one which was not actually present in the simulated scenario. This measure, ED2, sums a weighted distance measure across the resulting number of local maxima p where d n = |rdipn - r dip | and |D^(n)| is the magnitude of the local maxima rdipn normalized to the value of the global maximum of |D^(n)|.