pysmo.tools.noise
#
This module provides support for calculating random synthetic noise that matches the naturally observed amplitude spectrum.
See also
Peterson, J., 1993. Observations and modelling of background seismic noise. Open-file report 93-322, U. S. Geological Survey, Albuquerque, New Mexico.
Classes:
Name | Description |
---|---|
NoiseModel |
Class to store seismic noise models. |
Functions:
Name | Description |
---|---|
peterson |
Generate a noise model using Peterson's models as base. |
generate_noise |
Generate noise from a noise model. |
Examples:
>>> from pysmo.tools.noise import generate_noise, peterson
>>> NLNM = peterson(noise_level=0)
>>> delta = 0.05
>>> npts = 5000
>>> low_noise_seismogram = generate_noise(NLMN, npts, delta)
NoiseModel
dataclass
#
Class to store seismic noise models.
Attributes:
Name | Type | Description |
---|---|---|
psd |
ndarray
|
Power spectral density of ground acceleration [dB]. |
T |
ndarray
|
Period [seconds]. |
Source code in pysmo/tools/noise.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|
generate_noise(model, npts, delta=SEISMOGRAM_DEFAULTS.delta, begin_time=SEISMOGRAM_DEFAULTS.begin_time, return_velocity=False, seed=None)
#
Generate a random seismogram from a noise model. Realistic seismic noise is generated by assigning random phases to a fixed amplitude spectrum prescribed by a noise model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model |
NoiseModel
|
Noise model used to compute seismic noise. |
required |
npts |
int
|
Number of points of generated noise |
required |
delta |
float
|
Sampling interval of generated noise |
delta
|
begin_time |
datetime
|
Seismogram begin time |
begin_time
|
return_velocity |
bool
|
Return velocity instead of acceleration. |
False
|
seed |
int | None
|
set random seed manually (usually for testing purposes). |
None
|
Returns:
Type | Description |
---|---|
MiniSeismogram
|
Seismogram with random seismic noise as data. |
Source code in pysmo/tools/noise.py
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 |
|
peterson(noise_level)
#
Generate a noise model by interpolating between Peterson's New Low Noise Model (NLNM) and New High Noice Model (NHNM).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
noise_level |
float
|
Determines the noise level of the generated noise model. A noise level of 0 returns the NLNM, 1 returns the NHNM, and anything > 0 and < 1 returns an interpolated model that lies between the NLNM and NHNM. |
required |
Returns:
Type | Description |
---|---|
NoiseModel
|
Noise model. |
Source code in pysmo/tools/noise.py
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
|