/usr/share/doc/libcpl-dev/html/group__cpl__wlcalib.html is in libcpl-doc 7.1-3.
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 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 | <!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.10"/>
<title>Common Pipeline Library Reference Manual: Wavelength calibration</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 id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Common Pipeline Library Reference Manual
 <span id="projectnumber">7.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related 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">Wavelength calibration</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:ga7347aeb9d5fab72e41780718b5e9cd5f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__wlcalib.html#ga7347aeb9d5fab72e41780718b5e9cd5f">cpl_wlcalib_fill_line_spectrum</a> (cpl_vector *self, void *model, const cpl_polynomial *disp)</td></tr>
<tr class="memdesc:ga7347aeb9d5fab72e41780718b5e9cd5f"><td class="mdescLeft"> </td><td class="mdescRight">Generate a 1D spectrum from a model and a dispersion relation. <a href="#ga7347aeb9d5fab72e41780718b5e9cd5f">More...</a><br /></td></tr>
<tr class="separator:ga7347aeb9d5fab72e41780718b5e9cd5f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga23c1b3eac19cf1f9f1771b8e3cbd51b1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__wlcalib.html#ga23c1b3eac19cf1f9f1771b8e3cbd51b1">cpl_wlcalib_fill_line_spectrum_fast</a> (cpl_vector *self, void *model, const cpl_polynomial *disp)</td></tr>
<tr class="memdesc:ga23c1b3eac19cf1f9f1771b8e3cbd51b1"><td class="mdescLeft"> </td><td class="mdescRight">Generate a 1D spectrum from a model and a dispersion relation. <a href="#ga23c1b3eac19cf1f9f1771b8e3cbd51b1">More...</a><br /></td></tr>
<tr class="separator:ga23c1b3eac19cf1f9f1771b8e3cbd51b1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gae4d04a25632a755752a715e519a7927a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__wlcalib.html#gae4d04a25632a755752a715e519a7927a">cpl_wlcalib_fill_logline_spectrum</a> (cpl_vector *self, void *model, const cpl_polynomial *disp)</td></tr>
<tr class="memdesc:gae4d04a25632a755752a715e519a7927a"><td class="mdescLeft"> </td><td class="mdescRight">Generate a 1D spectrum from a model and a dispersion relation. <a href="#gae4d04a25632a755752a715e519a7927a">More...</a><br /></td></tr>
<tr class="separator:gae4d04a25632a755752a715e519a7927a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga73f63bd2ae230134a4db859e8ed62fb2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__wlcalib.html#ga73f63bd2ae230134a4db859e8ed62fb2">cpl_wlcalib_fill_logline_spectrum_fast</a> (cpl_vector *self, void *model, const cpl_polynomial *disp)</td></tr>
<tr class="memdesc:ga73f63bd2ae230134a4db859e8ed62fb2"><td class="mdescLeft"> </td><td class="mdescRight">Generate a 1D spectrum from a model and a dispersion relation. <a href="#ga73f63bd2ae230134a4db859e8ed62fb2">More...</a><br /></td></tr>
<tr class="separator:ga73f63bd2ae230134a4db859e8ed62fb2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga33a27df89c2861af93dcb740fce3a192"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__wlcalib.html#ga33a27df89c2861af93dcb740fce3a192">cpl_wlcalib_find_best_1d</a> (cpl_polynomial *self, const cpl_polynomial *guess, const cpl_vector *spectrum, void *model, <a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a>(*filler)(cpl_vector *, void *, const cpl_polynomial *), const cpl_vector *wl_search, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> nsamples, <a class="el" href="group__cpl__type.html#gacc431432a4fedf19ec6f7668dda3fbf0">cpl_size</a> hsize, double *xcmax, cpl_vector *xcorrs)</td></tr>
<tr class="memdesc:ga33a27df89c2861af93dcb740fce3a192"><td class="mdescLeft"> </td><td class="mdescRight">Find the best 1D dispersion polynomial in a given search space. <a href="#ga33a27df89c2861af93dcb740fce3a192">More...</a><br /></td></tr>
<tr class="separator:ga33a27df89c2861af93dcb740fce3a192"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa572c49885eee4c9f97eb4435a05ea1a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__wlcalib.html#gaa572c49885eee4c9f97eb4435a05ea1a">cpl_wlcalib_slitmodel_delete</a> (cpl_wlcalib_slitmodel *self)</td></tr>
<tr class="memdesc:gaa572c49885eee4c9f97eb4435a05ea1a"><td class="mdescLeft"> </td><td class="mdescRight">Free memory associated with a cpl_wlcalib_slitmodel object. <a href="#gaa572c49885eee4c9f97eb4435a05ea1a">More...</a><br /></td></tr>
<tr class="separator:gaa572c49885eee4c9f97eb4435a05ea1a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa888d82968fc079aab6fdc1078377bcc"><td class="memItemLeft" align="right" valign="top">cpl_wlcalib_slitmodel * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__wlcalib.html#gaa888d82968fc079aab6fdc1078377bcc">cpl_wlcalib_slitmodel_new</a> (void)</td></tr>
<tr class="memdesc:gaa888d82968fc079aab6fdc1078377bcc"><td class="mdescLeft"> </td><td class="mdescRight">Create a new line model to be initialized. <a href="#gaa888d82968fc079aab6fdc1078377bcc">More...</a><br /></td></tr>
<tr class="separator:gaa888d82968fc079aab6fdc1078377bcc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaf0a88f3bf76224ad48ae35aa4e003af8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__wlcalib.html#gaf0a88f3bf76224ad48ae35aa4e003af8">cpl_wlcalib_slitmodel_set_catalog</a> (cpl_wlcalib_slitmodel *self, cpl_bivector *catalog)</td></tr>
<tr class="memdesc:gaf0a88f3bf76224ad48ae35aa4e003af8"><td class="mdescLeft"> </td><td class="mdescRight">Set the catalog of lines to be used by the spectrum filler. <a href="#gaf0a88f3bf76224ad48ae35aa4e003af8">More...</a><br /></td></tr>
<tr class="separator:gaf0a88f3bf76224ad48ae35aa4e003af8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaf96f1fdfd37ba7d822c2446094b97776"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__wlcalib.html#gaf96f1fdfd37ba7d822c2446094b97776">cpl_wlcalib_slitmodel_set_threshold</a> (cpl_wlcalib_slitmodel *self, double value)</td></tr>
<tr class="memdesc:gaf96f1fdfd37ba7d822c2446094b97776"><td class="mdescLeft"> </td><td class="mdescRight">The (positive) threshold for truncating the transfer function. <a href="#gaf96f1fdfd37ba7d822c2446094b97776">More...</a><br /></td></tr>
<tr class="separator:gaf96f1fdfd37ba7d822c2446094b97776"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga87304f02d954c252f11a3a6a7a8f73fa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__wlcalib.html#ga87304f02d954c252f11a3a6a7a8f73fa">cpl_wlcalib_slitmodel_set_wfwhm</a> (cpl_wlcalib_slitmodel *self, double value)</td></tr>
<tr class="memdesc:ga87304f02d954c252f11a3a6a7a8f73fa"><td class="mdescLeft"> </td><td class="mdescRight">Set the FWHM of the transfer function to be used by the spectrum filler. <a href="#ga87304f02d954c252f11a3a6a7a8f73fa">More...</a><br /></td></tr>
<tr class="separator:ga87304f02d954c252f11a3a6a7a8f73fa"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa33ae7cc454e2f11298faf73aacfed56"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__wlcalib.html#gaa33ae7cc454e2f11298faf73aacfed56">cpl_wlcalib_slitmodel_set_wslit</a> (cpl_wlcalib_slitmodel *self, double value)</td></tr>
<tr class="memdesc:gaa33ae7cc454e2f11298faf73aacfed56"><td class="mdescLeft"> </td><td class="mdescRight">Set the slit width to be used by the spectrum filler. <a href="#gaa33ae7cc454e2f11298faf73aacfed56">More...</a><br /></td></tr>
<tr class="separator:gaa33ae7cc454e2f11298faf73aacfed56"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>This module contains functions to perform 1D-wavelength calibration, typically of long-slit spectroscopy data.</p>
<dl class="section user"><dt>Synopsis:</dt><dd><div class="fragment"><div class="line"><span class="preprocessor">#include "cpl_wlcalib.h"</span></div>
</div><!-- fragment --> </dd></dl>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga7347aeb9d5fab72e41780718b5e9cd5f"></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_wlcalib_fill_line_spectrum </td>
<td>(</td>
<td class="paramtype">cpl_vector * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>model</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_polynomial * </td>
<td class="paramname"><em>disp</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Generate a 1D spectrum from a model and a dispersion relation. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>Vector to fill with spectrum </td></tr>
<tr><td class="paramname">model</td><td>Pointer to cpl_wlcalib_slitmodel object </td></tr>
<tr><td class="paramname">disp</td><td>1D-Dispersion relation, at least of degree 1 </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE 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 note"><dt>Note</dt><dd>The model is passed as a <em>void</em> pointer so the function can be used with <a class="el" href="group__cpl__wlcalib.html#ga33a27df89c2861af93dcb740fce3a192" title="Find the best 1D dispersion polynomial in a given search space. ">cpl_wlcalib_find_best_1d()</a>. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__wlcalib.html#ga33a27df89c2861af93dcb740fce3a192" title="Find the best 1D dispersion polynomial in a given search space. ">cpl_wlcalib_find_best_1d()</a></dd></dl>
<p>The fill a vector with a spectrum, one must first initialize the parameters of the model (error checks omitted for brevity):</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> cpl_vector * spectrum = cpl_vector_new(nresolution);</div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> cpl_wlcalib_slitmodel * model = cpl_wlcalib_slitmodel_new();</div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> cpl_bivector * lines = my_load_lines_catalog(filename);</div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> cpl_polynomial * dispersion = my_1d_dispersion();</div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> </div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> cpl_wlcalib_slitmodel_set_wslit(model, 3.0);</div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> cpl_wlcalib_slitmodel_set_wfwhm(model, 4.0);</div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> cpl_wlcalib_slitmodel_set_threshold(model, 5.0);</div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> cpl_wlcalib_slitmodel_set_catalog(model, lines);</div>
</div><!-- fragment --><p>With that the spectrum can be filled: </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> cpl_wlcalib_fill_line_spectrum(spectrum, model, dispersion);</div>
</div><!-- fragment --><p>Clean-up when no more spectra are needed (lines are deleted with the model): </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> cpl_wlcalib_slitmodel_delete(model);</div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> cpl_polynomial_delete(dispersion);</div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> cpl_vector_delete(spectrum);</div>
</div><!-- fragment --><p>Each line profile is given by the convolution of the Dirac delta function with a Gaussian with <img class="formulaInl" alt="$\sigma = w_{FWHM}/(2\sqrt(2\log(2))),$" src="form_23.png"/> and a top-hat with the slit width as width. This continuous line profile is then integrated over each pixel, wherever the intensity is above the threshold set by the given model. For a given line the value on a given pixel requires the evaluation of two calls to <em>erf()</em>.</p>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set by this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if an input pointer is <em>NULL</em> </li>
<li>CPL_ERROR_INVALID_TYPE If the input polynomial is not 1D</li>
<li>CPL_ERROR_ILLEGAL_INPUT If the input polynomial is non-increasing over the given input (pixel) range, or if a model parameter is non-physical (e.g. non-positive slit width).</li>
<li>CPL_ERROR_DATA_NOT_FOUND If no catalog lines are available in the range of the dispersion relation</li>
<li>CPL_ERROR_INCOMPATIBLE_INPUT If the wavelengths of two catalog lines are found to be in non-increasing order. </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gaf18e95fbc6fc2cfde2a2cc8a0920b12d">cpl_ensure_code</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0239c1c63e9d21e98e45221a3ad60406">CPL_ERROR_NONE</a>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
</div>
</div>
<a class="anchor" id="ga23c1b3eac19cf1f9f1771b8e3cbd51b1"></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_wlcalib_fill_line_spectrum_fast </td>
<td>(</td>
<td class="paramtype">cpl_vector * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>model</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_polynomial * </td>
<td class="paramname"><em>disp</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Generate a 1D spectrum from a model and a dispersion relation. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>Vector to fill with spectrum </td></tr>
<tr><td class="paramname">model</td><td>Pointer to cpl_wlcalib_slitmodel object </td></tr>
<tr><td class="paramname">disp</td><td>1D-Dispersion relation, at least of degree 1 </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE 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 note"><dt>Note</dt><dd>The generated spectrum will use an approximate line profile for speed </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__wlcalib.html#ga7347aeb9d5fab72e41780718b5e9cd5f" title="Generate a 1D spectrum from a model and a dispersion relation. ">cpl_wlcalib_fill_line_spectrum()</a></dd></dl>
<p>The approximation preserves the position of the maximum, the symmetry and the flux of the line profile.</p>
<p>The use of a given line in a spectrum requires the evaluation of four calls to <em>erf()</em>.</p>
<p>The fast spectrum generation can be useful when the model spectrum includes many catalog lines. </p>
<p>References <a class="el" href="group__cpl__error.html#gaf18e95fbc6fc2cfde2a2cc8a0920b12d">cpl_ensure_code</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0239c1c63e9d21e98e45221a3ad60406">CPL_ERROR_NONE</a>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
</div>
</div>
<a class="anchor" id="gae4d04a25632a755752a715e519a7927a"></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_wlcalib_fill_logline_spectrum </td>
<td>(</td>
<td class="paramtype">cpl_vector * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>model</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_polynomial * </td>
<td class="paramname"><em>disp</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Generate a 1D spectrum from a model and a dispersion relation. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>Vector to fill with spectrum </td></tr>
<tr><td class="paramname">model</td><td>Pointer to cpl_wlcalib_slitmodel object </td></tr>
<tr><td class="paramname">disp</td><td>1D-Dispersion relation, at least of degree 1 </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE 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 note"><dt>Note</dt><dd>The spectrum is generated from 1 + the logarithm of the line intensities </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__wlcalib.html#ga7347aeb9d5fab72e41780718b5e9cd5f" title="Generate a 1D spectrum from a model and a dispersion relation. ">cpl_wlcalib_fill_line_spectrum()</a> </dd></dl>
<p>References <a class="el" href="group__cpl__error.html#gaf18e95fbc6fc2cfde2a2cc8a0920b12d">cpl_ensure_code</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0239c1c63e9d21e98e45221a3ad60406">CPL_ERROR_NONE</a>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
</div>
</div>
<a class="anchor" id="ga73f63bd2ae230134a4db859e8ed62fb2"></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_wlcalib_fill_logline_spectrum_fast </td>
<td>(</td>
<td class="paramtype">cpl_vector * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>model</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_polynomial * </td>
<td class="paramname"><em>disp</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Generate a 1D spectrum from a model and a dispersion relation. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>Vector to fill with spectrum </td></tr>
<tr><td class="paramname">model</td><td>Pointer to cpl_wlcalib_slitmodel object </td></tr>
<tr><td class="paramname">disp</td><td>1D-Dispersion relation, at least of degree 1 </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE 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 note"><dt>Note</dt><dd>The spectrum is generated from 1 + the logarithm of the line intensities and an approximate line profile for speed </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__wlcalib.html#ga23c1b3eac19cf1f9f1771b8e3cbd51b1" title="Generate a 1D spectrum from a model and a dispersion relation. ">cpl_wlcalib_fill_line_spectrum_fast()</a> </dd></dl>
<p>References <a class="el" href="group__cpl__error.html#gaf18e95fbc6fc2cfde2a2cc8a0920b12d">cpl_ensure_code</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0239c1c63e9d21e98e45221a3ad60406">CPL_ERROR_NONE</a>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
</div>
</div>
<a class="anchor" id="ga33a27df89c2861af93dcb740fce3a192"></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_wlcalib_find_best_1d </td>
<td>(</td>
<td class="paramtype">cpl_polynomial * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_polynomial * </td>
<td class="paramname"><em>guess</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_vector * </td>
<td class="paramname"><em>spectrum</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>model</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__error.html#ga44b4287e8a7a22122b94c220a1dd9459">cpl_error_code</a>(*)(cpl_vector *, void *, const cpl_polynomial *) </td>
<td class="paramname"><em>filler</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_vector * </td>
<td class="paramname"><em>wl_search</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> </td>
<td class="paramname"><em>nsamples</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> </td>
<td class="paramname"><em>hsize</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double * </td>
<td class="paramname"><em>xcmax</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cpl_vector * </td>
<td class="paramname"><em>xcorrs</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Find the best 1D dispersion polynomial in a given search space. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>Pre-created 1D-polynomial for the result </td></tr>
<tr><td class="paramname">guess</td><td>1D-polynomial with the guess, may equal self </td></tr>
<tr><td class="paramname">spectrum</td><td>The vector with the observed 1D-spectrum </td></tr>
<tr><td class="paramname">model</td><td>The spectrum model </td></tr>
<tr><td class="paramname">filler</td><td>The function used to make the spectrum </td></tr>
<tr><td class="paramname">wl_search</td><td>Search range around the anchor points, same unit as guess </td></tr>
<tr><td class="paramname">nsamples</td><td>Number of samples around the anchor points </td></tr>
<tr><td class="paramname">hsize</td><td>Maximum (pixel) displacement of the polynomial guess </td></tr>
<tr><td class="paramname">xcmax</td><td>On success, the maximum cross-correlation </td></tr>
<tr><td class="paramname">xcorrs</td><td>The vector to fill with the correlation values or NULL </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE 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__wlcalib.html#ga7347aeb9d5fab72e41780718b5e9cd5f" title="Generate a 1D spectrum from a model and a dispersion relation. ">cpl_wlcalib_fill_line_spectrum()</a> for the model and filler.</dd></dl>
<p>Find the polynomial that maximizes the cross-correlation between an observed 1D-spectrum and a model spectrum based on the polynomial dispersion relation.</p>
<p>Each element in the vector of wavelength search ranges is in the same unit as the corresponding Y-value of the dispersion relation. Each value in the vector is the width of a search window centered on the corresponding value in the guess polynomial. The length D of the search vector thus determines the dimensionality of the search space for the dispersion polynomial. If for example the search vector consists of three elements, then the three lowest order coefficients of the dispersion relation may be modified by the search.</p>
<p>For each candidate polynomial P(x), the polynomial P(x+u), -hsize <= u <= hsize is also evaluated. The half-size hsize may be zero. When it is non-zero, an additional 2 * hsize cross-correlations are performed for each candidate polynomial, one for each possible shift. The maximizing polynomial among those shifted polynomials is kept. A well-chosen half-size can allow for the use of fewer number of samples around the anchor points, leading to a reduction of polynomials to be evaluated.</p>
<p>The complexity in terms of model spectra creation is O(N^D) and in terms of cross-correlations O(hsize * N^D), where N is nsamples and D is the length of wl_search.</p>
<p>xcorrs must be NULL or have a size of (at least) N^D*(1 + 2 * hsize).</p>
<p>Possible <a class="el" href="group__cpl__error.html#ga49a0c316d52d2afbfd9fd94b95344900" title="Available error codes. ">_cpl_error_code_</a> set by this function:</p><ul>
<li>CPL_ERROR_NULL_INPUT if an input pointer is <em>NULL</em> </li>
<li>CPL_ERROR_INVALID_TYPE If an input polynomial is not 1D</li>
<li>CPL_ERROR_ILLEGAL_INPUT If nfree is less than 2, or nsamples is less than 1, hsize negative or if wl_search contains a zero search bound, or if xcorrs is non-NULL and too short.</li>
<li>CPL_ERROR_DATA_NOT_FOUND If no model spectra can be created using the supplied model and filler </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gaf18e95fbc6fc2cfde2a2cc8a0920b12d">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#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__errorstate.html#gae02fa954f3a0a6e245087bd42e617705">cpl_errorstate_dump()</a>, <a class="el" href="group__cpl__errorstate.html#gadcc304f83f1b5ebe07517fff21bcbc07">cpl_errorstate_dump_one_debug()</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__polynomial.html#gafa9242d9e26e39a675f5ca8ddc45f629">cpl_polynomial_copy()</a>, <a class="el" href="group__cpl__polynomial.html#gaad27580d5c9e514cdbcddbd0d4d038e7">cpl_polynomial_delete()</a>, <a class="el" href="group__cpl__polynomial.html#gab002089746a121023e072d2f5d8b057d">cpl_polynomial_eval_1d()</a>, <a class="el" href="group__cpl__polynomial.html#gacbf283d2c2ad290406f5297c2cdf2bb0">cpl_polynomial_get_degree()</a>, <a class="el" href="group__cpl__polynomial.html#ga4436f9900625ba6f19f189f5b0ee99d2">cpl_polynomial_get_dimension()</a>, <a class="el" href="group__cpl__polynomial.html#ga6e95c460a991e29169ff1d079377f334">cpl_polynomial_new()</a>, <a class="el" href="group__cpl__polynomial.html#gad445a939e63d62bc91455b5ef7924559">cpl_polynomial_shift_1d()</a>, <a class="el" href="group__cpl__vector.html#gaf563c19d309c5b60d148a84cb156c2cf">cpl_vector_delete()</a>, <a class="el" href="group__cpl__vector.html#ga72cfd50426a679a370e154f54a5fed4d">cpl_vector_fill()</a>, <a class="el" href="group__cpl__vector.html#gaf2f50a71abb6d452edb3820b967b2022">cpl_vector_get()</a>, <a class="el" href="group__cpl__vector.html#gaca37a188555aff6e2379199e7fae49be">cpl_vector_get_data()</a>, <a class="el" href="group__cpl__vector.html#ga991ded30622122c78bb34191f7c7a7c6">cpl_vector_get_data_const()</a>, <a class="el" href="group__cpl__vector.html#gac72d7e38ce2f5ac2e0863e2a11e9af1d">cpl_vector_get_size()</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="gaa572c49885eee4c9f97eb4435a05ea1a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void cpl_wlcalib_slitmodel_delete </td>
<td>(</td>
<td class="paramtype">cpl_wlcalib_slitmodel * </td>
<td class="paramname"><em>self</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Free memory associated with a cpl_wlcalib_slitmodel object. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The cpl_wlcalib_slitmodel object or <em>NULL</em> </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Nothing </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__wlcalib.html#gaa888d82968fc079aab6fdc1078377bcc" title="Create a new line model to be initialized. ">cpl_wlcalib_slitmodel_new()</a> </dd></dl>
<dl class="section note"><dt>Note</dt><dd>If <em>self</em> is <code>NULL</code> nothing is done and no error is set. </dd></dl>
<p>References <a class="el" href="group__cpl__bivector.html#gab49cf8bcea934646b96a4d4e476d7e54">cpl_bivector_delete()</a>, <a class="el" href="group__cpl__memory.html#ga9cd2b64cbbe05ec9f34fda048184b4d1">cpl_free()</a>, and <a class="el" href="group__cpl__vector.html#gaf563c19d309c5b60d148a84cb156c2cf">cpl_vector_delete()</a>.</p>
</div>
</div>
<a class="anchor" id="gaa888d82968fc079aab6fdc1078377bcc"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cpl_wlcalib_slitmodel* cpl_wlcalib_slitmodel_new </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new line model to be initialized. </p>
<dl class="section return"><dt>Returns</dt><dd>1 newly allocated cpl_wlcalib_slitmodel </dd></dl>
<dl class="section note"><dt>Note</dt><dd>All elements are initialized to either zero or NULL. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__wlcalib.html#gaa572c49885eee4c9f97eb4435a05ea1a" title="Free memory associated with a cpl_wlcalib_slitmodel object. ">cpl_wlcalib_slitmodel_delete()</a> for object deallocation.</dd></dl>
<p>The model comprises these elements: Slit Width FWHM of transfer function Truncation threshold of the transfer function Catalog of lines (typically arc or sky)</p>
<p>The units of the X-values of the lines is a length, it is assumed to be the same as that of the Y-values of the dispersion relation (e.g. meter), the units of slit width and the FWHM are assumed to be the same as the X-values of the dispersion relation (e.g. pixel), while the units of the produced spectrum will be that of the Y-values of the lines. </p>
<p>References <a class="el" href="group__cpl__memory.html#gab672473d6f7d0d933e06c2e8c456bd3b">cpl_calloc()</a>.</p>
</div>
</div>
<a class="anchor" id="gaf0a88f3bf76224ad48ae35aa4e003af8"></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_wlcalib_slitmodel_set_catalog </td>
<td>(</td>
<td class="paramtype">cpl_wlcalib_slitmodel * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cpl_bivector * </td>
<td class="paramname"><em>catalog</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the catalog of lines to be used by the spectrum filler. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The cpl_wlcalib_slitmodel object </td></tr>
<tr><td class="paramname">catalog</td><td>The catalog of lines (e.g. arc lines) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE 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__wlcalib.html#gaa888d82968fc079aab6fdc1078377bcc" title="Create a new line model to be initialized. ">cpl_wlcalib_slitmodel_new()</a> </dd></dl>
<dl class="section note"><dt>Note</dt><dd>The values in the X-vector must be increasing. Any previously set catalog is deallocated</dd></dl>
<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 <em>NULL</em> </li>
</ul>
<p>References <a class="el" href="group__cpl__bivector.html#gab49cf8bcea934646b96a4d4e476d7e54">cpl_bivector_delete()</a>, <a class="el" href="group__cpl__error.html#gaf18e95fbc6fc2cfde2a2cc8a0920b12d">cpl_ensure_code</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a0239c1c63e9d21e98e45221a3ad60406">CPL_ERROR_NONE</a>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
</div>
</div>
<a class="anchor" id="gaf96f1fdfd37ba7d822c2446094b97776"></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_wlcalib_slitmodel_set_threshold </td>
<td>(</td>
<td class="paramtype">cpl_wlcalib_slitmodel * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>The (positive) threshold for truncating the transfer function. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The cpl_wlcalib_slitmodel object </td></tr>
<tr><td class="paramname">value</td><td>The (non-negative) truncation threshold, 5 is a good value. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE 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__wlcalib.html#gaa888d82968fc079aab6fdc1078377bcc" title="Create a new line model to be initialized. ">cpl_wlcalib_slitmodel_new()</a> </dd></dl>
<dl class="section note"><dt>Note</dt><dd>The threshold should be high enough to ensure a good line profile, but not too high to make the spectrum generation too costly.</dd></dl>
<p>The line profile is truncated at this distance [pixel] from its maximum: <img class="formulaInl" alt="$x_{max} = w/2 + k * \sigma,$" src="form_21.png"/> where <img class="formulaInl" alt="$w$" src="form_22.png"/> is the slit width and <img class="formulaInl" alt="$\sigma = w_{FWHM}/(2\sqrt(2\log(2))),$" src="form_23.png"/> where <img class="formulaInl" alt="$w_{FWHM}$" src="form_24.png"/> is the Full Width at Half Maximum (FWHM) of the transfer function and <img class="formulaInl" alt="$k$" src="form_25.png"/> is the user supplied value.</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 <em>NULL</em> </li>
<li>CPL_ERROR_ILLEGAL_INPUT the value is negative </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gaf18e95fbc6fc2cfde2a2cc8a0920b12d">cpl_ensure_code</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>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
</div>
</div>
<a class="anchor" id="ga87304f02d954c252f11a3a6a7a8f73fa"></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_wlcalib_slitmodel_set_wfwhm </td>
<td>(</td>
<td class="paramtype">cpl_wlcalib_slitmodel * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the FWHM of the transfer function to be used by the spectrum filler. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The cpl_wlcalib_slitmodel object </td></tr>
<tr><td class="paramname">value</td><td>The (positive) FWHM </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE 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__wlcalib.html#gaa888d82968fc079aab6fdc1078377bcc" title="Create a new line model to be initialized. ">cpl_wlcalib_slitmodel_new()</a></dd></dl>
<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 <em>NULL</em> </li>
<li>CPL_ERROR_ILLEGAL_INPUT the value is non-positive </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gaf18e95fbc6fc2cfde2a2cc8a0920b12d">cpl_ensure_code</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>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
</div>
</div>
<a class="anchor" id="gaa33ae7cc454e2f11298faf73aacfed56"></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_wlcalib_slitmodel_set_wslit </td>
<td>(</td>
<td class="paramtype">cpl_wlcalib_slitmodel * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the slit width to be used by the spectrum filler. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The cpl_wlcalib_slitmodel object </td></tr>
<tr><td class="paramname">value</td><td>The (positive) width of the slit </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CPL_ERROR_NONE 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__wlcalib.html#gaa888d82968fc079aab6fdc1078377bcc" title="Create a new line model to be initialized. ">cpl_wlcalib_slitmodel_new()</a></dd></dl>
<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 <em>NULL</em> </li>
<li>CPL_ERROR_ILLEGAL_INPUT the value is non-positive </li>
</ul>
<p>References <a class="el" href="group__cpl__error.html#gaf18e95fbc6fc2cfde2a2cc8a0920b12d">cpl_ensure_code</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>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>
|