fracspy.utils.synthutils.add_noise#

fracspy.utils.synthutils.add_noise(data, noise_type='white', snr=1, trind=None, seed=None)[source]#

Contaminate seismic data with noise of different type.

Parameters:
datanumpy.ndarray

Input seismic data of shape \(n_r \times n_t\)

noise_type: :obj:`str`, optional, default: “white”

Type of noise: “white” for random white noise, “spiky” for noise that manifests as sharp spikes in the data. “ringy” for noise that creates a ringing effect in the data.

snr: :obj:`float`, optional, default: 1

Signal-to-noise ratio to determine noise strength defined as maximum amplitude of the signal divided by the maximum amplitude of noise

trind: :obj:`int`, optional, default: None (add to all traces)

Array of indices of traces to which noise must be added (must be >= 0 and <= nr and non-repeating)

seed: :obj:`int`, optional, default: None

Seed for the random number generator to ensure reproducibility

Returns:
data_contaminatednumpy.ndarray

Data contaminated with noise of the selected noise type, size: \(n_r \times n_t\)

Raises:
ValueError

If trind contains indices that are out of the valid range (>= 0 and < nr) or if trind contains non-unique values.

Notes

Maximum amplitude of the signal is calculated as maximum amplitude of the input data.

The ringing effect in seismic data refers to a specific type of noise or distortion that appears as a series of oscillations or reverberations in the seismic trace. This effect is characterized by a repetitive, wave-like pattern that continues after the main seismic event, resembling the ringing of a bell. Key aspects of the ringing effect include:

  • Appearance: It looks like a series of alternating positive and negative amplitudes that gradually decrease over time.

  • Causes: Ringing can be caused by various factors, including: - Instrument response: Poor coupling between the seismometer and the ground - Resonance in the recording system - Near-surface reverberations - Data processing artifacts, particularly from improper filtering

  • Impact: Ringing can obscure real seismic events and make interpretation difficult, especially for later arrivals or subtle features.

  • Frequency: The ringing often occurs at a characteristic frequency, which can help in identifying its source.

  • Duration: It can persist for a significant portion of the trace, sometimes lasting longer than the actual seismic signal of interest.