meegkit.star#

Sparse time-artefact removal.

Functions

star(X[, thresh, closest, depth, ...])

Sparse time-artifact removal.

meegkit.star.star(X, thresh=1, closest=[], depth=1, pca_thresh=1e-15, n_smooth=10, min_prop=0.5, n_iter=3, verbose=True)#

Sparse time-artifact removal.

Parameters:
  • X (array, shape=(n_times, n_chans[, n_trials])) – Data to denoise.

  • thresh (float) – Threshold for eccentricity measure (default=1).

  • closest (array, shape=(n_chans, n_neighbours)) – Indices of channels that are closest to each channel (default=all).

  • depth (int) – Maximum number of channels to fix at each sample (default=1).

  • pca_thresh (float) – Threshold for discarding weak PCs (default=1e-15)

  • n_smooth (int) – Samples, smoothing to apply to eccentricity (default=10).

  • min_prop (float) – Minimum proportion of artifact free at first iteration (default=0.3).

  • n_iter (int) – Iterations to refine c0 (default=3).

  • verbose (bool | 'debug') – Verbosity. If ‘debug’, also draw some diagnostics plots.

Returns:

  • y (array) – Denoised data.

  • w (array, shape=(n_times, 1)) – 0 for parts that needed fixing, 1 elsewhere.

  • ww (array, shape=(n_times, n_chans)) – 0 for parts that needed fixing, 1 elsewhere.

See also

sns