sesameeg.mne.prepare_sesame¶
- sesameeg.mne.prepare_sesame(forward, data, n_parts=100, top_min=None, top_max=None, subsample=None, noise_std=None, dip_mom_std=None, prior_locs=None, hyper_q=True, lam=0.25, max_n_dips=10, noise_cov=None, epochs_avg=False, radius=None, neigh_std=None, n_simil=0.5, fourier=False, subject=None, subjects_dir=None, trans_matrix=None, verbose=False)[source]¶
Prepare a SESAME instance for actually computing the inverse.
- Parameters:
- forward
Forwardobject The forward solution.
Note
SESAME automatically detects whether the dipole orientations are free or locally normal to the cortical surface.
- datainstance of
Evoked|EvokedArray|Epochs|EpochsArray The MEEG data.
- n_parts
int The number of particles forming the empirical pdf.
- top_min
float| None First topography to be included in the segment of data to be analyzed. It is meant to be expressed either in seconds in the time domain or in Hertz in the frequency domain. If None, it is set to the first topography of the input data.
- top_max
float| None Last topography to be included in the segment of data to be analyzed. It is meant to be expressed either in seconds in the time domain or in Hertz in the frequency domain. If None, it is set to the last topography of the input data.
- subsample
int| None The step used to subsample the data. If None no subsampling is applied.
- noise_std
float| None The standard deviation of the noise distribution. If None, it is estimated from the data.
- dip_mom_std
float| None The standard deviation of the prior pdf on the dipole moment. If None, it is estimated from the forward model and the data.
- prior_locs
ndarrayoffloat, shape (number of points in the source space) | None The prior probability of source location. If None, a uniform prior probability is used.
- hyper_q
bool If True, a hyperprior pdf on the dipole moment std is used.
- lam
float The parameter of the Poisson prior pdf on the number of dipoles.
- max_n_dips
int The maximum allowed number of dipoles in a particle.
- noise_covinstance of
Covariance| None The noise covariance matrix used to prewhiten the data. If None, no prewhitening is applied.
- epochs_avg
bool If True, average data epochs.
- radius
float| None The maximum distance in centimeters between two neighbouring vertices of the brain discretization. If None, it is set to 1 cm.
- neigh_std
float| None The standard deviation of the probability distribution of neighbours. If None, it is set to radius/2.
- n_simil
float Determines which distance is used in computing the set of neighbours of each point in the source space:
if
n_simil = 0the correlation distance is used;if
n_simil = 1the Euclidean distance is used;if
0 < n_simil < 1a combination of the two distances is used. In this case,n_similis the weight of the Euclidean distance
- fourier
bool If True, data are converted to the frequency domain.
- subject
str| None The subject name.
- subjects_dir
str| None If not None, this directory will be used as the subjects directory instead of the value set using the SUBJECTS_DIR environment variable.
- trans_matrixinstance of
Transform| None MRI<->Head coordinate transformation.
- verbose
bool If True, increase verbose level.
- forward
- Returns:
- sesameinstance of
Sesame Inverse operator
- sesameinstance of
Examples using sesameeg.mne.prepare_sesame¶
Compute SESAME inverse solution on simulated data in the frequency domain