This is an automated email from the git hooks/post-receive script. agramfort-guest pushed a commit to branch upstream in repository python-mne.
commit cbd1bc6c436962fd0e250be2e86323615a71e6ce Author: Alexandre Gramfort <[email protected]> Date: Wed Jan 8 16:37:09 2014 +0100 Imported Upstream version 0.7.1 --- MANIFEST.in | 1 + Makefile | 2 +- bin/mne | 2 +- doc/source/_static/institutions.png | Bin 0 -> 71392 bytes doc/source/_static/logo.png | Bin 175727 -> 0 bytes doc/source/_static/mne_logo.png | Bin 0 -> 77583 bytes doc/source/_templates/layout.html | 12 ++++++++++-- doc/source/index.rst | 7 +++++++ doc/source/python_reference.rst | 4 ++-- doc/source/whats_new.rst | 29 +++++++++++++++++++++++++++++ doc/upload_html.sh | 4 ++-- mne/__init__.py | 2 +- mne/coreg.py | 6 +++--- mne/fiff/edf/edf.py | 9 +++++---- mne/fiff/edf/tests/data/biosemi.hpts | 2 +- mne/fiff/edf/tests/test_edf.py | 7 ++++++- mne/gui/__init__.py | 4 ++-- mne/gui/_coreg_gui.py | 13 ++++++++----- mne/gui/_file_traits.py | 3 +++ mne/gui/tests/test_coreg_gui.py | 7 +++++++ 20 files changed, 89 insertions(+), 25 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index f8733c9..e2b071e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,6 +4,7 @@ include mne/__init__.py recursive-include examples *.py recursive-include examples *.txt recursive-include mne *.py +recursive-include mne/data *.dat recursive-include mne/data *.sel recursive-include mne/data *.fif.gz recursive-include mne/layouts *.lout diff --git a/Makefile b/Makefile index 530400a..8e583bb 100755 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ $(CURDIR)/examples/MNE-sample-data/MEG/sample/sample_audvis_raw.fif: wget ftp://surfer.nmr.mgh.harvard.edu/pub/data/MNE-sample-data-processed.tar.gz tar xvzf MNE-sample-data-processed.tar.gz mv MNE-sample-data examples/ - ln -s ${PWD}/examples/MNE-sample-data ${PWD}/MNE-sample-data -f + ln -sf ${PWD}/examples/MNE-sample-data ${PWD}/MNE-sample-data test: in sample_data rm -f .coverage diff --git a/bin/mne b/bin/mne index d322ada..cbd8096 100755 --- a/bin/mne +++ b/bin/mne @@ -33,4 +33,4 @@ elif sys.argv[1] not in valid_commands: else: cmd = sys.argv[1] cmd_path = op.join(mne_bin_dir, 'commands', 'mne_%s.py' % cmd) - sys.exit(subprocess.call([cmd_path] + sys.argv[2:])) + sys.exit(subprocess.call([sys.executable, cmd_path] + sys.argv[2:])) diff --git a/doc/source/_static/institutions.png b/doc/source/_static/institutions.png new file mode 100644 index 0000000..c2fb35f Binary files /dev/null and b/doc/source/_static/institutions.png differ diff --git a/doc/source/_static/logo.png b/doc/source/_static/logo.png deleted file mode 100644 index d90ddc0..0000000 Binary files a/doc/source/_static/logo.png and /dev/null differ diff --git a/doc/source/_static/mne_logo.png b/doc/source/_static/mne_logo.png new file mode 100644 index 0000000..0577fd9 Binary files /dev/null and b/doc/source/_static/mne_logo.png differ diff --git a/doc/source/_templates/layout.html b/doc/source/_templates/layout.html index 85b0125..6a5bd02 100755 --- a/doc/source/_templates/layout.html +++ b/doc/source/_templates/layout.html @@ -47,9 +47,17 @@ {% block relbar1 %} -<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px"> +<div style="background-color: white; text-align: left; padding: 10px 7px 15px 15px; min-width: 910px"> +<div style="float: left"> <a href="{{ pathto('index') }}"><img src="{{ -pathto("_static/logo.png", 1) }}" border="0" alt="py4sci"/></a> +pathto("_static/mne_logo.png", 1) }}" border="0" alt="py4sci"/></a> +</div> + +<div style="float: right"> +<a href="{{ pathto('index') }}"><img src="{{ +pathto("_static/institutions.png", 1) }}" border="0" alt="py4sci"/></a> +</div> +<br style="clear:both"/> </div> {{ super() }} {% endblock %} diff --git a/doc/source/index.rst b/doc/source/index.rst index ed89936..47a9194 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -29,9 +29,16 @@ component of MNE is presently evolving quickly and thanks to the adopted open development environment user contributions can be easily incorporated. +The MNE development is supported by National Institute of Biomedical Imaging and Bioengineering +grants 5R01EB009048 and P41EB015896 (Center for Functional Neuroimaging Technologies) as well as +NSF awards 0958669 and 1042134. + The Matlab and Python components of MNE are provided under the simplified BSD license. + + + * `Download <http://www.nmr.mgh.harvard.edu/martinos/userInfo/data/MNE_register/index.php>`_ MNE * Read the :ref:`manual`. * Get started with :ref:`mne_python` diff --git a/doc/source/python_reference.rst b/doc/source/python_reference.rst index 2c2561e..2994986 100644 --- a/doc/source/python_reference.rst +++ b/doc/source/python_reference.rst @@ -393,9 +393,9 @@ MRI Processing Step by step instructions for using :func:`gui.coregistration`: - `Coregistration for subjects with structural MRI - <http://www.slideshare.net/slideshow/embed_code/28598463>`_ + <http://www.slideshare.net/mne-python/mnepython-coregistration>`_ - `Scaling a template MRI for subjects for which no MRI is available - <http://www.slideshare.net/slideshow/embed_code/28598561>`_ + <http://www.slideshare.net/mne-python/mnepython-scale-mri>`_ .. autosummary:: :toctree: generated/ diff --git a/doc/source/whats_new.rst b/doc/source/whats_new.rst index 0853e0c..a0d743f 100644 --- a/doc/source/whats_new.rst +++ b/doc/source/whats_new.rst @@ -110,6 +110,35 @@ API - `plot_evoked` and `Epochs.plot` now open a new figure by default. To plot on an existing figure please specify the `axes` parameter. + +Authors +~~~~~~~~~ + +The committer list for this release is the following (preceded by number +of commits): + + * 336 Denis A. Engemann + * 202 Eric Larson + * 193 Roman Goj + * 138 Alexandre Gramfort + * 99 Mainak Jas + * 75 Christian Brodbeck + * 60 Martin Luessi + * 40 Teon Brooks + * 29 Romain Trachel + * 28 Andrew Dykstra + * 12 Mark Wronkiewicz + * 10 Christoph Dinh + * 8 Alan Leggitt + * 3 Yaroslav Halchenko + * 3 Daniel Strohmeier + * 2 Mads Jensen + * 2 Praveen Sripad + * 1 Luke Bloy + * 1 Emanuele Olivetti + * 1 Yousra BEKHTI + + .. _changes_0_6: Version 0.6 diff --git a/doc/upload_html.sh b/doc/upload_html.sh index 21d1c58..e9ff7e4 100755 --- a/doc/upload_html.sh +++ b/doc/upload_html.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash #scp -r build/html/* martinos-data:/web/html/mne/ -rsync -rltvz --delete --perms --chmod=g+w build/html/ martinos-data:/web/html/mne/ -essh -ssh martinos-data "chgrp -R megweb /web/html/mne" +rsync -rltvz --delete --perms --chmod=g+w build/html/ martinos-data:/web/html/ext/mne/ -essh +ssh martinos-data "chgrp -R megweb /web/html/ext/mne" diff --git a/mne/__init__.py b/mne/__init__.py index b95152e..7b504e0 100644 --- a/mne/__init__.py +++ b/mne/__init__.py @@ -1,7 +1,7 @@ """MNE for MEG and EEG data analysis """ -__version__ = '0.7' +__version__ = '0.7.1' # have to import verbose first since it's needed by many things from .utils import (set_log_level, set_log_file, verbose, set_config, diff --git a/mne/coreg.py b/mne/coreg.py index 4ae10e6..56242bb 100644 --- a/mne/coreg.py +++ b/mne/coreg.py @@ -715,13 +715,13 @@ def _is_mri_subject(subject, subjects_dir=None): Whether ``subject`` is an mri subject. """ subjects_dir = get_subjects_dir(subjects_dir, raise_error=True) - sdir = os.path.join(subjects_dir, subject) - fname = os.path.join(sdir, 'bem', '%s-head.fif' % subject) + fname = head_bem_fname.format(subjects_dir=subjects_dir, subject=subject) if not os.path.exists(fname): return False - fname = os.path.join(sdir, 'bem', '%s-*-bem.fif' % subject) + fname = bem_fname.format(subjects_dir=subjects_dir, subject=subject, + name='*') if len(glob(fname)) == 0: return False diff --git a/mne/fiff/edf/edf.py b/mne/fiff/edf/edf.py index 356e26e..e2beba0 100644 --- a/mne/fiff/edf/edf.py +++ b/mne/fiff/edf/edf.py @@ -417,11 +417,12 @@ def _get_edf_info(fname, n_eeg, stim_channel, annot, annotmap, hpts, preload): if hpts and os.path.lexists(hpts): fid = open(hpts, 'rb').read() locs = {} - temp = re.findall('eeg\s(\w+)\s(-?\d+)\s(-?\d+)\s(-?\d+)', fid) - temp = temp + re.findall('cardinal\s(\d+)\s(-?\d+)\s(-?\d+)\s(-?\d+)', - fid) + temp = re.findall('eeg\s(\w+)\s(-?[\d,.]+)\s(-?[\d,.]+)\s(-?[\d,.]+)', + fid) + temp += re.findall('cardinal\s([\d,.]+)\s(-?[\d,.]+)\s(-?[\d,.]+)\s(-?' + '[\d,.]+)', fid) for loc in temp: - coord = np.array(map(int, loc[1:])) + coord = np.array(map(float, loc[1:])) coord = apply_trans(als_ras_trans_mm, coord) locs[loc[0].lower()] = coord trans = get_ras_to_neuromag_trans(nasion=locs['2'], lpa=locs['1'], diff --git a/mne/fiff/edf/tests/data/biosemi.hpts b/mne/fiff/edf/tests/data/biosemi.hpts index cf3d2b5..6e54b9d 100644 --- a/mne/fiff/edf/tests/data/biosemi.hpts +++ b/mne/fiff/edf/tests/data/biosemi.hpts @@ -7,7 +7,7 @@ # # 64 eeg channels # --------------- -eeg Fp1 -95 -31 -3 +eeg Fp1 -95.0 -31.0 -3.0 eeg AF7 -81 -59 -3 eeg AF3 -87 -41 28 eeg F1 -71 -29 64 diff --git a/mne/fiff/edf/tests/test_edf.py b/mne/fiff/edf/tests/test_edf.py index 1d7216b..7dee947 100644 --- a/mne/fiff/edf/tests/test_edf.py +++ b/mne/fiff/edf/tests/test_edf.py @@ -7,7 +7,7 @@ import os.path as op import inspect -from nose.tools import assert_equal +from nose.tools import assert_equal, assert_true from numpy.testing import assert_array_almost_equal, assert_array_equal from scipy import io @@ -43,6 +43,11 @@ def test_bdf_data(): assert_array_almost_equal(data_py, data_eeglab) + # Manually checking that float coordinates are imported + assert_true((raw_py.info['chs'][0]['eeg_loc']).any()) + assert_true((raw_py.info['chs'][25]['eeg_loc']).any()) + assert_true((raw_py.info['chs'][63]['eeg_loc']).any()) + def test_edf_data(): """Test reading raw edf files diff --git a/mne/gui/__init__.py b/mne/gui/__init__.py index bf8326f..d44b8a4 100644 --- a/mne/gui/__init__.py +++ b/mne/gui/__init__.py @@ -45,9 +45,9 @@ def coregistration(tabbed=False, split=True, scene_width=01, raw=None, All parameters are optional, since they can be set through the GUI. Step by step instructions for the coregistrations can be accessed as slides, `for subjects with structural MRI - <http://www.slideshare.net/slideshow/embed_code/28598463>`_ and `for + <http://www.slideshare.net/mne-python/mnepython-coregistration>`_ and `for subjects for which no MRI is available - <http://www.slideshare.net/slideshow/embed_code/28598561>`_. + <http://www.slideshare.net/mne-python/mnepython-scale-mri>`_. """ from ._coreg_gui import CoregFrame, _make_view view = _make_view(tabbed, split, scene_width) diff --git a/mne/gui/_coreg_gui.py b/mne/gui/_coreg_gui.py index 7bb0225..e57b6c2 100644 --- a/mne/gui/_coreg_gui.py +++ b/mne/gui/_coreg_gui.py @@ -73,8 +73,7 @@ from ..utils import get_subjects_dir, logger from ._fiducials_gui import MRIHeadWithFiducialsModel, FiducialsPanel from ._file_traits import (assert_env_set, trans_wildcard, RawSource, SubjectSelectorPanel) -from ._viewer import (defaults, HeadViewController, PointObject, SurfaceObject, - headview_borders) +from ._viewer import defaults, HeadViewController, PointObject, SurfaceObject laggy_float_editor = TextEditor(auto_set=False, enter_set=True, evaluate=float) @@ -523,6 +522,12 @@ class CoregModel(HasPrivateTraits): head_mri_trans = info['trans'] self.set_trans(head_mri_trans) + def reset(self): + """Reset all the parameters affecting the coregistration""" + self.reset_traits(('n_scaling_params', 'scale_x', 'scale_y', 'scale_z', + 'rot_x', 'rot_y', 'rot_z', 'trans_x', 'trans_y', + 'trans_z')) + def set_trans(self, head_mri_trans): """Set rotation and translation parameters from a transformation matrix @@ -885,9 +890,7 @@ class CoregPanel(HasPrivateTraits): warning(None, err, "MNE_ROOT Not Set") def _reset_params_fired(self): - self.reset_traits(('n_scaling_params', 'scale_x', 'scale_y', 'scale_z', - 'rot_x', 'rot_y', 'rot_z', 'trans_x', 'trans_y', - 'trans_z')) + self.model.reset() def _rot_x_dec_fired(self): self.rot_x -= self.rot_step diff --git a/mne/gui/_file_traits.py b/mne/gui/_file_traits.py index a0e43a1..758d346 100644 --- a/mne/gui/_file_traits.py +++ b/mne/gui/_file_traits.py @@ -321,6 +321,9 @@ class RawSource(HasPrivateTraits): else: return np.zeros((1, 3)) + def _file_changed(self): + self.reset_traits(('points_filter',)) + class MRISubjectSource(HasPrivateTraits): """Find subjects in SUBJECTS_DIR and select one diff --git a/mne/gui/tests/test_coreg_gui.py b/mne/gui/tests/test_coreg_gui.py index f7608df..8b41ff5 100644 --- a/mne/gui/tests/test_coreg_gui.py +++ b/mne/gui/tests/test_coreg_gui.py @@ -12,11 +12,13 @@ from nose.tools import (assert_equal, assert_almost_equal, assert_false, import mne from mne.datasets import sample +from mne.fiff.kit.tests import data_dir as kit_data_dir from mne.utils import _TempDir, requires_traits, requires_mne_fs_in_env data_path = sample.data_path(download=False) raw_path = os.path.join(data_path, 'MEG', 'sample', 'sample_audvis_raw.fif') +kit_raw_path = os.path.join(kit_data_dir, 'test_bin.fif') subjects_dir = os.path.join(data_path, 'subjects') tempdir = _TempDir() @@ -155,3 +157,8 @@ def test_coreg_model_with_fsaverage(): model.n_scale_params = 3 model.fit_scale_hsp_points() assert_less(np.mean(model.point_distance), avg_point_distance_1param) + + # test switching raw disables point omission + assert_equal(model.hsp.n_omitted, 1) + model.hsp.file = kit_raw_path + assert_equal(model.hsp.n_omitted, 0) -- Alioth's /git/debian-med/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
