mne.
MixedSourceEstimate
(data, vertices=None, tmin=None, tstep=None, subject=None, verbose=None)[source]¶Container for mixed surface and volume source estimates.
Parameters: 


See also
SourceEstimate
VectorSourceEstimate
VolSourceEstimate
Notes
New in version 0.9.0.
Attributes: 

Methods
__add__ (a) 
Add source estimates. 
__div__ (a) 
Divide source estimates. 
__hash__ ($self, /) 
Return hash(self). 
__mul__ (a) 
Multiply source estimates. 
__neg__ () 
Negate the source estimate. 
__sub__ (a) 
Subtract source estimates. 
bin (width[, tstart, tstop, func]) 
Return a source estimate object with data summarized over time bins. 
copy () 
Return copy of source estimate instance. 
crop ([tmin, tmax]) 
Restrict SourceEstimate to a time interval. 
mean () 
Make a summary stc file with mean over time points. 
plot_surface (src[, subject, surface, hemi, …]) 
Plot surface source estimates with PySurfer. 
resample (sfreq[, npad, window, n_jobs, verbose]) 
Resample data. 
save (fname[, ftype, verbose]) 
Save the source estimates to a file. 
sqrt () 
Take the square root. 
sum () 
Make a summary stc file with sum over time points. 
time_as_index (times[, use_rounding]) 
Convert time to indices. 
to_data_frame ([picks, index, scaling_time, …]) 
Export data in tabular structure as a pandas DataFrame. 
transform (func[, idx, tmin, tmax, copy]) 
Apply linear transform. 
transform_data (func[, idx, tmin_idx, tmax_idx]) 
Get data after a linear (time) transform has been applied. 
__hash__
($self, /)¶Return hash(self).
bin
(width, tstart=None, tstop=None, func=<function mean>)[source]¶Return a source estimate object with data summarized over time bins.
Time bins of width
seconds. This method is intended for
visualization only. No filter is applied to the data before binning,
making the method inappropriate as a tool for downsampling data.
Parameters: 


Returns: 

crop
(tmin=None, tmax=None)[source]¶Restrict SourceEstimate to a time interval.
Parameters: 


data
¶Numpy array of source estimate data.
mean
()[source]¶Make a summary stc file with mean over time points.
Returns: 


plot_surface
(src, subject=None, surface='inflated', hemi='lh', colormap='auto', time_label='time=%02.f ms', smoothing_steps=10, transparent=None, alpha=1.0, time_viewer=False, config_opts=None, subjects_dir=None, figure=None, views='lat', colorbar=True, clim='auto')[source]¶Plot surface source estimates with PySurfer.
Note: PySurfer currently needs the SUBJECTS_DIR environment variable, which will automatically be set by this function. Plotting multiple SourceEstimates with different values for subjects_dir will cause PySurfer to use the wrong FreeSurfer surfaces when using methods of the returned Brain object. It is therefore recommended to set the SUBJECTS_DIR environment variable or always use the same value for subjects_dir (within the same Python session).
Parameters: 


Returns: 

resample
(sfreq, npad='auto', window='boxcar', n_jobs=1, verbose=None)[source]¶Resample data.
Parameters: 


Notes
For some data, it may be more accurate to use npad=0 to reduce artifacts. This is dataset dependent – check your data!
Note that the sample rate of the original data is inferred from tstep.
save
(fname, ftype='h5', verbose=None)[source]¶Save the source estimates to a file.
Parameters: 


sfreq
¶Sample rate of the data.
shape
¶Shape of the data.
sqrt
()[source]¶Take the square root.
Returns: 


sum
()[source]¶Make a summary stc file with sum over time points.
Returns: 


time_as_index
(times, use_rounding=False)[source]¶Convert time to indices.
Parameters: 


Returns: 

times
¶A timestamp for each sample.
tmin
¶The first timestamp.
to_data_frame
(picks=None, index=None, scaling_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: 


Returns: 

transform
(func, idx=None, tmin=None, tmax=None, copy=False)[source]¶Apply linear transform.
The transform is applied to each source time course independently.
Parameters: 


Returns: 

Notes
Applying transforms can be significantly faster if the SourceEstimate object was created using “(kernel, sens_data)”, for the “data” parameter as the transform is applied in sensor space. Inverse methods, e.g., “apply_inverse_epochs”, or “apply_lcmv_epochs” do this automatically (if possible).
transform_data
(func, idx=None, tmin_idx=None, tmax_idx=None)[source]¶Get data after a linear (time) transform has been applied.
The transform is applied to each source time course independently.
Parameters: 


Returns: 

Notes
Applying transforms can be significantly faster if the SourceEstimate object was created using “(kernel, sens_data)”, for the “data” parameter as the transform is applied in sensor space. Inverse methods, e.g., “apply_inverse_epochs”, or “apply_lcmv_epochs” do this automatically (if possible).
tstep
¶The change in time between two consecutive samples (1 / sfreq).