mne.time_frequency.
AverageTFR
(info, data, times, freqs, nave, comment=None, method=None, verbose=None)[source]¶Container for Time-Frequency data.
Can for example store induced power at sensor level or inter-trial coherence.
Parameters: |
|
---|---|
Attributes: |
|
Methods
__add__ (tfr) |
Add instances. |
__contains__ (ch_type) |
Check channel type membership. |
__hash__ () |
Hash the object. |
__sub__ (tfr) |
Subtract instances. |
add_channels (add_list[, force_update_info]) |
Append new channels to the instance. |
apply_baseline (baseline[, mode, verbose]) |
Baseline correct the data. |
copy () |
Return a copy of the instance. |
crop ([tmin, tmax]) |
Crop data to a given time interval in place. |
drop_channels (ch_names) |
Drop some channels. |
pick (picks[, exclude]) |
Pick a subset of channels. |
pick_channels (ch_names) |
Pick some channels. |
pick_types ([meg, eeg, stim, eog, ecg, emg, …]) |
Pick some channels by type and names. |
plot ([picks, baseline, mode, tmin, tmax, …]) |
Plot TFRs as a two-dimensional image(s). |
plot_joint ([timefreqs, picks, baseline, …]) |
Plot TFRs as a two-dimensional image with topomaps. |
plot_topo ([picks, baseline, mode, tmin, …]) |
Plot TFRs in a topography with images. |
plot_topomap ([tmin, tmax, fmin, fmax, …]) |
Plot topographic maps of time-frequency intervals of TFR data. |
reorder_channels (ch_names) |
Reorder channels. |
save (fname[, overwrite]) |
Save TFR object to hdf5 file. |
__contains__
(ch_type)[source]¶Check channel type membership.
Parameters: |
|
---|---|
Returns: |
|
Examples
Channel type membership can be tested as:
>>> 'meg' in inst
True
>>> 'seeg' in inst
False
add_channels
(add_list, force_update_info=False)[source]¶Append new channels to the instance.
Parameters: |
|
---|---|
Returns: |
|
See also
Notes
If self
is a Raw instance that has been preloaded into a
numpy.memmap
instance, the memmap will be resized.
apply_baseline
(baseline, mode='mean', verbose=None)[source]¶Baseline correct the data.
Parameters: |
|
---|---|
Returns: |
|
ch_names
¶Channel names.
compensation_grade
¶The current gradient compensation grade.
crop
(tmin=None, tmax=None)[source]¶Crop data to a given time interval in place.
Parameters: |
|
---|---|
Returns: |
|
drop_channels
(ch_names)[source]¶Drop some channels.
Parameters: |
|
---|---|
Returns: |
|
See also
Notes
New in version 0.9.0.
pick
(picks, exclude=())[source]¶Pick a subset of channels.
Parameters: |
|
---|---|
Returns: |
|
pick_channels
(ch_names)[source]¶Pick some channels.
Parameters: |
|
---|---|
Returns: |
|
See also
Notes
The channel names given are assumed to be a set, i.e. the order
does not matter. The original order of the channels is preserved.
You can use reorder_channels
to set channel order if necessary.
New in version 0.9.0.
pick_types
(meg=True, eeg=False, stim=False, eog=False, ecg=False, emg=False, ref_meg='auto', misc=False, resp=False, chpi=False, exci=False, ias=False, syst=False, seeg=False, dipole=False, gof=False, bio=False, ecog=False, fnirs=False, include=(), exclude='bads', selection=None, verbose=None)[source]¶Pick some channels by type and names.
Parameters: |
|
---|---|
Returns: |
|
See also
Notes
New in version 0.9.0.
plot
(picks=None, baseline=None, mode='mean', tmin=None, tmax=None, fmin=None, fmax=None, vmin=None, vmax=None, cmap='RdBu_r', dB=False, colorbar=True, show=True, title=None, axes=None, layout=None, yscale='auto', mask=None, mask_style=None, mask_cmap='Greys', mask_alpha=0.1, combine=None, exclude=[], verbose=None)[source]¶Plot TFRs as a two-dimensional image(s).
Parameters: |
|
---|---|
Returns: |
|
plot_joint
(timefreqs=None, picks=None, baseline=None, mode='mean', tmin=None, tmax=None, fmin=None, fmax=None, vmin=None, vmax=None, cmap='RdBu_r', dB=False, colorbar=True, show=True, title=None, layout=None, yscale='auto', combine='mean', exclude=[], topomap_args=None, image_args=None, verbose=None)[source]¶Plot TFRs as a two-dimensional image with topomaps.
Parameters: |
|
---|---|
Returns: |
|
Notes
timefreqs has three different modes: tuples, dicts, and auto. For (list of) tuple(s) mode, each tuple defines a pair (time, frequency) in s and Hz on the TFR plot. For example, to look at 10 Hz activity 1 second into the epoch and 3 Hz activity 300 msec into the epoch,:
timefreqs=((1, 10), (.3, 3))
If provided as a dictionary, (time, frequency) tuples are keys and (time_window, frequency_window) tuples are the values - indicating the width of the windows (centered on the time and frequency indicated by the key) to be averaged over. For example,:
timefreqs={(1, 10): (0.1, 2)}
would translate into a window that spans 0.95 to 1.05 seconds, as well as 9 to 11 Hz. If None, a single topomap will be plotted at the absolute peak across the time-frequency representation.
New in version 0.16.0.
plot_topo
(picks=None, baseline=None, mode='mean', tmin=None, tmax=None, fmin=None, fmax=None, vmin=None, vmax=None, layout=None, cmap='RdBu_r', title=None, dB=False, colorbar=True, layout_scale=0.945, show=True, border='none', fig_facecolor='k', fig_background=None, font_color='w', yscale='auto')[source]¶Plot TFRs in a topography with images.
Parameters: |
|
---|---|
Returns: |
|
plot_topomap
(tmin=None, tmax=None, fmin=None, fmax=None, ch_type=None, baseline=None, mode='mean', layout=None, vmin=None, vmax=None, cmap=None, sensors=True, colorbar=True, unit=None, res=64, size=2, cbar_fmt='%1.1e', show_names=False, title=None, axes=None, show=True, outlines='head', head_pos=None, contours=6)[source]¶Plot topographic maps of time-frequency intervals of TFR data.
Parameters: |
|
---|---|
Returns: |
|