Display on Cortex (Time Frequency Map)

When EEG/SEEG/ECOG data are displayed on a surface (head, gray matter, white matter, skull...), the values at the surface vertices are computed from the recordings using a 3D nearest-neighbor interpolation using Shepard's weighting.
This is done in the same way for temporal (EEG recordings), spectral (PSD) and time-frequency data.

The relevant functions:

https://en.wikipedia.org/wiki/Inverse_distance_weighting