[med-svn] [python-mne] 171/353: typos and cosmetics

Yaroslav Halchenko debian at onerussian.com
Fri Nov 27 17:24:52 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 8f7ca567597c6bdb002bce4e0f84821221a0be6f
Author: Martin Luessi <mluessi at nmr.mgh.harvard.edu>
Date:   Thu May 3 16:49:35 2012 -0400

    typos and cosmetics
---
 bin/mne_compute_proj_ecg.py |  8 ++++----
 bin/mne_compute_proj_eog.py |  8 ++++----
 mne/preprocessing/ssp.py    | 20 +++++++++++---------
 3 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/bin/mne_compute_proj_ecg.py b/bin/mne_compute_proj_ecg.py
index 945ea5c..a32292b 100755
--- a/bin/mne_compute_proj_ecg.py
+++ b/bin/mne_compute_proj_ecg.py
@@ -43,7 +43,7 @@ if __name__ == '__main__':
                     help="Filter high cut-off frequency in Hz",
                     default=35)
     parser.add_option("-p", "--preload", dest="preload",
-                    help="Temporary file used during computaion (to save memory)",
+                    help="Temporary file used during computation (to save memory)",
                     default=True)
     parser.add_option("-a", "--average", dest="average", action="store_true",
                     help="Compute SSP after averaging",
@@ -72,7 +72,7 @@ if __name__ == '__main__':
     parser.add_option("--avg-ref", dest="avg_ref", action="store_true",
                     help="Add EEG average reference proj",
                     default=False)
-    parser.add_option("--exclproj", dest="excl_proj", action="store_true",
+    parser.add_option("--no-proj", dest="no_proj", action="store_true",
                     help="Exclude the SSP projectors currently in the fiff file",
                     default=False)
     parser.add_option("--bad", dest="bad_fname",
@@ -106,7 +106,7 @@ if __name__ == '__main__':
                   eeg=1e-6 * float(options.rej_eeg),
                   eog=1e-6 * float(options.rej_eog))
     avg_ref = options.avg_ref
-    excl_proj = options.excl_proj
+    no_proj = options.no_proj
     bad_fname = options.bad_fname
     event_id = options.event_id
 
@@ -133,7 +133,7 @@ if __name__ == '__main__':
     projs, events = mne.preprocessing.compute_proj_ecg(raw, tmin, tmax,
                             n_grad, n_mag, n_eeg, l_freq, h_freq, average,
                             filter_length, n_jobs, ch_name, reject,
-                            bads, avg_ref, excl_proj, event_id)
+                            bads, avg_ref, no_proj, event_id)
 
     raw.close()
 
diff --git a/bin/mne_compute_proj_eog.py b/bin/mne_compute_proj_eog.py
index 1fe27c4..cf6d66f 100755
--- a/bin/mne_compute_proj_eog.py
+++ b/bin/mne_compute_proj_eog.py
@@ -43,7 +43,7 @@ if __name__ == '__main__':
                     help="Filter high cut-off frequency in Hz",
                     default=35)
     parser.add_option("-p", "--preload", dest="preload",
-                    help="Temporary file used during computaion (to save memory)",
+                    help="Temporary file used during computation (to save memory)",
                     default=True)
     parser.add_option("-a", "--average", dest="average", action="store_true",
                     help="Compute SSP after averaging",
@@ -69,7 +69,7 @@ if __name__ == '__main__':
     parser.add_option("--avg-ref", dest="avg_ref", action="store_true",
                     help="Add EEG average reference proj",
                     default=False)
-    parser.add_option("--exclproj", dest="excl_proj", action="store_true",
+    parser.add_option("--no-proj", dest="no_proj", action="store_true",
                     help="Exclude the SSP projectors currently in the fiff file",
                     default=False)
     parser.add_option("--bad", dest="bad_fname",
@@ -102,7 +102,7 @@ if __name__ == '__main__':
                   eeg=1e-6 * float(options.rej_eeg),
                   eog=1e-6 * float(options.rej_eog))
     avg_ref = options.avg_ref
-    excl_proj = options.excl_proj
+    no_proj = options.no_proj
     bad_fname = options.bad_fname
     event_id = options.event_id
 
@@ -129,7 +129,7 @@ if __name__ == '__main__':
     projs, events = mne.preprocessing.compute_proj_eog(raw, tmin, tmax,
                             n_grad, n_mag, n_eeg, l_freq, h_freq, average,
                             filter_length, n_jobs, reject, bads,
-                            avg_ref, excl_proj, event_id)
+                            avg_ref, no_proj, event_id)
 
     raw.close()
 
diff --git a/mne/preprocessing/ssp.py b/mne/preprocessing/ssp.py
index 1d77f9b..bd3a476 100644
--- a/mne/preprocessing/ssp.py
+++ b/mne/preprocessing/ssp.py
@@ -6,6 +6,8 @@
 
 import os
 
+import numpy as np
+
 from .. import Epochs, compute_proj_evoked, compute_proj_epochs
 from ..fiff import Raw, pick_types, make_eeg_average_ref_proj
 from ..artifacts import find_ecg_events, find_eog_events
@@ -14,7 +16,7 @@ from ..artifacts import find_ecg_events, find_eog_events
 def _compute_exg_proj(mode, raw, tmin, tmax,
                       n_grad, n_mag, n_eeg, l_freq, h_freq,
                       average, filter_length, n_jobs, ch_name,
-                      reject, bads, avg_ref, excl_proj, event_id):
+                      reject, bads, avg_ref, no_proj, event_id):
     """Compute SSP/PCA projections for ECG or EOG artifacts
 
     Note: raw has to be constructed with preload=True (or string)
@@ -70,7 +72,7 @@ def _compute_exg_proj(mode, raw, tmin, tmax,
     avg_ref: bool
         Add EEG average reference proj
 
-    excl_proj: bool
+    no_proj: bool
         Exclude the SSP projectors currently in the fiff file
 
     event_id: int
@@ -87,7 +89,7 @@ def _compute_exg_proj(mode, raw, tmin, tmax,
     if not raw._preloaded:
         raise ValueError('raw needs to be preloaded, use preload=True in constructor')
 
-    if excl_proj:
+    if no_proj:
         projs = []
     else:
         projs = raw.info['projs']
@@ -149,7 +151,7 @@ def compute_proj_ecg(raw, tmin=-0.2, tmax=0.4,
                      n_grad=2, n_mag=2, n_eeg=2, l_freq=1.0, h_freq=35.0,
                      average=False, filter_length=2048, n_jobs=1, ch_name=None,
                      reject=dict(grad=2000e-13, mag=3000e-15, eeg=50e-6,
-                     eog=250e-6), bads=[], avg_ref=False, excl_proj=True,
+                     eog=250e-6), bads=[], avg_ref=False, no_proj=True,
                      event_id=999):
     """Compute SSP/PCA projections for ECG artifacts
 
