ENH add_dig_points, SetChannelMixin, reorganization

This is WIP.

Adds function apply_dig_points to apply hpi, cardinal, and dig points to the Info.

Remove unnecessary import functions for np.loadtxt.

Needs test. Not ready for review
that section is from an old version of the master. that section was removed
and replaced with the montage. it can be specified using the hpts format
now.

-teon


Teon Brooks, Pre-hD
NSF Fellow, Chateaubriand Fellow
PhD Candidate
Department of Psychology
New York University

On Mon, Dec 8, 2014 at 4:34 PM, Christian Brodbeck <notifications@github.com
> wrote:

> In mne/io/kit/kit.py:
>
> >
> >          if isinstance(elp, string_types):
> > -            elp_points = read_elp(elp)[:8]
> > -            if len(elp) < 8:
> > -                err = ("File %r contains fewer than 8 points; got shape "
> > +            elp_points = read_dig_points(elp)
> > +            if len(elp_points) != 8:
>
> right, so speaking of which I see in brain vision.py (line 619) the code
> below. Shouldn't that be done with make_dig() now?
>
>         ch_locs = _get_elp_locs(elp_fname, elp_names)
>         info['dig'] = [{'r': ch_locs['nasion'],
>                         'ident': FIFF.FIFFV_POINT_NASION,
>                         'kind': FIFF.FIFFV_POINT_CARDINAL,
>                         'coord_frame':  FIFF.FIFFV_COORD_HEAD},
>                        {'r': ch_locs['lpa'], 'ident': FIFF.FIFFV_POINT_LPA,
>                         'kind': FIFF.FIFFV_POINT_CARDINAL,
>                         'coord_frame': FIFF.FIFFV_COORD_HEAD},
>                        {'r': ch_locs['rpa'], 'ident': FIFF.FIFFV_POINT_RPA,
>                         'kind': FIFF.FIFFV_POINT_CARDINAL,
>                         'coord_frame': FIFF.FIFFV_COORD_HEAD}]
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/mne-tools/mne-python/pull/1677/files#r21459638>.
>