On Wed, Sep 18, 2013 at 3:03 PM, Roman Goj <notifications@github.com> wrote:

> In mne/beamformer/_tf_lcmv.py:
>
> > +import mne
> > +
> > +from ..fiff.pick import pick_channels_cov
> > +from ..forward import _subject_from_forward
> > +from ..cov import compute_whitener
> > +from ..source_estimate import SourceEstimate
> > +from ._lcmv import _prepare_beamformer_input
> > +
> > +
> > +def iter_filter_epochs(raw, freq_bins, events, event_id, tmin, tmax, baseline,
> > +                       n_jobs, picks):
> > +    """Filters raw data, creates and yields epochs
> > +    """
> > +    # Getting picks based on rejections prior to filtering
> > +    tmp_epochs = mne.Epochs(raw, events, event_id, tmin, tmax, picks=picks,
> > +                            proj=True, baseline=baseline, preload=True)
>
>  mhmmm. This should happen outside. But we should check whether it
> happened or not. If it did not happen, we should do it. Make sense?
> Checkout the epochs dropped API
>
> @dengemann <https://github.com/dengemann> I'm not sure how to do this? Do
> you mean:
>
> before calling iter_filter_epochs do:
>
> tmp_epochs = mne.Epoochs(...reject=...)
> events = tmp_epochs.events
>
> filtered_epochs = inter_filter_epochs(events)
>
> but then what? how could I check if the epochs have been rejected? What
> did you mean by the epochs dropped API?
>

I think the two solutions are to require passing the final events
(rejection to be done  outside as you exposed above) or have that one line
in the function.

`events = mne.Epoochs(...events=events, reject=..., preload=True).events`

One thing I saw was Epochs._bad_dropped but that's not really for
> rejections, plus I'd have to pass tmp_epochs, which would be really weird
> :-/
>
> Oh it is ;-) It tells you  which epochs have been rejected due to the
reject params.

> Did I understand what you meant correctly? If so, how could I achieve that?
>
> But forget about it for now, I think it's not too important.


> —
>
Reply to this email directly or view it on
GitHub<https://github.com/mne-tools/mne-python/pull/742/files#r6432363>
> .
>