/usr/share/doc/libcpl-dev/html/group__cpl__wcs.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 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 | <!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: World Coordinate System</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="#define-members">Macros</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">World Coordinate System</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga3260115835868e1151d85241768e812d"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__wcs.html#ga3260115835868e1151d85241768e812d">CPL_WCS_REGEXP</a></td></tr>
<tr class="memdesc:ga3260115835868e1151d85241768e812d"><td class="mdescLeft"> </td><td class="mdescRight">A regular expression that matches the FITS keys used for WCS. <a href="#ga3260115835868e1151d85241768e812d">More...</a><br /></td></tr>
<tr class="separator:ga3260115835868e1151d85241768e812d"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga3e6e2597917be71afeb5de2d957a659a"><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__wcs.html#ga3e6e2597917be71afeb5de2d957a659a">cpl_wcs_convert</a> (const cpl_wcs *wcs, const cpl_matrix *from, cpl_matrix **to, cpl_array **status, cpl_wcs_trans_mode transform)</td></tr>
<tr class="memdesc:ga3e6e2597917be71afeb5de2d957a659a"><td class="mdescLeft"> </td><td class="mdescRight">Convert between physical and world coordinates. <a href="#ga3e6e2597917be71afeb5de2d957a659a">More...</a><br /></td></tr>
<tr class="separator:ga3e6e2597917be71afeb5de2d957a659a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gad3c5f9a87cfe66226c1690953539f46b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__wcs.html#gad3c5f9a87cfe66226c1690953539f46b">cpl_wcs_delete</a> (cpl_wcs *wcs)</td></tr>
<tr class="memdesc:gad3c5f9a87cfe66226c1690953539f46b"><td class="mdescLeft"> </td><td class="mdescRight">Destroy a WCS structure. <a href="#gad3c5f9a87cfe66226c1690953539f46b">More...</a><br /></td></tr>
<tr class="separator:gad3c5f9a87cfe66226c1690953539f46b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga38bc358f66ff1e00e5031b52bf9e754c"><td class="memItemLeft" align="right" valign="top">const cpl_matrix * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__wcs.html#ga38bc358f66ff1e00e5031b52bf9e754c">cpl_wcs_get_cd</a> (const cpl_wcs *wcs)</td></tr>
<tr class="memdesc:ga38bc358f66ff1e00e5031b52bf9e754c"><td class="mdescLeft"> </td><td class="mdescRight">Accessor to get the CD matrix for a WCS. <a href="#ga38bc358f66ff1e00e5031b52bf9e754c">More...</a><br /></td></tr>
<tr class="separator:ga38bc358f66ff1e00e5031b52bf9e754c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa41d1df1a061f3b845045319c4e824c5"><td class="memItemLeft" align="right" valign="top">const cpl_array * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__wcs.html#gaa41d1df1a061f3b845045319c4e824c5">cpl_wcs_get_crpix</a> (const cpl_wcs *wcs)</td></tr>
<tr class="memdesc:gaa41d1df1a061f3b845045319c4e824c5"><td class="mdescLeft"> </td><td class="mdescRight">Accessor to get the CRPIX vector for a WCS. <a href="#gaa41d1df1a061f3b845045319c4e824c5">More...</a><br /></td></tr>
<tr class="separator:gaa41d1df1a061f3b845045319c4e824c5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga2768a1047aef663008d5733665407a34"><td class="memItemLeft" align="right" valign="top">const cpl_array * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__wcs.html#ga2768a1047aef663008d5733665407a34">cpl_wcs_get_crval</a> (const cpl_wcs *wcs)</td></tr>
<tr class="memdesc:ga2768a1047aef663008d5733665407a34"><td class="mdescLeft"> </td><td class="mdescRight">Accessor to get the CRVAL vector for a WCS. <a href="#ga2768a1047aef663008d5733665407a34">More...</a><br /></td></tr>
<tr class="separator:ga2768a1047aef663008d5733665407a34"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga97239180c1e8d626c7d9283cf2903611"><td class="memItemLeft" align="right" valign="top">const cpl_array * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__wcs.html#ga97239180c1e8d626c7d9283cf2903611">cpl_wcs_get_ctype</a> (const cpl_wcs *wcs)</td></tr>
<tr class="memdesc:ga97239180c1e8d626c7d9283cf2903611"><td class="mdescLeft"> </td><td class="mdescRight">Accessor to get the CTYPE vector for a WCS. <a href="#ga97239180c1e8d626c7d9283cf2903611">More...</a><br /></td></tr>
<tr class="separator:ga97239180c1e8d626c7d9283cf2903611"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga1eddc57a42641a26344f9049922e758d"><td class="memItemLeft" align="right" valign="top">const cpl_array * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__wcs.html#ga1eddc57a42641a26344f9049922e758d">cpl_wcs_get_cunit</a> (const cpl_wcs *wcs)</td></tr>
<tr class="memdesc:ga1eddc57a42641a26344f9049922e758d"><td class="mdescLeft"> </td><td class="mdescRight">Accessor to get the CUNIT vector for a WCS. <a href="#ga1eddc57a42641a26344f9049922e758d">More...</a><br /></td></tr>
<tr class="separator:ga1eddc57a42641a26344f9049922e758d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa0470276e42554e03de63dd5b68d587d"><td class="memItemLeft" align="right" valign="top">const cpl_array * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__wcs.html#gaa0470276e42554e03de63dd5b68d587d">cpl_wcs_get_image_dims</a> (const cpl_wcs *wcs)</td></tr>
<tr class="memdesc:gaa0470276e42554e03de63dd5b68d587d"><td class="mdescLeft"> </td><td class="mdescRight">Accessor to get the axis lengths of the image associated with a WCS. <a href="#gaa0470276e42554e03de63dd5b68d587d">More...</a><br /></td></tr>
<tr class="separator:gaa0470276e42554e03de63dd5b68d587d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga7954220296431284bc6a96ca24f70459"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__wcs.html#ga7954220296431284bc6a96ca24f70459">cpl_wcs_get_image_naxis</a> (const cpl_wcs *wcs)</td></tr>
<tr class="memdesc:ga7954220296431284bc6a96ca24f70459"><td class="mdescLeft"> </td><td class="mdescRight">Accessor to get the dimensionality of the image associated with a WCS. <a href="#ga7954220296431284bc6a96ca24f70459">More...</a><br /></td></tr>
<tr class="separator:ga7954220296431284bc6a96ca24f70459"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga7939791fbe7e4bbcdd65e8695c27c0c0"><td class="memItemLeft" align="right" valign="top">cpl_wcs * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__wcs.html#ga7939791fbe7e4bbcdd65e8695c27c0c0">cpl_wcs_new_from_propertylist</a> (const <a class="el" href="group__cpl__propertylist.html#gab1629461e5d64dd8594cd505e3ea46ab">cpl_propertylist</a> *plist)</td></tr>
<tr class="memdesc:ga7939791fbe7e4bbcdd65e8695c27c0c0"><td class="mdescLeft"> </td><td class="mdescRight">Create a wcs structure by parsing a propertylist. <a href="#ga7939791fbe7e4bbcdd65e8695c27c0c0">More...</a><br /></td></tr>
<tr class="separator:ga7939791fbe7e4bbcdd65e8695c27c0c0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaef2a2ad1e5206d26175ab95f81afb58c"><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__wcs.html#gaef2a2ad1e5206d26175ab95f81afb58c">cpl_wcs_platesol</a> (const <a class="el" href="group__cpl__propertylist.html#gab1629461e5d64dd8594cd505e3ea46ab">cpl_propertylist</a> *ilist, const cpl_matrix *cel, const cpl_matrix *xy, int niter, float thresh, cpl_wcs_platesol_fitmode fitmode, cpl_wcs_platesol_outmode outmode, <a class="el" href="group__cpl__propertylist.html#gab1629461e5d64dd8594cd505e3ea46ab">cpl_propertylist</a> **olist)</td></tr>
<tr class="memdesc:gaef2a2ad1e5206d26175ab95f81afb58c"><td class="mdescLeft"> </td><td class="mdescRight">Do a 2d plate solution given physical and celestial coordinates. <a href="#gaef2a2ad1e5206d26175ab95f81afb58c">More...</a><br /></td></tr>
<tr class="separator:gaef2a2ad1e5206d26175ab95f81afb58c"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>This module provides functions to manipulate FITS World Coordinate Systems</p>
<p>A <em>cpl_wcs</em> is an object containing a pointer to the WCSLIB structure and the physical dimensions of the image from which the WCS was read. The functionality provided includes general transformations between physical and world coordinates as well as a few convenience routines for x,y <=> RA,Dec transformations.</p>
<dl class="section user"><dt>Synopsis:</dt><dd><div class="fragment"><div class="line"><span class="preprocessor">#include "cpl_wcs.h"</span></div>
</div><!-- fragment --> </dd></dl>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ga3260115835868e1151d85241768e812d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CPL_WCS_REGEXP</td>
</tr>
</table>
</div><div class="memdoc">
<p>A regular expression that matches the FITS keys used for WCS. </p>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga3e6e2597917be71afeb5de2d957a659a"></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_wcs_convert </td>
<td>(</td>
<td class="paramtype">const cpl_wcs * </td>
<td class="paramname"><em>wcs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_matrix * </td>
<td class="paramname"><em>from</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cpl_matrix ** </td>
<td class="paramname"><em>to</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cpl_array ** </td>
<td class="paramname"><em>status</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cpl_wcs_trans_mode </td>
<td class="paramname"><em>transform</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Convert between physical and world coordinates. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">wcs</td><td>The input cpl_wcs structure </td></tr>
<tr><td class="paramname">from</td><td>The input coordinate matrix </td></tr>
<tr><td class="paramname">to</td><td>The output coordinate matrix </td></tr>
<tr><td class="paramname">status</td><td>The output status array </td></tr>
<tr><td class="paramname">transform</td><td>The transformation mode</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An appropriate error code.</dd></dl>
<dl class="exception">
<dt><b>Errors</b></dt>
<dd></dd>
<dt></dt>
<dd><table class="ec" align="center">
<tr>
<td class="ecl">CPL_ERROR_NULL_INPUT </td><td class="ecr">The parameter <em>wcs</em>, <em>from</em>, <em>to</em> or <em>status</em> is a <code>NULL</code> pointer or <em>wcs</em> is missing some of its information. </td></tr>
<tr>
<td class="ecl">CPL_ERROR_UNSPECIFIED </td><td class="ecr">No rows or columns in the input matrix, or an unspecified error has occurred in the WCSLIB routine </td></tr>
<tr>
<td class="ecl">CPL_ERROR_UNSUPPORTED_MODE </td><td class="ecr">The input conversion mode is not supported </td></tr>
<tr>
<td class="ecl">CPL_ERROR_NO_WCS </td><td class="ecr">The WCS sub library is not available. </td></tr>
</table>
</dd>
</dl>
<p>This function converts between several types of coordinates. These include: – physical coordinates: The physical location on a detector (i.e. pixel coordinates) – world coordinates: The real astronomical coordinate system for the observations. This may be spectral, celestial, time, etc. – standard coordinates: These are an intermediate relative coordinate representation, defined as a distance from a reference point in the natural units of the world coordinate system. Any defined projection geometry will have already been included in the definition of standard coordinates.</p>
<p>The supported conversion modes are: – CPL_WCS_PHYS2WORLD: Converts input physical to world coordinates – CPL_WCS_WORLD2PHYS: Converts input world to physical coordinates – CPL_WCS_WORLD2STD: Converts input world to standard coordinates – CPL_WCS_PHYS2STD: Converts input physical to standard coordinates</p>
<p>The input cpl_matrix <b>from</b> has to be filled with coordinates. The number of rows equals the number of objects and the number of columns has to be equal to the value of the NAXIS keyword in the <b>wcs</b> structure. The same convention is used for the output cpl_matrix <b>to</b>. For example, if an image contains NAXIS = 2 and 100 stars with positions X,Y, the new matrix will be created: </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> from = cpl_matrix_new(100, 2);</div>
</div><!-- fragment --><p> Each element in column 0 will take a X coordinate and each element in column 1 will take a Y coordinate.</p>
<p>The output matrix and status arrays will be allocated here, and thus will need to be freed by the calling routine. The status array is used to flag input coordinates where there has been some sort of failure in the transformation. </p>
<p>References <a class="el" href="group__cpl__array.html#ga6bffcca34e6751f1e5c2db6497be2074">cpl_array_delete()</a>, <a class="el" href="group__cpl__array.html#ga65acfed522e9a1aa7e3a0ecae0ed0a81">cpl_array_get_data_double()</a>, <a class="el" href="group__cpl__array.html#gaef6ce495b8cff38332106ba3242a2c9f">cpl_array_get_data_int()</a>, <a class="el" href="group__cpl__array.html#gaf7d187111491f2d3a8b50fff01fbad17">cpl_array_new()</a>, <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#gga49a0c316d52d2afbfd9fd94b95344900a1352506541e745e79ad981e25eb83b01">CPL_ERROR_NO_WCS</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__error.html#gga49a0c316d52d2afbfd9fd94b95344900abb6808829dd2b06a86ec503f1169eab3">CPL_ERROR_UNSPECIFIED</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a74ef8e37f3412e85cfc22840d13bdd0c">CPL_ERROR_UNSUPPORTED_MODE</a>, <a class="el" href="group__cpl__matrix.html#ga76f34c669aefde2a5ac3fe1e9a96d9a4">cpl_matrix_delete()</a>, <a class="el" href="group__cpl__matrix.html#gac3ae0a639b51b6e2a7c85046ad3f4b7f">cpl_matrix_get_data()</a>, <a class="el" href="group__cpl__matrix.html#ga8cca30a90b99acbd643748ada726f2c9">cpl_matrix_get_data_const()</a>, <a class="el" href="group__cpl__matrix.html#ga4bade56f31c3e0f69ca513a557c1d4fd">cpl_matrix_get_ncol()</a>, <a class="el" href="group__cpl__matrix.html#gaba2be6537f0aacb0dfea437f186627c9">cpl_matrix_get_nrow()</a>, <a class="el" href="group__cpl__matrix.html#ga2be93c6a9d5e03a976d7e4f538c3a346">cpl_matrix_new()</a>, <a class="el" href="group__cpl__type.html#gga3f03371e201544e9115b40065e47f086a4923f03f3a673edd344b0d81835ca69e">CPL_TYPE_DOUBLE</a>, and <a class="el" href="group__cpl__type.html#gga3f03371e201544e9115b40065e47f086ae333db5ccea0813ccd892525b4ba1345">CPL_TYPE_INT</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__wcs.html#gaef2a2ad1e5206d26175ab95f81afb58c">cpl_wcs_platesol()</a>.</p>
</div>
</div>
<a class="anchor" id="gad3c5f9a87cfe66226c1690953539f46b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void cpl_wcs_delete </td>
<td>(</td>
<td class="paramtype">cpl_wcs * </td>
<td class="paramname"><em>wcs</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Destroy a WCS structure. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">wcs</td><td>The WCS structure to destroy</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Nothing.</dd></dl>
<dl class="exception">
<dt><b>Errors</b></dt>
<dd></dd>
<dt></dt>
<dd><table class="ec" align="center">
<tr>
<td class="ecl">CPL_ERROR_NO_WCS </td><td class="ecr">The WCS sub library is not available. </td></tr>
</table>
</dd>
</dl>
<p>The function destroys the WCS structure <em>wcs</em> and its whole contents. If <em>wcs</em> is <code>NULL</code>, nothing is done and no error is set. </p>
<p>References <a class="el" href="group__cpl__array.html#ga6bffcca34e6751f1e5c2db6497be2074">cpl_array_delete()</a>, <a class="el" href="group__cpl__array.html#ga72d1dd093082f040d23a745d49c20a17">cpl_array_unwrap()</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a1352506541e745e79ad981e25eb83b01">CPL_ERROR_NO_WCS</a>, <a class="el" href="group__cpl__memory.html#ga9cd2b64cbbe05ec9f34fda048184b4d1">cpl_free()</a>, and <a class="el" href="group__cpl__matrix.html#ga76f34c669aefde2a5ac3fe1e9a96d9a4">cpl_matrix_delete()</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__wcs.html#gaef2a2ad1e5206d26175ab95f81afb58c">cpl_wcs_platesol()</a>.</p>
</div>
</div>
<a class="anchor" id="ga38bc358f66ff1e00e5031b52bf9e754c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const cpl_matrix* cpl_wcs_get_cd </td>
<td>(</td>
<td class="paramtype">const cpl_wcs * </td>
<td class="paramname"><em>wcs</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Accessor to get the CD matrix for a WCS. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">wcs</td><td>The WCS structure to examine</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A handle to a matrix with the CDi_ja linear transformation matrix, or NULL on error.</dd></dl>
<dl class="exception">
<dt><b>Errors</b></dt>
<dd></dd>
<dt></dt>
<dd><table class="ec" align="center">
<tr>
<td class="ecl">CPL_ERROR_NULL_INPUT </td><td class="ecr">The parameter <em>wcs</em> is a <code>NULL</code> pointer. </td></tr>
<tr>
<td class="ecl">CPL_ERROR_NO_WCS </td><td class="ecr">The WCS sub library is not available. </td></tr>
</table>
</dd>
</dl>
<p>The function returns a handle to a matrix with the CD matrix defined for this WCS. </p>
<p>References <a class="el" href="group__cpl__error.html#gafb123879d8683c6d63681f433dc19bd0">cpl_ensure</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a1352506541e745e79ad981e25eb83b01">CPL_ERROR_NO_WCS</a>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
</div>
</div>
<a class="anchor" id="gaa41d1df1a061f3b845045319c4e824c5"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const cpl_array* cpl_wcs_get_crpix </td>
<td>(</td>
<td class="paramtype">const cpl_wcs * </td>
<td class="paramname"><em>wcs</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Accessor to get the CRPIX vector for a WCS. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">wcs</td><td>The WCS structure to examine</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A handle to an array with the CRPIXja keyvalues for each pixel axis, or NULL on error.</dd></dl>
<dl class="exception">
<dt><b>Errors</b></dt>
<dd></dd>
<dt></dt>
<dd><table class="ec" align="center">
<tr>
<td class="ecl">CPL_ERROR_NULL_INPUT </td><td class="ecr">The parameter <em>wcs</em> is a <code>NULL</code> pointer. </td></tr>
<tr>
<td class="ecl">CPL_ERROR_NO_WCS </td><td class="ecr">The WCS sub library is not available. </td></tr>
</table>
</dd>
</dl>
<p>The function returns a handle to an array with the CRPIX vector defined for this WCS. </p>
<p>References <a class="el" href="group__cpl__error.html#gafb123879d8683c6d63681f433dc19bd0">cpl_ensure</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a1352506541e745e79ad981e25eb83b01">CPL_ERROR_NO_WCS</a>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
</div>
</div>
<a class="anchor" id="ga2768a1047aef663008d5733665407a34"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const cpl_array* cpl_wcs_get_crval </td>
<td>(</td>
<td class="paramtype">const cpl_wcs * </td>
<td class="paramname"><em>wcs</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Accessor to get the CRVAL vector for a WCS. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">wcs</td><td>The WCS structure to examine</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A handle to an array with the CRVALia keyvalues for each coord axis, or NULL on error.</dd></dl>
<dl class="exception">
<dt><b>Errors</b></dt>
<dd></dd>
<dt></dt>
<dd><table class="ec" align="center">
<tr>
<td class="ecl">CPL_ERROR_NULL_INPUT </td><td class="ecr">The parameter <em>wcs</em> is a <code>NULL</code> pointer. </td></tr>
<tr>
<td class="ecl">CPL_ERROR_NO_WCS </td><td class="ecr">The WCS sub library is not available. </td></tr>
</table>
</dd>
</dl>
<p>The function returns a handle to an array with the CRVAL vector defined for this WCS. </p>
<p>References <a class="el" href="group__cpl__error.html#gafb123879d8683c6d63681f433dc19bd0">cpl_ensure</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a1352506541e745e79ad981e25eb83b01">CPL_ERROR_NO_WCS</a>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
</div>
</div>
<a class="anchor" id="ga97239180c1e8d626c7d9283cf2903611"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const cpl_array* cpl_wcs_get_ctype </td>
<td>(</td>
<td class="paramtype">const cpl_wcs * </td>
<td class="paramname"><em>wcs</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Accessor to get the CTYPE vector for a WCS. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">wcs</td><td>The WCS structure to examine</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A handle to an array with the CTYPEja keyvalues for each pixel axis, or NULL on error.</dd></dl>
<dl class="exception">
<dt><b>Errors</b></dt>
<dd></dd>
<dt></dt>
<dd><table class="ec" align="center">
<tr>
<td class="ecl">CPL_ERROR_NULL_INPUT </td><td class="ecr">The parameter <em>wcs</em> is a <code>NULL</code> pointer. </td></tr>
<tr>
<td class="ecl">CPL_ERROR_NO_WCS </td><td class="ecr">The WCS sub library is not available. </td></tr>
</table>
</dd>
</dl>
<p>The function returns a handle to an array with the CTYPE vector defined for this WCS. </p>
<p>References <a class="el" href="group__cpl__error.html#gafb123879d8683c6d63681f433dc19bd0">cpl_ensure</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a1352506541e745e79ad981e25eb83b01">CPL_ERROR_NO_WCS</a>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
</div>
</div>
<a class="anchor" id="ga1eddc57a42641a26344f9049922e758d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const cpl_array* cpl_wcs_get_cunit </td>
<td>(</td>
<td class="paramtype">const cpl_wcs * </td>
<td class="paramname"><em>wcs</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Accessor to get the CUNIT vector for a WCS. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">wcs</td><td>The WCS structure to examine</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A handle to an array with the CUNITja keyvalues for each pixel axis, or NULL on error.</dd></dl>
<dl class="exception">
<dt><b>Errors</b></dt>
<dd></dd>
<dt></dt>
<dd><table class="ec" align="center">
<tr>
<td class="ecl">CPL_ERROR_NULL_INPUT </td><td class="ecr">The parameter <em>wcs</em> is a <code>NULL</code> pointer. </td></tr>
<tr>
<td class="ecl">CPL_ERROR_NO_WCS </td><td class="ecr">The WCS sub library is not available. </td></tr>
</table>
</dd>
</dl>
<p>The function returns a handle to an array with the CUNIT vector defined for this WCS. </p>
<p>References <a class="el" href="group__cpl__error.html#gafb123879d8683c6d63681f433dc19bd0">cpl_ensure</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a1352506541e745e79ad981e25eb83b01">CPL_ERROR_NO_WCS</a>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
</div>
</div>
<a class="anchor" id="gaa0470276e42554e03de63dd5b68d587d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const cpl_array* cpl_wcs_get_image_dims </td>
<td>(</td>
<td class="paramtype">const cpl_wcs * </td>
<td class="paramname"><em>wcs</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Accessor to get the axis lengths of the image associated with a WCS. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">wcs</td><td>The WCS structure to examine</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An array with the image axis sizes, or NULL on error.</dd></dl>
<dl class="exception">
<dt><b>Errors</b></dt>
<dd></dd>
<dt></dt>
<dd><table class="ec" align="center">
<tr>
<td class="ecl">CPL_ERROR_NULL_INPUT </td><td class="ecr">The parameter <em>wcs</em> is a <code>NULL</code> pointer. </td></tr>
<tr>
<td class="ecl">CPL_ERROR_NO_WCS </td><td class="ecr">The WCS sub library is not available. </td></tr>
</table>
</dd>
</dl>
<p>The function returns a handle to an array with the axis lengths of the image associated with this WCS. If no image was used to define the WCS then a NULL value will be returned. </p>
<p>References <a class="el" href="group__cpl__error.html#gafb123879d8683c6d63681f433dc19bd0">cpl_ensure</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a1352506541e745e79ad981e25eb83b01">CPL_ERROR_NO_WCS</a>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
</div>
</div>
<a class="anchor" id="ga7954220296431284bc6a96ca24f70459"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int cpl_wcs_get_image_naxis </td>
<td>(</td>
<td class="paramtype">const cpl_wcs * </td>
<td class="paramname"><em>wcs</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Accessor to get the dimensionality of the image associated with a WCS. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">wcs</td><td>The WCS structure to examine</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The image dimensionality, or zero on error</dd></dl>
<dl class="exception">
<dt><b>Errors</b></dt>
<dd></dd>
<dt></dt>
<dd><table class="ec" align="center">
<tr>
<td class="ecl">CPL_ERROR_NULL_INPUT </td><td class="ecr">The parameter <em>wcs</em> is a <code>NULL</code> pointer. </td></tr>
<tr>
<td class="ecl">CPL_ERROR_NO_WCS </td><td class="ecr">The WCS sub library is not available. </td></tr>
</table>
</dd>
</dl>
<p>The function returns the dimensionality of the image associated with a WCS. If no image was used to define the WCS then a value of zero is returned. </p>
<p>References <a class="el" href="group__cpl__error.html#gafb123879d8683c6d63681f433dc19bd0">cpl_ensure</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a1352506541e745e79ad981e25eb83b01">CPL_ERROR_NO_WCS</a>, and <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>.</p>
</div>
</div>
<a class="anchor" id="ga7939791fbe7e4bbcdd65e8695c27c0c0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cpl_wcs* cpl_wcs_new_from_propertylist </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="group__cpl__propertylist.html#gab1629461e5d64dd8594cd505e3ea46ab">cpl_propertylist</a> * </td>
<td class="paramname"><em>plist</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a wcs structure by parsing a propertylist. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">plist</td><td>The input propertylist</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The newly created and filled cpl_wcs object or NULL if it could not be created. In the latter case an appropriate error code is set.</dd></dl>
<dl class="exception">
<dt><b>Errors</b></dt>
<dd></dd>
<dt></dt>
<dd><table class="ec" align="center">
<tr>
<td class="ecl">CPL_ERROR_NULL_INPUT </td><td class="ecr">The parameter <em>plist</em> is a <code>NULL</code> pointer. </td></tr>
<tr>
<td class="ecl">CPL_ERROR_TYPE_MISMATCH </td><td class="ecr">NAXIS information in image propertylist is not an integer </td></tr>
<tr>
<td class="ecl">CPL_ERROR_DATA_NOT_FOUND </td><td class="ecr">Error in getting NAXIS information for image propertylists </td></tr>
<tr>
<td class="ecl">CPL_ERROR_UNSPECIFIED </td><td class="ecr">An unspecified error occurred in the WCSLIB routine. </td></tr>
<tr>
<td class="ecl">CPL_ERROR_NO_WCS </td><td class="ecr">The WCS sub library is not available. </td></tr>
</table>
</dd>
</dl>
<p>The function allocates memory for a WCS structure. A pointer to the WCSLIB header information is created by parsing the FITS WCS keywords from the header of a file. A few ancillary items are also filled in.</p>
<p>It is allowed to pass a cpl_propertylist with a valid WCS structure and NAXIS = 0, such a propertylist can be created by <a class="el" href="group__cpl__wcs.html#gaef2a2ad1e5206d26175ab95f81afb58c" title="Do a 2d plate solution given physical and celestial coordinates. ">cpl_wcs_platesol()</a>. In this case a cpl_wcs object is returned for which the dimensional information (accessible via <a class="el" href="group__cpl__wcs.html#gaa0470276e42554e03de63dd5b68d587d" title="Accessor to get the axis lengths of the image associated with a WCS. ">cpl_wcs_get_image_dims()</a>) will be NULL.</p>
<p>The returned property must be destroyed using the wcs destructor <b><a class="el" href="group__cpl__wcs.html#gad3c5f9a87cfe66226c1690953539f46b" title="Destroy a WCS structure. ">cpl_wcs_delete()</a></b>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__wcs.html#gad3c5f9a87cfe66226c1690953539f46b" title="Destroy a WCS structure. ">cpl_wcs_delete()</a> </dd></dl>
<p>References <a class="el" href="group__cpl__array.html#ga83f215dd3642ac04434dc11f19cfb531">cpl_array_fill_window()</a>, <a class="el" href="group__cpl__array.html#gaef6ce495b8cff38332106ba3242a2c9f">cpl_array_get_data_int()</a>, <a class="el" href="group__cpl__array.html#ga8e801eed015223aa6ebdf157896cc164">cpl_array_get_size()</a>, <a class="el" href="group__cpl__error.html#gafb123879d8683c6d63681f433dc19bd0">cpl_ensure</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a1352506541e745e79ad981e25eb83b01">CPL_ERROR_NO_WCS</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a7b054cf7927d1bd0a9b3693a6715be84">CPL_ERROR_NULL_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900abb6808829dd2b06a86ec503f1169eab3">CPL_ERROR_UNSPECIFIED</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__memory.html#ga9cd2b64cbbe05ec9f34fda048184b4d1">cpl_free()</a>, <a class="el" href="group__cpl__propertylist.html#ga8ad1d13749c2dbc2d3e61672085169b6">cpl_propertylist_copy_property_regexp()</a>, <a class="el" href="group__cpl__propertylist.html#gae02f740d29133f8ecd419cf2f4e31efe">cpl_propertylist_delete()</a>, <a class="el" href="group__cpl__propertylist.html#gafc5c4eed51a1d494e07dbe514989d47a">cpl_propertylist_get_int()</a>, <a class="el" href="group__cpl__propertylist.html#ga04b26b4c955d73cefa08fa11ceaacacb">cpl_propertylist_get_size()</a>, <a class="el" href="group__cpl__propertylist.html#ga3c1cda7ff8b40d12073df3873134bbb9">cpl_propertylist_has()</a>, <a class="el" href="group__cpl__propertylist.html#ga38d4962818e4c35308e3404bbfb7dbc4">cpl_propertylist_new()</a>, and <a class="el" href="group__cpl__memory.html#ga3182acba4528fb26736337aadfb839de">cpl_sprintf()</a>.</p>
<p>Referenced by <a class="el" href="group__cpl__wcs.html#gaef2a2ad1e5206d26175ab95f81afb58c">cpl_wcs_platesol()</a>.</p>
</div>
</div>
<a class="anchor" id="gaef2a2ad1e5206d26175ab95f81afb58c"></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_wcs_platesol </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="group__cpl__propertylist.html#gab1629461e5d64dd8594cd505e3ea46ab">cpl_propertylist</a> * </td>
<td class="paramname"><em>ilist</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_matrix * </td>
<td class="paramname"><em>cel</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cpl_matrix * </td>
<td class="paramname"><em>xy</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>niter</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"><em>thresh</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cpl_wcs_platesol_fitmode </td>
<td class="paramname"><em>fitmode</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cpl_wcs_platesol_outmode </td>
<td class="paramname"><em>outmode</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__cpl__propertylist.html#gab1629461e5d64dd8594cd505e3ea46ab">cpl_propertylist</a> ** </td>
<td class="paramname"><em>olist</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Do a 2d plate solution given physical and celestial coordinates. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ilist</td><td>The input property list containing the first pass WCS </td></tr>
<tr><td class="paramname">cel</td><td>The celestial coordinate matrix </td></tr>
<tr><td class="paramname">xy</td><td>The physical coordinate matrix </td></tr>
<tr><td class="paramname">niter</td><td>The number of fitting iterations </td></tr>
<tr><td class="paramname">thresh</td><td>The threshold for the fitting rejection cycle </td></tr>
<tr><td class="paramname">fitmode</td><td>The fitting mode (see below) </td></tr>
<tr><td class="paramname">outmode</td><td>The output mode (see below) </td></tr>
<tr><td class="paramname">olist</td><td>The output property list containing the new WCS</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An appropriate error code.</dd></dl>
<dl class="exception">
<dt><b>Errors</b></dt>
<dd></dd>
<dt></dt>
<dd><table class="ec" align="center">
<tr>
<td class="ecl">CPL_ERROR_NULL_INPUT </td><td class="ecr">The parameter <em>cel</em> is a <code>NULL</code> pointer, the parameter <em>xy</em> is a <code>NULL</code> pointer or <em>ilist</em> is a <code>NULL</code> pointer. </td><td class="ecl">CPL_ERROR_ILLEGAL_INPUT </td><td class="ecr">The parameter <em>niter</em> is non-positive. </td></tr>
<tr>
<td class="ecl">CPL_ERROR_UNSPECIFIED </td><td class="ecr">Unable to parse the input propertylist into a proper FITS WCS or there are too few points in the input matrices for a fit. </td></tr>
<tr>
<td class="ecl">CPL_ERROR_INCOMPATIBLE_INPUT </td><td class="ecr">The matrices <em>cel</em> and <em>xy</em> have different sizes. </td></tr>
<tr>
<td class="ecl">CPL_ERROR_UNSUPPORTED_MODE </td><td class="ecr">Either <em>fitmode</em> or <em>outmode</em> are specified incorrectly </td></tr>
<tr>
<td class="ecl">CPL_ERROR_DATA_NOT_FOUND </td><td class="ecr">The threshold is so low that no valid points are found. If the threshold is not positive, this error is certain to occur. </td></tr>
<tr>
<td class="ecl">CPL_ERROR_NO_WCS </td><td class="ecr">The WCS sub library is not available. </td></tr>
</table>
</dd>
</dl>
<p>This function allows for the following type of fits: – CPL_WCS_PLATESOL_4: Fit for zero point, 1 scale and 1 rotation. – CPL_WCS_PLATESOL_6: Fit for zero point, 2 scales, 1 rotation, 1 shear.</p>
<p>This function allows the zeropoint to be defined by shifting either the physical or the celestial coordinates of the reference point: – CPL_WCS_MV_CRVAL: Keeps the physical point fixed and shifts the celestial – CPL_WCS_MV_CRPIX: Keeps the celestial point fixed and shifts the physical</p>
<p>The output property list contains WCS relevant information only.</p>
<p>The matrices <em>cel</em>, and <em>xy</em> have to be set up in the same way as it is required for <b><a class="el" href="group__cpl__wcs.html#ga3e6e2597917be71afeb5de2d957a659a" title="Convert between physical and world coordinates. ">cpl_wcs_convert()</a></b>. See the documentation of <b><a class="el" href="group__cpl__wcs.html#ga3e6e2597917be71afeb5de2d957a659a" title="Convert between physical and world coordinates. ">cpl_wcs_convert()</a></b> for details.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__cpl__wcs.html#ga3e6e2597917be71afeb5de2d957a659a" title="Convert between physical and world coordinates. ">cpl_wcs_convert()</a> </dd></dl>
<p>References <a class="el" href="group__cpl__array.html#ga6bffcca34e6751f1e5c2db6497be2074">cpl_array_delete()</a>, <a class="el" href="group__cpl__array.html#gacf4a7775ab84a3d776f0be5e19ac5576">cpl_array_get_data_double_const()</a>, <a class="el" href="group__cpl__array.html#gabc7eaabc5ae95aaa957353af9d1eed48">cpl_array_wrap_int()</a>, <a class="el" href="group__cpl__memory.html#gab672473d6f7d0d933e06c2e8c456bd3b">cpl_calloc()</a>, <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#ga724de575c31ddf40f42786306f9dbdcb">cpl_error_get_code()</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900ae6ab32df318c1af9afcddcb8249cad51">CPL_ERROR_ILLEGAL_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a67b9f44eb1db1ab12f0575dbb878c0fd">CPL_ERROR_INCOMPATIBLE_INPUT</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a1352506541e745e79ad981e25eb83b01">CPL_ERROR_NO_WCS</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__error.html#gga49a0c316d52d2afbfd9fd94b95344900abb6808829dd2b06a86ec503f1169eab3">CPL_ERROR_UNSPECIFIED</a>, <a class="el" href="group__cpl__error.html#gga49a0c316d52d2afbfd9fd94b95344900a74ef8e37f3412e85cfc22840d13bdd0c">CPL_ERROR_UNSUPPORTED_MODE</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__memory.html#ga9cd2b64cbbe05ec9f34fda048184b4d1">cpl_free()</a>, <a class="el" href="group__cpl__memory.html#gac884edcb0a592489c65239d0e5d08785">cpl_malloc()</a>, <a class="el" href="group__cpl__matrix.html#ga76f34c669aefde2a5ac3fe1e9a96d9a4">cpl_matrix_delete()</a>, <a class="el" href="group__cpl__matrix.html#ga49f69f09c0f6a8610318aeb90beee97c">cpl_matrix_get()</a>, <a class="el" href="group__cpl__matrix.html#ga8cca30a90b99acbd643748ada726f2c9">cpl_matrix_get_data_const()</a>, <a class="el" href="group__cpl__matrix.html#gaba2be6537f0aacb0dfea437f186627c9">cpl_matrix_get_nrow()</a>, <a class="el" href="group__cpl__property.html#ga7bbb0003e6269b5153dee971a58a6de8">cpl_property_delete()</a>, <a class="el" href="group__cpl__property.html#gaadb3bf1cb17fecf101c688c2310fadcd">cpl_property_get_int()</a>, <a class="el" href="group__cpl__property.html#ga8bacf2c59c9008b35f72e67e117e43bc">cpl_property_get_name()</a>, <a class="el" href="group__cpl__property.html#gabe3a757599ecd6a2fa2794930f7854cf">cpl_property_get_type()</a>, <a class="el" href="group__cpl__property.html#ga74df72ef2dca368376f649a3498701d4">cpl_property_new()</a>, <a class="el" href="group__cpl__property.html#ga9bcee7ae36cc3f312c7a18e355c57c1e">cpl_property_set_comment()</a>, <a class="el" href="group__cpl__property.html#ga36caa74cd14d90150a2c4624d5c9a66d">cpl_property_set_double()</a>, <a class="el" href="group__cpl__propertylist.html#ga01a0c64db3aa4e8dd351aa685df61e9c">cpl_propertylist_append_double()</a>, <a class="el" href="group__cpl__propertylist.html#ga8ad1d13749c2dbc2d3e61672085169b6">cpl_propertylist_copy_property_regexp()</a>, <a class="el" href="group__cpl__propertylist.html#gae02f740d29133f8ecd419cf2f4e31efe">cpl_propertylist_delete()</a>, <a class="el" href="group__cpl__propertylist.html#ga7f98345cde444f97b448fd3bad44e965">cpl_propertylist_erase()</a>, <a class="el" href="group__cpl__propertylist.html#gab2381a85b0d198cb4a047e62b58069ef">cpl_propertylist_erase_regexp()</a>, <a class="el" href="group__cpl__propertylist.html#gacabcd2a20cb9697519ae61a88c2454a3">cpl_propertylist_get()</a>, <a class="el" href="group__cpl__propertylist.html#ga04b26b4c955d73cefa08fa11ceaacacb">cpl_propertylist_get_size()</a>, <a class="el" href="group__cpl__propertylist.html#gabdfaeca1352f4f254ed417e6f29e9a63">cpl_propertylist_insert_after_property()</a>, <a class="el" href="group__cpl__propertylist.html#ga38d4962818e4c35308e3404bbfb7dbc4">cpl_propertylist_new()</a>, <a class="el" href="group__cpl__type.html#ga4f6c44a14bbc3aea87b1f47acf8dfd02">CPL_SIZE_FORMAT</a>, <a class="el" href="group__cpl__memory.html#ga3182acba4528fb26736337aadfb839de">cpl_sprintf()</a>, <a class="el" href="group__cpl__type.html#gga3f03371e201544e9115b40065e47f086a4923f03f3a673edd344b0d81835ca69e">CPL_TYPE_DOUBLE</a>, <a class="el" href="group__cpl__type.html#gga3f03371e201544e9115b40065e47f086ae333db5ccea0813ccd892525b4ba1345">CPL_TYPE_INT</a>, <a class="el" href="group__cpl__wcs.html#ga3e6e2597917be71afeb5de2d957a659a">cpl_wcs_convert()</a>, <a class="el" href="group__cpl__wcs.html#gad3c5f9a87cfe66226c1690953539f46b">cpl_wcs_delete()</a>, and <a class="el" href="group__cpl__wcs.html#ga7939791fbe7e4bbcdd65e8695c27c0c0">cpl_wcs_new_from_propertylist()</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>
|