[med-svn] [python-mne] 126/353: DOC : improve reference + some doc fixes
Yaroslav Halchenko
debian at onerussian.com
Fri Nov 27 17:24:42 UTC 2015
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 4002002ef2b1eb3a1d731337fab3ccaabd277494
Author: Alexandre Gramfort <alexandre.gramfort at inria.fr>
Date: Wed Mar 21 18:53:11 2012 +0100
DOC : improve reference + some doc fixes
---
.../_images/plot_read_and_write_raw_data.png | Bin 0 -> 61418 bytes
doc/source/_images/plot_read_epochs.png | Bin 0 -> 186065 bytes
doc/source/_images/plot_time_frequency.png | Bin 0 -> 151383 bytes
doc/source/mne-python.rst | 2 +-
doc/source/python_reference.rst | 38 ++++++++++++---------
mne/__init__.py | 11 +++---
mne/fiff/__init__.py | 2 ++
mne/fiff/pick.py | 4 +--
mne/minimum_norm/__init__.py | 2 ++
mne/source_estimate.py | 9 +++++
mne/stats/__init__.py | 2 ++
mne/viz.py | 6 +++-
12 files changed, 51 insertions(+), 25 deletions(-)
diff --git a/doc/source/_images/plot_read_and_write_raw_data.png b/doc/source/_images/plot_read_and_write_raw_data.png
new file mode 100644
index 0000000..4b63526
Binary files /dev/null and b/doc/source/_images/plot_read_and_write_raw_data.png differ
diff --git a/doc/source/_images/plot_read_epochs.png b/doc/source/_images/plot_read_epochs.png
new file mode 100644
index 0000000..6484722
Binary files /dev/null and b/doc/source/_images/plot_read_epochs.png differ
diff --git a/doc/source/_images/plot_time_frequency.png b/doc/source/_images/plot_time_frequency.png
new file mode 100644
index 0000000..da7456b
Binary files /dev/null and b/doc/source/_images/plot_time_frequency.png differ
diff --git a/doc/source/mne-python.rst b/doc/source/mne-python.rst
index 5199eca..c9c386c 100644
--- a/doc/source/mne-python.rst
+++ b/doc/source/mne-python.rst
@@ -8,9 +8,9 @@ MNE with Python
:maxdepth: 1
getting_started.rst
+ auto_examples/index.rst
python_tutorial.rst
python_reference.rst
- auto_examples/index.rst
whats_new.rst
gitwash/index.rst
diff --git a/doc/source/python_reference.rst b/doc/source/python_reference.rst
index 8b73446..2807742 100644
--- a/doc/source/python_reference.rst
+++ b/doc/source/python_reference.rst
@@ -4,7 +4,7 @@ Reference
This is the classes and functions reference of mne-python.
-.. _mne_ref:
+.. currentmodule:: mne.fiff
.. automodule:: mne
:no-members:
@@ -13,17 +13,15 @@ This is the classes and functions reference of mne-python.
Classes reference
=================
-.. currentmodule:: mne
-
.. autosummary::
:toctree: generated/
:template: class.rst
- fiff.Raw
- fiff.Evoked
- Epochs
- Covariance
- SourceEstimate
+ mne.fiff.Raw
+ mne.fiff.Evoked
+ mne.Epochs
+ mne.Covariance
+ mne.SourceEstimate
Functions reference
===================
@@ -34,23 +32,17 @@ Functions reference
read_cov
write_cov
-
label_time_courses
read_label
label_sign_flip
write_label
stc_to_label
-
read_bem_surfaces
read_surface
write_bem_surface
-
read_source_spaces
-
save_stc_as_volume
-
morph_data
-
read_stc
write_stc
read_w
@@ -59,8 +51,8 @@ Functions reference
.. currentmodule:: mne.fiff
.. autosummary::
- :toctree: generated/
- :template: function.rst
+ :toctree: generated/
+ :template: function.rst
pick_types
pick_channels
@@ -78,8 +70,20 @@ Functions reference
read_inverse_operator
apply_inverse
apply_inverse_raw
- make_inverse_operator
apply_inverse_epochs
+ make_inverse_operator
write_inverse_operator
source_band_induced_power
source_induced_power
+
+.. currentmodule:: mne.stats
+
+.. autosummary::
+ :toctree: generated/
+ :template: function.rst
+
+ permutation_t_test
+ permutation_cluster_test
+ permutation_cluster_1samp_test
+ fdr_correction
+ bonferroni_correction
diff --git a/mne/__init__.py b/mne/__init__.py
index 8044dcc..652aa62 100644
--- a/mne/__init__.py
+++ b/mne/__init__.py
@@ -1,3 +1,6 @@
+"""MNE for MEG and EEG data analysis
+"""
+
__version__ = '0.2.git'
from .cov import read_cov, write_cov, Covariance, \
@@ -18,7 +21,7 @@ from .label import label_time_courses, read_label, label_sign_flip, \
from .misc import parse_config, read_reject_parameters
from .transforms import transform_coordinates
from .proj import read_proj
-import fiff
-import artifacts
-import stats
-import viz
+from . import fiff
+from . import artifacts
+from . import stats
+from . import viz
diff --git a/mne/fiff/__init__.py b/mne/fiff/__init__.py
index da57656..fda05f2 100644
--- a/mne/fiff/__init__.py
+++ b/mne/fiff/__init__.py
@@ -1,3 +1,5 @@
+"""FIF module for IO with .fif files"""
+
# Authors: Alexandre Gramfort <gramfort at nmr.mgh.harvard.edu>
# Matti Hamalainen <msh at nmr.mgh.harvard.edu>
#
diff --git a/mne/fiff/pick.py b/mne/fiff/pick.py
index d911ca3..9912c79 100644
--- a/mne/fiff/pick.py
+++ b/mne/fiff/pick.py
@@ -98,8 +98,8 @@ def pick_channels_regexp(ch_names, regexp):
sel : array of int
Indices of good channels.
- Example
- -------
+ Examples
+ --------
>>> pick_channels_regexp(['MEG 2331', 'MEG 2332', 'MEG 2333'], 'MEG ...1')
[0]
>>> pick_channels_regexp(['MEG 2331', 'MEG 2332', 'MEG 2333'], 'MEG *')
diff --git a/mne/minimum_norm/__init__.py b/mne/minimum_norm/__init__.py
index 5fbf009..06a815a 100644
--- a/mne/minimum_norm/__init__.py
+++ b/mne/minimum_norm/__init__.py
@@ -1,3 +1,5 @@
+"""Linear inverse solvers based on L2 Minimum Norm Estimates (MNE)"""
+
from .inverse import read_inverse_operator, apply_inverse, \
apply_inverse_raw, make_inverse_operator, \
apply_inverse_epochs, write_inverse_operator
diff --git a/mne/source_estimate.py b/mne/source_estimate.py
index 38c3162..865fb67 100644
--- a/mne/source_estimate.py
+++ b/mne/source_estimate.py
@@ -328,6 +328,15 @@ class SourceEstimate(object):
return "SourceEstimate (%s)" % s
def crop(self, tmin=None, tmax=None):
+ """Restrict SourceEstimate to a time interval
+
+ Parameters
+ ----------
+ tmin : float or None
+ The first time point in seconds. It None the first present is used.
+ tmax : float or None
+ The last time point in seconds. It None the last present is used.
+ """
mask = np.ones(len(self.times), dtype=np.bool)
if tmin is not None:
mask = mask & (self.times >= tmin)
diff --git a/mne/stats/__init__.py b/mne/stats/__init__.py
index 4211030..38aa10f 100644
--- a/mne/stats/__init__.py
+++ b/mne/stats/__init__.py
@@ -1,3 +1,5 @@
+"""Functions for statistical analysis"""
+
from .permutations import permutation_t_test
from .cluster_level import permutation_cluster_test, \
permutation_cluster_1samp_test
diff --git a/mne/viz.py b/mne/viz.py
index a750f78..260302a 100644
--- a/mne/viz.py
+++ b/mne/viz.py
@@ -7,7 +7,8 @@
import copy
import numpy as np
-import pylab as pl
+
+# XXX : don't import pylab here or you will break the doc
from .fiff.pick import channel_type, pick_types
from .fiff.proj import make_projector
@@ -20,6 +21,7 @@ def plot_topo(evoked, layout):
times = evoked.times
data = evoked.data
+ import pylab as pl
pl.rcParams['axes.edgecolor'] = 'w'
pl.figure(facecolor='k')
for name in layout.names:
@@ -47,6 +49,7 @@ def plot_evoked(evoked, picks=None, unit=True, show=True):
show : bool
Call pylab.show() as the end or not.
"""
+ import pylab as pl
pl.clf()
if picks is None:
picks = range(evoked.info['nchan'])
@@ -131,6 +134,7 @@ def plot_cov(cov, info, exclude=None, colorbar=True, proj=False, show=True):
else:
print ' The projection vectors do not apply to these channels.'
+ import pylab as pl
pl.figure(figsize=(2.5 * len(idx_names), 2.7))
for k, (idx, name) in enumerate(idx_names):
pl.subplot(1, len(idx_names), k + 1)
--
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