This function computes the circular shift associated with a wavelet
transform filter of length L
and level j
. L
must
be of even length.
Each coefficient's index will be circularly shifted forward by the
value outputted. For example, if we have a vector of DWT scaling
coefficients (with NAs inserted) with indices 1,2,3,4,5,6,7,8 and the
value outputted from the function scalingshift.dwt
is 2, the
new order of the vector of aligned DWT wavelet coefficients would be
7,8,1,2,3,4,5,6.
If N
is specified, the function will output the "shift" Modulo
N. Because the shift is circular, the value outputted when N is
specified is equivalent to the case when N is not specified.
This function calculates the absolute value of vjH in formulas (114c)
in Wavelet Methods for Time Series Analysis by Percival and
Walden (2000). (And optionally vjH Modulo N)