WaveletMapIndexed
✖
WaveletMapIndexed
applies the function f to the arrays of coefficients and indices of a ContinuousWaveletData or DiscreteWaveletData object.
applies f to the DiscreteWaveletData coefficients specified by wind.
applies f to the ContinuousWaveletData coefficients specified by octvoc.
Details

- WaveletMapIndexed takes a ContinuousWaveletData or DiscreteWaveletData object and returns an object of the same type.
- For dwd with coefficients {wind1->coef1,…}, WaveletMapIndexed[f,dwd] effectively corresponds to DiscreteWaveletData[{wind1->f[coef1,wind1],…},…].
- For cwd with coefficients {{oct1,voc1}->coef1,…}, WaveletMapIndexed[f,cwd] effectively corresponds to ContinuousWaveletData[{{oct1,voc1}->f[coef1,{oct1,voc1}],…},…].
- Each f[coefi,windi] should return an array or Image of the same dimensions as coefi.
- For Sound and SampledSoundList, each coefi is given as a list of vectors, each corresponding to a channel of sound samples.
- The wavelet index convention is the same as explained in ContinuousWaveletData and DiscreteWaveletData.
Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Rescale all coefficients of a discrete wavelet transform by 20:

https://wolfram.com/xid/0d4mzssfvyojf4vy-bfonyr

https://wolfram.com/xid/0d4mzssfvyojf4vy-kyv3vf

Normal gives the array of coefficients:

https://wolfram.com/xid/0d4mzssfvyojf4vy-lg3n4

Compare with the unmodified coefficients:

https://wolfram.com/xid/0d4mzssfvyojf4vy-eql25c

Amplify the {1} coefficient of the stationary wavelet transform of an image:

https://wolfram.com/xid/0d4mzssfvyojf4vy-btgsf3


https://wolfram.com/xid/0d4mzssfvyojf4vy-k4s4pq

The inverse wavelet transform gives an image with vertical edges sharpened:

https://wolfram.com/xid/0d4mzssfvyojf4vy-oy52g9

Scope (11)Survey of the scope of standard use cases
Basic Uses (3)
Apply an arbitrary function to all coefficients of a discrete wavelet transform:

https://wolfram.com/xid/0d4mzssfvyojf4vy-ho6k05

Apply a symbolic function that also depends on the wavelet index for each coefficient vector:

https://wolfram.com/xid/0d4mzssfvyojf4vy-g7qiw6

WaveletMapIndexed operates on ContinuousWaveletData or DiscreteWaveletData:

https://wolfram.com/xid/0d4mzssfvyojf4vy-vpm81

The result is a wavelet data object of the same type:

https://wolfram.com/xid/0d4mzssfvyojf4vy-l1ksjl

The modified data can be used in other wavelet functions such as inverse wavelet transforms:

https://wolfram.com/xid/0d4mzssfvyojf4vy-su857

Coefficient Specification (4)
Transform only specified coefficients in DiscreteWaveletData:

https://wolfram.com/xid/0d4mzssfvyojf4vy-fb5ug2

Apply a function to detail coefficients only, using the index pattern {___, 1}:

https://wolfram.com/xid/0d4mzssfvyojf4vy-gi6k0n

Apply a function to coarse coefficients only, using the index pattern {___, 0}:

https://wolfram.com/xid/0d4mzssfvyojf4vy-0jqu2

Transform only specified coefficients in a ContinuousWaveletData:

https://wolfram.com/xid/0d4mzssfvyojf4vy-c6fmla

Apply a function to coefficients in the first octave {1,_} only:

https://wolfram.com/xid/0d4mzssfvyojf4vy-ccwqha

Apply a function to all coefficients except those in the second octave, first voice {2,1}:

https://wolfram.com/xid/0d4mzssfvyojf4vy-cy2htm

The function f can depend on the wavelet index as its second argument:

https://wolfram.com/xid/0d4mzssfvyojf4vy-chv808

Define a function with an arbitrary dependence on the wavelet index:

https://wolfram.com/xid/0d4mzssfvyojf4vy-5hxm2
Apply the function to continuous wavelet transform coefficients:

https://wolfram.com/xid/0d4mzssfvyojf4vy-fpq1su

Data (4)
For list data, the coefficients supplied as the first argument of f are lists:

https://wolfram.com/xid/0d4mzssfvyojf4vy-biqvmp

https://wolfram.com/xid/0d4mzssfvyojf4vy-dppbyk

Apply a function that transforms lists:

https://wolfram.com/xid/0d4mzssfvyojf4vy-j5ccy6

