1 | % ----------------------------------------------------------------------- |
---|
2 | % app-waveletNoise.tex: Section detailing how the rms noise scales |
---|
3 | % with wavelet scale in the a trous method. |
---|
4 | % ----------------------------------------------------------------------- |
---|
5 | % Copyright (C) 2006, Matthew Whiting, ATNF |
---|
6 | % |
---|
7 | % This program is free software; you can redistribute it and/or modify it |
---|
8 | % under the terms of the GNU General Public License as published by the |
---|
9 | % Free Software Foundation; either version 2 of the License, or (at your |
---|
10 | % option) any later version. |
---|
11 | % |
---|
12 | % Duchamp is distributed in the hope that it will be useful, but WITHOUT |
---|
13 | % ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
14 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
---|
15 | % for more details. |
---|
16 | % |
---|
17 | % You should have received a copy of the GNU General Public License |
---|
18 | % along with Duchamp; if not, write to the Free Software Foundation, |
---|
19 | % Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA |
---|
20 | % |
---|
21 | % Correspondence concerning Duchamp may be directed to: |
---|
22 | % Internet email: Matthew.Whiting [at] atnf.csiro.au |
---|
23 | % Postal address: Dr. Matthew Whiting |
---|
24 | % Australia Telescope National Facility, CSIRO |
---|
25 | % PO Box 76 |
---|
26 | % Epping NSW 1710 |
---|
27 | % AUSTRALIA |
---|
28 | % ----------------------------------------------------------------------- |
---|
29 | \secA{Gaussian noise and the wavelet scale} |
---|
30 | \label{app-scaling} |
---|
31 | |
---|
32 | The key element in the wavelet reconstruction of an array is the |
---|
33 | thresholding of the individual wavelet coefficient arrays. This is |
---|
34 | usually done by choosing a level to be some number of standard |
---|
35 | deviations above the mean value. |
---|
36 | |
---|
37 | However, since the wavelet arrays are produced by convolving the input |
---|
38 | array by an increasingly large filter, the pixels in the coefficient |
---|
39 | arrays become increasingly correlated as the scale of the filter |
---|
40 | increases. This results in the measured standard deviation from a |
---|
41 | given coefficient array decreasing with increasing scale. To calculate |
---|
42 | this, we need to take into account how many other pixels each pixel in |
---|
43 | the convolved array depends on. |
---|
44 | |
---|
45 | To demonstrate, suppose we have a 1-D array with $N$ pixel values |
---|
46 | given by $F_i,\ i=1,...,N$, and we convolve it with the B$_3$-spline |
---|
47 | filter, defined by the set of coefficients |
---|
48 | $\{1/16,1/4,3/8,1/4,1/16\}$. The flux of the $i$th pixel in the |
---|
49 | convolved array will be |
---|
50 | \[ |
---|
51 | F'_i = \frac{1}{16}F_{i-2} + \frac{1}{4}F_{i-1} + \frac{3}{8}F_{i} |
---|
52 | + \frac{1}{4}F_{i+1} + \frac{1}{16}F_{i+2} |
---|
53 | \] |
---|
54 | and the flux of the corresponding pixel in the wavelet array will be |
---|
55 | \[ |
---|
56 | W'_i = F_i - F'_i = \frac{-1}{16}F_{i-2} - \frac{1}{4}F_{i-1} |
---|
57 | + \frac{5}{8}F_{i} - \frac{1}{4}F_{i+1} - \frac{1}{16}F_{i+2} |
---|
58 | \] |
---|
59 | Now, assuming each pixel has the same standard deviation |
---|
60 | $\sigma_i=\sigma$, we can work out the standard deviation for the |
---|
61 | wavelet array: |
---|
62 | \[ |
---|
63 | \sigma'_i = \sigma \sqrt{\left(\frac{1}{16}\right)^2 |
---|
64 | + \left(\frac{1}{4}\right)^2 + \left(\frac{5}{8}\right)^2 |
---|
65 | + \left(\frac{1}{4}\right)^2 + \left(\frac{1}{16}\right)^2} |
---|
66 | = 0.72349\ \sigma |
---|
67 | \] |
---|
68 | Thus, the first scale wavelet coefficient array will have a standard |
---|
69 | deviation of 72.3\% of the input array. This procedure can be followed |
---|
70 | to calculate the necessary values for all scales, dimensions and |
---|
71 | filters used by \duchamp. |
---|
72 | |
---|
73 | Calculating these values is clearly a critical step in performing the |
---|
74 | reconstruction. The method used by \citet{starck02a} was to |
---|
75 | simulate data sets with Gaussian noise, take the wavelet transform, |
---|
76 | and measure the value of $\sigma$ for each scale. We take a different |
---|
77 | approach, by calculating the scaling factors directly from the filter |
---|
78 | coefficients by taking the wavelet transform of an array made up of a |
---|
79 | 1 in the central pixel and 0s everywhere else. The scaling value is |
---|
80 | then derived by taking the square root of the sum (in quadrature) of |
---|
81 | all the wavelet coefficient values at each scale. We give the scaling |
---|
82 | factors for the three filters available to \duchamp below. These |
---|
83 | values are hard-coded into \duchamp, so no on-the-fly calculation of |
---|
84 | them is necessary. |
---|
85 | |
---|
86 | Memory limitations prevent us from calculating factors for large |
---|
87 | scales, particularly for the three-dimensional case (hence the smaller |
---|
88 | table). To calculate factors for higher scales than those available, |
---|
89 | we divide the previous scale's factor by either $\sqrt{2}$, $2$, or |
---|
90 | $\sqrt{8}$ for 1D, 2D and 3D respectively. |
---|
91 | |
---|
92 | |
---|
93 | \begin{table}[b] |
---|
94 | \begin{tabular}{llll} |
---|
95 | \hline |
---|
96 | & $B_3$ Spline & Triangle & Haar\\ |
---|
97 | & $\{\frac{1}{16},\frac{1}{4},\frac{3}{8},\frac{1}{4},\frac{1}{16}\}$ |
---|
98 | & $\{\frac{1}{4},\frac{1}{2},\frac{1}{4}\}$ |
---|
99 | & $\{0,\frac{1}{2},\frac{1}{2}\}$ \\ |
---|
100 | \hline |
---|
101 | \multicolumn{4}{l}{1 dimension}\\ |
---|
102 | \hline |
---|
103 | 1 & 0.723489806 & 0.612372436 & 0.707106781 \\ |
---|
104 | 2 & 0.285450405 & 0.330718914 & 0.5 \\ |
---|
105 | 3 & 0.177947535 & 0.211947812 & 0.353553391 \\ |
---|
106 | 4 & 0.122223156 & 0.145740298 & 0.25 \\ |
---|
107 | 5 & 0.0858113122 & 0.102310944 & 0.176776695 \\ |
---|
108 | 6 & 0.0605703043 & 0.0722128185 & 0.125 \\ |
---|
109 | 7 & 0.0428107206 & 0.0510388224 & 0.0883883476 \\ |
---|
110 | 8 & 0.0302684024 & 0.0360857673 & 0.0625 \\ |
---|
111 | 9 & 0.0214024008 & 0.0255157615 & 0.0441941738 \\ |
---|
112 | 10 & 0.0151336781 & 0.0180422389 & 0.03125 \\ |
---|
113 | 11 & 0.0107011079 & 0.0127577667 & 0.0220970869 \\ |
---|
114 | 12 & 0.00756682272 & 0.00902109930 & 0.015625 \\ |
---|
115 | 13 & 0.00535055108 & 0.00637887978 & 0.0110485435 \\ |
---|
116 | \hline |
---|
117 | \multicolumn{4}{l}{2 dimension}\\ |
---|
118 | \hline |
---|
119 | 1 & 0.890796310 & 0.800390530 & 0.866025404 \\ |
---|
120 | 2 & 0.200663851 & 0.272878894 & 0.433012702 \\ |
---|
121 | 3 & 0.0855075048 & 0.119779282 & 0.216506351 \\ |
---|
122 | 4 & 0.0412474444 & 0.0577664785 & 0.108253175 \\ |
---|
123 | 5 & 0.0204249666 & 0.0286163283 & 0.0541265877 \\ |
---|
124 | 6 & 0.0101897592 & 0.0142747506 & 0.0270632939 \\ |
---|
125 | 7 & 0.00509204670 & 0.00713319703 & 0.0135316469 \\ |
---|
126 | 8 & 0.00254566946 & 0.00356607618 & 0.00676582347 \\ |
---|
127 | 9 & 0.00127279050 & 0.00178297280 & 0.00338291173 \\ |
---|
128 | 10 & 0.000636389722 & 0.000891478237 & 0.00169145587 \\ |
---|
129 | 11 & 0.000318194170 & 0.000445738098 & 0.000845727933 \\ |
---|
130 | \hline |
---|
131 | \multicolumn{4}{l}{3 dimension}\\ |
---|
132 | \hline |
---|
133 | 1 & 0.956543592 & 0.895954449 & 0.935414347 \\ |
---|
134 | 2 & 0.120336499 & 0.192033014 & 0.330718914\\ |
---|
135 | 3 & 0.0349500154 & 0.0576484078 & 0.116926793\\ |
---|
136 | 4 & 0.0118164242 & 0.0194912393 & 0.0413398642\\ |
---|
137 | 5 & 0.00413233507 & 0.00681278387 & 0.0146158492\\ |
---|
138 | 6 & 0.00145703714 & 0.00240175885 & 0.00516748303\\ |
---|
139 | 7 & 0.000514791120 & 0.000848538128 & 0.00182698115\\ |
---|
140 | \end{tabular} |
---|
141 | %\caption{Standard deviation scaling coefficients for three different wavelet filter |
---|
142 | %functions, when used in 1D, 2D and 3D situations. The coefficients |
---|
143 | %defining each filter are shown at the top of each column.} |
---|
144 | %\label{tab-scaling} |
---|
145 | \end{table} |
---|
146 | |
---|
147 | |
---|
148 | %%% Local Variables: |
---|
149 | %%% mode: latex |
---|
150 | %%% TeX-master: "Guide" |
---|
151 | %%% End: |
---|