Tools
MeasureSNR
#
Seismic.MeasureSNR
— Function.
MeasureSNR(signal, noisy; db=false)
Measure the signal-to-noise ratio between the clean input signal
and the contaminated input noisy
.
Arguments
signal::Array{Real, N}
: N-dimensional clean signal.N
must be <= 5.noisy::Array{Real, N}
: N-dimensional noisy signal of same size assignal
.
Keyword arguments
db::Bool=false
:db=false
if the signal-to-noise ratio is measured by
amplitude, or db=true
if the signal-to-noise ratio is measure in dB.
Example
julia> d, extent = SeisHypEvents(); dnoisy = SeisAddNoise(d, 2); MeasureSNR(d, dnoisy)
PadFirstAxis
#
Seismic.PadFirstAxis
— Function.
PadFirstAxis(d, N1)
Zero-padding first axis of N-dimensional array d
.
Arguments
d::Array{Real, N}
: N-dimensional data.N1::Int
: total number of samples for the first axis of the zero-padded data.
Examples
julia> w = Ricker(); wpad = PadFirstAxis(w, 128); plot(w); plot(wpad+1.0) julia> d, ext = SeisHypEvents(); dpad = PadFirstAxis(d, 512); SeisPlot(d); SeisPlot(dpad)