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 538c87f4bd93312cb5c639d7d05998de23bc50de Author: Martin Luessi <[email protected]> Date: Fri Dec 16 12:01:02 2011 -0500 BF: save correct first_samp time in raw file --- mne/fiff/raw.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mne/fiff/raw.py b/mne/fiff/raw.py index a6dd4f7..572aab6 100644 --- a/mne/fiff/raw.py +++ b/mne/fiff/raw.py @@ -200,7 +200,7 @@ class Raw(dict): self.times = times self._preloaded = True - def save(self, fname, picks=None, tmin=0, tmax=None, buffer_size_sec=10, + def save(self, fname, picks=None, tmin=None, tmax=None, buffer_size_sec=10, drop_small_buffer=False): """Save raw data to file @@ -232,7 +232,12 @@ class Raw(dict): # # Convert to samples - start = int(floor(tmin * self.info['sfreq'])) + if tmin is None: + start = 0 + first_samp = self.first_samp + else: + start = int(floor(tmin * self.info['sfreq'])) + first_samp = start if tmax is None: stop = self.last_samp + 1 - self.first_samp @@ -243,7 +248,7 @@ class Raw(dict): # # Read and write all the data # - write_int(outfid, FIFF.FIFF_FIRST_SAMPLE, start) + write_int(outfid, FIFF.FIFF_FIRST_SAMPLE, first_samp) for first in range(start, stop, buffer_size): last = first + buffer_size if last >= stop: -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-mne.git _______________________________________________ debian-med-commit mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