@@ -203,7 +205,7 @@ def compute_proj_ecg(raw, tmin=-0.2, tmax=0.4,
     avg_ref: bool
         Add EEG average reference proj
 
-    excl_proj: bool
+    no_proj: bool
         Exclude the SSP projectors currently in the fiff file
 
     event_id: int
@@ -221,7 +223,7 @@ def compute_proj_ecg(raw, tmin=-0.2, tmax=0.4,
     projs, ecg_events = _compute_exg_proj('ECG', raw, tmin, tmax,
                         n_grad, n_mag, n_eeg, l_freq, h_freq,
                         average, filter_length, n_jobs, ch_name,
-                        reject, bads, avg_ref, excl_proj, event_id)
+                        reject, bads, avg_ref, no_proj, event_id)
 
     return projs, ecg_events
 
@@ -230,7 +232,7 @@ def compute_proj_eog(raw, tmin=-0.15, tmax=0.15,
                      n_grad=2, n_mag=2, n_eeg=2, l_freq=1.0, h_freq=35.0,
                      average=False, filter_length=2048, n_jobs=1,
                      reject=dict(grad=2000e-13, mag=3000e-15, eeg=500e-6,
-                     eog=1e9), bads=[], avg_ref=False, excl_proj=True,
+                     eog=np.inf), bads=[], avg_ref=False, no_proj=True,
                      event_id=998):
     """Compute SSP/PCA projections for EOG artifacts
 
@@ -284,7 +286,7 @@ def compute_proj_eog(raw, tmin=-0.15, tmax=0.15,
     avg_ref: bool
         Add EEG average reference proj
 
-    excl_proj: bool
+    no_proj: bool
         Exclude the SSP projectors currently in the fiff file
 
     event_id: int
@@ -302,6 +304,6 @@ def compute_proj_eog(raw, tmin=-0.15, tmax=0.15,
     projs, eog_events = _compute_exg_proj('EOG', raw, tmin, tmax,
                         n_grad, n_mag, n_eeg, l_freq, h_freq,
                         average, filter_length, n_jobs, None,
-                        reject, bads, avg_ref, excl_proj, event_id)
+                        reject, bads, avg_ref, no_proj, event_id)
 
     return projs, eog_events

-- 
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