For multidimensional data, the coefficients are arrays of the same depth:

https://wolfram.com/xid/0d4mzssfvyojf4vy-ix947

https://wolfram.com/xid/0d4mzssfvyojf4vy-bdwuiy

Apply a function that transforms array coefficients of that depth:

https://wolfram.com/xid/0d4mzssfvyojf4vy-k1tpj

For image data, the coefficients are supplied to f as Image objects:

https://wolfram.com/xid/0d4mzssfvyojf4vy-evrxjh

https://wolfram.com/xid/0d4mzssfvyojf4vy-cdzago

The coefficients have the same number of channels as the original image:

https://wolfram.com/xid/0d4mzssfvyojf4vy-ocvvz

Apply a function that transforms image coefficients:

https://wolfram.com/xid/0d4mzssfvyojf4vy-cw069v


https://wolfram.com/xid/0d4mzssfvyojf4vy-bu1uof

For sound data, the coefficients are two-dimensional arrays:

https://wolfram.com/xid/0d4mzssfvyojf4vy-dfyote

Dimensions of one coefficient:

https://wolfram.com/xid/0d4mzssfvyojf4vy-gt5m7n

The two dimensions specify the channel number and the wavelet coefficients for that channel:

https://wolfram.com/xid/0d4mzssfvyojf4vy-g8fpcd

Apply a function that transforms two-channel data:

https://wolfram.com/xid/0d4mzssfvyojf4vy-cdlcp8

https://wolfram.com/xid/0d4mzssfvyojf4vy-mnzlcc


https://wolfram.com/xid/0d4mzssfvyojf4vy-f9d0ni

Reconstructed Sound data:

https://wolfram.com/xid/0d4mzssfvyojf4vy-hgoje3

Applications (7)Sample problems that can be solved with this function
Data Processing (2)
Coefficients with short indices correspond to small-scale structure in the data:

https://wolfram.com/xid/0d4mzssfvyojf4vy-gphdl9
Zero all small-scale coefficients from the stationary wavelet transform of random data:

https://wolfram.com/xid/0d4mzssfvyojf4vy-cy2opx

The inverse wavelet transform varies only on larger scales:

https://wolfram.com/xid/0d4mzssfvyojf4vy-dpydxu

Perform a simple thresholding operation by removing low-amplitude wavelet coefficients:

https://wolfram.com/xid/0d4mzssfvyojf4vy-fwh2ss

https://wolfram.com/xid/0d4mzssfvyojf4vy-kcvrtw

Compare with the original data:

https://wolfram.com/xid/0d4mzssfvyojf4vy-o5yfz

Image Processing (3)
Blur an image by setting small-scale detail coefficients to zero:

https://wolfram.com/xid/0d4mzssfvyojf4vy-c4161

Compare with the original image:

https://wolfram.com/xid/0d4mzssfvyojf4vy-hcxb5h

Sharpen an image by amplifying small-scale detail coefficients:

https://wolfram.com/xid/0d4mzssfvyojf4vy-pz1q3

Compare with the original image:

https://wolfram.com/xid/0d4mzssfvyojf4vy-blv8s7

Use a mask image to vary between blurring and sharpening across an image:

https://wolfram.com/xid/0d4mzssfvyojf4vy-m9own9

Compare with the original image:

https://wolfram.com/xid/0d4mzssfvyojf4vy-e8ibrf

Sound Processing (1)
Apply a nonlinear function to wavelet coefficients for sound data:

https://wolfram.com/xid/0d4mzssfvyojf4vy-dtfxq7

https://wolfram.com/xid/0d4mzssfvyojf4vy-g8cylw

Inverse transform to obtain a reconstructed sound object:

https://wolfram.com/xid/0d4mzssfvyojf4vy-k4owy0

Wavelet Thresholding (1)
Perform a wavelet-based shrinkage based on conditional mean:

https://wolfram.com/xid/0d4mzssfvyojf4vy-pzr9ns

https://wolfram.com/xid/0d4mzssfvyojf4vy-rawtwm

https://wolfram.com/xid/0d4mzssfvyojf4vy-r0xps9

Compute a discrete wavelet transform up to refinement level 6:

https://wolfram.com/xid/0d4mzssfvyojf4vy-l25w68
Compute the standard deviation for the finest detail coefficients:

https://wolfram.com/xid/0d4mzssfvyojf4vy-n8n5o5

Compute the standard deviation for all wavelet coefficients:

https://wolfram.com/xid/0d4mzssfvyojf4vy-c3tntw

Assuming a Gaussian mixture model, variance can be estimated in the proportion
to
:

