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 ec73fec353808b318aec1fa9599e3ea3d17b7e1a Author: Alexandre Gramfort <[email protected]> Date: Thu Mar 8 14:21:15 2012 +0100 ENH : add support to write inverse_operators (surf + volume) misc --- mne/cov.py | 2 +- mne/fiff/ctf.py | 3 +- mne/fiff/matrix.py | 62 ++++++++---- mne/fiff/write.py | 30 +++--- mne/minimum_norm/__init__.py | 2 +- mne/minimum_norm/inverse.py | 131 ++++++++++++++++++++++---- mne/minimum_norm/tests/test_inverse.py | 44 ++++++++- mne/minimum_norm/tests/test_time_frequency.py | 2 +- mne/source_space.py | 101 +++++++++++++++++++- mne/surface.py | 1 - 10 files changed, 318 insertions(+), 60 deletions(-) diff --git a/mne/cov.py b/mne/cov.py index f7acbae..02edf48 100644 --- a/mne/cov.py +++ b/mne/cov.py @@ -417,7 +417,7 @@ def write_cov(fid, cov): write_int(fid, FIFF.FIFF_MNE_COV_NFREE, cov['nfree']) # Channel names - if cov['names'] is not None: + if cov['names'] is not None and len(cov['names']) > 0: write_name_list(fid, FIFF.FIFF_MNE_ROW_NAMES, cov['names']) # Data diff --git a/mne/fiff/ctf.py b/mne/fiff/ctf.py index 4d453e9..73a350f 100644 --- a/mne/fiff/ctf.py +++ b/mne/fiff/ctf.py @@ -211,7 +211,8 @@ def read_ctf_comp(fid, node, chs): ############################################################################### # Writing -from .write import start_block, end_block, write_int, write_named_matrix +from .write import start_block, end_block, write_int +from .matrix import write_named_matrix def write_ctf_comp(fid, comps): diff --git a/mne/fiff/matrix.py b/mne/fiff/matrix.py index 04435b0..8f883a2 100644 --- a/mne/fiff/matrix.py +++ b/mne/fiff/matrix.py @@ -3,13 +3,17 @@ # # License: BSD (3-clause) +import copy from .constants import FIFF from .tag import find_tag, has_tag +from .write import write_int, start_block, end_block, write_float_matrix, \ + write_string, write_name_list def _transpose_named_matrix(mat): """Transpose mat inplace (no copy) """ + mat = copy.deepcopy(mat) mat['nrow'], mat['ncol'] = mat['ncol'], mat['nrow'] mat['row_names'], mat['col_names'] = mat['col_names'], mat['row_names'] mat['data'] = mat['data'].T @@ -41,12 +45,12 @@ def _read_named_matrix(fid, node, matkind): node = node['children'][k] break else: - raise ValueError('Desired named matrix (kind = %d) not available' - % matkind) + print 'Desired named matrix (kind = %d) not available' % matkind + return None else: if not has_tag(node, matkind): - raise ValueError('Desired named matrix (kind = %d) not available' - % matkind) + print 'Desired named matrix (kind = %d) not available' % matkind + return None # Read everything we need tag = find_tag(fid, node, matkind) @@ -57,29 +61,47 @@ def _read_named_matrix(fid, node, matkind): nrow, ncol = data.shape tag = find_tag(fid, node, FIFF.FIFF_MNE_NROW) - if tag is not None: - if tag.data != nrow: - raise ValueError('Number of rows in matrix data and FIFF_MNE_NROW ' - 'tag do not match') + if tag is not None and tag.data != nrow: + raise ValueError('Number of rows in matrix data and FIFF_MNE_NROW ' + 'tag do not match') tag = find_tag(fid, node, FIFF.FIFF_MNE_NCOL) - if tag is not None: - if tag.data != ncol: - raise ValueError('Number of columns in matrix data and ' - 'FIFF_MNE_NCOL tag do not match') + if tag is not None and tag.data != ncol: + raise ValueError('Number of columns in matrix data and ' + 'FIFF_MNE_NCOL tag do not match') tag = find_tag(fid, node, FIFF.FIFF_MNE_ROW_NAMES) - if tag is not None: - row_names = tag.data.split(':') - else: - row_names = [] + row_names = tag.data.split(':') if tag is not None else [] tag = find_tag(fid, node, FIFF.FIFF_MNE_COL_NAMES) - if tag is not None: - col_names = tag.data.split(':') - else: - col_names = [] + col_names = tag.data.split(':') if tag is not None else [] mat = dict(nrow=nrow, ncol=ncol, row_names=row_names, col_names=col_names, data=data) return mat + + +def write_named_matrix(fid, kind, mat): + """Write named matrix from the given node + + Parameters + ---------- + fid: file + The opened file descriptor + kind: int + The kind of the matrix + matkind: int + The type of matrix + """ + start_block(fid, FIFF.FIFFB_MNE_NAMED_MATRIX) + write_int(fid, FIFF.FIFF_MNE_NROW, mat['nrow']) + write_int(fid, FIFF.FIFF_MNE_NCOL, mat['ncol']) + + if len(mat['row_names']) > 0: + write_name_list(fid, FIFF.FIFF_MNE_ROW_NAMES, mat['row_names']) + + if len(mat['col_names']) > 0: + write_name_list(fid, FIFF.FIFF_MNE_COL_NAMES, mat['col_names']) + + write_float_matrix(fid, kind, mat['data']) + end_block(fid, FIFF.FIFFB_MNE_NAMED_MATRIX) diff --git a/mne/fiff/write.py b/mne/fiff/write.py index a7984a8..bd2de7c 100644 --- a/mne/fiff/write.py +++ b/mne/fiff/write.py @@ -317,17 +317,25 @@ def write_dig_point(fid, dig): fid.write(np.array(dig['r'][:3], dtype='>f4').tostring()) -def write_named_matrix(fid, kind, mat): - """Writes a named single-precision floating-point matrix""" - start_block(fid, FIFF.FIFFB_MNE_NAMED_MATRIX) - write_int(fid, FIFF.FIFF_MNE_NROW, mat['nrow']) - write_int(fid, FIFF.FIFF_MNE_NCOL, mat['ncol']) +def write_float_sparse_rcs(fid, kind, mat): + """Writes a single-precision floating-point matrix tag""" + FIFFT_FLOAT = 4 + FIFFT_MATRIX = 16416 << 16 + FIFFT_MATRIX_FLOAT_RCS = FIFFT_FLOAT | FIFFT_MATRIX + FIFFV_NEXT_SEQ = 0 + + nnzm = mat.nnz + nrow = mat.shape[0] + data_size = 4 * nnzm + 4 * nnzm + 4 * (nrow + 1) + 4 * 4 - if len(mat['row_names']) > 0: - write_name_list(fid, FIFF.FIFF_MNE_ROW_NAMES, mat['row_names']) + fid.write(np.array(kind, dtype='>i4').tostring()) + fid.write(np.array(FIFFT_MATRIX_FLOAT_RCS, dtype='>i4').tostring()) + fid.write(np.array(data_size, dtype='>i4').tostring()) + fid.write(np.array(FIFFV_NEXT_SEQ, dtype='>i4').tostring()) - if len(mat['col_names']) > 0: - write_name_list(fid, FIFF.FIFF_MNE_COL_NAMES, mat['col_names']) + fid.write(np.array(mat.data, dtype='>f4').tostring()) + fid.write(np.array(mat.indices, dtype='>i4').tostring()) + fid.write(np.array(mat.indptr, dtype='>i4').tostring()) - write_float_matrix(fid, kind, mat['data']) - end_block(fid, FIFF.FIFFB_MNE_NAMED_MATRIX) + dims = [nnzm, mat.shape[0], mat.shape[1], 2] + fid.write(np.array(dims, dtype='>i4').tostring()) diff --git a/mne/minimum_norm/__init__.py b/mne/minimum_norm/__init__.py index 3ee45ec..5fbf009 100644 --- a/mne/minimum_norm/__init__.py +++ b/mne/minimum_norm/__init__.py @@ -1,4 +1,4 @@ from .inverse import read_inverse_operator, apply_inverse, \ apply_inverse_raw, make_inverse_operator, \ - apply_inverse_epochs + apply_inverse_epochs, write_inverse_operator from .time_frequency import source_band_induced_power, source_induced_power diff --git a/mne/minimum_norm/inverse.py b/mne/minimum_norm/inverse.py index 2338301..77d6150 100644 --- a/mne/minimum_norm/inverse.py +++ b/mne/minimum_norm/inverse.py @@ -12,14 +12,19 @@ from scipy import linalg from ..fiff.constants import FIFF from ..fiff.open import fiff_open from ..fiff.tag import find_tag -from ..fiff.matrix import _read_named_matrix, _transpose_named_matrix -from ..fiff.proj import read_proj, make_projector +from ..fiff.matrix import _read_named_matrix, _transpose_named_matrix, \ + write_named_matrix +from ..fiff.proj import read_proj, make_projector, write_proj from ..fiff.tree import dir_tree_find +from ..fiff.write import write_int, write_float_matrix, start_file, \ + start_block, end_block, end_file, write_float, \ + write_coord_trans -from ..cov import read_cov, prepare_noise_cov +from ..cov import read_cov, prepare_noise_cov, write_cov from ..forward import compute_depth_prior, compute_depth_prior_fixed from ..source_space import read_source_spaces_from_tree, \ - find_source_space_hemi, _get_vertno + find_source_space_hemi, _get_vertno, \ + write_source_spaces from ..transforms import invert_transform, transform_source_space_to from ..source_estimate import SourceEstimate @@ -75,7 +80,7 @@ def read_inverse_operator(fname): if len(parent_mri) == 0: fid.close() raise Exception('No parent MRI information in %s' % fname) - parent_mri = parent_mri[0] + parent_mri = parent_mri[0] # take only first one print ' Reading inverse operator info...', # @@ -137,17 +142,17 @@ def read_inverse_operator(fname): # The eigenleads and eigenfields # inv['eigen_leads_weighted'] = False - try: - inv['eigen_leads'] = _read_named_matrix(fid, invs, - FIFF.FIFF_MNE_INVERSE_LEADS) - except: + eigen_leads = _read_named_matrix(fid, invs, FIFF.FIFF_MNE_INVERSE_LEADS) + if eigen_leads is None: inv['eigen_leads_weighted'] = True - inv['eigen_leads'] = _read_named_matrix(fid, invs, - FIFF.FIFF_MNE_INVERSE_LEADS_WEIGHTED) + eigen_leads = _read_named_matrix(fid, invs, + FIFF.FIFF_MNE_INVERSE_LEADS_WEIGHTED) + if eigen_leads is None: + raise ValueError('Eigen leads not found in inverse operator.') # # Having the eigenleads as columns is better for the inverse calculations # - inv['eigen_leads'] = _transpose_named_matrix(inv['eigen_leads']) + inv['eigen_leads'] = _transpose_named_matrix(eigen_leads) inv['eigen_fields'] = _read_named_matrix(fid, invs, FIFF.FIFF_MNE_INVERSE_FIELDS) print '[done]' @@ -179,11 +184,8 @@ def read_inverse_operator(fname): # # Read the source spaces # - try: - inv['src'] = read_source_spaces_from_tree(fid, tree, add_geom=False) - except Exception as inst: - fid.close() - raise Exception('Could not read the source spaces (%s)' % inst) + + inv['src'] = read_source_spaces_from_tree(fid, tree, add_geom=False) for s in inv['src']: s['id'] = find_source_space_hemi(s) @@ -207,6 +209,7 @@ def read_inverse_operator(fname): 'not found') inv['mri_head_t'] = mri_head_t + # # Transform the source spaces to the correct coordinate frame # if necessary @@ -254,6 +257,97 @@ def read_inverse_operator(fname): return inv + +def write_inverse_operator(fname, inv): + """Write an inverse operator from a FIF file + + Parameters + ---------- + fname: string + The name of the FIF file. + + inv: dict + The inverse operator + """ + # + # Open the file, create directory + # + print 'Write inverse operator decomposition in %s...' % fname + + # Create the file and save the essentials + fid = start_file(fname) + + start_block(fid, FIFF.FIFFB_MNE_INVERSE_SOLUTION) + + print ' Writing inverse operator info...', + + write_int(fid, FIFF.FIFF_MNE_INCLUDED_METHODS, inv['methods']) + write_int(fid, FIFF.FIFF_MNE_SOURCE_ORIENTATION, inv['source_ori']) + write_int(fid, FIFF.FIFF_MNE_SOURCE_SPACE_NPOINTS, inv['nsource']) + write_int(fid, FIFF.FIFF_MNE_COORD_FRAME, inv['coord_frame']) + write_float_matrix(fid, FIFF.FIFF_MNE_INVERSE_SOURCE_ORIENTATIONS, + inv['source_nn']) + write_float(fid, FIFF.FIFF_MNE_INVERSE_SING, inv['sing']) + + # + # The eigenleads and eigenfields + # + if inv['eigen_leads_weighted']: + write_named_matrix(fid, FIFF.FIFF_MNE_INVERSE_LEADS_WEIGHTED, + _transpose_named_matrix(inv['eigen_leads'])) + else: + write_named_matrix(fid, FIFF.FIFF_MNE_INVERSE_LEADS, + _transpose_named_matrix(inv['eigen_leads'])) + + write_named_matrix(fid, FIFF.FIFF_MNE_INVERSE_FIELDS, inv['eigen_fields']) + print '[done]' + # + # write the covariance matrices + # + print ' Writing noise covariance matrix.' + write_cov(fid, inv['noise_cov']) + + print ' Writing source covariance matrix.' + write_cov(fid, inv['source_cov']) + # + # write the various priors + # + print ' Writing orientation priors.' + if inv['orient_prior'] is not None: + write_cov(fid, inv['orient_prior']) + write_cov(fid, inv['depth_prior']) + + if inv['fmri_prior'] is not None: + write_cov(fid, inv['fmri_prior']) + + # + # Parent MRI data + # + start_block(fid, FIFF.FIFFB_MNE_PARENT_MRI_FILE) + # write the MRI <-> head coordinate transformation + write_coord_trans(fid, inv['mri_head_t']) + end_block(fid, FIFF.FIFFB_MNE_PARENT_MRI_FILE) + + # + # Read the source spaces + # + if 'src' in inv: + write_source_spaces(fid, inv['src']) + + # + # We also need the SSP operator + # + write_proj(fid, inv['projs']) + # + # Done! + # + + end_block(fid, FIFF.FIFFB_MNE_INVERSE_SOLUTION) + end_file(fid) + + fid.close() + + ############################################################################### # Compute inverse solution @@ -915,7 +1009,8 @@ def make_inverse_operator(info, forward, noise_cov, loose=0.2, depth=0.8): if not is_fixed_ori: orient_prior = np.ones(n_dipoles, dtype=gain.dtype) if loose is not None: - print 'Applying loose dipole orientations. Loose value of %s.' % loose + print ('Applying loose dipole orientations. Loose value of %s.' + % loose) orient_prior[np.mod(np.arange(n_dipoles), 3) != 2] *= loose source_cov *= orient_prior orient_prior = dict(data=orient_prior) diff --git a/mne/minimum_norm/tests/test_inverse.py b/mne/minimum_norm/tests/test_inverse.py index 567a016..8b896df 100644 --- a/mne/minimum_norm/tests/test_inverse.py +++ b/mne/minimum_norm/tests/test_inverse.py @@ -1,8 +1,10 @@ import os.path as op import numpy as np from numpy.testing import assert_array_almost_equal, assert_equal +from scipy import sparse from nose.tools import assert_true import nose +import copy from ...datasets import sample from ...label import read_label, label_sign_flip @@ -12,7 +14,7 @@ from ...source_estimate import SourceEstimate from ... import fiff, Covariance, read_forward_solution from ..inverse import apply_inverse, read_inverse_operator, \ apply_inverse_raw, apply_inverse_epochs, \ - make_inverse_operator + make_inverse_operator, write_inverse_operator examples_folder = op.join(op.dirname(__file__), '..', '..', '..', 'examples') data_path = sample.data_path(examples_folder) @@ -39,6 +41,7 @@ fname_label = op.join(data_path, 'MEG', 'sample', 'labels', '%s.label' % label) inverse_operator = read_inverse_operator(fname_inv) inverse_operator_fixed = read_inverse_operator(fname_inv_fixed) +inverse_operator_vol = read_inverse_operator(fname_vol_inv) label = read_label(fname_label) noise_cov = Covariance(fname_cov) raw = fiff.Raw(fname_raw) @@ -47,7 +50,40 @@ lambda2 = 1.0 / snr ** 2 dSPM = True -def test_inverse_operator(): +def _compare(a, b): + if isinstance(a, dict): + assert_true(isinstance(b, dict)) + for k, v in a.iteritems(): + if not k in b: + raise ValueError('%s not in %s' % (k, b)) + _compare(v, b[k]) + elif isinstance(a, list): + assert_true(len(a) == len(b)) + for i, j in zip(a, b): + _compare(i, j) + elif isinstance(a, sparse.csr.csr_matrix): + assert_array_almost_equal(a.data, b.data) + assert_equal(a.indices, b.indices) + assert_equal(a.indptr, b.indptr) + elif isinstance(a, np.ndarray): + assert_array_almost_equal(a, b) + else: + assert_true(a == b) + + +def test_io_inverse_operator(): + """Test IO of inverse_operator + """ + for inv in [inverse_operator, inverse_operator_vol]: + inv_init = copy.deepcopy(inv) + write_inverse_operator('test-inv.fif', inv) + this_inv = read_inverse_operator('test-inv.fif') + + _compare(inv, inv_init) + _compare(inv, this_inv) + + +def test_apply_inverse_operator(): """Test MNE inverse computation With and without precomputed inverse operator. @@ -113,8 +149,8 @@ def test_make_inverse_operator_fixed(): def test_inverse_operator_volume(): """Test MNE inverse computation on volume source space""" evoked = fiff.Evoked(fname_data, setno=0, baseline=(None, 0)) - inverse_operator = read_inverse_operator(fname_vol_inv) - stc = apply_inverse(evoked, inverse_operator, lambda2, dSPM) + inverse_operator_vol = read_inverse_operator(fname_vol_inv) + stc = apply_inverse(evoked, inverse_operator_vol, lambda2, dSPM) stc.save('tmp-vl.stc') stc2 = SourceEstimate('tmp-vl.stc') assert_true(np.all(stc.data > 0)) diff --git a/mne/minimum_norm/tests/test_time_frequency.py b/mne/minimum_norm/tests/test_time_frequency.py index c6a1d9c..8c8c6f0 100644 --- a/mne/minimum_norm/tests/test_time_frequency.py +++ b/mne/minimum_norm/tests/test_time_frequency.py @@ -71,5 +71,5 @@ def test_tfr_with_inverse_operator(): frequencies, label, baseline=(-0.1, 0), baseline_mode='percent', n_cycles=2, n_jobs=1) assert_true(np.all(phase_lock > 0)) - assert_true(np.all(phase_lock < 1)) + assert_true(np.all(phase_lock <= 1)) assert_true(np.max(power) > 10) diff --git a/mne/source_space.py b/mne/source_space.py index 109f8ee..e225ecb 100644 --- a/mne/source_space.py +++ b/mne/source_space.py @@ -9,6 +9,10 @@ from .fiff.constants import FIFF from .fiff.tree import dir_tree_find from .fiff.tag import find_tag, read_tag from .fiff.open import fiff_open +from .fiff.write import start_block, end_block, write_int, \ + write_float_sparse_rcs, write_string, \ + write_float_matrix, write_int_matrix, \ + write_coord_trans def patch_info(nearest): @@ -183,7 +187,7 @@ def _read_one_source_space(fid, this): if tag is None: raise ValueError('Number of vertices not found') - res['np'] = tag.data + res['np'] = int(tag.data) tag = find_tag(fid, this, FIFF_BEM_SURF_NTRI) if tag is None: @@ -241,7 +245,7 @@ def _read_one_source_space(fid, this): res['inuse'] = np.zeros(res['nuse'], dtype=np.int) res['vertno'] = None else: - res['nuse'] = tag.data + res['nuse'] = int(tag.data) tag = find_tag(fid, this, FIFF.FIFF_MNE_SOURCE_SPACE_SELECTION) if tag is None: raise ValueError('Source selection information missing') @@ -339,3 +343,96 @@ def _get_vertno(src): for s in src: vertno.append(s['vertno']) return vertno + +############################################################################### +# Write routines + +def write_source_spaces(fid, src): + """Write the source spaces to a FIF file + + Parameters + ---------- + fid: file descriptor + An open file descriptor + + src: list + The list of source spaces + + """ + for s in src: + print ' Write a source space...', + start_block(fid, FIFF.FIFFB_MNE_SOURCE_SPACE) + _write_one_source_space(fid, s) + end_block(fid, FIFF.FIFFB_MNE_SOURCE_SPACE) + print '[done]' + print ' %d source spaces written' % len(src) + + +def _write_one_source_space(fid, this): + """Read one source space + """ + + write_int(fid, FIFF.FIFF_MNE_SOURCE_SPACE_ID, this['id']) + if this['type'] == 'surf': + write_int(fid, FIFF.FIFF_MNE_SOURCE_SPACE_TYPE, 1) + elif this['type'] == 'vol': + write_int(fid, FIFF.FIFF_MNE_SOURCE_SPACE_TYPE, 2) + else: + raise ValueError('Unknown source space type (%d)' % this['type']) + + if this['type'] == 'vol': + + write_int(fid, FIFF.FIFF_MNE_SOURCE_SPACE_VOXEL_DIMS, this['shape']) + write_coord_trans(fid, this['src_mri_t']) + + start_block(fid, FIFF.FIFFB_MNE_PARENT_MRI_FILE) + write_coord_trans(fid, this['vox_mri_t']) + + write_coord_trans(fid, this['mri_ras_t']) + + write_float_sparse_rcs(fid, FIFF.FIFF_MNE_SOURCE_SPACE_INTERPOLATOR, + this['interpolator']) + + if 'mri_file' in this and this['mri_file'] is not None: + write_string(fid, FIFF.FIFF_MNE_SOURCE_SPACE_MRI_FILE, + this['mri_file']) + + write_int(fid, FIFF.FIFF_MRI_WIDTH, this['mri_width']) + write_int(fid, FIFF.FIFF_MRI_HEIGHT, this['mri_height']) + write_int(fid, FIFF.FIFF_MRI_DEPTH, this['mri_depth']) + + end_block(fid, FIFF.FIFFB_MNE_PARENT_MRI_FILE) + + write_int(fid, FIFF.FIFF_MNE_SOURCE_SPACE_NPOINTS, this['np']) + write_int(fid, FIFF.FIFF_MNE_SOURCE_SPACE_NTRI, this['ntri']) + write_int(fid, FIFF.FIFF_MNE_COORD_FRAME, this['coord_frame']) + write_float_matrix(fid, FIFF.FIFF_MNE_SOURCE_SPACE_POINTS, this['rr']) + write_float_matrix(fid, FIFF.FIFF_MNE_SOURCE_SPACE_NORMALS, this['nn']) + + if this['ntri'] > 0: + write_int_matrix(fid, FIFF.FIFF_MNE_SOURCE_SPACE_TRIANGLES, this['tris'] + 1) + + # Which vertices are active + write_int(fid, FIFF.FIFF_MNE_SOURCE_SPACE_NUSE, this['nuse']) + write_int(fid, FIFF.FIFF_MNE_SOURCE_SPACE_SELECTION, this['inuse']) + + if this['type'] != 'vol': + # Use triangulation + write_int(fid, FIFF.FIFF_MNE_SOURCE_SPACE_NUSE_TRI, this['nuse_tri']) + write_int_matrix(fid, FIFF.FIFF_MNE_SOURCE_SPACE_USE_TRIANGLES, + this['use_tris'] + 1) + + # # Patch-related information + # tag1 = find_tag(fid, this, FIFF.FIFF_MNE_SOURCE_SPACE_NEAREST) + # tag2 = find_tag(fid, this, FIFF.FIFF_MNE_SOURCE_SPACE_NEAREST_DIST) + + # if tag1 is None or tag2 is None: + # res['nearest'] = None + # res['nearest_dist'] = None + # else: + # res['nearest'] = tag1.data + # res['nearest_dist'] = tag2.data.T + # + # res['pinfo'] = patch_info(res['nearest']) + # if res['pinfo'] is not None: + # print 'Patch information added...', diff --git a/mne/surface.py b/mne/surface.py index 9ea7b8a..b2c7c73 100644 --- a/mne/surface.py +++ b/mne/surface.py @@ -310,7 +310,6 @@ def write_bem_surface(fname, surf): write_int(fid, FIFF_BEM_SURF_NNODE, surf['np']) write_int(fid, FIFF_BEM_SURF_NTRI, surf['ntri']) write_int(fid, FIFF_BEM_COORD_FRAME, surf['coord_frame']) - # write_float_matrix(fid, FIFF_BEM_SURF_NODES, surf['rr']) write_float_matrix(fid, FIFF_BEM_SURF_NODES, surf['rr']) if 'nn' in surf and surf['nn'] is not None and len(surf['nn']) > 0: -- 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
