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=0}^{N-1}$ where
$X_t$ is a real-valued uniformly-sampled time series. The
$j^{th}$ level DWT wavelet
coefficients ($d_{j,t}$)
and scaling coefficients ($s_{j,t}$)
are defined as $d_{j,t} \equiv \sum_{l=0}^{L-1} h_l s_{j-1,2t+1-l \bmod N_{j-1}},
\quad t=0,\ldots, N_j -1$ and
$s_{j,t} \equiv \sum_{l=0}^{L-1} g_l s_{j-1,2t+1-l \bmod N_{j-1}},
\quad t=0,\ldots, N_j -1$
for $j=1,\ldots,J$ where ${ h_l }$ and ${ g_l }$ are the $j^{th}$ level wavelet and scaling filter, respectively, and
$N_j \equiv N / 2^j$. The DWT is a collection of all wavelet coefficients and the
scaling coefficients at the last level:
$\mathbf{d_1,d_2},\ldots,\mathbf{d_J,s_J}$ where
$\mathbf{d_j}$ and
$\mathbf{s_j}$ denote a collection of wavelet
and scaling coefficients, respectively, at level $j$.