'Get channel locations from info.
Parameters
picks : array-like of int | None
Indices of channels to include. If None (default), all meg and eeg
channels that are available are returned (bad channels excluded).
Notes
.. versionadded:: 0.9.0'

def _get_channel_positions(self, picks=None):

    if (picks is None):
        picks = pick_types(self.info, meg=True, eeg=True)
    chs = self.info['chs']
    pos = np.array([chs[k]['loc'][:3] for k in picks])
    n_zero = np.sum((np.sum(np.abs(pos), axis=1) == 0))
    if (n_zero > 1):
        raise ValueError('Could    not    extract    channel    positions    for    {}    channels'.format(n_zero))
    return pos
