MRG : EEG Reference reloaded !

+1 too, thanks a lot!

2014-12-30 22:07 GMT+01:00 Alexandre Gramfort <notifications@github.com>:

> In mne/io/reference.py
> <https://github.com/mne-tools/mne-python/pull/1713#discussion-diff-22364843>
> :
>
> > +    if copy:
> > +        raw = raw.copy()
> > +
> > +    # Perform bipolar referencing
> > +    for an, ca, name, info in zip(anode, cathode, ch_name, new_ch_info):
> > +        raw, _ = _apply_reference(raw, [ca], [an], copy=False)
> > +        an_idx = raw.ch_names.index(an)
> > +        raw.info['chs'][an_idx] = info
> > +        raw.info['chs'][an_idx]['ch_name'] = name
> > +        raw.info['ch_names'][an_idx] = name
> > +        logger.info('Bipolar channel added as "%s".' % name)
> > +
> > +    # Drop cathode channels
> > +    raw.drop_channels(cathode)
> > +
> > +    return raw
>
>  Fine. Referencing Epoch objects it is.
> then Referencing Epoch objects it shall be.
>  -1 for dropping projections. The user has gone through the trouble of
> creating them, so we can assume he/she wants to use them. I would like to
> apply them instead (with an info message).
> fine with me.
>  When I'm back at work, I can make the modifications to this PR. I'm
> thinking of modifying the functions to take either a Raw or Epochs object
> as first argument (rather than creating even more referencing functions).
> +1
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/mne-tools/mne-python/pull/1713/files#r22364843>.
>