Skip to content
Snippets Groups Projects
Commit 3fbc60da authored by Moritz Huebner's avatar Moritz Huebner
Browse files

Merge branch 'suppress-error-message' into 'master'

Suppress the error message when creating injections

See merge request !938
parents 48a546c4 5ba7bf1b
No related branches found
No related tags found
1 merge request!938Suppress the error message when creating injections
Pipeline #218628 passed with warnings
......@@ -359,7 +359,8 @@ class PowerSpectralDensity(object):
"""
white_noise, frequencies = utils.create_white_noise(sampling_frequency, duration)
frequency_domain_strain = self.__power_spectral_density_interpolated(frequencies) ** 0.5 * white_noise
with np.errstate(invalid="ignore"):
frequency_domain_strain = self.__power_spectral_density_interpolated(frequencies) ** 0.5 * white_noise
out_of_bounds = (frequencies < min(self.frequency_array)) | (frequencies > max(self.frequency_array))
frequency_domain_strain[out_of_bounds] = 0 * (1 + 1j)
return frequency_domain_strain, frequencies
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment