[med-svn] [python-mne] 35/353: tmin default param 0 instead of None

Yaroslav Halchenko debian at onerussian.com
Fri Nov 27 17:24:27 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 bb710183d74d7eef29132cc5d0dce45560609e56
Author: martin <martin at think.hsd1.ma.comcast.net>
Date:   Thu Dec 22 16:33:52 2011 -0500

    tmin default param 0 instead of None
---
 doc/source/whats_new.rst |  1 +
 mne/fiff/raw.py          | 10 +++-------
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/doc/source/whats_new.rst b/doc/source/whats_new.rst
index 2ef2950..3ef7269 100644
--- a/doc/source/whats_new.rst
+++ b/doc/source/whats_new.rst
@@ -10,6 +10,7 @@ Changelog
 ~~~~~~~~~
 
    - Sign flip computation for robust label average of signed values by `Alex Gramfort`_.
+   - Reading and writing of .w files by `Martin Luessi`_.
 
 Version 0.2
 -----------
diff --git a/mne/fiff/raw.py b/mne/fiff/raw.py
index 47a8b8b..22f4c04 100644
--- a/mne/fiff/raw.py
+++ b/mne/fiff/raw.py
@@ -242,7 +242,7 @@ class Raw(dict):
             self._data = data
             self._times = times
 
-    def save(self, fname, picks=None, tmin=None, tmax=None, buffer_size_sec=10,
+    def save(self, fname, picks=None, tmin=0, tmax=None, buffer_size_sec=10,
              drop_small_buffer=False):
         """Save raw data to file
 
@@ -274,12 +274,8 @@ class Raw(dict):
         #
 
         #   Convert to samples
-        if tmin is None:
-            start = 0
-            first_samp = self.first_samp
-        else:
-            start = int(floor(tmin * self.info['sfreq']))
-            first_samp = self.first_samp + start
+        start = int(floor(tmin * self.info['sfreq']))
+        first_samp = self.first_samp + start
 
         if tmax is None:
             stop = self.last_samp + 1 - self.first_samp

-- 
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