mne-tools/mne-python — pull request #828 by christianmbrodbeck (2013-10-17 21:22:52+00:00)
Title: RF:  mne.transforms and mne.coreg into top level modules

following up on https://github.com/mne-tools/mne-python/issues/827

I get a couple of errors in the tests but nothing seems to be related to this PR (hadn't installed sklearn)

```
ERROR: Test stc_to_label
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/christian/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/Users/christian/Documents/Eclipse/projects/mne-python/mne/tests/test_label.py", line 235, in test_stc_to_label
connected=True)
File "/Users/christian/Documents/Eclipse/projects/mne-python/mne/label.py", line 667, in stc_to_label
connectivity=this_src_conn)
File "/Users/christian/Documents/Eclipse/projects/mne-python/mne/stats/cluster_level.py", line 367, in _find_clusters
max_step, partitions, t_power)
File "/Users/christian/Documents/Eclipse/projects/mne-python/mne/stats/cluster_level.py", line 412, in _find_clusters_1dir_parts
t_power)
File "/Users/christian/Documents/Eclipse/projects/mne-python/mne/stats/cluster_level.py", line 461, in _find_clusters_1dir
clusters = _get_components(x_in, connectivity)
File "/Users/christian/Documents/Eclipse/projects/mne-python/mne/stats/cluster_level.py", line 217, in _get_components
raise ImportError('scikit-learn must be installed')
ImportError: scikit-learn must be installed
-------------------- >> begin captured stdout << ---------------------
Reading a source space...
Computing patch statistics...
Patch information added...
Distance information added...
[done]
Reading a source space...
Computing patch statistics...
Patch information added...
Distance information added...
[done]
2 source spaces read
Triangle file: created by gramfort on Thu Sep 15 19:44:31 2011 nvert = 155407 ntri = 310810
Triangle file: created by gramfort on Thu Sep 15 22:04:14 2011 nvert = 156866 ntri = 313728
-- number of connected vertices : 8196
-- number of connected vertices : 8196

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: Test spatio-temporal connectivity from triangles
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/christian/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/Users/christian/Documents/Eclipse/projects/mne-python/mne/tests/test_source_estimate.py", line 442, in test_spatio_temporal_tris_connectivity
components = stats.cluster_level._get_components(np.array(x), connectivity)
File "/Users/christian/Documents/Eclipse/projects/mne-python/mne/stats/cluster_level.py", line 217, in _get_components
raise ImportError('scikit-learn must be installed')
ImportError: scikit-learn must be installed
-------------------- >> begin captured stdout << ---------------------
-- number of connected vertices : 6

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: Test setting up volume source spaces
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/christian/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/Users/christian/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/testing/decorators.py", line 146, in skipper_func
return f(*args, **kwargs)
File "/Users/christian/Documents/Eclipse/projects/mne-python/mne/tests/test_source_space.py", line 76, in test_volume_source_space
subjects_dir=subjects_dir)
File "/Users/christian/Documents/Eclipse/projects/mne-python/mne/utils.py", line 379, in dec
return function(*args, **kwargs)
File "/Users/christian/Documents/Eclipse/projects/mne-python/mne/source_space.py", line 1087, in setup_volume_source_space
_add_interpolator(sp, mri)
File "/Users/christian/Documents/Eclipse/projects/mne-python/mne/source_space.py", line 1333, in _add_interpolator
trans = mri_hdr.get_vox2ras_tkr()
AttributeError: 'MGHHeader' object has no attribute 'get_vox2ras_tkr'
-------------------- >> begin captured stdout << ---------------------
Reading a source space...
[done]
1 source spaces read
BEM file : /Users/christian/Documents/Eclipse/projects/mne-python/examples/MNE-sample-data/subjects/sample/bem/sample-5120-bem.fif
Output file : /var/folders/k5/6g6xdm2j4vq5d2y42686ylqc0000gn/T/tmpzZHeYC/temp-src.fif
grid : 7.0 mm
mindist : 5.0 mm
MRI volume : /Users/christian/Documents/Eclipse/projects/mne-python/examples/MNE-sample-data/subjects/sample/mri/T1.mgz

Loaded inner skull from /Users/christian/Documents/Eclipse/projects/mne-python/examples/MNE-sample-data/subjects/sample/bem/sample-5120-bem.fif (2562 nodes)
Surface CM = ( 0.7 -10.0 44.3) mm
Surface fits inside a sphere with radius 91.8 mm
Surface extent:
x = -66.7 ... 68.8 mm
y = -88.0 ... 79.0 mm
z = -44.5 ... 105.8 mm
Grid extent:
x = -70.0 ... 70.0 mm
y = -91.0 ... 84.0 mm
z = -49.0 ... 112.0 mm
13104 sources before omitting any.
8549 sources after omitting infeasible sources.
Source spaces are in MRI coordinates.
Checking that the sources are inside the bounding surface and at least 5.0 mm away (will take a few...)
Nearest-neighbor searches will be significantly faster if scikit-learn is installed.
3911 source space points omitted because they are outside the inner skull surface.
881 source space points omitted because of the 5.0-mm distance limit.
Thank you for waiting.
3757 sources remaining after excluding the sources outside the surface and less than 5.0 mm inside.
Adjusting the neighborhood info...
Reading /Users/christian/Documents/Eclipse/projects/mne-python/examples/MNE-sample-data/subjects/sample/mri/T1.mgz...

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: Test setting up ico, oct, and all source spaces
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/christian/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/Users/christian/Documents/Eclipse/projects/mne-python/mne/tests/test_source_space.py", line 155, in test_setup_source_space
src = read_source_spaces(fname_ico)
File "/Users/christian/Documents/Eclipse/projects/mne-python/mne/utils.py", line 379, in dec
return function(*args, **kwargs)
File "/Users/christian/Documents/Eclipse/projects/mne-python/mne/source_space.py", line 185, in read_source_spaces
fid, tree, _ = fiff_open(fname)
File "/Users/christian/Documents/Eclipse/projects/mne-python/mne/utils.py", line 379, in dec
return function(*args, **kwargs)
File "/Users/christian/Documents/Eclipse/projects/mne-python/mne/fiff/open.py", line 48, in fiff_open
fid = open(fname, "rb") # Open in binary mode
IOError: [Errno 2] No such file or directory: u'/Users/christian/Documents/Eclipse/projects/mne-python/examples/MNE-sample-data/subjects/fsaverage/bem/fsaverage-ico-5-src.fif'

======================================================================
ERROR: Test reading and creating morph maps
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/christian/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/Users/christian/Documents/Eclipse/projects/mne-python/mne/tests/test_surface.py", line 36, in test_make_morph_maps
mmap2 = _make_morph_map('fsaverage', 'sample', subjects_dir=subjects_dir)
File "/Users/christian/Documents/Eclipse/projects/mne-python/mne/utils.py", line 379, in dec
return function(*args, **kwargs)
File "/Users/christian/Documents/Eclipse/projects/mne-python/mne/surface.py", line 1007, in _make_morph_map
nn_pts_idx = _get_nearest(to_pts, from_pts)
File "/Users/christian/Documents/Eclipse/projects/mne-python/mne/surface.py", line 543, in _get_nearest
for t in to])
File "/Users/christian/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/scipy/spatial/distance.py", line 1965, in cdist
raise ValueError('XA and XB must have the same number of columns '
ValueError: XA and XB must have the same number of columns (i.e. feature dimension.)
-------------------- >> begin captured stdout << ---------------------
Left-hemisphere map read.
Right-hemisphere map read.

--------------------- >> end captured stdout << ----------------------

```