https://wolfram.com/xid/0d4mzssfvyojf4vy-cdbp1v

https://wolfram.com/xid/0d4mzssfvyojf4vy-yfe7he
Shrinkage estimates of the signal coefficients are given by:

https://wolfram.com/xid/0d4mzssfvyojf4vy-8ov67g

https://wolfram.com/xid/0d4mzssfvyojf4vy-5fwm2p

https://wolfram.com/xid/0d4mzssfvyojf4vy-bnqybn
Use WaveletMapIndexed to map over detail coefficients:

https://wolfram.com/xid/0d4mzssfvyojf4vy-7gvwk4
Reconstruct thresholded signal coefficients:

https://wolfram.com/xid/0d4mzssfvyojf4vy-mi6f74

Properties & Relations (3)Properties of the function, and connections to other functions
MapIndexed[f,expr] applies f to the parts of any expression:

https://wolfram.com/xid/0d4mzssfvyojf4vy-hrqdz8

WaveletMapIndexed[f,wd] applies f to the coefficients in the wavelet data object wd:

https://wolfram.com/xid/0d4mzssfvyojf4vy-i8md3b

https://wolfram.com/xid/0d4mzssfvyojf4vy-b1ja8r

WaveletMapIndexed[vMap[f,v],wd] applies f to each part of each coefficient:

https://wolfram.com/xid/0d4mzssfvyojf4vy-hfkf4

MapIndexed gives the part specification as the second argument of f:

https://wolfram.com/xid/0d4mzssfvyojf4vy-bzvhh

WaveletMapIndexed gives the wavelet index specification as the second argument of f:

https://wolfram.com/xid/0d4mzssfvyojf4vy-f86ezp

WaveletMapIndexed transforms arrays of coefficients, giving a new DiscreteWaveletData:

https://wolfram.com/xid/0d4mzssfvyojf4vy-bhofpp

https://wolfram.com/xid/0d4mzssfvyojf4vy-iiv4n

Use Map and Normal[dwd] to transform coefficients into normal expressions:

https://wolfram.com/xid/0d4mzssfvyojf4vy-hosh2q

Or use ReplaceAll (/.):

https://wolfram.com/xid/0d4mzssfvyojf4vy-ezaiu2

Possible Issues (2)Common pitfalls and unexpected behavior
The function f is always passed the index specification as its second argument:

https://wolfram.com/xid/0d4mzssfvyojf4vy-7p2bk

https://wolfram.com/xid/0d4mzssfvyojf4vy-bm7ux2


Use a function that operates on its first argument only:

https://wolfram.com/xid/0d4mzssfvyojf4vy-mtel86

The function f should return an array or image of the same dimensions:

https://wolfram.com/xid/0d4mzssfvyojf4vy-h83x0o

https://wolfram.com/xid/0d4mzssfvyojf4vy-eh8vne


Listable functions return an array of the same dimensions:

https://wolfram.com/xid/0d4mzssfvyojf4vy-g9sc0p

Arithmetic operations such as multiplication are Listable:

https://wolfram.com/xid/0d4mzssfvyojf4vy-ftqals

Use Map for functions that are not Listable:

https://wolfram.com/xid/0d4mzssfvyojf4vy-d44cbv

Wolfram Research (2010), WaveletMapIndexed, Wolfram Language function, https://reference.wolfram.com/language/ref/WaveletMapIndexed.html.
Text
Wolfram Research (2010), WaveletMapIndexed, Wolfram Language function, https://reference.wolfram.com/language/ref/WaveletMapIndexed.html.
Wolfram Research (2010), WaveletMapIndexed, Wolfram Language function, https://reference.wolfram.com/language/ref/WaveletMapIndexed.html.
CMS
Wolfram Language. 2010. "WaveletMapIndexed." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/WaveletMapIndexed.html.
Wolfram Language. 2010. "WaveletMapIndexed." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/WaveletMapIndexed.html.
APA
Wolfram Language. (2010). WaveletMapIndexed. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/WaveletMapIndexed.html
Wolfram Language. (2010). WaveletMapIndexed. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/WaveletMapIndexed.html
BibTeX
@misc{reference.wolfram_2025_waveletmapindexed, author="Wolfram Research", title="{WaveletMapIndexed}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/WaveletMapIndexed.html}", note=[Accessed: 28-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_waveletmapindexed, organization={Wolfram Research}, title={WaveletMapIndexed}, year={2010}, url={https://reference.wolfram.com/language/ref/WaveletMapIndexed.html}, note=[Accessed: 28-March-2025
]}