This file is indexed.

/usr/share/doc/libcpl-doc/html/group__cpl__detector.html is in libcpl-doc 6.6.1-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>Common Pipeline Library Reference Manual: High-level functions to compute detector features</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="cpl.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Common Pipeline Library Reference Manual
   &#160;<span id="projectnumber">6.6.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">High-level functions to compute detector features</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga83fd1a1d48eeeb444d6a1a84c6d5e2de"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__detector.html#ga83fd1a1d48eeeb444d6a1a84c6d5e2de">cpl_detector_interpolate_rejected</a> (cpl_image *self)</td></tr>
<tr class="memdesc:ga83fd1a1d48eeeb444d6a1a84c6d5e2de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Interpolate any bad pixels in an image and delete the bad pixel map.  <a href="#ga83fd1a1d48eeeb444d6a1a84c6d5e2de">More...</a><br /></td></tr>
<tr class="separator:ga83fd1a1d48eeeb444d6a1a84c6d5e2de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf1c0a4858464aadaef04d42770db2f7c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__detector.html#gaf1c0a4858464aadaef04d42770db2f7c">cpl_flux_get_bias_window</a> (const cpl_image *diff, const <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> *zone_def, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> ron_hsize, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> ron_nsamp, double *bias, double *error)</td></tr>
<tr class="memdesc:gaf1c0a4858464aadaef04d42770db2f7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the bias in a rectangle.  <a href="#gaf1c0a4858464aadaef04d42770db2f7c">More...</a><br /></td></tr>
<tr class="separator:gaf1c0a4858464aadaef04d42770db2f7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad77be43229e187b59bad4cdd766a53d0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__detector.html#gad77be43229e187b59bad4cdd766a53d0">cpl_flux_get_noise_ring</a> (const cpl_image *diff, const double *zone_def, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> ron_hsize, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> ron_nsamp, double *noise, double *error)</td></tr>
<tr class="memdesc:gad77be43229e187b59bad4cdd766a53d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the readout noise in a ring.  <a href="#gad77be43229e187b59bad4cdd766a53d0">More...</a><br /></td></tr>
<tr class="separator:gad77be43229e187b59bad4cdd766a53d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga74968d3ccbe99f2e4ec868cb931bb87e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__detector.html#ga74968d3ccbe99f2e4ec868cb931bb87e">cpl_flux_get_noise_window</a> (const cpl_image *diff, const <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> *zone_def, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> ron_hsize, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> ron_nsamp, double *noise, double *error)</td></tr>
<tr class="memdesc:ga74968d3ccbe99f2e4ec868cb931bb87e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the readout noise in a rectangle.  <a href="#ga74968d3ccbe99f2e4ec868cb931bb87e">More...</a><br /></td></tr>
<tr class="separator:ga74968d3ccbe99f2e4ec868cb931bb87e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<dl class="section user"><dt>Synopsis:</dt><dd><div class="fragment"><div class="line"><span class="preprocessor">#include &quot;cpl_detector.h&quot;</span></div>
</div><!-- fragment --> </dd></dl>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga83fd1a1d48eeeb444d6a1a84c6d5e2de"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> cpl_detector_interpolate_rejected </td>
          <td>(</td>
          <td class="paramtype">cpl_image *&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Interpolate any bad pixels in an image and delete the bad pixel map. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>The image to clean </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> or CPL_ERROR_NONE</dd></dl>
<p>The value of a bad pixel is interpolated from the good pixels among the 8 nearest. (If all but one of the eight neighboring pixels are bad, the interpolation becomes a nearest neighbor interpolation). For integer images the interpolation in done with floating-point and rounded to the nearest integer.</p>
<p>If there are pixels for which all of the eight neighboring pixels are bad, a subsequent interpolation pass is done, where the already interpolated pixels are included as source for the interpolation.</p>
<p>The interpolation passes are repeated until all bad pixels have been interpolated. In the worst case, all pixels will be interpolated from a single good pixel.</p>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if an input pointer is NULL</li>
<li>CPL_ERROR_DATA_NOT_FOUND if all pixels are bad </li>
</ul>

<p>References <a class="el" href="group__cpl__error.html#ga79968a56c1b2ee25b12747ad7e1b3478">cpl_ensure_code</a>, <a class="el" href="group__cpl__error.html#ga724de575c31ddf40f42786306f9dbdcb">cpl_error_get_code()</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7907a24014a3a45aebe5ee1842f0c6f3">CPL_ERROR_INVALID_TYPE</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0239c1c63e9d21e98e45221a3ad60406">CPL_ERROR_NONE</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>, <a class="el" href="group__cpl__image.html#ga035ba167b6776b782e9920335dba5587">cpl_image_accept_all()</a>, <a class="el" href="group__cpl__image.html#gaa199c6fc00ac1d83ed37fb9717e2c4bd">cpl_image_get_bpm_const()</a>, <a class="el" href="group__cpl__image.html#ga0b497875edfee08e540e69c2baea1ab4">cpl_image_get_data()</a>, <a class="el" href="group__cpl__image.html#gab5a6bc059aa1d38c37ab5852b5170e45">cpl_image_get_size_x()</a>, <a class="el" href="group__cpl__image.html#gaf3495f9be1d6892cfed9c5232ccee350">cpl_image_get_size_y()</a>, <a class="el" href="group__cpl__image.html#ga17f97e60794f88e7f06b85cccbecc132">cpl_image_get_type()</a>, <a class="el" href="group__cpl__mask.html#gac9ab11af7ef4ff0b8424141271fd685b">cpl_mask_get_data_const()</a>, <a class="el" href="group__cpl__type.html#gga3f03371e201544e9115b40065e47f086a4923f03f3a673edd344b0d81835ca69e">CPL_TYPE_DOUBLE</a>, <a class="el" href="group__cpl__type.html#gga3f03371e201544e9115b40065e47f086afc7205e8b040bdfdee6011685cfe4345">CPL_TYPE_DOUBLE_COMPLEX</a>, <a class="el" href="group__cpl__type.html#gga3f03371e201544e9115b40065e47f086aa44c37e26b9040a96e3a49b405946942">CPL_TYPE_FLOAT</a>, <a class="el" href="group__cpl__type.html#gga3f03371e201544e9115b40065e47f086ab2ab0f96a382011a38ee9446626fe1e0">CPL_TYPE_FLOAT_COMPLEX</a>, and <a class="el" href="group__cpl__type.html#gga3f03371e201544e9115b40065e47f086ae333db5ccea0813ccd892525b4ba1345">CPL_TYPE_INT</a>.</p>

</div>
</div>
<a class="anchor" id="gaf1c0a4858464aadaef04d42770db2f7c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> cpl_flux_get_bias_window </td>
          <td>(</td>
          <td class="paramtype">const cpl_image *&#160;</td>
          <td class="paramname"><em>diff</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> *&#160;</td>
          <td class="paramname"><em>zone_def</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a>&#160;</td>
          <td class="paramname"><em>ron_hsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a>&#160;</td>
          <td class="paramname"><em>ron_nsamp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>bias</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Compute the bias in a rectangle. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">diff</td><td>Input image, usually a difference frame. </td></tr>
    <tr><td class="paramname">zone_def</td><td>Zone where the bias is to be computed. </td></tr>
    <tr><td class="paramname">ron_hsize</td><td>to specify half size of squares (&lt;0 to use default) </td></tr>
    <tr><td class="paramname">ron_nsamp</td><td>to specify the nb of samples (&lt;0 to use default) </td></tr>
    <tr><td class="paramname">bias</td><td>Output parameter: bias in the frame. </td></tr>
    <tr><td class="paramname">error</td><td>Output parameter: error on the bias. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE on success or the relevant <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> on error </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__detector.html#ga74968d3ccbe99f2e4ec868cb931bb87e" title="Compute the readout noise in a rectangle. ">cpl_flux_get_noise_window()</a>, rand() </dd></dl>
<dl class="section note"><dt>Note</dt><dd>No calls to srand() are made from CPL </dd></dl>

<p>References <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0239c1c63e9d21e98e45221a3ad60406">CPL_ERROR_NONE</a>.</p>

</div>
</div>
<a class="anchor" id="gad77be43229e187b59bad4cdd766a53d0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> cpl_flux_get_noise_ring </td>
          <td>(</td>
          <td class="paramtype">const cpl_image *&#160;</td>
          <td class="paramname"><em>diff</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double *&#160;</td>
          <td class="paramname"><em>zone_def</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a>&#160;</td>
          <td class="paramname"><em>ron_hsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a>&#160;</td>
          <td class="paramname"><em>ron_nsamp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>noise</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Compute the readout noise in a ring. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">diff</td><td>Input image, usually a difference frame. </td></tr>
    <tr><td class="paramname">zone_def</td><td>Zone where the readout noise is to be computed. </td></tr>
    <tr><td class="paramname">ron_hsize</td><td>to specify half size of squares (&lt;0 to use default) </td></tr>
    <tr><td class="paramname">ron_nsamp</td><td>to specify the nb of samples (&lt;0 to use default) </td></tr>
    <tr><td class="paramname">noise</td><td>On success, *noise is the noise in the frame. </td></tr>
    <tr><td class="paramname">error</td><td>NULL, or on success, *error is the error in the noise </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE on success or the relevant <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> on error </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__detector.html#ga74968d3ccbe99f2e4ec868cb931bb87e" title="Compute the readout noise in a rectangle. ">cpl_flux_get_noise_window()</a>, rand() </dd></dl>
<dl class="section note"><dt>Note</dt><dd>No calls to srand() are made from CPL</dd></dl>
<p>The provided zone is an array of four integers specifying the zone to take into account for the computation. The integers specify a ring as x, y, r1, r2 where these coordinates are given in the FITS notation (x from 1 to nx, y from 1 to ny and bottom to top).</p>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if diff noise or zone_def is NULL</li>
<li>CPL_ERROR_ILLEGAL_INPUT if the internal radius is bigger than the external one in zone_def</li>
<li>CPL_ERROR_DATA_NOT_FOUND if an insufficient number of samples were found inside the ring </li>
</ul>

<p>References <a class="el" href="group__cpl__bivector.html#gab49cf8bcea934646b96a4d4e476d7e54">cpl_bivector_delete()</a>, <a class="el" href="group__cpl__bivector.html#ga6df6e1f59656d27f36be998b18f53ea4">cpl_bivector_get_x_data_const()</a>, <a class="el" href="group__cpl__bivector.html#ga4efd181088428c4fe42541cad1c594af">cpl_bivector_get_y_data_const()</a>, <a class="el" href="group__cpl__error.html#ga79968a56c1b2ee25b12747ad7e1b3478">cpl_ensure_code</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a5b82c7780a2a8a79dfafcac70717b830">CPL_ERROR_DATA_NOT_FOUND</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900ae6ab32df318c1af9afcddcb8249cad51">CPL_ERROR_ILLEGAL_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0239c1c63e9d21e98e45221a3ad60406">CPL_ERROR_NONE</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>, <a class="el" href="group__cpl__errorstate.html#gadbf3f1525429b95837bc79a5e99b12cd">cpl_errorstate_get()</a>, <a class="el" href="group__cpl__errorstate.html#gab4487759414dfe1a7403321b86d5b3cd">cpl_errorstate_is_equal()</a>, <a class="el" href="group__cpl__errorstate.html#gaa72d44efb065d64d8f1cac3d0e5bf8af">cpl_errorstate_set()</a>, <a class="el" href="group__cpl__image.html#gab5a6bc059aa1d38c37ab5852b5170e45">cpl_image_get_size_x()</a>, <a class="el" href="group__cpl__image.html#gaf3495f9be1d6892cfed9c5232ccee350">cpl_image_get_size_y()</a>, <a class="el" href="group__cpl__image.html#ga0e366eb2c54499be78741bd4da925604">cpl_image_get_stdev_window()</a>, <a class="el" href="group__cpl__type.html#ga4f6c44a14bbc3aea87b1f47acf8dfd02">CPL_SIZE_FORMAT</a>, <a class="el" href="group__cpl__vector.html#gaf563c19d309c5b60d148a84cb156c2cf">cpl_vector_delete()</a>, <a class="el" href="group__cpl__vector.html#ga75be26b3974441825b596a77eb014da2">cpl_vector_get_median()</a>, <a class="el" href="group__cpl__vector.html#gac1dd7e2f4ff3e1cb9137d8af88e54df0">cpl_vector_get_stdev()</a>, <a class="el" href="group__cpl__vector.html#ga0a0d8b61b19cd1d3668525a3f2d55e72">cpl_vector_new()</a>, <a class="el" href="group__cpl__vector.html#ga13138212c2b535b08cd1174afa479d28">cpl_vector_set()</a>, <a class="el" href="group__cpl__vector.html#ga3d022e443df6e51ae2c005285d978957">cpl_vector_unwrap()</a>, and <a class="el" href="group__cpl__vector.html#ga1f52028a78be1cab17567cf15c483fcc">cpl_vector_wrap()</a>.</p>

</div>
</div>
<a class="anchor" id="ga74968d3ccbe99f2e4ec868cb931bb87e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> cpl_flux_get_noise_window </td>
          <td>(</td>
          <td class="paramtype">const cpl_image *&#160;</td>
          <td class="paramname"><em>diff</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> *&#160;</td>
          <td class="paramname"><em>zone_def</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a>&#160;</td>
          <td class="paramname"><em>ron_hsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a>&#160;</td>
          <td class="paramname"><em>ron_nsamp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>noise</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Compute the readout noise in a rectangle. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">diff</td><td>Input image, usually a difference frame. </td></tr>
    <tr><td class="paramname">zone_def</td><td>Zone where the readout noise is to be computed. </td></tr>
    <tr><td class="paramname">ron_hsize</td><td>to specify half size of squares (&lt;0 to use default) </td></tr>
    <tr><td class="paramname">ron_nsamp</td><td>to specify the nb of samples (&lt;0 to use default) </td></tr>
    <tr><td class="paramname">noise</td><td>Output parameter: noise in the frame. </td></tr>
    <tr><td class="paramname">error</td><td>Output parameter: error on the noise. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE on success or the relevant <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> on error </dd></dl>
<dl class="section see"><dt>See also</dt><dd>rand() </dd></dl>
<dl class="section note"><dt>Note</dt><dd>No calls to srand() are made from CPL</dd></dl>
<p>This function is meant to compute the readout noise in a frame by means of a MonteCarlo approach. The input is a frame, usually a difference between two frames taken with the same settings for the acquisition system, although no check is done on that, it is up to the caller to feed in the right kind of frame.</p>
<p>The provided zone is an array of four integers specifying the zone to take into account for the computation. The integers specify ranges as xmin, xmax, ymin, ymax, where these coordinates are given in the FITS notation (x from 1 to lx, y from 1 to ly and bottom to top). Specify NULL instead of an array of four values to use the whole frame in the computation.</p>
<p>The algorithm will create typically 100 9x9 windows on the frame, scattered optimally using a Poisson law. In each window, the standard deviation of all pixels in the window is computed and this value is stored. The readout noise is the median of all computed standard deviations, and the error is the standard deviation of the standard deviations.</p>
<p>Both noise and error are returned by modifying a passed double. If you do not care about the error, pass NULL.</p>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set in this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if diff or noise is NULL</li>
<li>CPL_ERROR_ILLEGAL_INPUT if the specified window (zone_def) is invalid </li>
</ul>

<p>References <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0239c1c63e9d21e98e45221a3ad60406">CPL_ERROR_NONE</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>