  We present a theoretical framework for analyzing spatial sampling of fields
in three-dimensional space. The framework bridges Shannon's sampling and
information theory to Bayesian probabilistic inference and experimental design.
Based on the theory, we present an approach for optimal sampling on curved
surfaces and analyze spatial sampling of EEG as well as that of on- and
off-scalp MEG. Our spatial-frequency analysis of simulated measurements shows
that the available spatial degrees of freedom in the electric potential are
limited by the smoothing due to head tissues, while those in the magnetic field
are limited by the measurement distance. On-scalp MEG would generally benefit
from three times more samples than EEG or off-scalp MEG. Assuming uniform
whole-head sampling and similar signal-to-noise ratios, on-scalp MEG has the
highest total information content among these modalities. If the number of
spatial samples is small, nonuniform sampling can be beneficial.
