The discrete wavelet transform using convolution style filtering
and periodic extension.Let $j, t$ be the decomposition level,
and time index, respectively, and
$s(0,t)=X(t) for t=0,...,N-1$ where
$X(t)$ is a real-valued uniformly-sampled time series. The
$jth$ level DWT wavelet
coefficients ($d(j,t)$)
and scaling coefficients ($s(j,t)$)
are defined as $d(j,t)=sum(h(l) s(j-1, t - 2t+1-l) mod N(j-1))$ and
$s(j,t)=sum(g(l) s(j-1, t - 2t+1-l mod N(j-1)))$
for $j=1,...,J$ where $h(l)$ and $g(l)$ are the $jth$ level wavelet and scaling filter, respectively, and
$Nj=2^(j-1)$. The DWT is a collection of all wavelet coefficients and the
scaling coefficients at the last level:
$d(1),d(2),...,d(J),s(J)$ where
$d(j)$ and
$s(j)$ denote a collection of wavelet
and scaling coefficients, respectively, at level $j$.