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 f7789edee58bf7b17a90394a601809048ea34126 Author: Alexandre Gramfort <[email protected]> Date: Wed Aug 8 15:24:26 2012 +0200 API: make sfreq, lowpass, highpass float attributes (not np.array) --- mne/artifacts/stim.py | 4 ++-- mne/fiff/meas_info.py | 6 +++--- mne/forward.py | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mne/artifacts/stim.py b/mne/artifacts/stim.py index 84717ec..dcd6def 100644 --- a/mne/artifacts/stim.py +++ b/mne/artifacts/stim.py @@ -42,8 +42,8 @@ def eliminate_stim_artifact(raw, events, event_id, tmin=-0.005, '(or string) in the constructor.') events_sel = (events[:, 2] == event_id) event_start = events[events_sel, 0] - s_start = np.ceil(raw.info['sfreq'] * np.abs(tmin))[0] - s_end = np.ceil(raw.info['sfreq'] * tmax)[0] + s_start = np.ceil(raw.info['sfreq'] * np.abs(tmin)) + s_end = np.ceil(raw.info['sfreq'] * tmax) picks = pick_types(raw.info, meg=True, eeg=True) diff --git a/mne/fiff/meas_info.py b/mne/fiff/meas_info.py index 7ebc792..82e79d6 100644 --- a/mne/fiff/meas_info.py +++ b/mne/fiff/meas_info.py @@ -74,17 +74,17 @@ def read_meas_info(fid, tree): nchan = int(tag.data) elif kind == FIFF.FIFF_SFREQ: tag = read_tag(fid, pos) - sfreq = tag.data + sfreq = float(tag.data) elif kind == FIFF.FIFF_CH_INFO: tag = read_tag(fid, pos) chs.append(tag.data) p += 1 elif kind == FIFF.FIFF_LOWPASS: tag = read_tag(fid, pos) - lowpass = tag.data + lowpass = float(tag.data) elif kind == FIFF.FIFF_HIGHPASS: tag = read_tag(fid, pos) - highpass = tag.data + highpass = float(tag.data) elif kind == FIFF.FIFF_MEAS_DATE: tag = read_tag(fid, pos) meas_date = tag.data diff --git a/mne/forward.py b/mne/forward.py index ba562b1..7b121d8 100644 --- a/mne/forward.py +++ b/mne/forward.py @@ -610,9 +610,9 @@ def _fill_measurement_info(info, fwd, sfreq): usec = 1e6 * (now - sec) info['meas_date'] = np.array([sec, usec], dtype=np.int32) - info['highpass'] = np.array(0.0, dtype=np.float32) - info['lowpass'] = np.array(sfreq / 2.0, dtype=np.float32) - info['sfreq'] = np.array(sfreq, dtype=np.float32) + info['highpass'] = 0.0 + info['lowpass'] = sfreq / 2.0 + info['sfreq'] = sfreq info['projs'] = [] return info -- 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
