File: node11.html

package info (click to toggle)
gcx 0.9.11-4
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 5,072 kB
  • ctags: 3,445
  • sloc: ansic: 37,434; sh: 3,060; perl: 1,453; makefile: 162
file content (344 lines) | stat: -rw-r--r-- 11,058 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Robust Averaging</TITLE>
<META NAME="description" CONTENT="Robust Averaging">
<META NAME="keywords" CONTENT="gcx">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">

<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="gcx.css">

<LINK REL="next" HREF="node12.html">
<LINK REL="previous" HREF="node10.html">
<LINK REL="up" HREF="gcx.html">
<LINK REL="next" HREF="node12.html">
</HEAD>

<BODY >

<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html694"
  HREF="node12.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
 SRC="/usr/share/latex2html/icons/next.png"></A> 
<A NAME="tex2html690"
  HREF="gcx.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
 SRC="/usr/share/latex2html/icons/up.png"></A> 
<A NAME="tex2html684"
  HREF="node10.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
 SRC="/usr/share/latex2html/icons/prev.png"></A> 
<A NAME="tex2html692"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
 SRC="/usr/share/latex2html/icons/contents.png"></A>  
<BR>
<B> Next:</B> <A NAME="tex2html695"
  HREF="node12.html">Native Star Files</A>
<B> Up:</B> <A NAME="tex2html691"
  HREF="gcx.html">GCX User's Manual</A>
<B> Previous:</B> <A NAME="tex2html685"
  HREF="node10.html">Noise Modelling</A>
 &nbsp; <B>  <A NAME="tex2html693"
  HREF="node1.html">Contents</A></B> 
<BR>
<BR></DIV>
<!--End of Navigation Panel-->

<H1><A NAME="SECTION001100000000000000000"></A><A NAME="ap:robust"></A>
<BR>
Robust Averaging
</H1>

<P>
A robust averaging algorithm is implemented by <SMALL>GCX </SMALL>and used in
several places, most notably for zeropoint fitting by the aperture
photometry and multiframe reduction routines. 
The algorithm calculates the robust average of a number of values
(for the zeropoint routines, these are the differences between the
standard and instrumental magnitudes of standard stars). 

<P>
The data used consists of the values we want to calculate, and
the estimated error of each value. For fitting frame zeropoints
they are:
<BR>
<DIV ALIGN="CENTER">

<!-- MATH
 \begin{eqnarray}
y_k = S_k - I_k\\
\epsilon^2_k = \epsilon_{ik}^2 + \epsilon_{sk}^2
\end{eqnarray}
 -->
<TABLE CELLPADDING="0" ALIGN="CENTER" WIDTH="100%">
<TR VALIGN="MIDDLE"><TD NOWRAP WIDTH="50%" ALIGN="RIGHT"><IMG
 WIDTH="100" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
 SRC="img174.png"
 ALT="$\displaystyle y_k = S_k - I_k$"></TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
<TD CLASS="eqno" WIDTH=10 ALIGN="RIGHT">
(B.<SPAN CLASS="arabic">1</SPAN>)</TD></TR>
<TR VALIGN="MIDDLE"><TD NOWRAP WIDTH="50%" ALIGN="RIGHT"><IMG
 WIDTH="105" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
 SRC="img175.png"
 ALT="$\displaystyle \epsilon^2_k = \epsilon_{ik}^2 + \epsilon_{sk}^2$"></TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
<TD CLASS="eqno" WIDTH=10 ALIGN="RIGHT">
(B.<SPAN CLASS="arabic">2</SPAN>)</TD></TR>
</TABLE></DIV>
<BR CLEAR="ALL"><P></P>
where <SPAN CLASS="MATH"><IMG
 WIDTH="16" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
 SRC="img135.png"
 ALT="$S$"></SPAN> is the standard magnitude, <SPAN CLASS="MATH"><IMG
 WIDTH="13" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
 SRC="img13.png"
 ALT="$I$"></SPAN> is the instrumental magnitude, 
<SPAN CLASS="MATH"><IMG
 WIDTH="17" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
 SRC="img176.png"
 ALT="$\epsilon_i$"></SPAN> is the estimated error of the instrumental magnitude, 
<SPAN CLASS="MATH"><IMG
 WIDTH="18" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
 SRC="img177.png"
 ALT="$\epsilon_s$"></SPAN> is the error of the standard magnitude of each star.
Each star is assigned a <EM>natural weight</EM>, calculated as
<BR>
<DIV ALIGN="RIGHT" CLASS="mathdisplay">

<!-- MATH
 \begin{equation}
W_k = \frac{1}{\epsilon_k^2}
\end{equation}
 -->
<TABLE WIDTH="100%" ALIGN="CENTER">
<TR VALIGN="MIDDLE"><TD ALIGN="CENTER" NOWRAP><IMG
 WIDTH="64" HEIGHT="47" BORDER="0"
 SRC="img178.png"
 ALT="\begin{displaymath}
