ENH: Add interpolation code and example

cc / FYI @agramfort @wmvanvliet @MadsJensen @t3on @christianbrodbeck 
... The question is why it works. Probably because the helmet can be fit to a sphere

> On 12 Dec 2014, at 14:54, Alexandre Gramfort <notifications@github.com> wrote:
> 
> In mne/channels/interpolation.py:
> 
> > +
> > +    # cosine angles between source positions
> > +    cosang_from = pos_from.dot(pos_from.T)
> > +    cosang_to_from = pos_to.dot(pos_from.T)
> > +    G_from = _calc_g(cosang_from)
> > +    G_to_from, H_to_from = (f(cosang_to_from) for f in (_calc_g, _calc_h))
> > +
> > +    if alpha is not None:
> > +        G_from.flat[::len(G_from) + 1] += alpha
> > +
> > +    C_inv = linalg.pinv(G_from)
> > +    interpolation = G_to_from.dot(C_inv)
> > +    return interpolation
> > +
> > +
> > +def interpolate_bads(inst):
> Maybe name should explicit that it only works with EEG.
> 
> —
> Reply to this email directly or view it on GitHub.
>