mne.io.
Raw
(fname, allow_maxshield=False, preload=False, add_eeg_ref=False, verbose=None)[source]¶Raw data in FIF format.
Parameters: | fname : str
allow_maxshield : bool | str (default False)
preload : bool or str (default False)
add_eeg_ref : bool
verbose : bool, str, int, or None
|
---|
Attributes
ch_names |
Channel names. |
n_times |
Number of time points. |
info | (dict) Measurement info . |
preload | (bool) Indicates whether raw data are in memory. |
verbose | (bool, str, int, or None) See above. |
Methods
__contains__ (ch_type) |
Check channel type membership. |
__getitem__ (item) |
Get raw data and times. |
__hash__ () |
Hash the object. |
__len__ () |
Return the number of time points. |
add_channels (add_list[, force_update_info]) |
Append new channels to the instance. |
add_events (events[, stim_channel]) |
Add events to stim channel. |
add_proj (projs[, remove_existing, verbose]) |
Add SSP projection vectors. |
anonymize () |
Anonymize measurement information in place. |
append (raws[, preload]) |
Concatenate raw instances as if they were continuous. |
apply_function (fun[, picks, dtype, n_jobs]) |
Apply a function to a subset of channels. |
apply_gradient_compensation (grade[, verbose]) |
Apply CTF gradient compensation. |
apply_hilbert ([picks, envelope, n_jobs, …]) |
Compute analytic signal or envelope for a subset of channels. |
apply_proj () |
Apply the signal space projection (SSP) operators to the data. |
close () |
Clean up the object. |
copy () |
Return copy of Raw instance. |
crop ([tmin, tmax]) |
Crop raw data file. |
del_proj ([idx]) |
Remove SSP projection vector. |
drop_channels (ch_names) |
Drop some channels. |
estimate_rank ([tstart, tstop, tol, …]) |
Estimate rank of the raw data. |
filter (l_freq, h_freq[, picks, …]) |
Filter a subset of channels. |
fix_mag_coil_types () |
Fix Elekta magnetometer coil types. |
get_data ([picks, start, stop, …]) |
Get data in the given range. |
interpolate_bads ([reset_bads, mode]) |
Interpolate bad MEG and EEG channels. |
load_bad_channels ([bad_file, force]) |
Mark channels as bad from a text file. |
load_data ([verbose]) |
Load raw data. |
notch_filter (freqs[, picks, filter_length, …]) |
Notch filter 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 ([events, duration, start, n_channels, …]) |
Plot raw data. |
plot_projs_topomap ([ch_type, layout, axes]) |
Plot SSP vector. |
plot_psd ([tmin, tmax, fmin, fmax, proj, …]) |
Plot the power spectral density across channels. |
plot_psd_topo ([tmin, tmax, fmin, fmax, …]) |
Plot channel-wise frequency spectra as topography. |
plot_sensors ([kind, ch_type, title, …]) |
Plot sensor positions. |
rename_channels (mapping) |
Rename channels. |
resample (sfreq[, npad, window, stim_picks, …]) |
Resample all channels. |
save (fname[, picks, tmin, tmax, …]) |
Save raw data to file. |
set_channel_types (mapping) |
Define the sensor type of channels. |
set_eeg_reference ([ref_channels, verbose]) |
Specify which reference to use for EEG data. |
set_montage (montage[, verbose]) |
Set EEG sensor configuration and head digitization. |
time_as_index (times[, use_rounding]) |
Convert time to indices. |
to_data_frame ([picks, index, scale_time, …]) |
Export data in tabular structure as a pandas DataFrame. |
__contains__
(ch_type)[source]¶Check channel type membership.
Parameters: | ch_type : str
|
---|---|
Returns: | in : bool
|
Examples
Channel type membership can be tested as:
>>> 'meg' in inst
True
>>> 'seeg' in inst
False
__getitem__
(item)[source]¶Get raw data and times.
Parameters: | item : tuple or array-like
|
---|---|
Returns: | data : ndarray, shape (n_channels, n_times)
times : ndarray, shape (n_times,)
|
Examples
Generally raw data is accessed as:
>>> data, times = raw[picks, time_slice]
To get all data, you can thus do either of:
>>> data, times = raw[:]
Which will be equivalent to:
>>> data, times = raw[:, :]
To get only the good MEG data from 10-20 seconds, you could do:
>>> picks = mne.pick_types(raw.info, meg=True, exclude='bads')
>>> t_idx = raw.time_as_index([10., 20.])
>>> data, times = raw[picks, t_idx[0]:t_idx[1]]
__len__
()[source]¶Return the number of time points.
Returns: | len : int
|
---|
Examples
This can be used as:
>>> len(raw)
1000
acqparser
¶The AcqParserFIF for the measurement info.
See also
add_channels
(add_list, force_update_info=False)[source]¶Append new channels to the instance.
Parameters: | add_list : list
force_update_info : bool
|
---|---|
Returns: | inst : instance of Raw, Epochs, or Evoked
|
add_events
(events, stim_channel=None)[source]¶Add events to stim channel.
Parameters: | events : ndarray, shape (n_events, 3)
stim_channel : str | None
|
---|
Notes
Data must be preloaded in order to add events.
add_proj
(projs, remove_existing=False, verbose=None)[source]¶Add SSP projection vectors.
Parameters: | projs : list
remove_existing : bool
verbose : bool, str, int, or None
|
---|---|
Returns: | self : instance of Raw | Epochs | Evoked
|
annotations
¶Annotations for marking segments of data.
anonymize
()[source]¶Anonymize measurement information in place.
Reset ‘subject_info’, ‘meas_date’, ‘file_id’, and ‘meas_id’ keys if they
exist in info
.
Returns: | info : instance of Info
|
---|
Notes
Operates in place.
New in version 0.13.0.
append
(raws, preload=None)[source]¶Concatenate raw instances as if they were continuous.
Note
Boundaries of the raw files are annotated bad. If you wish to
use the data as continuous recording, you can remove the
boundary annotations after concatenation (see
mne.Annotations.delete()
).
Parameters: | raws : list, or Raw instance
preload : bool, str, or None (default None)
|
---|
apply_function
(fun, picks=None, dtype=None, n_jobs=1, *args, **kwargs)[source]¶Apply a function to a subset of channels.
The function “fun” is applied to the channels defined in “picks”. The data of the Raw object is modified inplace. If the function returns a different data type (e.g. numpy.complex) it must be specified using the dtype parameter, which causes the data type used for representing the raw data to change.
The Raw object has to have the data loaded e.g. with preload=True
or self.load_data()
.
Note
If n_jobs > 1, more memory is required as
len(picks) * n_times
additional time points need to
be temporaily stored in memory.
Note
If the data type changes (dtype != None), more memory is required since the original and the converted data needs to be stored in memory.
Parameters: | fun : function
picks : array-like of int (default: None)
dtype : numpy.dtype (default: None)
n_jobs: int (default: 1)
*args :
**kwargs :
|
---|---|
Returns: | self : instance of Raw
|
apply_gradient_compensation
(grade, verbose=None)[source]¶Apply CTF gradient compensation.
Warning
The compensation matrices are stored with single precision, so repeatedly switching between different of compensation (e.g., 0->1->3->2) can increase numerical noise, especially if data are saved to disk in between changing grades. It is thus best to only use a single gradient compensation level in final analyses.
Parameters: | grade : int
verbose : bool, str, int, or None
|
---|---|
Returns: | raw : instance of Raw
|
apply_hilbert
(picks=None, envelope=False, n_jobs=1, n_fft=’auto’, verbose=None)[source]¶Compute analytic signal or envelope for a subset of channels.
If envelope=False, the analytic signal for the channels defined in “picks” is computed and the data of the Raw object is converted to a complex representation (the analytic signal is complex valued).
If envelope=True, the absolute value of the analytic signal for the channels defined in “picks” is computed, resulting in the envelope signal.
Note
If envelope=False, more memory is required since the original raw data as well as the analytic signal have temporarily to be stored in memory.
Note
If n_jobs > 1, more memory is required as
len(picks) * n_times
additional time points need to
be temporaily stored in memory.
Parameters: | picks : array-like of int (default: None)
envelope : bool (default: False)
n_jobs: int
n_fft : int | None | str
verbose : bool, str, int, or None
|
---|---|
Returns: | self : instance of Raw
|
Notes
The analytic signal “x_a(t)” of “x(t)” is:
x_a = F^{-1}(F(x) 2U) = x + i y
where “F” is the Fourier transform, “U” the unit step function, and “y” the Hilbert transform of “x”. One usage of the analytic signal is the computation of the envelope signal, which is given by “e(t) = abs(x_a(t))”. Due to the linearity of Hilbert transform and the MNE inverse solution, the enevlope in source space can be obtained by computing the analytic signal in sensor space, applying the MNE inverse, and computing the envelope in source space.
Also note that the n_fft parameter will allow you to pad the signal with zeros before performing the Hilbert transform. This padding is cut off, but it may result in a slightly different result (particularly around the edges). Use at your own risk.
apply_proj
()[source]¶Apply the signal space projection (SSP) operators to the data.
Returns: | self : instance of Raw | Epochs | Evoked
|
---|
Notes
Once the projectors have been applied, they can no longer be removed. It is usually not recommended to apply the projectors at too early stages, as they are applied automatically later on (e.g. when computing inverse solutions). Hint: using the copy method individual projection vectors can be tested without affecting the original data. With evoked data, consider the following example:
projs_a = mne.read_proj('proj_a.fif')
projs_b = mne.read_proj('proj_b.fif')
# add the first, copy, apply and see ...
evoked.add_proj(a).copy().apply_proj().plot()
# add the second, copy, apply and see ...
evoked.add_proj(b).copy().apply_proj().plot()
# drop the first and see again
evoked.copy().del_proj(0).apply_proj().plot()
evoked.apply_proj() # finally keep both
ch_names
¶Channel names.
close
()[source]¶Clean up the object.
Does nothing for objects that close their file descriptors. Things like RawFIF will override this method.
compensation_grade
¶The current gradient compensation grade.
crop
(tmin=0.0, tmax=None)[source]¶Crop raw data file.
Limit the data from the raw file to go between specific times. Note that the new tmin is assumed to be t=0 for all subsequently called functions (e.g., time_as_index, or Epochs). New first_samp and last_samp are set accordingly.
Parameters: | tmin : float
tmax : float | None
|
---|---|
Returns: | raw : instance of Raw
|
del_proj
(idx=’all’)[source]¶Remove SSP projection vector.
Parameters: | idx : int | list of int | str
|
---|---|
Returns: | self : instance of Raw | Epochs | Evoked |
drop_channels
(ch_names)[source]¶Drop some channels.
Parameters: | ch_names : list
|
---|---|
Returns: | inst : instance of Raw, Epochs, or Evoked
|
See also
Notes
New in version 0.9.0.
estimate_rank
(tstart=0.0, tstop=30.0, tol=0.0001, return_singular=False, picks=None, scalings=’norm’)[source]¶Estimate rank of the raw data.
This function is meant to provide a reasonable estimate of the rank. The true rank of the data depends on many factors, so use at your own risk.
Parameters: | tstart : float
tstop : float | None
tol : float
return_singular : bool
picks : array_like of int, shape (n_selected_channels,)
scalings : dict | ‘norm’
|
---|---|
Returns: | rank : int
s : array
|
Notes
If data are not pre-loaded, the appropriate data will be loaded by this function (can be memory intensive).
Projectors are not taken into account unless they have been applied to the data using apply_proj(), since it is not always possible to tell whether or not projectors have been applied previously.
Bad channels will be excluded from calculations.
filenames
¶The filenames used.
filter
(l_freq, h_freq, picks=None, filter_length=’auto’, l_trans_bandwidth=’auto’, h_trans_bandwidth=’auto’, n_jobs=1, method=’fir’, iir_params=None, phase=’zero’, fir_window=’hamming’, verbose=None)[source]¶Filter a subset of channels.
Applies a zero-phase low-pass, high-pass, band-pass, or band-stop
filter to the channels selected by picks
. By default the data
of the Raw object is modified inplace.
The Raw object has to have the data loaded e.g. with preload=True
or self.load_data()
.
l_freq
and h_freq
are the frequencies below which and above
which, respectively, to filter out of the data. Thus the uses are:
l_freq < h_freq
: band-pass filterl_freq > h_freq
: band-stop filterl_freq is not None and h_freq is None
: high-pass filterl_freq is None and h_freq is not None
: low-pass filter
self.info['lowpass']
and self.info['highpass']
are only
updated with picks=None.
Note
If n_jobs > 1, more memory is required as
len(picks) * n_times
additional time points need to
be temporaily stored in memory.
Parameters: | l_freq : float | None
h_freq : float | None
picks : array-like of int | None
filter_length : str | int
l_trans_bandwidth : float | str
h_trans_bandwidth : float | str
n_jobs : int | str
method : str
iir_params : dict | None
phase : str
fir_window : str
verbose : bool, str, int, or None
|
---|---|
Returns: | raw : instance of Raw
|
See also
mne.Epochs.savgol_filter
, mne.io.Raw.notch_filter
, mne.io.Raw.resample
, mne.filter.filter_data
, mne.filter.construct_iir_filter
Notes
For more information, see the tutorials Background information on filtering and Filtering and resampling data.
first_samp
¶The first data sample.
fix_mag_coil_types
()[source]¶Fix Elekta magnetometer coil types.
Returns: | raw : instance of Raw
|
---|
Notes
This function changes magnetometer coil types 3022 (T1: SQ20483N) and 3023 (T2: SQ20483-A) to 3024 (T3: SQ20950N) in the channel definition records in the info structure.
Neuromag Vectorview systems can contain magnetometers with two different coil sizes (3022 and 3023 vs. 3024). The systems incorporating coils of type 3024 were introduced last and are used at the majority of MEG sites. At some sites with 3024 magnetometers, the data files have still defined the magnetometers to be of type 3022 to ensure compatibility with older versions of Neuromag software. In the MNE software as well as in the present version of Neuromag software coil type 3024 is fully supported. Therefore, it is now safe to upgrade the data files to use the true coil type.
Note
The effect of the difference between the coil sizes on the current estimates computed by the MNE software is very small. Therefore the use of mne_fix_mag_coil_types is not mandatory.
get_data
(picks=None, start=0, stop=None, reject_by_annotation=None, return_times=False)[source]¶Get data in the given range.
Parameters: | picks : array-like of int | None
start : int
stop : int | None
reject_by_annotation : None | ‘omit’ | ‘NaN’
return_times : bool
|
---|---|
Returns: | data : ndarray, shape (n_channels, n_times)
times : ndarray, shape (n_times,)
|
Notes
New in version 0.14.0.
interpolate_bads
(reset_bads=True, mode=’accurate’)[source]¶Interpolate bad MEG and EEG channels.
Operates in place.
Parameters: | reset_bads : bool
mode : str
|
---|---|
Returns: | inst : instance of Raw, Epochs, or Evoked
|
Notes
New in version 0.9.0.
last_samp
¶The last data sample.
load_bad_channels
(bad_file=None, force=False)[source]¶Mark channels as bad from a text file.
This function operates mostly in the style of the C function
mne_mark_bad_channels
.
Parameters: | bad_file : string
force : boolean
|
---|
load_data
(verbose=None)[source]¶Load raw data.
Parameters: | verbose : bool, str, int, or None
|
---|---|
Returns: | raw : instance of Raw
|
Notes
This function will load raw data if it was not already preloaded. If data were already preloaded, it will do nothing.
New in version 0.10.0.
n_times
¶Number of time points.
notch_filter
(freqs, picks=None, filter_length=’auto’, notch_widths=None, trans_bandwidth=1.0, n_jobs=1, method=’fft’, iir_params=None, mt_bandwidth=None, p_value=0.05, phase=’zero’, fir_window=’hamming’, verbose=None)[source]¶Notch filter a subset of channels.
Applies a zero-phase notch filter to the channels selected by “picks”. By default the data of the Raw object is modified inplace.
The Raw object has to have the data loaded e.g. with preload=True
or self.load_data()
.
Note
If n_jobs > 1, more memory is required as
len(picks) * n_times
additional time points need to
be temporaily stored in memory.
Parameters: | freqs : float | array of float | None
picks : array-like of int | None
filter_length : str | int
notch_widths : float | array of float | None
trans_bandwidth : float
n_jobs : int | str
method : str
iir_params : dict | None
mt_bandwidth : float | None
p_value : float
phase : str
fir_window : str
verbose : bool, str, int, or None
|
---|---|
Returns: | raw : instance of Raw
|
See also
Notes
For details, see mne.filter.notch_filter()
.
pick_channels
(ch_names)[source]¶Pick some channels.
Parameters: | ch_names : list
|
---|---|
Returns: | inst : instance of Raw, Epochs, or Evoked
|
See also
Notes
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)[source]¶Pick some channels by type and names.
Parameters: | meg : bool | str
eeg : bool
stim : bool
eog : bool
ecg : bool
emg : bool
ref_meg: bool | str
misc : bool
resp : bool
chpi : bool
exci : bool
ias : bool
syst : bool
seeg : bool
dipole : bool
gof : bool
bio : bool
ecog : bool
fnirs : bool | str
include : list of string
exclude : list of string | str
selection : list of string
|
---|---|
Returns: | inst : instance of Raw, Epochs, or Evoked
|
Notes
New in version 0.9.0.
plot
(events=None, duration=10.0, start=0.0, n_channels=20, bgcolor=’w’, color=None, bad_color=(0.8, 0.8, 0.8), event_color=’cyan’, scalings=None, remove_dc=True, order=’type’, show_options=False, title=None, show=True, block=False, highpass=None, lowpass=None, filtorder=4, clipping=None, show_first_samp=False)[source]¶Plot raw data.
Parameters: | events : array | None
duration : float
start : float
n_channels : int
bgcolor : color object
color : dict | color object | None
bad_color : color object
event_color : color object | dict
scalings : dict | None
remove_dc : bool
order : str | array of int
show_options : bool
title : str | None
show : bool
block : bool
highpass : float | None
lowpass : float | None
filtorder : int
clipping : str | None
show_first_samp : bool
|
---|---|
Returns: | fig : Instance of matplotlib.figure.Figure
|
Notes
The arrow keys (up/down/left/right) can typically be used to navigate
between channels and time ranges, but this depends on the backend
matplotlib is configured to use (e.g., mpl.use(‘TkAgg’) should work). The
scaling can be adjusted with - and + (or =) keys. The viewport dimensions
can be adjusted with page up/page down and home/end keys. Full screen mode
can be to toggled with f11 key. To mark or un-mark a channel as bad, click
on the rather flat segments of a channel’s time series. The changes will be
reflected immediately in the raw object’s raw.info['bads']
entry.
plot_projs_topomap
(ch_type=None, layout=None, axes=None)[source]¶Plot SSP vector.
Parameters: | ch_type : ‘mag’ | ‘grad’ | ‘planar1’ | ‘planar2’ | ‘eeg’ | None | List
layout : None | Layout | List of Layouts
axes : instance of Axes | list | None
|
---|---|
Returns: | fig : instance of matplotlib figure
|
plot_psd
(tmin=0.0, tmax=None, fmin=0, fmax=inf, proj=False, n_fft=None, picks=None, ax=None, color=’black’, area_mode=’std’, area_alpha=0.33, n_overlap=0, dB=True, average=None, show=True, n_jobs=1, line_alpha=None, spatial_colors=None, xscale=’linear’, verbose=None)[source]¶Plot the power spectral density across channels.
Parameters: | tmin : float
tmax : float
fmin : float
fmax : float
proj : bool
n_fft : int | None
picks : array-like of int | None
ax : instance of matplotlib Axes | None
color : str | tuple
area_mode : str | None
area_alpha : float
n_overlap : int
dB : bool
average : bool
show : bool
n_jobs : int
line_alpha : float | None
spatial_colors : bool
xscale : str
verbose : bool, str, int, or None
|
---|---|
Returns: | fig : instance of matplotlib figure
|
plot_psd_topo
(tmin=0.0, tmax=None, fmin=0, fmax=100, proj=False, n_fft=2048, n_overlap=0, layout=None, color=’w’, fig_facecolor=’k’, axis_facecolor=’k’, dB=True, show=True, block=False, n_jobs=1, verbose=None)[source]¶Plot channel-wise frequency spectra as topography.
Parameters: | tmin : float
tmax : float | None
fmin : float
fmax : float
proj : bool
n_fft : int
n_overlap : int
layout : instance of Layout | None
color : str | tuple
fig_facecolor : str | tuple
axis_facecolor : str | tuple
dB : bool
show : bool
block : bool
n_jobs : int
verbose : bool, str, int, or None
|
---|---|
Returns: | fig : instance of matplotlib figure
|
plot_sensors
(kind=’topomap’, ch_type=None, title=None, show_names=False, ch_groups=None, to_sphere=True, axes=None, block=False, show=True)[source]¶Plot sensor positions.
Parameters: | kind : str
ch_type : None | str
title : str | None
show_names : bool
ch_groups : ‘position’ | array of shape (ch_groups, picks) | None
to_sphere : bool
axes : instance of Axes | instance of Axes3D | None
block : bool
show : bool
|
---|---|
Returns: | fig : instance of matplotlib figure
selection : list
|
See also
Notes
This function plots the sensor locations from the info structure using
matplotlib. For drawing the sensors using mayavi see
mne.viz.plot_trans()
.
New in version 0.12.0.
proj
¶Whether or not projections are active.
rename_channels
(mapping)[source]¶Rename channels.
Parameters: | mapping : dict | callable
|
---|
Notes
New in version 0.9.0.
resample
(sfreq, npad=’auto’, window=’boxcar’, stim_picks=None, n_jobs=1, events=None, verbose=None)[source]¶Resample all channels.
The Raw object has to have the data loaded e.g. with preload=True
or self.load_data()
.
Warning
The intended purpose of this function is primarily to speed up computations (e.g., projection calculation) when precise timing of events is not required, as downsampling raw data effectively jitters trigger timings. It is generally recommended not to epoch downsampled data, but instead epoch and then downsample, as epoching downsampled data jitters triggers. For more, see this illustrative gist.
If resampling the continuous data is desired, it is recommended to construct events using the original data. The event onsets can be jointly resampled with the raw data using the ‘events’ parameter.
Parameters: | sfreq : float
npad : int | str
window : string or tuple
stim_picks : array of int | None
n_jobs : int | str
events : 2D array, shape (n_events, 3) | None
verbose : bool, str, int, or None
|
---|---|
Returns: | raw : instance of Raw
|
See also
Notes
For some data, it may be more accurate to use npad=0
to reduce
artifacts. This is dataset dependent – check your data!
save
(fname, picks=None, tmin=0, tmax=None, buffer_size_sec=None, drop_small_buffer=False, proj=False, fmt=’single’, overwrite=False, split_size=‘2GB’, verbose=None)[source]¶Save raw data to file.
Parameters: | fname : string
picks : array-like of int | None
tmin : float | None
tmax : float | None
buffer_size_sec : float | None
drop_small_buffer : bool
proj : bool
fmt : str
overwrite : bool
split_size : string | int
verbose : bool, str, int, or None
|
---|
Notes
If Raw is a concatenation of several raw files, be warned that only the measurement information from the first raw file is stored. This likely means that certain operations with external tools may not work properly on a saved concatenated file (e.g., probably some or all forms of SSS). It is recommended not to concatenate and then save raw files for this reason.
set_channel_types
(mapping)[source]¶Define the sensor type of channels.
Parameters: | mapping : dict
|
---|
Notes
New in version 0.9.0.
set_eeg_reference
(ref_channels=None, verbose=None)[source]¶Specify which reference to use for EEG data.
By default, MNE-Python will automatically re-reference the EEG signal to use an average reference (see below). Use this function to explicitly specify the desired reference for EEG. This can be either an existing electrode or a new virtual channel. This function will re-reference the data according to the desired reference and prevent MNE-Python from automatically adding an average reference.
Some common referencing schemes and the corresponding value for the
ref_channels
parameter:
ref_channels=[]
. This will prevent MNE-Python from
automatically re-referencing the data to an average reference.ref_channels=None
.ref_channels
to the name of the channel that will act as
the new reference.ref_channels
to a list of channel names,
indicating which channels to use. For example, to apply an average
mastoid reference, when using the 10-20 naming scheme, set
ref_channels=['M1', 'M2']
.Parameters: | ref_channels : list of str | None
verbose : bool, str, int, or None
|
---|---|
Returns: | inst : instance of Raw | Epochs | Evoked
|
See also
Notes
apply_proj()
method to apply
them.New in version 0.13.0.
set_montage
(montage, verbose=None)[source]¶Set EEG sensor configuration and head digitization.
Parameters: | montage : instance of Montage or DigMontage
verbose : bool, str, int, or None
|
---|
Notes
Operates in place.
New in version 0.9.0.
time_as_index
(times, use_rounding=False)[source]¶Convert time to indices.
Parameters: | times : list-like | float | int
use_rounding : boolean
|
---|---|
Returns: | index : ndarray
|
times
¶Time points.
to_data_frame
(picks=None, index=None, scale_time=1000.0, scalings=None, copy=True, start=None, stop=None)[source]¶Export data in tabular structure as a pandas DataFrame.
Columns and indices will depend on the object being converted. Generally this will include as much relevant information as possible for the data type being converted. This makes it easy to convert data for use in packages that utilize dataframes, such as statsmodels or seaborn.
Parameters: | picks : array-like of int | None
index : tuple of str | None
scale_time : float
scalings : dict | None
copy : bool
start : int | None
stop : int | None
|
---|---|
Returns: | df : instance of pandas.core.DataFrame
|