W_k = \frac{1}{\epsilon_k^2}
\end{displaymath}"></TD>
<TD CLASS="eqno" WIDTH=10 ALIGN="RIGHT">
(B.<SPAN CLASS="arabic">3</SPAN>)</TD></TR>
</TABLE>
<BR CLEAR="ALL"></DIV><P></P>
We start with a very robust estimate of the average:
<BR>
<DIV ALIGN="RIGHT" CLASS="mathdisplay">

<!-- MATH
 \begin{equation}
\widetilde{Z}={\rm median}(y_k)
\end{equation}
 -->
<TABLE WIDTH="100%" ALIGN="CENTER">
<TR VALIGN="MIDDLE"><TD ALIGN="CENTER" NOWRAP><IMG
 WIDTH="119" HEIGHT="31" BORDER="0"
 SRC="img179.png"
 ALT="\begin{displaymath}
\widetilde{Z}={\rm median}(y_k)
\end{displaymath}"></TD>
<TD CLASS="eqno" WIDTH=10 ALIGN="RIGHT">
(B.<SPAN CLASS="arabic">4</SPAN>)</TD></TR>
</TABLE>
<BR CLEAR="ALL"></DIV><P></P>
and calculate the <EM>residuals</EM> of each value:
<BR>
<DIV ALIGN="RIGHT" CLASS="mathdisplay">

<!-- MATH
 \begin{equation}
\rho_k=y_k - \widetilde{Z}
\end{equation}
 -->
<A NAME="eq:residuals"></A>
<TABLE WIDTH="100%" ALIGN="CENTER">
<TR VALIGN="MIDDLE"><TD ALIGN="CENTER" NOWRAP><A NAME="eq:residuals"></A><IMG
 WIDTH="92" HEIGHT="30" BORDER="0"
 SRC="img180.png"
 ALT="\begin{displaymath}
\rho_k=y_k - \widetilde{Z}
\end{displaymath}"></TD>
<TD CLASS="eqno" WIDTH=10 ALIGN="RIGHT">
(B.<SPAN CLASS="arabic">5</SPAN>)</TD></TR>
</TABLE>
<BR CLEAR="ALL"></DIV><P></P>
and the <EM>standard errors</EM>:
<BR>
<DIV ALIGN="RIGHT" CLASS="mathdisplay">

<!-- MATH
 \begin{equation}
\rho'_k=(y_k - \widetilde{Z})\sqrt{W_k}
\end{equation}
 -->
<TABLE WIDTH="100%" ALIGN="CENTER">
<TR VALIGN="MIDDLE"><TD ALIGN="CENTER" NOWRAP><IMG
 WIDTH="146" HEIGHT="31" BORDER="0"
 SRC="img181.png"
 ALT="\begin{displaymath}
\rho'_k=(y_k - \widetilde{Z})\sqrt{W_k}
\end{displaymath}"></TD>
<TD CLASS="eqno" WIDTH=10 ALIGN="RIGHT">
(B.<SPAN CLASS="arabic">6</SPAN>)</TD></TR>
</TABLE>
<BR CLEAR="ALL"></DIV><P></P>
The expected value of each standard error is 1. We can identify
possible outliers by their large standard errors. A simple way to
treat outliers is to just exclude from the fit any value that has a
standard error larger than a certain threshold. This has the
disadvantage that small changes in the values can cause large jumps in
the solution if an outlier just crosses the threshold. Instead, we
adjust the weights of the data points to reduce the outliers'
contribution to the solution:
<BR>
<DIV ALIGN="RIGHT" CLASS="mathdisplay">

<!-- MATH
 \begin{equation}
W'_k = \frac{W_k}{1 + \left({\rho'_k}\over{\alpha}\right)^\beta}
\end{equation}
 -->
<TABLE WIDTH="100%" ALIGN="CENTER">
<TR VALIGN="MIDDLE"><TD ALIGN="CENTER" NOWRAP><IMG
 WIDTH="125" HEIGHT="62" BORDER="0"
 SRC="img182.png"
 ALT="\begin{displaymath}
W'_k = \frac{W_k}{1 + \left({\rho'_k}\over{\alpha}\right)^\beta}
\end{displaymath}"></TD>
<TD CLASS="eqno" WIDTH=10 ALIGN="RIGHT">
(B.<SPAN CLASS="arabic">7</SPAN>)</TD></TR>
</TABLE>
<BR CLEAR="ALL"></DIV><P></P>
The weighting function reduces the weight of values that have residuals <SPAN CLASS="MATH"><IMG
 WIDTH="16" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
 SRC="img183.png"
 ALT="$\alpha$"></SPAN> times larger 
