mne_denoise.sound.compute_sound_ref_best#
- mne_denoise.sound.compute_sound_ref_best(data: ndarray, leadfield: ndarray, *, lambda_: float = 0.1, n_iter: int = 5, tol: float | None = None, random_state=None, callback=None, verbose: bool | str | int | None = None) tuple[ndarray, ndarray, ndarray, int][source]#
Compute SOUND with a selected single-channel reference.
The function excludes the least-noisy reference channel during estimation and returns an average-referenced full-channel operator.
- Parameters:
- datandarray, shape (n_channels, n_times)
Sensor data.
- leadfieldndarray, shape (n_channels, n_sources)
Lead-field matrix in the same channel order and reference as data.
- lambda_float, default=0.1
Non-negative regularization scale.
- n_iterint, default=5
Maximum number of iterations.
- tolfloat or None, default=None
Convergence tolerance.
- random_stateint, numpy.random.Generator, or None, default=None
Random state for channel-update order.
- callbackcallable or None, default=None
Synchronous callback after each iteration.
- verbosebool, str, int, or None, default=None
Logging level.
- Returns:
- operatorndarray, shape (n_channels, n_channels)
Average-referenced cleaning operator.
- sigmasndarray, shape (n_channels - 1,)
Noise amplitudes for channels other than best_channel.
- convergencendarray, shape (n_iter_run,)
Maximum relative noise-level change per iteration.
- best_channelint
Index of the selected reference channel.
Notes
The reference channel is selected from the data-driven Wiener noise estimates; its index is returned so the reference choice remains explicit.