mne.preprocessing.compute_current_source_density

mne.preprocessing.compute_current_source_density(inst, sphere='auto', lambda2=1e-05, stiffness=4, n_legendre_terms=50, copy=True)[source]

Get the current source density (CSD) transformation.

Transformation based on spherical spline surface Laplacian [1] [2] [3].

Parameters
instinstance of Raw, Epochs or Evoked

The data to be transformed.

spherearray_like, shape (4,) | str

The sphere, head-model of the form (x, y, z, r) where x, y, z is the center of the sphere and r is the radius in meters. Can also be “auto” to use a digitization-based fit.

lambda2float

Regularization parameter, produces smoothness. Defaults to 1e-5.

stiffnessfloat

Stiffness of the spline.

n_legendre_termsint

Number of Legendre terms to evaluate.

copybool

Whether to overwrite instance data or create a copy.

Returns
inst_csdinstance of Raw, Epochs or Evoked

The transformed data. Output type will match input type.

Notes

This function applies an average reference to the data if copy is False. Do not transform CSD data to source space.

New in version 0.20.

References

1

Perrin F, Bertrand O, Pernier J. “Scalp current density mapping: Value and estimation from potential data.” IEEE Trans Biomed Eng. 1987;34(4):283–288.

2

Perrin F, Pernier J, Bertrand O, Echallier JF. “Spherical splines for scalp potential and current density mapping.” Electroenceph Clin Neurophysiol. 1989;72(2):184–187.

3

Kayser J, Tenke CE. “On the benefits of using surface Laplacian (Current Source Density) methodology in electrophysiology. Int J Psychophysiol. 2015 Sep; 97(3): 171–173.

Examples using mne.preprocessing.compute_current_source_density