[med-svn] [python-mne] 201/376: pyflakes
Yaroslav Halchenko
debian at onerussian.com
Fri Nov 27 17:22:37 UTC 2015
This is an automated email from the git hooks/post-receive script.
yoh pushed a commit to annotated tag v0.1
in repository python-mne.
commit f21fedb15f2f67438f31013088011077ef711ba1
Author: Alexandre Gramfort <alexandre.gramfort at inria.fr>
Date: Sun Apr 17 18:39:50 2011 -0400
pyflakes
---
mne/event.py | 1 -
mne/fiff/compensator.py | 2 +-
mne/fiff/meas_info.py | 2 +-
mne/preprocessing.py | 8 ++++----
mne/source_space.py | 2 +-
mne/tests/test_source_space.py | 16 +++++++++++++---
mne/tests/test_viz.py | 2 --
7 files changed, 20 insertions(+), 13 deletions(-)
diff --git a/mne/event.py b/mne/event.py
index d5b8aef..786727c 100755
--- a/mne/event.py
+++ b/mne/event.py
@@ -102,7 +102,6 @@ def find_events(raw, stim_channel='STI 014'):
data, times = raw[pick, :]
data = data.ravel()
idx = np.where(np.diff(data.ravel()) > 0)[0]
- n_events = len(idx)
events_id = data[idx + 1].astype(np.int)
idx += raw.first_samp + 1
events = np.c_[idx, np.zeros_like(idx), events_id]
diff --git a/mne/fiff/compensator.py b/mne/fiff/compensator.py
index 7c79771..9f87264 100755
--- a/mne/fiff/compensator.py
+++ b/mne/fiff/compensator.py
@@ -1,4 +1,4 @@
-import numpy as np
+# import numpy as np
from .constants import FIFF
diff --git a/mne/fiff/meas_info.py b/mne/fiff/meas_info.py
index ddaedd6..ff5e002 100755
--- a/mne/fiff/meas_info.py
+++ b/mne/fiff/meas_info.py
@@ -13,7 +13,7 @@ from .proj import read_proj, write_proj
from .ctf import read_ctf_comp, write_ctf_comp
from .channels import _read_bad_channels
-from .write import start_block, end_block, write_id, \
+from .write import start_block, end_block, \
write_float, write_int, write_coord_trans, write_ch_info, \
write_dig_point, write_name_list
diff --git a/mne/preprocessing.py b/mne/preprocessing.py
index 1ad326f..0a8a6a8 100755
--- a/mne/preprocessing.py
+++ b/mne/preprocessing.py
@@ -1,7 +1,7 @@
-import numpy as np
-
-from .fiff.proj import make_projector_info
-from .fiff.compensator import get_current_comp
+# import numpy as np
+#
+# from .fiff.proj import make_projector_info
+# from .fiff.compensator import get_current_comp
# from .fiff.compensator import compensate_to, make_compensator
# XXX
diff --git a/mne/source_space.py b/mne/source_space.py
index 5240b48..c224a2c 100755
--- a/mne/source_space.py
+++ b/mne/source_space.py
@@ -218,7 +218,7 @@ def _read_one_source_space(fid, this):
res['pinfo'] = patch_info(res['nearest'])
if res['pinfo'] is not None:
- print 'Patch information added...'
+ print 'Patch information added...',
return res
diff --git a/mne/tests/test_source_space.py b/mne/tests/test_source_space.py
index 0ae1f48..693e3b7 100755
--- a/mne/tests/test_source_space.py
+++ b/mne/tests/test_source_space.py
@@ -9,6 +9,7 @@ examples_folder = op.join(op.dirname(__file__), '..', '..', 'examples')
data_path = sample.data_path(examples_folder)
fname = op.join(data_path, 'MEG', 'sample', 'sample_audvis-eeg-oct-6p-fwd.fif')
+
def test_read_source_spaces():
"""Testing reading of source space meshes
"""
@@ -17,7 +18,16 @@ def test_read_source_spaces():
# 3D source space
lh_points = src[0]['rr']
- lh_faces = src[0]['use_tris']
+ lh_faces = src[0]['tris']
+ lh_use_faces = src[0]['use_tris']
rh_points = src[1]['rr']
- rh_faces = src[1]['use_tris']
- # XXX : test something
+ rh_faces = src[1]['tris']
+ rh_use_faces = src[1]['use_tris']
+ assert lh_faces.min() == 0
+ assert lh_faces.max() == lh_points.shape[0] - 1
+ assert lh_use_faces.min() >= 0
+ assert lh_use_faces.max() <= lh_points.shape[0] - 1
+ assert rh_faces.min() == 0
+ assert rh_faces.max() == rh_points.shape[0] - 1
+ assert rh_use_faces.min() >= 0
+ assert rh_use_faces.max() <= lh_points.shape[0] - 1
diff --git a/mne/tests/test_viz.py b/mne/tests/test_viz.py
index 9cdb01d..1d3455c 100755
--- a/mne/tests/test_viz.py
+++ b/mne/tests/test_viz.py
@@ -1,7 +1,5 @@
import os.path as op
-import pylab as pl
-
from mne import fiff
from mne.layouts import Layout
from mne.viz import plot_topo
--
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