than expected to one half. Of course values with even larger residuals are downweighted even 
more. The parameter <SPAN CLASS="MATH"><IMG
 WIDTH="15" HEIGHT="33" ALIGN="MIDDLE" BORDER="0"
 SRC="img184.png"
 ALT="$\beta$"></SPAN> tunes the ``sharpness'' of the weighting
function.<A NAME="tex2html69"
  HREF="footnode.html#foot1264"><SUP>B.<SPAN CLASS="arabic">1</SPAN></SUP></A>A new estimate of the average is produced by:
<BR>
<DIV ALIGN="RIGHT" CLASS="mathdisplay">

<!-- MATH
 \begin{equation}
\widetilde{Z}=\sum_k(y_k-\widetilde{Z})W'_k
\end{equation}
 -->
<TABLE WIDTH="100%" ALIGN="CENTER">
<TR VALIGN="MIDDLE"><TD ALIGN="CENTER" NOWRAP><IMG
 WIDTH="147" HEIGHT="48" BORDER="0"
 SRC="img185.png"
 ALT="\begin{displaymath}
\widetilde{Z}=\sum_k(y_k-\widetilde{Z})W'_k
\end{displaymath}"></TD>
<TD CLASS="eqno" WIDTH=10 ALIGN="RIGHT">
(B.<SPAN CLASS="arabic">8</SPAN>)</TD></TR>
</TABLE>
<BR CLEAR="ALL"></DIV><P></P>
The residual calculation, weighting and average estimating are
iterated until the estimate doesn't change. 

<P>
Finally, the error for the estimated parameters is calculated. 
the error of the zero point is:
<BR>
<DIV ALIGN="RIGHT" CLASS="mathdisplay">

<!-- MATH
 \begin{equation}
\epsilon_{\rm zp}^2 = \frac{\sum\rho_k^2W'_k}{\sum W'_k}
\end{equation}
 -->
<TABLE WIDTH="100%" ALIGN="CENTER">
<TR VALIGN="MIDDLE"><TD ALIGN="CENTER" NOWRAP><IMG
 WIDTH="107" HEIGHT="50" BORDER="0"
 SRC="img186.png"
 ALT="\begin{displaymath}
\epsilon_{\rm zp}^2 = \frac{\sum\rho_k^2W'_k}{\sum W'_k}
\end{displaymath}"></TD>
<TD CLASS="eqno" WIDTH=10 ALIGN="RIGHT">
(B.<SPAN CLASS="arabic">9</SPAN>)</TD></TR>
</TABLE>
<BR CLEAR="ALL"></DIV><P></P>
and the <EM>mean error of unit weight</EM> is:
<BR>
<DIV ALIGN="RIGHT" CLASS="mathdisplay">

<!-- MATH
 \begin{equation}
{\rm me1}^2 = \frac{\sum\rho_k^2W'_k}{N-1}
\end{equation}
 -->
<TABLE WIDTH="100%" ALIGN="CENTER">
<TR VALIGN="MIDDLE"><TD ALIGN="CENTER" NOWRAP><IMG
 WIDTH="126" HEIGHT="46" BORDER="0"
 SRC="img187.png"
 ALT="\begin{displaymath}
{\rm me1}^2 = \frac{\sum\rho_k^2W'_k}{N-1}
\end{displaymath}"></TD>
<TD CLASS="eqno" WIDTH=10 ALIGN="RIGHT">
(B.<SPAN CLASS="arabic">10</SPAN>)</TD></TR>
</TABLE>
<BR CLEAR="ALL"></DIV><P></P>
where <SPAN CLASS="MATH"><IMG
 WIDTH="20" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
 SRC="img31.png"
 ALT="$N$"></SPAN> is the number of standard stars. The mean error of unit weight 
is 1 in the ideal case (when all the errors are estimated correctly). A significantly
larger value should raise doubts about the error estimates.

<P>

<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A NAME="tex2html694"
  HREF="node12.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
 SRC="/usr/share/latex2html/icons/next.png"></A> 
<A NAME="tex2html690"
  HREF="gcx.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
 SRC="/usr/share/latex2html/icons/up.png"></A> 
<A NAME="tex2html684"
  HREF="node10.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
 SRC="/usr/share/latex2html/icons/prev.png"></A> 
<A NAME="tex2html692"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
 SRC="/usr/share/latex2html/icons/contents.png"></A>  
<BR>
<B> Next:</B> <A NAME="tex2html695"
  HREF="node12.html">Native Star Files</A>
<B> Up:</B> <A NAME="tex2html691"
  HREF="gcx.html">GCX User's Manual</A>
<B> Previous:</B> <A NAME="tex2html685"
  HREF="node10.html">Noise Modelling</A>
 &nbsp; <B>  <A NAME="tex2html693"
  HREF="node1.html">Contents</A></B> </DIV>
<!--End of Navigation Panel-->
<ADDRESS>
root
2005-11-27
</ADDRESS>
</BODY>
</HTML>