mne-tools/mne-python — pull request #597 by dengemann (2013-05-16 10:05:53+00:00)
Title: ENH: refactor drop log private function to fix bug

This fixes a stupid bug.
The children's drop log discussed in #592 is left unaddressed. After thinking a bit about the details I came to the conclusion that this gonna be messy, as splitting the drop log by key_match (select events) disrupts the original drop log which still refers to the original list of events.

See:
``` Python
# in epochs.py

if epochs.drop_log is not None:
epochs.drop_log = [l for l, sel in zip(epochs.drop_log,
select) if sel]

# test
# this passes
assert_true(n_events == sum(len(epochs[k].drop_log) for k in 'abcd'))

# this fails, we cannot reconstruct the original log anymore
drop_log3 = [i for e in [epochs[k].drop_log for k in 'abcd'] for i in e]
assert_true(epochs.drop_log == drop_log3)
```

Unless we include condition labels inside the drop_log this is not safe to add, I would contend.