2.11.2.5 idwt(Pro)
Menu Information
Analysis: Signal Processing: Wavelet: Reconstruction
Brief Information
Reconstruct a signal from its coefficients
Additional Information
This feature is for OriginPro only.
Command Line Usage
1. idwt ca:=Col(1) cd:=Col(2);
2. idwt ca:=Col(1) cd:=Col(2) ext:=z;
3. idwt ca:=Col(1) cd:=Col(2) type:=db3;
4. idwt ca:=Col(1) cd:=Col(2) ox:=Col(3); //coefficients in Column 1 and 2; save the result to Column 3
X-Function Execution Options
Please refer to the page for additional option switches when accessing the x-function from script
Variables
Display Name
|
Variable Name
|
I/O and Type
|
Default Value
|
Description
|
Approximation Coefficients
|
ca
|
Input
vector
|
<active>
|
Specify the approximation coefficients
|
Detail Coefficients
|
cd
|
Input
vector
|
<active>
|
Specify the detail coefficients
|
Wavelet Type
|
type
|
Input
int
|
H
|
Specify the wavelet type. This should correspond to the wavelet type used by the wavelet decomposition that has produced the input coefficients.
Option list
- haar:Haar
- Haar wavelet
- db 2:DB2
- Daubechies wavelet (N=4
- db 3:DB3
- Daubechies wavelet (N=6)
- db 4:DB4
- Daubechies wavelet (N=8)
- db 5:DB5
- Daubechies wavelet (N=10)
- db 6:DB6
- Daubechies wavelet (N=12)
- db 7:DB7
- Daubechies wavelet (N=14)
- db 8:DB8
- Daubechies wavelet (N=16)
- db 9:DB9
- Daubechies wavelet (N=18)
- db 10:DB10
- Daubechies wavelet (N=20)
- b11:Bior1.1
- Biorthogonal (Nr=1, Nd=1)
- b13:Bior1.3
- Biorthogonal (Nr=1, Nd=3)
- b15:Bior1.5
- Biorthogonal (Nr=1, Nd=5)
- b22:Bior2.2
- Biorthogonal (Nr=2, Nd=2)
- b24:Bior2.4
- Biorthogonal (Nr=2, Nd=4)
- b26:Bior2.6
- Biorthogonal (Nr=2, Nd=6)
- b28:Bior2.8
- Biorthogonal (Nr=2, Nd=8)
- b31:Bior3.1
- Biorthogonal (Nr=3, Nd=1)
- b33:Bior3.3
- Biorthogonal (Nr=3 Nd=3)
- b35:Bior3.5
- Biorthogonal (Nr=3, Nd=5)
- b37:Bior3.7
- Biorthogonal (Nr=3, Nd=7)
|
Boundary
|
ext
|
Input
int
|
P
|
Specify the end extension method to deal with boundary effects
Option list
- periodic:Periodic
- The input signal will be viewed as periodic.
- z:Zero -padded
- The data points outside the input range will be viewed as zeroes.
|
Output
|
ox
|
Output
vector
|
<new>
|
Specify the output signal
|
Description
idwt reconstructs a signal from its approximation coefficients and detail coefficients.
To construct the signal correctly, the wavelet type and the boundary should be the same with the options chosen for the decomposition that has produced the coefficients.
Examples
- To reconstruct a signal from its approximation coefficients and detail coefficients saved in Column 1 and 2 of the active sheet using DB4 wavelet and periodic as the extension mode, use the Command Window:
idwt ca:=Col(1) cd:=Col(2) type:=1
- To perform idwt using a pre-saved analysis theme called MyTheme, use the Command Window:
idwt -t "MyTheme"
// Wavelet decomposition and reconstruction with two different wavelet types
//Create a new workbook and import sample data
newbook name:="Wavelet Demo" sheet:=1;
fname$=system.path.program$ + "Samples\Signal Processing\Step Signal With Random Noise.dat";
impasc;
//Multi-level wavelet decomposition using two wavelet types
mdwt ix:=col(2) type:=haar level:=3 rd:=[<input>]"Haar";
mdwt ix:=1!col(2) type:=db7 level:=3 rd:=[<input>]"DB7";
//Reconstruction
idwt ca:=2!1 cd:=2!2 type:=haar;
idwt ca:=2!5 cd:=2!3 type:=haar;
idwt ca:=2!6 cd:=2!4 type:=haar;
idwt ca:=3!1 cd:=3!2 type:=db2;
idwt ca:=3!5 cd:=3!3 type:=db2;
idwt ca:=3!6 cd:=3!4 type:=db2;
//Report
newsheet name:="report" labels:="|Haar|DB7";
wcolwidth irng:=1:3 width:="15";
wrowheight irng:=col(1)[1:5] height:=5;
wcellcolor irng:=col(1)[1:5] color:=color(249, 236, 151);
col(1)[1]$="CA3";
col(1)[2]$="CD3";
col(1)[3]$="CD2";
col(1)[4]$="CD1";
col(1)[5]$="Reconstructed";
//Insert sparklines for coefficients and reconstructed signals
insertSparklines irng:=(2!1:4, 2!7) name:=0 orng:=col(2)[1];
insertSparklines irng:=(3!1:4, 3!7) name:=0 orng:=col(3)[1];
window -z; //Maximize window
More Information
For more information, please refer to our User Guide.
Related X-Functions
dwt, dwt2, idwt2
Keywords:wavelet, approximation
|