# random_noise#

emg3d.surveys.random_noise(standard_deviation, mean_noise=0.0, ntype='white_noise')[source]#

Return random noise for given inputs.

Different methods are implemented to create random noise for frequency-domain CSEM data. All methods generate random noise in the following way

$d^\text{noise} = \varsigma \left[(1 + \text{i})\,u + \mathcal{R} \right] \, .$

where $$\varsigma$$ is the standard deviation (see emg3d.surveys.Survey.standard_deviation), $$u$$ is the mean value of the randomly distributed noise, and $$\mathcal{R}$$ are the random realizations of the noise.

Currently there are three methods (ntype) implemented.

1. white_noise

Random uniform phases with constant amplitudes. This is the default implementation, and corresponds to white noise in the time-domain: a flat amplitude spectrum for all frequencies, with random phases:

$\mathcal{R}_\text{wn} = \exp[\text{i}\,\mathcal{U}(0, 2\pi)] \, ,$

where $$\mathcal{U}(0, 2\pi)$$ is the uniform distribution and its range.

2. Random Gaussian noise.

In the following, $$\mathcal{N}(0, 1)$$ is the standard normal distribution of zero mean and unit standard deviation.

1. gaussian_correlated

Same realization added to real and imaginary part.

$\mathcal{R}_\text{gc} = (1+\text{i})\,\mathcal{N}(0, 1) \, .$
2. gaussian_uncorrelated

Independent realizations added to real and imaginary part.

$\mathcal{R}_\text{gu} = \mathcal{N}(0, 1) + \text{i}\,\mathcal{N}(0, 1) \, .$

There are, of course, other possibilities. One could, e.g., make the non-zero mean itself random.

See the example random_noise_f_domain.html for more details about random noise in the frequency domain.

Parameters
standard_deviationndarray

Standard deviations of the data.

mean_noisefloat, default: 0.0

Mean value of the random noise (as fraction of standard_deviation).

ntypestr, default: white_noise

What type of noise. Options:

• 'white_noise': random uniform phases with constant amplitude.

• 'gaussian_correlated': Same Gaussian random realizations added to Real and Imaginary part.

• 'gaussian_uncorrelated': Independent Gaussian random realizations added to Real and Imaginary part.

Returns
noisendarray

Noise, a complex-valued ndarray of the same shape as standard_deviation.