({{, (RefLink[ContinuousWaveletData, paclet:ref/ContinuousWaveletData])[{{(Subscript[oct, 1]),(Subscript[voc, 1])}->(Subscript[coef, 1]),…},wave]
yields a continuous wavelet data object with wavelet coefficients (Subscript[coef, i]) corresponding to octave and voice {(Subscript[oct, i]),(Subscript[voc, i])} and wavelet wave.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[ContinuousWaveletData, paclet:ref/ContinuousWaveletData])[{{(Subscript[oct, 1]),(Subscript[voc, 1])}->(Subscript[coef, 1]),…},…] is always converted to an optimized standard form with structure (RefLink[ContinuousWaveletData, paclet:ref/ContinuousWaveletData])[coefs,octvocs,…].

The coefficients (Subscript[coef, i]) can be vectors,  (RefLink[Sound, paclet:ref/Sound])[…], or (RefLink[SampledSoundList, paclet:ref/SampledSoundList])[…] objects.

The options used by (RefLink[ContinuousWaveletTransform, paclet:ref/ContinuousWaveletTransform]) can also be used as options to (RefLink[ContinuousWaveletData, paclet:ref/ContinuousWaveletData]).

In standard output format, only the number of octaves, voices, and dimensions of the original data are printed.

(RefLink[Normal, paclet:ref/Normal])[ContinuousWaveletData[…]] gives a list of rules {{(Subscript[oct, 1]),(Subscript[voc, 1])}->(Subscript[coef, 1]),{(Subscript[oct, 2]),(Subscript[voc, 2])}->(Subscript[coef, 2]),…} which gives the correspondence between each octave and voice {(Subscript[oct, i]),(Subscript[voc, i])} and the corresponding coefficient array (Subscript[coef, i]).

(RefLink[ContinuousWaveletData, paclet:ref/ContinuousWaveletData]) represents a continuous wavelet transform w(u,s)=(1/(Sqrt[s]))(∑_(k=1)^n)(Subscript[x, k]) (Conjugate[ψ])(((Δ (k-u))/s)) at multiple scales s.

Each scale s is specified by an octave number oct and voice number voc and is given by (Subscript[s, oct,voc])=α (2^(oct-1)) (2^(voc/nvoc)).

The scale {oct,voc} can be used to extract wavelet coefficients from a (RefLink[ContinuousWaveletData, paclet:ref/ContinuousWaveletData]) object cwd. The following specifications can be given:

By default, coefficients are returned as a list of rules {{(Subscript[oct, 1]),(Subscript[voc, 1])}->(Subscript[coef, 1]),{(Subscript[oct, 2]),(Subscript[voc, 2])}->(Subscript[coef, 2]),…}.

cwd[…,{(Subscript[form, 1]),(Subscript[form, 2]),…}] can be used to control the output form. Possible (Subscript[form, i]) include:

Properties of a wavelet representation are obtained from (RefLink[ContinuousWaveletData, paclet:ref/ContinuousWaveletData])[…]["prop"].

(RefLink[ContinuousWaveletData, paclet:ref/ContinuousWaveletData])[…]["Properties"] gives a list of properties available for the (RefLink[ContinuousWaveletData, paclet:ref/ContinuousWaveletData]) object.

Properties related to transform coefficients include:

Properties related to input data include:

OpenersPrimaryExamplesSection(Spacer1)Examples  (24)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Get a (RefLink[ContinuousWaveletData, paclet:ref/ContinuousWaveletData]) object:

cwd=ContinuousWaveletTransform[Sin[Range[40]/5]]

The (RefLink[ContinuousWaveletData, paclet:ref/ContinuousWaveletData]) represents arrays of coefficients at different scales {oct,voc}:

WaveletScalogram[cwd,Ticks->Full]

Extract properties including numerical scale corresponding to each {oct,voc}:

cwd["Scales"]

Compute the inverse wavelet transform of arbitrary continuous wavelet transform coefficients:

InverseContinuousWaveletTransform[ContinuousWaveletData[{{2,1}->{1,0,3,3,0,2},{3,2}->{-2,2.5,1,1,0,0}},PaulWavelet[]]]

OpenersExampleSection1(Spacer1)Scope  (12)

OpenersExampleSubsection0(Spacer1)Basic Uses  (10)

Get a (RefLink[ContinuousWaveletData, paclet:ref/ContinuousWaveletData]) object from (RefLink[ContinuousWaveletTransform, paclet:ref/ContinuousWaveletTransform]):

cwd=ContinuousWaveletTransform[{1,2,3,4}]

Show the list of computed scales {oct,voc}:

cwd["WaveletIndex"]

Get the coefficient arrays as a list of rules:

Normal[cwd]

(RefLink[InverseContinuousWaveletTransform, paclet:ref/InverseContinuousWaveletTransform]) operates on (RefLink[ContinuousWaveletData, paclet:ref/ContinuousWaveletData]):

data=AiryAi[-Range[100]/10];

cwd=ContinuousWaveletTransform[data,Automatic,{8,8}]

With enough octaves and voices, the inverse transform gives an accurate reconstruction:

{ListLinePlot[data,PlotLabel->"original"],ListLinePlot[InverseContinuousWaveletTransform[cwd],PlotLabel->"reconstructed"]}

Extract coefficients corresponding to specific octaves and voices:

cwd=ContinuousWaveletTransform[{1,1,3,1},Automatic,{3,2}]

Extract a single coefficient array:

cwd[{{1,1}}]

Extract all coefficients in the first octave using the pattern {1,_}:

cwd[{1,_}]

Specify a list including both specific {oct,voc} and patterns:

cwd[{{1,1},{3,2},{2,_}}]

Get coefficient arrays in different forms:

cwd=ContinuousWaveletTransform[{1,1,3,1},Automatic,{3,2}]

Get as a list of rules (default):

cwd[{{1,1},{2,2}},"Rules"]

Get values only:

cwd[{{1,1},{2,2}},"Values"]

Get coefficients as small list plots:

cwd[{{1,1},{2,2}},"ListPlot"]

Get an inverse transform of each coefficient array:

cwd[{{1,1},{2,2}},"Inverse"]

Combine forms:

cwd[{{1,1},{2,2}},{"Values","ListPlot"}]

Get sound wavelet coefficients as (RefLink[Sound, paclet:ref/Sound]) objects:

cwd=ContinuousWaveletTransform[ExampleData[{"Sound","Tuba"}]]

cwd[{3,2},"Sound"]

Extract properties of the wavelet transform data:

cwd=ContinuousWaveletTransform[RandomReal[1,12],MorletWavelet[]]

Number of octaves and voices, and wavelet used:

{cwd["Octaves"],cwd["Voices"],cwd["Wavelet"]}

All available properties:

cwd["Properties"]

Use (RefLink[ContinuousWaveletData, paclet:ref/ContinuousWaveletData]) in other wavelet functions:

data=Table[Sin[x+(x^2)],{x,0,10,0.1}];

cwd=ContinuousWaveletTransform[data]

Inverse transform:

InverseContinuousWaveletTransform[cwd]//ListLinePlot

Scalogram:

WaveletScalogram[cwd]

Transform (RefLink[ContinuousWaveletData, paclet:ref/ContinuousWaveletData]):

data=Table[Sin[20Log[x]],{x,1,10,0.1}];

cwd1=ContinuousWaveletTransform[data,Automatic,3]

Apply an arbitrary function to each coefficient:

cwd2=WaveletMapIndexed[c|->Rescale[c,{0,1+I}],cwd1]

Set all coefficients matching a specified {oct,voc} to zero:

cwd3=WaveletMapIndexed[c|->0c,cwd1,{2,_}]

Compare scalograms:

Table[WaveletScalogram[cwd],{cwd,{cwd1,cwd2,cwd3}}]

Construct a (RefLink[ContinuousWaveletData, paclet:ref/ContinuousWaveletData]) object from a list of rules giving coefficient arrays:

cwd=ContinuousWaveletData[{{1,1}->{-1,1,1,1},{2,3}->{2,3,3,0}}]

The result represents a range of octaves and voices including the specified coefficients:

cwd["WaveletIndex"]

The other coefficients are assumed to be zero:

Normal[cwd]

Construct a (RefLink[ContinuousWaveletData, paclet:ref/ContinuousWaveletData]) object using a specified wavelet:

cwd=ContinuousWaveletData[{{1,1}->{-1,1,1,1},{2,3}->{2,3,3,0}},PaulWavelet[]]

The specified wavelet is used in the inverse transform:

InverseContinuousWaveletTransform[cwd]

OpenersExampleSubsection1(Spacer1)Properties  (2)

Get properties of the continuous wavelet transform:

cwd=ContinuousWaveletTransform[RandomReal[1,8],MexicanHatWavelet[]]

Wavelet and wavelet scale used:

{cwd["Wavelet"],cwd["WaveletScale"]}

Properties of transform coefficients, including number of octaves and voices:

{cwd["Octaves"],cwd["Voices"]}

List of all available {oct,voc}:

cwd["WaveletIndex"]

Numerical scales corresponding to each {oct,voc}:

cwd["Scales"]

Properties related to input data:

data=;

cwd=ContinuousWaveletTransform[data]

Data dimensions, number of audio channels, and sample rate:

{cwd["DataDimensions"],cwd["DataChannels"],cwd["SampleRate"]}

Wrapper function that is automatically applied to the result of an inverse transform:

cwd["DataWrapper"]

{Head[data],Head[InverseContinuousWaveletTransform[cwd]]}

OpenersExampleSection2(Spacer1)Options  (5)

OpenersExampleSubsection2(Spacer1)SampleRate  (1)

For (RefLink[Sound, paclet:ref/Sound]) input, (RefLink[SampleRate, paclet:ref/SampleRate]) is automatically computed:

snd = Sound[SampledSoundList[Table[Cos[100 (t^2)],{t,0,1,1./255}],250]]

cwd= ContinuousWaveletTransform[snd]

By default, (RefLink[SampleRate, paclet:ref/SampleRate]) is extracted from the first coefficient rule:

srules = cwd[All,"Sound"];

First[srules]

InverseContinuousWaveletTransform[ContinuousWaveletData[srules]]

Specify (RefLink[SampleRate, paclet:ref/SampleRate]) explicitly:

InverseContinuousWaveletTransform[ContinuousWaveletData[srules,SampleRate->150]]

OpenersExampleSubsection3(Spacer1)WorkingPrecision  (2)

By default, (RefLink[WorkingPrecision, paclet:ref/WorkingPrecision])->(RefLink[MachinePrecision, paclet:ref/MachinePrecision]) is used:

cwd1=ContinuousWaveletData[{{1,1}->{1,2,3,4},{2,1}->{1,2,3,4}}]

cwd2= ContinuousWaveletData[{{1,1}->{1,2,3,4},{2,1}->{1,2,3,4}},WorkingPrecision->MachinePrecision]

cwd1==cwd2

Use higher-precision computation:

cwd=Normal@ContinuousWaveletData[{{1,1}->{0,1,(Sqrt[2]),(Sqrt[3]),4},{2,1}->{0,1,(Sqrt[2]),(Sqrt[3]),4}},WorkingPrecision->25]

With numbers close to zero, accuracy is the better indicator of the number of correct digits:

{Precision[cwd],Accuracy[cwd]}

OpenersExampleSubsection4(Spacer1)WaveletScale  (2)

By default, (RefLink[WaveletScale, paclet:ref/WaveletScale]) is automatically computed:

data=Table[Sin[(x^2)],{x,0,3 π,((3 π)/1023)}];

ListLinePlot[data]

cwt1=ContinuousWaveletTransform[data,GaborWavelet[6]]

Set (RefLink[ContinuousWaveletData, paclet:ref/ContinuousWaveletData]):

cwt2 = ContinuousWaveletData[Normal[cwt1],GaborWavelet[6]]

cwt1["WaveletScale"]==cwt2["WaveletScale"]

Explicitly set (RefLink[WaveletScale, paclet:ref/WaveletScale]):

cwd=ContinuousWaveletData[{{1,1}->{1,2,3,4},{2,1}->{1,2,3,4}},GaborWavelet[6],WaveletScale->1]

cwd["WaveletScale"]

OpenersExampleSection3(Spacer1)Properties & Relations  (5)

The length of each wavelet coefficient array equals the length of the data:

cwd=ContinuousWaveletTransform[Range[8]]

Map[Length,cwd[All,"Values"]]

(RefLink[ContinuousWaveletData, paclet:ref/ContinuousWaveletData]) represents continuous transform coefficients at a set of scales:

cwd=ContinuousWaveletTransform[{1,1,8,1,1,2,2,1,1}]

{TableForm[cwd["Scales"]],WaveletScalogram[cwd,Ticks->Full]}

(RefLink[DiscreteWaveletData, paclet:ref/DiscreteWaveletData]) represents a tree of discrete transform coefficients:

dwd=DiscreteWaveletTransform[{1,1,8,1,1,2,2,1,1}]

{dwd["TreeView"],WaveletListPlot[dwd,Ticks->Full,PlotLayout->"CommonYAxis"]}

Reconstruct a (RefLink[ContinuousWaveletData, paclet:ref/ContinuousWaveletData]) from its coefficients and properties:

cwd=ContinuousWaveletTransform[Range[-2,2],MexicanHatWavelet[]]

Specify the coefficients and the wavelet used:

cwd2=ContinuousWaveletData[Normal[cwd],cwd["Wavelet"],WaveletScale->cwd["WaveletScale"]]

The data dimensions are determined from the coefficients:

{cwd["DataDimensions"],cwd2["DataDimensions"]}

Compare inverse transforms:

InverseContinuousWaveletTransform[cwd]==InverseContinuousWaveletTransform[cwd2]

Equivalent ways to get all coefficients as a list of rules:

cwd=ContinuousWaveletTransform[{1,2,3,4}]

Use (RefLink[Normal, paclet:ref/Normal]):

Normal[cwd]

Explicitly extract (RefLink[All, paclet:ref/All]) coefficients:

cwd[All]

Specify the pattern (RefLink[Blank, paclet:ref/Blank])[] (_), which matches any octave and voice:

cwd[_]

Equivalent ways to get only coefficient lists:

cwd=ContinuousWaveletTransform[{1,2,3,4},Automatic,{3,2}]

Apply (RefLink[Last, paclet:ref/Last]) to each rule returned by cwd[{oct,voc}]:

Last/@cwd[{2,_}]

Use (RefLink[Part, paclet:ref/Part]):

cwd[{2,_}][[All,2]]

Explicitly get only coefficient values:

cwd[{2,_},"Values"]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[ContinuousWaveletTransform, paclet:ref/ContinuousWaveletTransform])  ▪  (RefLink[InverseContinuousWaveletTransform, paclet:ref/InverseContinuousWaveletTransform])  ▪  (RefLink[WaveletScalogram, paclet:ref/WaveletScalogram])  ▪  (RefLink[DiscreteWaveletData, paclet:ref/DiscreteWaveletData])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Wavelet Analysis, paclet:guide/Wavelets])}})}})