meeg_utils.steps.SNS#
- class meeg_utils.steps.SNS(n_neighbors=10, *, skip=0, n_iter=1)[source]#
Sensor noise suppression: replace each channel by its projection on its neighbours.
Wraps
mne_denoise.sns.SNS(de Cheveigné & Simon, 2008, J Neurosci Methods 168:195). Noise specific to single sensors (e.g. sensor or amplifier noise, a loose electrode) is not shared with other channels and is removed; activity seen by several sensors (brain signal, and also shared artifacts, which SNS does not remove) is kept. Each data channel type is processed separately; the operator is learned infit.- Parameters:
n_neighbors (int) – Number of most correlated channels each channel is projected on (10 in de Cheveigné & Simon, 2008); 0 uses all channels.
skip (int) – Number of most correlated neighbours to leave out (e.g. to keep a channel’s own noise from leaking through near-duplicates).
n_iter (int) – Number of times the projection is applied.
Notes
Bad channels are left out and unchanged. SNS lowers the rank of the data only slightly, but channels become more correlated; run it before ICA.
Figures (
plot()):"psd", spectra before and after.Methods
__init__([n_neighbors, skip, n_iter])fit(inst[, y, system])Learn the step's state from the data.
fit_transform(inst[, y, system, copy])Fit the step on the data and transform the same data.
get_metadata_routing()Get metadata routing of this object.
get_params([deep])Get parameters for this estimator.
plot([kind, inst])Draw quality-control figures.
set_fit_request(*[, inst, system])Configure whether metadata should be requested to be passed to the
fitmethod.set_params(**params)Set the parameters of this estimator.
set_transform_request(*[, copy, inst])Configure whether metadata should be requested to be passed to the
transformmethod.transform(inst, *[, copy])Apply the fitted step to the data.
Attributes
Data types the step accepts.
adds_annotationsWhether the step may add
BAD_annotations (existing ones are kept).changes_channelsWhether the step may add, drop or reorder channels.
changes_timesWhether the step may change the time axis (e.g. resampling, cropping).
drops_epochsWhether the step may drop epochs (e.g. artifact rejection).
kind -> whether it needs data (
inst).returnsData type the step returns;
Nonemeans the same type as its input.systemsAcquisition systems the step applies to;
Nonemeans all systems.