Now for the task of going from a spectrum to a causal wavelet.
Take as given the spectrum of the causal wavelet B(Z).
This means that we are not given B(Z) itself,
but we are given .Assuming no zeros in the spectrum
,it is easy to find the log of the spectrum
.The spectrum may be specified as autocorrelation coefficients
or values on the unit circle
.Thus,
![]() |
(16) |
![]() |
(17) |
The autocorrelation factorization subroutine is autofac()
module autofac_mod { # Autocorrelation factorization.
use fft
contains
subroutine autofac( rr) {
complex, dimension (:) :: rr # input: rr = autocorrelation
integer n # output: rr = min phase wavelet
n = size (rr)
rr(n:n/2:-1) = conjg( rr(2:n/2+2)); call fts( +1, rr) # make spectrum
rr = clog( rr); call fts( -1, rr)
rr(1 ) = rr(1 ) / 2.
rr(1+n/2) = rr(1+n/2) / 2.
rr(1+n/2+1: n) = 0.; call fts( +1, rr)
rr = cexp( rr); call fts( -1, rr)
}
}
where the inputs and outputs
were explained earlier with subroutine lapfac()
. Subroutine autofac() is based on
the classic 1-D discrete FT subroutine fts()
.