[med-svn] [python-mne] 45/353: ENH : making Epochs.bad_dropped hidden
Yaroslav Halchenko
debian at onerussian.com
Fri Nov 27 17:24:29 UTC 2015
This is an automated email from the git hooks/post-receive script.
yoh pushed a commit to tag 0.4
in repository python-mne.
commit 941f3efe9622a19e052316d99ec0804351fc0cc0
Author: Alexandre Gramfort <alexandre.gramfort at inria.fr>
Date: Fri Jan 6 08:45:08 2012 +0100
ENH : making Epochs.bad_dropped hidden
---
mne/epochs.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/mne/epochs.py b/mne/epochs.py
index 608b1dd..0ac01cf 100644
--- a/mne/epochs.py
+++ b/mne/epochs.py
@@ -110,7 +110,7 @@ class Epochs(object):
self.preload = preload
self.reject = reject
self.flat = flat
- self.bad_dropped = False
+ self._bad_dropped = False
# Handle measurement info
self.info = copy.deepcopy(raw.info)
@@ -200,7 +200,7 @@ class Epochs(object):
if self.preload:
self._data, good_events = self._get_data_from_disk()
self.events = np.atleast_2d(self.events[good_events, :])
- self.bad_dropped = True
+ self._bad_dropped = True
def drop_picks(self, bad_picks):
"""Drop some picks
@@ -230,7 +230,7 @@ class Epochs(object):
Warning: Operation is slow since all epochs have to be read from disk
"""
- if self.bad_dropped:
+ if self._bad_dropped:
return
good_events = []
@@ -241,7 +241,7 @@ class Epochs(object):
good_events.append(idx)
self.events = np.atleast_2d(self.events[good_events])
- self.bad_dropped = True
+ self._bad_dropped = True
print "%d bad epochs dropped" % (n_events - len(good_events))
@@ -359,7 +359,7 @@ class Epochs(object):
return epoch
def __repr__(self):
- if not self.bad_dropped:
+ if not self._bad_dropped:
s = "n_events : %s (good & bad)" % len(self.events)
else:
s = "n_events : %s (all good)" % len(self.events)
@@ -371,7 +371,7 @@ class Epochs(object):
def __getitem__(self, key):
"""Return an Epochs object with a subset of epochs
"""
- if not self.bad_dropped:
+ if not self._bad_dropped:
warnings.warn("Bad epochs have not been dropped, indexing will be "
"inaccurate. Use drop_bad_epochs() or preload=True")
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-mne.git
More information about the debian-med-commit
mailing list