myogen.simulator.SurfaceEMG.add_noise#
- SurfaceEMG.add_noise( ) SURFACE_EMG__Block[source]#
Add noise to all electrode arrays.
This method adds realistic noise to the simulated surface EMG signals based on a specified signal-to-noise ratio. The noise is calculated and applied independently for each electrode channel to ensure that channels with different signal amplitudes maintain the specified SNR.
- Parameters:
snr__dB (float) – Signal-to-noise ratio in dB. Higher values result in cleaner signals. Typical physiological EMG has SNR ranging from 10-40 dB. The SNR is applied independently to each electrode channel.
noise_type (str, default="gaussian") – Type of noise to add. Currently supports “gaussian” for white noise.
- Returns:
Noisy EMG signals for each electrode array as a neo.Block. Results are stored in the noisy_surface_emg__Block property after execution.
- Return type:
- Raises:
ValueError – If surface EMG has not been simulated. Call simulate_surface_emg() first.
Notes
The noise is computed per-channel (per electrode) to maintain the specified SNR independently across all channels. This ensures that electrodes with different signal amplitudes receive appropriately scaled noise.