# Tag Info

16

Yes, you are right. WaveletScalogram produces a plot that is very similar in behaviour to that used in music. Here, the octave axis is also logarithmic: -Log[2,b], meaning that the frequency at the next octave is doubled. We can illustrate this by a simple example - Consider a signal with a freq = 440Hz and a signal with double that freq = 880Hz. Now, ...

14

So, you have a function $F(x,y) = f_x(x)g_y(y) + g_x(x)f_y(y)$, and you want to recover $f_x,g_y,g_x,f_y$. If you've tabulated the values of $F(x,y)$ in a matrix $\mathbf F$ with entries $f_{ij} = F(x_i,y_j)$, then this amounts to decomposing the matrix as $$\mathbf F \approx \mathbf f_x\mathbf g_y^T + \mathbf g_x\mathbf f_y^T,$$ where $\mathbf f_x,\mathbf ... 11 So, in order to answer your question I will first provide a little information about the so-called padding in wavelet transforms. For the continuous wavelet transform there will be problems near the edge of the time series, as the wavelet starts to run off the end. To minimize these problems, the time series can be padded with zeroes. This reduces the ... 11 In the old Mathematica wavelet explorer, the one used in the tutorial, coefficients were arranged in decreasing order of energy. You can see that from the following line from the tutorial, In[8]:= Dimensions /@ wtdata Out[8]= {{32,32},{3,32,32},{3,64,64}....} In the new Mathematica 8 wavelets the coefficients are arranged in increasing order of energy as ... 11 EDIT: First, a note: As the usage of options, parameters and functions listed below is not documented, be advised that they still need proper tuning and/or may not work at all. CMorletWavelet[]["WaveletQ"] := True CMorletWavelet[]["OrthogonalQ"] := False CMorletWavelet[]["BiorthogonalQ"] := False CMorletWavelet[]["WaveletFunction"] := 1/Sqrt[π] Exp[2 I π ... 10 Since you haven't provided any data I define something like: data = Table[ Sin[2 Pi t] + 0.86 Sin[97 Pi t] Cos[46 Pi t] Sin[39 Pi t] Cos[19 Pi t] Exp[-102 (1/3 - t)^2], {t, 0.091, 0.519, 1/4095}]; ListLinePlot[data, PlotStyle -> Thick] Now let's demonstrate how WaveletScalogram depends on the choice of ContinuousWaveletTransform ... 10 I found a way to do this thanks to the more simple question I posted here: Wrapping ArrayPlot or MatrixPlot around a circle but it takes a very long time to compute. So I will post the answer but I hope someone will post a faster solution. cwd = ContinuousWaveletTransform[data, GaborWavelet[6], {4, 12}, WaveletScale -> 100]; ws = WaveletScalogram[cwd, ... 9 After consulting a friend of mine P.M. I can tell you this. First of all as @Szabolcs @ruebenko already mentions - in order to get a comparison with Wavelet explorer (v7) to v8, you can go to the following link in the documentation center which shows how the syntax has changed: ... 8 I am not sure where your problem lies exactly. If you have a set of points, x_i,y_i which obey the PDF F[x,y], you could do maximum likelihood analysis. A parametric model could be gxa[x_, a_] = Exp[-a x]/(Exp[-5 x] + 5); G[x_, y_, a_] = fx[x] gy[y] + gxa[x, a] fy[y]; with the corresponding normalization (so that its a PDF) norma[a_] = Table[{a, ... 7 We can visualize the wavelet scalogram using ListPolarPlot data = Re[Zeta[1/2 + I Range[0, 100, 0.01]]]; cwd = ContinuousWaveletTransform[data, GaborWavelet[6], {4, 12}, WaveletScale -> 100]; ListPolarPlot[Abs@Reverse[Last /@ cwd[All]], ColorFunction -> "Rainbow"] Additionally we can see the scalogram in 3D using ListPlot3D: ... 6 So, the scalogram is a raster, so what? Why does it deter you from just wrapping it around the pole? ws = WaveletScalogram[cwd, All, Re, ColorFunction -> "CherryTones", Axes -> False, PlotRangePadding -> None, AspectRatio -> 1] ImageTransformation[ws, {(ArcTan @@ (0.5 - #) + Pi)/(2 Pi),2 Norm[0.5 - #]} &] 6 An alternative; we will discard the time values. f[list_, pos_] := Module[{x = list}, x[[All, pos]] = Sequence[]; x] data = Import[ "http://www.fileconvoy.com/gf.php?id=geed872d9b8a38dc6999443310. 4661369818fbd5fa1bf3bc&sts=138977900593152145247060b494909aee48bb2a26b595048647"]; fdata = Flatten@f[data, 1]; cwd = ContinuousWaveletTransform[fdata, ... 6 Here is a rather quick attempt. Define a function which converts frequencies to the nearest pitch. NoteName[freq_] := Module[{notelist,freqlist,list}, notelist = {"B"}~Join~ Nest[Join[{"C", "C\[Sharp]/D\[Flat]", "D", "D\[Sharp]/E\[Flat]", "E", "F", "F\[Sharp]/G\[Flat]", "G", "G\[Sharp]/A\[Flat]", "A", "A\[Sharp]/B\[Flat]", "B"}, #] ... 5 I won't catch the fish for you rather than teach you how to do it. Generate a random data set: data = LowpassFilter[Accumulate@Re@Fourier[Table[RandomReal[{-.5, .5}] Sinh[Exp[RandomReal[{-.5, .5}]^2]], {2^10}]], .4]; and transform it dwd = DiscreteWaveletTransform[data, HaarWavelet[]] swd = StationaryWaveletTransform[data, ... 5 The Spectrogram function also allows you to alter the window length, overlap and apply a windowing function to your data segment before FFT. You'll get better results if you utilize those (which requires some knowledge of DSP and your specific problem) instead of using the default parameters and the rectangle window. For instance, the following shows the ... 5 Unless I'm missing something, your question does not make sense. The cascade algorithm is an iterative solution to$\phi(x)=\sum_{k=0}^{N-1} c_k \phi(2 x - k)$, which computes$\phi(x)$approximately at dyadic points$x=k\times2^{-j}$, to whatever resolution you choose for the initial approximation. The definition$\phi_{j,k}(x)=2^{j/2} \phi(2^{j} x - k)$... 5 Try specifying your function as MyWavelet[n_,opts:OptionsPattern[]] (documentation) and define Options to your function Method->"PrimalLowpass",Precision->$MachinePrecision, like this: Options[MyWavelet] ={Method->"PrimalLowpass",Precision->$MachinePrecision} To actually construct all this as a function, you need to put certain steps as a ... 4 I don't know if you are wedded to wavelets but... Have you considered a "compound median filter" (q.v.) ? For a list of data x and filter width 2r+1, MedianFilterRoot[x_, r_] := FixedPoint[MedianFilter[#, r] &, x] CompoundMedianFilter[x_, r_] := Fold[MedianFilterRoot[#1, #2] &, x, Range[r]] Plotting ... 4 Both the scaling and wavelet functions of the DaubechiesWavelet are compactly supported on the interval$\left [ 0, N-1 \right ]$, where N is the number of "taps", the impulse response length or just the length of the filter. Choose the one that suits you ^^ Bear in mind that the notation in Mathematica is slightly different - The wavelets are classified by ... 3 I'm pretty sure there ought to be something cleaner. While we wait for a better answer, you may use this to return the minimum and maximum number of arguments allowed for each wavelet: nArgs[fun_] := StringCases[ToString@DownValues@fun, Shortest["ArgumentCountQ"~~__~~(n1:NumberString)~~__~~ (n2:NumberString)] :> ... 3 I found the issue and the reason. First, the reason for that 1/31. As explained in documentation for DiscreteWaveletTransform (see "Properties & Relations") The energy norm is conserved for orthogonal wavelet families: In[1]:= data = RandomReal[1, {100}]; In[2]:= dwt = DiscreteWaveletTransform[data, Padding -> 0.]; In[3]:= Norm[data] == ... 3 While it may be a complicated question about whether the Continuous Wavelet Transform (CWT) in general is a linear operator, it is possible to answer the question "experimentally" without undue hassle regarding Mathematica's implementation of the CWT. Here are two sequences, a and b and their ContinuousWaveletTransforms: a = RandomReal[{-1, 1}, 100]; b = ... 2 Peak Detection Process may involve 3 main steps smoothing baseline correction peak picking For smoothing you can use: Moving average filter, Savitzky-Golay filter, Gaussian filter, Kaiser window, Continuous Wavelet Transform, Discrete Wavelet Transform, Undecimated Discrete Wavelet Transform For baseline correction you can use: Monotone minimum, Linear ... 2 Keep in mind this is only a partial solution and it is supposed to give you ideas and some insight. First to give you an idea of where I am going consider the following example img = Import["http://i.stack.imgur.com/yV8FW.png"] WaveletImagePlot[DiscreteWaveletTransform[img]] Now on to the more interesting problem at hand fx[x_] := 1/(Exp[-x - 7] + ... 2 Once again I repeat that trying to reproduce something like the curve you are trying to get is going to be inaccurate - There are more suitable representations you can use to get the desired frequency spectrum, but you are the one asking the questions :) First, we fetch your data data = Import[ ... 2 To answer your first question - yes. The wavelet scalogram or wavelet energy density function is defined as $$S(t_{0}, s) = \left |W(t_{0}, s) \right |^{2}$$ where$W(t_{0}, s)$is the wavelet transform at time$t_0$and scale$s$. If you are interested in the region around time$t_0$then$S(t_{0}, s)\$ would be the instantaneous energy distribution at that ...

1

I believe the last problem is caused by the standard behavior of the "Image" option. By default, it seems that the resulting output images are color adjusted (for optimal visibility?). inrules = dwd[All, {"Image"}] Use "ImageFunction" -> Identity to prevent this: inrules = dwd[All, {"Image", "ImageFunction" -> Identity}] with an inverse ...

1

Construct an "irregular grid" with a vertical discontinuity: a = {{ConstantArray[0, {3, 3}], ConstantArray[1, {3, 5}]}, {ConstantArray[0, {5, 3}], ConstantArray[1, {5, 5}]}} Use ArrayFlatten to get a rectangular matrix: b = ArrayFlatten@a WaveletMatrixPlot[LiftingWaveletTransform[b]]

1

Actually, we can get linear scale rather than log scale using wavelet transform, using the "LinearScalogramFunction" property of a ContinuousWaveletData object. This is the default wavelet scalogram: sampleRate = 1023; data = Table[ Piecewise[{{Sin[2 π 10 t], 0 <= t < 1/4}, {Sin[2 π 25 t], 1/4 <= t < 1/2}, {Sin[2 π 50 t], 1/2 ...

Only top voted, non community-wiki answers of a minimum length are eligible