This is an automated email from the git hooks/post-receive script. yoh pushed a commit to annotated tag v0.1 in repository python-mne.
commit 3721652e772b3cb84f6b5325f9909e3fa3c2ddea Merge: b9017b3 fa1c2be Author: Alexandre Gramfort <[email protected]> Date: Mon Mar 7 11:10:13 2011 -0500 Merge branch 'tfr4' into cluster examples/plot_read_epochs.py | 29 ++- examples/time_frequency/plot_time_frequency.py | 17 +- mne/__init__.py | 2 +- mne/epochs.py | 238 ++++++++++++++++--------- mne/tests/test_epochs.py | 6 +- mne/tests/test_tfr.py | 11 +- mne/tfr.py | 10 +- 7 files changed, 188 insertions(+), 125 deletions(-) diff --cc mne/tfr.py index 65d42bd,7e32542..2ac0b55 --- a/mne/tfr.py +++ b/mne/tfr.py @@@ -189,32 -189,8 +189,32 @@@ def _time_frequency(X, Ws, use_fft) return psd, plf +def single_trial_power(epochs, Fs, frequencies, use_fft=True, n_cycles=25, + n_jobs=1): + """Compute time-frequency power on single epochs + """ + n_frequencies = len(frequencies) + n_epochs, n_channels, n_times = epochs.shape + + # Precompute wavelets for given frequency range to save time + Ws = morlet(Fs, frequencies, n_cycles=n_cycles) + + power = np.empty((n_epochs, n_channels, n_frequencies, n_times), + dtype=np.float) + + mode = 'same' + if use_fft: + _cwt = _cwt_fft + else: + _cwt = _cwt_convolve + + for k, e in enumerate(epochs): + mode = 'same' + power[k] = np.abs(_cwt(e, Ws, mode))**2 + + return power - def time_frequency(epochs, Fs, frequencies, use_fft=True, n_cycles=25, + def time_frequency(data, Fs, frequencies, use_fft=True, n_cycles=25, n_jobs=1): """Compute time induced power and inter-trial phase-locking factor -- 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
