I have a problem in understanding how to create my own wavelets in Mathematica's wavelet framework.
There is a tutorial.
I have read the tutorial, but I don’t understand what exactly is needed to define my own wavelet type. I tried to implement a very simple wavelet (Haar wavelet) in the framework discussed in the tutorial to get a basic understanding, but it did not work out.
Does anyone has experience with this framework or directly sees how or what I need to do? I want to use this framework because it is the only way of using internal Mathematica functions with your own wavelets.
The tutorial says the following:
FranklinWavelet[lim_Integer]["WaveletQ"] := True
FranklinWavelet[lim_]["OrthogonalQ"] := True
a[k_] := Sqrt[3] HypergeometricPFQRegularized[{1/2, 1/2, 1}, {1 - k, 1 + k}, -2]
Z[k_, n_] := 1/24 a[2 k - n - 2] + 1/4 a[2 k - n - 1] + 5/12 a[2 k - n] + 1/4 a[2 k - n + 1] + 1/24 a[2 k - n + 2]
FranklinWavelet[lim_Integer]["PrimalLowpass", prec_ : MachinePrecision] :=
ParallelTable[{n, N[Total[Table[a[k] Z[k, n], {k, -15, 15}]], prec]}, {n,-lim, lim}]
wave = FranklinWavelet[14];
WaveletFilterCoefficients[wave]
{{-14, -9.77137*10^-6}, {-13, 0.0000212211}, {-12, 0.0000391428}, {-11, -0.0000867523}, {-10, -0.000158601}, {-9, 0.000361781}, {-8, 0.000652922}, {-7, -0.00155701}, {-6, -0.00274588}, {-5, 0.00706442}, {-4, 0.0120003}, {-3, -0.0367309}, {-2, -0.0488618}, {-1, 0.280931}, {0, 0.578163}, {1, 0.280931}, {2, -0.0488618}, {3, -0.0367309}, {4, 0.0120003}, {5, 0.00706442}, {6, -0.00274588}, {7, -0.00155701}, {8,0.000652922}, {9, 0.000361781}, {10, -0.000158601}, {11, -0.0000867523}, {12, 0.0000391428}, {13, 0.0000212211}, {14, -9.77137*10^-6}}
My code until now:
f[x_] := Piecewise[{{1, 0 <= x <= 1}}]
g[x_] := f[2 x] - f[2 x - 1];
MyWavelet[lim_Integer]["WaveletQ"] := True
MyWavelet[lim_]["OrthogonalQ"] := True
MyWavelet[lim_Integer]["PrimalLowpass", prec_ : MachinePrecision] := g[lim]
The Haar Wavelet in defined by it´s scaling function f(x) and has the wavelet function g(x). But obviously mathematica is waiting for some values that define the wavelet but how?