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 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>WCSLIB 4.8.2: wcshdr.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<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="annotated.html"><span>Data Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>wcshdr.h File Reference</h1><code>#include "<a class="el" href="wcs_8h-source.html">wcs.h</a>"</code><br>
<p>
<a href="wcshdr_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#92a0007f672a5498ab1b6ccc6a4a002b">WCSHDR_none</a> 0x00000000</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - reject all extensions. <a href="#92a0007f672a5498ab1b6ccc6a4a002b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#0b9b53e5cfd05653cbca75cf1aa8b2ed">WCSHDR_all</a> 0x000FFFFF</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - accept all extensions. <a href="#0b9b53e5cfd05653cbca75cf1aa8b2ed"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#fd6d52bed79bd48230f651ac48eb5ca6">WCSHDR_reject</a> 0x10000000</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - reject non-standard keywords. <a href="#fd6d52bed79bd48230f651ac48eb5ca6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#017f1e817bdb2114ba765e7a9ef73bac">WCSHDR_CROTAia</a> 0x00000001</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - accept <code><b>CROTA</b>ia</code>, <code>i<b>CROT</b>na</code>, <code><b>TCROT</b>na</code>. <a href="#017f1e817bdb2114ba765e7a9ef73bac"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#5feeef18919b1cbb79729bbfa75976ec">WCSHDR_EPOCHa</a> 0x00000002</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - accept <code><b>EPOCH</b>a</code>. <a href="#5feeef18919b1cbb79729bbfa75976ec"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#fc0a5a6b475a8e50b77d4be099790985">WCSHDR_VELREFa</a> 0x00000004</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - accept <code><b>VELREF</b>a</code>. <a href="#fc0a5a6b475a8e50b77d4be099790985"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#63eb554461f3df5dc64a25f71891b9f1">WCSHDR_CD00i00j</a> 0x00000008</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - accept <code><b>CD00</b>i<b>00</b>j</code>. <a href="#63eb554461f3df5dc64a25f71891b9f1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#3dea9d7548bdbc9a7cc8d0a04cdd46fb">WCSHDR_PC00i00j</a> 0x00000010</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - accept <code><b>PC00</b>i<b>00</b>j</code>. <a href="#3dea9d7548bdbc9a7cc8d0a04cdd46fb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#ee4fe41274945f9e34009d2eb309c922">WCSHDR_PROJPn</a> 0x00000020</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - accept <code><b>PROJP</b>n</code>. <a href="#ee4fe41274945f9e34009d2eb309c922"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#1d506ef2ad493a963426e0732a6328ca">WCSHDR_RADECSYS</a> 0x00000040</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - accept <code><b>RADECSYS</b></code>. <a href="#1d506ef2ad493a963426e0732a6328ca"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#1b66d50d7f1927222a170bc88f9db51e">WCSHDR_VSOURCE</a> 0x00000080</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - accept <code><b>VSOURCE</b>a</code>. <a href="#1b66d50d7f1927222a170bc88f9db51e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#dff9a101a373a634f3a1baab29e92534">WCSHDR_DOBSn</a> 0x00000100</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - accept <code><b>DOBS</b>n</code>. <a href="#dff9a101a373a634f3a1baab29e92534"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#e8a768f544fe3ae81436b73dca3099fb">WCSHDR_LONGKEY</a> 0x00000200</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - accept long forms of the alternate binary table and pixel list WCS keywords. <a href="#e8a768f544fe3ae81436b73dca3099fb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#df57a609a5c3f7288452cce86210260e">WCSHDR_CNAMn</a> 0x00000400</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - accept <code>i<b>CNAM</b>n</code>, <code><b>TCNAM</b>n</code>, <code>i<b>CRDE</b>n</code>, <code><b>TCRDE</b>n</code>, <code>i<b>CSYE</b>n</code>, <code><b>TCSYE</b>n</code>. <a href="#df57a609a5c3f7288452cce86210260e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#0e8eb873389e9c15bd6079a96c41ad60">WCSHDR_AUXIMG</a> 0x00000800</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - allow the image-header form of an auxiliary WCS keyword to provide a default value for all images. <a href="#0e8eb873389e9c15bd6079a96c41ad60"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#33d67fd81c52448aead9e09f32ba9cca">WCSHDR_ALLIMG</a> 0x00001000</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - allow the image-header form of <em>all</em> image header WCS keywords to provide a default value for all images. <a href="#33d67fd81c52448aead9e09f32ba9cca"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#b65e929c7d525d735ae240046d4f0d9c">WCSHDR_IMGHEAD</a> 0x00010000</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - restrict to image header keywords only. <a href="#b65e929c7d525d735ae240046d4f0d9c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a7c5021293b0db20ece0e82c3702a159">WCSHDR_BIMGARR</a> 0x00020000</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - restrict to binary table image array keywords only. <a href="#a7c5021293b0db20ece0e82c3702a159"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#7bf13ab87b23ecdbbb4b4847d4944070">WCSHDR_PIXLIST</a> 0x00040000</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - restrict to pixel list keywords only. <a href="#7bf13ab87b23ecdbbb4b4847d4944070"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#54634ed49425e8842874e9e2b77899df">WCSHDO_none</a> 0x00</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a> - don't write any extensions. <a href="#54634ed49425e8842874e9e2b77899df"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#5592649ee4c25e118559c6d283c51930">WCSHDO_all</a> 0xFF</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a> - write all extensions. <a href="#5592649ee4c25e118559c6d283c51930"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#446914676e0b3f55ac6a080015a52b43">WCSHDO_safe</a> 0x0F</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a> - write safe extensions only. <a href="#446914676e0b3f55ac6a080015a52b43"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#6779d48001260a0011b3dcffdcb64cb6">WCSHDO_DOBSn</a> 0x01</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a> - write <code><b>DOBS</b>n</code>. <a href="#6779d48001260a0011b3dcffdcb64cb6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#96b787f84207faa42599e50e6e078d21">WCSHDO_TPCn_ka</a> 0x02</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a> - write <code><b>TPC</b>n<b>_</b>ka</code>. <a href="#96b787f84207faa42599e50e6e078d21"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#222a5bd7659f3e1ea1a9ed21f54c50ef">WCSHDO_PVn_ma</a> 0x04</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a> - write <code>i<b>PV</b>n<b>_</b>ma</code>, <code><b>TPV</b>n<b>_</b>ma</code>, <code>i<b>PS</b>n<b>_</b>ma</code>, <code><b>TPS</b>n<b>_</b>ma</code>. <a href="#222a5bd7659f3e1ea1a9ed21f54c50ef"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#ace96fb8c1499616dd1333af3e8340b0">WCSHDO_CRPXna</a> 0x08</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a> - write <code>j<b>CRPX</b>na</code>, <code><b>TCRPX</b>na</code>, <code>i<b>CDLT</b>na</code>, <code><b>TCDLT</b>na</code>, <code>i<b>CUNI</b>na</code>, <code><b>TCUNI</b>na</code>, <code>i<b>CTYP</b>na</code>, <code><b>TCTYP</b>na</code>, <code>i<b>CRVL</b>na</code>, <code><b>TCRVL</b>na</code>. <a href="#ace96fb8c1499616dd1333af3e8340b0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#95325b53ebd8d7d0a371a65b27b3d04a">WCSHDO_CNAMna</a> 0x10</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a> - write <code>i<b>CNAM</b>na</code>, <code><b>TCNAM</b>na</code>, <code>i<b>CRDE</b>na</code>, <code><b>TCRDE</b>na</code>, <code>i<b>CSYE</b>na</code>, <code><b>TCSYE</b>na</code>. <a href="#95325b53ebd8d7d0a371a65b27b3d04a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#9a70ad2a355a9736711d8017535bf72b">WCSHDO_WCSNna</a> 0x20</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a> - write <code><b>WCSN</b>na</code> instead of <code><b>TWCS</b>na</code>. <a href="#9a70ad2a355a9736711d8017535bf72b"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#e2dfc36c150d3a16a5e83131d32ecdae">wcshdr_errmsg_enum</a> { <br>
<a class="el" href="wcshdr_8h.html#e2dfc36c150d3a16a5e83131d32ecdaebfe69dd9e4c486f856a5dc44b02e79a1">WCSHDRERR_SUCCESS</a> = 0,
<a class="el" href="wcshdr_8h.html#e2dfc36c150d3a16a5e83131d32ecdae99dd31e274ec97542e650ff89357cded">WCSHDRERR_NULL_POINTER</a> = 1,
<a class="el" href="wcshdr_8h.html#e2dfc36c150d3a16a5e83131d32ecdae0a858638ef0dd0dc9b529f98b14cc46f">WCSHDRERR_MEMORY</a> = 2,
<a class="el" href="wcshdr_8h.html#e2dfc36c150d3a16a5e83131d32ecdae0c926e2cc98a8c39585aa0e212423459">WCSHDRERR_BAD_COLUMN</a> = 3,
<br>
<a class="el" href="wcshdr_8h.html#e2dfc36c150d3a16a5e83131d32ecdae218297c7a2a4d405c251e9ed239e615b">WCSHDRERR_PARSER</a> = 4,
<a class="el" href="wcshdr_8h.html#e2dfc36c150d3a16a5e83131d32ecdaeeae58359638c0c631e6c7c573a343508">WCSHDRERR_BAD_TABULAR_PARAMS</a> = 5
<br>
}</td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60">wcspih</a> (char *header, int nkeyrec, int relax, int ctrl, int *nreject, int *nwcs, struct <a class="el" href="structwcsprm.html">wcsprm</a> **wcs)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">FITS WCS parser routine for image headers. <a href="#c75623ee805ab7d43b0bba684c719a60"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633">wcsbth</a> (char *header, int nkeyrec, int relax, int ctrl, int keysel, int *colsel, int *nreject, int *nwcs, struct <a class="el" href="structwcsprm.html">wcsprm</a> **wcs)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">FITS WCS parser routine for binary table and image headers. <a href="#dc053d80a9c4da454a52eed34e123633"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#6dd857f7b61a5b349cc8af5a4b6d8a1c">wcstab</a> (struct <a class="el" href="structwcsprm.html">wcsprm</a> *wcs)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Tabular construction routine. <a href="#6dd857f7b61a5b349cc8af5a4b6d8a1c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#6174a483baad91dae3fa1c30b0e4cde5">wcsidx</a> (int nwcs, struct <a class="el" href="structwcsprm.html">wcsprm</a> **wcs, int alts[27])</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Index alternate coordinate representations. <a href="#6174a483baad91dae3fa1c30b0e4cde5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#16e35904c64fe6b0aab144bd022c722f">wcsbdx</a> (int nwcs, struct <a class="el" href="structwcsprm.html">wcsprm</a> **wcs, int type, short alts[1000][28])</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Index alternate coordinate representions. <a href="#16e35904c64fe6b0aab144bd022c722f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#27465844aaeea0623133f8151ca4fd9b">wcsvfree</a> (int *nwcs, struct <a class="el" href="structwcsprm.html">wcsprm</a> **wcs)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Free the array of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> structs. <a href="#27465844aaeea0623133f8151ca4fd9b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6">wcshdo</a> (int relax, struct <a class="el" href="structwcsprm.html">wcsprm</a> *wcs, int *nkeyrec, char **header)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Write out a <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> struct as a FITS header. <a href="#0b8372e555a2e2bcc63a11f3dc7a1bf6"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#06cd9297f8315235ba1cf13d1cc115e1">wcshdr_errmsg</a> []</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Status return messages. <a href="#06cd9297f8315235ba1cf13d1cc115e1"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Routines in this suite are aimed at extracting WCS information from a FITS file. They provide the high-level interface between the FITS file and the WCS coordinate transformation routines.<p>
Additionally, function <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a> is provided to write out the contents of a <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> struct as a FITS header.<p>
Briefly, the anticipated sequence of operations is as follows:<p>
<ul>
<li>
1: Open the FITS file and read the image or binary table header, e.g. using CFITSIO routine <em>fits_hdr2str()</em>.<p>
</li>
<li>
2: Parse the header using <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> or <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a>; they will automatically interpret <code>'<b>TAB</b>'</code> header keywords using <a class="el" href="wcshdr_8h.html#6dd857f7b61a5b349cc8af5a4b6d8a1c" title="Tabular construction routine.">wcstab()</a>.<p>
</li>
<li>
3: Allocate memory for, and read <code>'<b>TAB</b>'</code> arrays from the binary table extension, e.g. using CFITSIO routine <a class="el" href="getwcstab_8h.html#96c804d78d44901bc5d497b30e47b7ad" title="FITS 'TAB' table reading routine.">fits_read_wcstab()</a> - refer to the prologue of <a class="el" href="getwcstab_8h.html">getwcstab.h</a>. <a class="el" href="wcs_8h.html#e5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct.">wcsset()</a> will automatically take control of this allocated memory, in particular causing it to be free'd by <a class="el" href="wcs_8h.html#4ab38bc642c4656f62c43acf84a849f1" title="Destructor for the wcsprm struct.">wcsfree()</a>.<p>
</li>
<li>
4: Translate non-standard WCS usage using <a class="el" href="wcsfix_8h.html#89e1b5b4d2fa89af03f5d1143352b05f" title="Translate a non-standard WCS struct.">wcsfix()</a>, see <a class="el" href="wcsfix_8h.html">wcsfix.h</a>.<p>
</li>
<li>
5: Initialize <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> struct(s) using <a class="el" href="wcs_8h.html#e5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct.">wcsset()</a> and calculate coordinates using <a class="el" href="wcs_8h.html#27d3dd209db3e76cf4c50f48c01ba986" title="Pixel-to-world transformation.">wcsp2s()</a> and/or <a class="el" href="wcs_8h.html#60673d05a3513659ac848a9cb3d0cb07" title="World-to-pixel transformation.">wcss2p()</a>. Refer to the prologue of <a class="el" href="wcs_8h.html">wcs.h</a> for a description of these and other high-level WCS coordinate transformation routines.<p>
</li>
<li>
6: Clean up by freeing memory with <a class="el" href="wcshdr_8h.html#27465844aaeea0623133f8151ca4fd9b" title="Free the array of wcsprm structs.">wcsvfree()</a>. </li>
</ul>
<p>
<b>In detail:</b> <br>
<p>
<ul>
<li><a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> is a high-level FITS WCS routine that parses an image header. It returns an array of up to 27 <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> structs on each of which it invokes <a class="el" href="wcshdr_8h.html#6dd857f7b61a5b349cc8af5a4b6d8a1c" title="Tabular construction routine.">wcstab()</a>.</li></ul>
<p>
<ul>
<li><a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> is the analogue of <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> for use with binary tables; it handles image array and pixel list keywords. As an extension of the FITS WCS standard, it also recognizes image header keywords which may be used to provide default values via an inheritance mechanism.</li></ul>
<p>
<ul>
<li><a class="el" href="wcshdr_8h.html#6dd857f7b61a5b349cc8af5a4b6d8a1c" title="Tabular construction routine.">wcstab()</a> assists in filling in members of the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> struct associated with coordinate lookup tables (<code>'<b>TAB</b>'</code>). These are based on arrays stored in a FITS binary table extension (BINTABLE) that are located by <code><b>PV</b>i<b>_</b>ma</code> keywords in the image header.</li></ul>
<p>
<ul>
<li><a class="el" href="wcshdr_8h.html#6174a483baad91dae3fa1c30b0e4cde5" title="Index alternate coordinate representations.">wcsidx()</a> and <a class="el" href="wcshdr_8h.html#16e35904c64fe6b0aab144bd022c722f" title="Index alternate coordinate representions.">wcsbdx()</a> are utility routines that return the index for a specified alternate coordinate descriptor in the array of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> structs returned by <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> or <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a>.</li></ul>
<p>
<ul>
<li><a class="el" href="wcshdr_8h.html#27465844aaeea0623133f8151ca4fd9b" title="Free the array of wcsprm structs.">wcsvfree()</a> deallocates memory for an array of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> structs, such as returned by <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> or <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a>.</li></ul>
<p>
<ul>
<li><a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a> writes out a <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> struct as a FITS header. </li></ul>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="92a0007f672a5498ab1b6ccc6a4a002b"></a><!-- doxytag: member="wcshdr.h::WCSHDR_none" ref="92a0007f672a5498ab1b6ccc6a4a002b" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDR_none 0x00000000 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - reject all extensions.<p>
Refer to <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> note 5.
</div>
</div><p>
<a class="anchor" name="0b9b53e5cfd05653cbca75cf1aa8b2ed"></a><!-- doxytag: member="wcshdr.h::WCSHDR_all" ref="0b9b53e5cfd05653cbca75cf1aa8b2ed" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDR_all 0x000FFFFF </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - accept all extensions.<p>
Refer to <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> note 5.
</div>
</div><p>
<a class="anchor" name="fd6d52bed79bd48230f651ac48eb5ca6"></a><!-- doxytag: member="wcshdr.h::WCSHDR_reject" ref="fd6d52bed79bd48230f651ac48eb5ca6" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDR_reject 0x10000000 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - reject non-standard keywords.<p>
Refer to <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> note 5.
</div>
</div><p>
<a class="anchor" name="017f1e817bdb2114ba765e7a9ef73bac"></a><!-- doxytag: member="wcshdr.h::WCSHDR_CROTAia" ref="017f1e817bdb2114ba765e7a9ef73bac" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDR_CROTAia 0x00000001 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - accept <code><b>CROTA</b>ia</code>, <code>i<b>CROT</b>na</code>, <code><b>TCROT</b>na</code>.<p>
Refer to <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> note 5.
</div>
</div><p>
<a class="anchor" name="5feeef18919b1cbb79729bbfa75976ec"></a><!-- doxytag: member="wcshdr.h::WCSHDR_EPOCHa" ref="5feeef18919b1cbb79729bbfa75976ec" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDR_EPOCHa 0x00000002 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - accept <code><b>EPOCH</b>a</code>.<p>
Refer to <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> note 5.
</div>
</div><p>
<a class="anchor" name="fc0a5a6b475a8e50b77d4be099790985"></a><!-- doxytag: member="wcshdr.h::WCSHDR_VELREFa" ref="fc0a5a6b475a8e50b77d4be099790985" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDR_VELREFa 0x00000004 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - accept <code><b>VELREF</b>a</code>.<p>
Refer to <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> note 5.
</div>
</div><p>
<a class="anchor" name="63eb554461f3df5dc64a25f71891b9f1"></a><!-- doxytag: member="wcshdr.h::WCSHDR_CD00i00j" ref="63eb554461f3df5dc64a25f71891b9f1" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDR_CD00i00j 0x00000008 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - accept <code><b>CD00</b>i<b>00</b>j</code>.<p>
Refer to <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> note 5.
</div>
</div><p>
<a class="anchor" name="3dea9d7548bdbc9a7cc8d0a04cdd46fb"></a><!-- doxytag: member="wcshdr.h::WCSHDR_PC00i00j" ref="3dea9d7548bdbc9a7cc8d0a04cdd46fb" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDR_PC00i00j 0x00000010 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - accept <code><b>PC00</b>i<b>00</b>j</code>.<p>
Refer to <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> note 5.
</div>
</div><p>
<a class="anchor" name="ee4fe41274945f9e34009d2eb309c922"></a><!-- doxytag: member="wcshdr.h::WCSHDR_PROJPn" ref="ee4fe41274945f9e34009d2eb309c922" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDR_PROJPn 0x00000020 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - accept <code><b>PROJP</b>n</code>.<p>
Refer to <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> note 5.
</div>
</div><p>
<a class="anchor" name="1d506ef2ad493a963426e0732a6328ca"></a><!-- doxytag: member="wcshdr.h::WCSHDR_RADECSYS" ref="1d506ef2ad493a963426e0732a6328ca" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDR_RADECSYS 0x00000040 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - accept <code><b>RADECSYS</b></code>.<p>
Refer to <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> note 5.
</div>
</div><p>
<a class="anchor" name="1b66d50d7f1927222a170bc88f9db51e"></a><!-- doxytag: member="wcshdr.h::WCSHDR_VSOURCE" ref="1b66d50d7f1927222a170bc88f9db51e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDR_VSOURCE 0x00000080 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - accept <code><b>VSOURCE</b>a</code>.<p>
Refer to <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> note 5.
</div>
</div><p>
<a class="anchor" name="dff9a101a373a634f3a1baab29e92534"></a><!-- doxytag: member="wcshdr.h::WCSHDR_DOBSn" ref="dff9a101a373a634f3a1baab29e92534" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDR_DOBSn 0x00000100 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - accept <code><b>DOBS</b>n</code>.<p>
Refer to <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> note 5.
</div>
</div><p>
<a class="anchor" name="e8a768f544fe3ae81436b73dca3099fb"></a><!-- doxytag: member="wcshdr.h::WCSHDR_LONGKEY" ref="e8a768f544fe3ae81436b73dca3099fb" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDR_LONGKEY 0x00000200 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - accept long forms of the alternate binary table and pixel list WCS keywords.<p>
Refer to <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> note 5.
</div>
</div><p>
<a class="anchor" name="df57a609a5c3f7288452cce86210260e"></a><!-- doxytag: member="wcshdr.h::WCSHDR_CNAMn" ref="df57a609a5c3f7288452cce86210260e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDR_CNAMn 0x00000400 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - accept <code>i<b>CNAM</b>n</code>, <code><b>TCNAM</b>n</code>, <code>i<b>CRDE</b>n</code>, <code><b>TCRDE</b>n</code>, <code>i<b>CSYE</b>n</code>, <code><b>TCSYE</b>n</code>.<p>
Refer to <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> note 5.
</div>
</div><p>
<a class="anchor" name="0e8eb873389e9c15bd6079a96c41ad60"></a><!-- doxytag: member="wcshdr.h::WCSHDR_AUXIMG" ref="0e8eb873389e9c15bd6079a96c41ad60" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDR_AUXIMG 0x00000800 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - allow the image-header form of an auxiliary WCS keyword with representation-wide scope to provide a default value for all images.<p>
Refer to <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> note 5.
</div>
</div><p>
<a class="anchor" name="33d67fd81c52448aead9e09f32ba9cca"></a><!-- doxytag: member="wcshdr.h::WCSHDR_ALLIMG" ref="33d67fd81c52448aead9e09f32ba9cca" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDR_ALLIMG 0x00001000 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - allow the image-header form of <em>all</em> image header WCS keywords to provide a default value for all image arrays in a binary table (n.b. not pixel list).<p>
Refer to <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> note 5.
</div>
</div><p>
<a class="anchor" name="b65e929c7d525d735ae240046d4f0d9c"></a><!-- doxytag: member="wcshdr.h::WCSHDR_IMGHEAD" ref="b65e929c7d525d735ae240046d4f0d9c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDR_IMGHEAD 0x00010000 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>keysel</em> argument of <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - restrict keyword types considered to image header keywords only.
</div>
</div><p>
<a class="anchor" name="a7c5021293b0db20ece0e82c3702a159"></a><!-- doxytag: member="wcshdr.h::WCSHDR_BIMGARR" ref="a7c5021293b0db20ece0e82c3702a159" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDR_BIMGARR 0x00020000 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>keysel</em> argument of <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - restrict keyword types considered to binary table image array keywords only.
</div>
</div><p>
<a class="anchor" name="7bf13ab87b23ecdbbb4b4847d4944070"></a><!-- doxytag: member="wcshdr.h::WCSHDR_PIXLIST" ref="7bf13ab87b23ecdbbb4b4847d4944070" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDR_PIXLIST 0x00040000 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>keysel</em> argument of <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> - restrict keyword types considered to pixel list keywords only.
</div>
</div><p>
<a class="anchor" name="54634ed49425e8842874e9e2b77899df"></a><!-- doxytag: member="wcshdr.h::WCSHDO_none" ref="54634ed49425e8842874e9e2b77899df" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDO_none 0x00 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a> - don't write any extensions.<p>
Refer to the notes for <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a>.
</div>
</div><p>
<a class="anchor" name="5592649ee4c25e118559c6d283c51930"></a><!-- doxytag: member="wcshdr.h::WCSHDO_all" ref="5592649ee4c25e118559c6d283c51930" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDO_all 0xFF </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a> - write all extensions.<p>
Refer to the notes for <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a>.
</div>
</div><p>
<a class="anchor" name="446914676e0b3f55ac6a080015a52b43"></a><!-- doxytag: member="wcshdr.h::WCSHDO_safe" ref="446914676e0b3f55ac6a080015a52b43" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDO_safe 0x0F </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a> - write only extensions that are considered safe.<p>
Refer to the notes for <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a>.
</div>
</div><p>
<a class="anchor" name="6779d48001260a0011b3dcffdcb64cb6"></a><!-- doxytag: member="wcshdr.h::WCSHDO_DOBSn" ref="6779d48001260a0011b3dcffdcb64cb6" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDO_DOBSn 0x01 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a> - write <code><b>DOBS</b>n</code>, the column-specific analogue of DATE-OBS for use in binary tables and pixel lists.<p>
Refer to the notes for <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a>.
</div>
</div><p>
<a class="anchor" name="96b787f84207faa42599e50e6e078d21"></a><!-- doxytag: member="wcshdr.h::WCSHDO_TPCn_ka" ref="96b787f84207faa42599e50e6e078d21" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDO_TPCn_ka 0x02 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a> - write <code><b>TPC</b>n<b>_</b>ka</code> if less than eight characters instead of <code><b>TP</b>n<b>_</b>ka</code>.<p>
Refer to the notes for <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a>.
</div>
</div><p>
<a class="anchor" name="222a5bd7659f3e1ea1a9ed21f54c50ef"></a><!-- doxytag: member="wcshdr.h::WCSHDO_PVn_ma" ref="222a5bd7659f3e1ea1a9ed21f54c50ef" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDO_PVn_ma 0x04 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a> - write <code>i<b>PV</b>n<b>_</b>ma</code>, <code><b>TPV</b>n<b>_</b>ma</code>, <code>i<b>PS</b>n<b>_</b>ma</code>, <code><b>TPS</b>n<b>_</b>ma</code>, if less than eight characters instead of <code>i<b>V</b>n<b>_</b>ma</code>, <code><b>TV</b>n<b>_</b>ma</code>, <code>i<b>S</b>n<b>_</b>ma</code>, <code><b>TS</b>n<b>_</b>ma</code>.<p>
Refer to the notes for <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a>.
</div>
</div><p>
<a class="anchor" name="ace96fb8c1499616dd1333af3e8340b0"></a><!-- doxytag: member="wcshdr.h::WCSHDO_CRPXna" ref="ace96fb8c1499616dd1333af3e8340b0" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDO_CRPXna 0x08 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a> - write <code>j<b>CRPX</b>na</code>, <code><b>TCRPX</b>na</code>, <code>i<b>CDLT</b>na</code>, <code><b>TCDLT</b>na</code>, <code>i<b>CUNI</b>na</code>, <code><b>TCUNI</b>na</code>, <code>i<b>CTYP</b>na</code>, <code><b>TCTYP</b>na</code>, <code>i<b>CRVL</b>na</code>, <code><b>TCRVL</b>na</code>, if less than eight characters instead of <code>j<b>CRP</b>na</code>, <code><b>TCRP</b>na</code>, <code>i<b>CDE</b>na</code>, <code><b>TCDE</b>na</code>, <code>i<b>CUN</b>na</code>, <code><b>TCUN</b>na</code>, <code>i<b>CTY</b>na</code>, <code><b>TCTY</b>na</code>, <code>i<b>CRV</b>na</code>, <code><b>TCRV</b>na</code>.<p>
Refer to the notes for <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a>.
</div>
</div><p>
<a class="anchor" name="95325b53ebd8d7d0a371a65b27b3d04a"></a><!-- doxytag: member="wcshdr.h::WCSHDO_CNAMna" ref="95325b53ebd8d7d0a371a65b27b3d04a" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDO_CNAMna 0x10 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a> - write <code>i<b>CNAM</b>na</code>, <code><b>TCNAM</b>na</code>, <code>i<b>CRDE</b>na</code>, <code><b>TCRDE</b>na</code>, <code>i<b>CSYE</b>na</code>, <code><b>TCSYE</b>na</code>, if less than eight characters instead of <code>i<b>CNA</b>na</code>, <code><b>TCNA</b>na</code>, <code>i<b>CRD</b>na</code>, <code><b>TCRD</b>na</code>, <code>i<b>CSY</b>na</code>, <code><b>TCSY</b>na</code>.<p>
Refer to the notes for <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a>.
</div>
</div><p>
<a class="anchor" name="9a70ad2a355a9736711d8017535bf72b"></a><!-- doxytag: member="wcshdr.h::WCSHDO_WCSNna" ref="9a70ad2a355a9736711d8017535bf72b" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSHDO_WCSNna 0x20 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a> - write <code><b>WCSN</b>na</code> instead of <code><b>TWCS</b>na</code>.<p>
Refer to the notes for <a class="el" href="wcshdr_8h.html#0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header.">wcshdo()</a>.
</div>
</div><p>
<hr><h2>Enumeration Type Documentation</h2>
<a class="anchor" name="e2dfc36c150d3a16a5e83131d32ecdae"></a><!-- doxytag: member="wcshdr.h::wcshdr_errmsg_enum" ref="e2dfc36c150d3a16a5e83131d32ecdae" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="wcshdr_8h.html#e2dfc36c150d3a16a5e83131d32ecdae">wcshdr_errmsg_enum</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="e2dfc36c150d3a16a5e83131d32ecdaebfe69dd9e4c486f856a5dc44b02e79a1"></a><!-- doxytag: member="WCSHDRERR_SUCCESS" ref="e2dfc36c150d3a16a5e83131d32ecdaebfe69dd9e4c486f856a5dc44b02e79a1" args="" -->WCSHDRERR_SUCCESS</em> </td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="e2dfc36c150d3a16a5e83131d32ecdae99dd31e274ec97542e650ff89357cded"></a><!-- doxytag: member="WCSHDRERR_NULL_POINTER" ref="e2dfc36c150d3a16a5e83131d32ecdae99dd31e274ec97542e650ff89357cded" args="" -->WCSHDRERR_NULL_POINTER</em> </td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="e2dfc36c150d3a16a5e83131d32ecdae0a858638ef0dd0dc9b529f98b14cc46f"></a><!-- doxytag: member="WCSHDRERR_MEMORY" ref="e2dfc36c150d3a16a5e83131d32ecdae0a858638ef0dd0dc9b529f98b14cc46f" args="" -->WCSHDRERR_MEMORY</em> </td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="e2dfc36c150d3a16a5e83131d32ecdae0c926e2cc98a8c39585aa0e212423459"></a><!-- doxytag: member="WCSHDRERR_BAD_COLUMN" ref="e2dfc36c150d3a16a5e83131d32ecdae0c926e2cc98a8c39585aa0e212423459" args="" -->WCSHDRERR_BAD_COLUMN</em> </td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="e2dfc36c150d3a16a5e83131d32ecdae218297c7a2a4d405c251e9ed239e615b"></a><!-- doxytag: member="WCSHDRERR_PARSER" ref="e2dfc36c150d3a16a5e83131d32ecdae218297c7a2a4d405c251e9ed239e615b" args="" -->WCSHDRERR_PARSER</em> </td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="e2dfc36c150d3a16a5e83131d32ecdaeeae58359638c0c631e6c7c573a343508"></a><!-- doxytag: member="WCSHDRERR_BAD_TABULAR_PARAMS" ref="e2dfc36c150d3a16a5e83131d32ecdaeeae58359638c0c631e6c7c573a343508" args="" -->WCSHDRERR_BAD_TABULAR_PARAMS</em> </td><td>
</td></tr>
</table>
</dl>
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="c75623ee805ab7d43b0bba684c719a60"></a><!-- doxytag: member="wcshdr.h::wcspih" ref="c75623ee805ab7d43b0bba684c719a60" args="(char *header, int nkeyrec, int relax, int ctrl, int *nreject, int *nwcs, struct wcsprm **wcs)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wcspih </td>
<td>(</td>
<td class="paramtype">char * </td>
<td class="paramname"> <em>header</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>nkeyrec</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>relax</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>ctrl</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int * </td>
<td class="paramname"> <em>nreject</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int * </td>
<td class="paramname"> <em>nwcs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> ** </td>
<td class="paramname"> <em>wcs</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>wcspih</b>() is a high-level FITS WCS routine that parses an image header, either that of a primary HDU or of an image extension. All WCS keywords defined in Papers I, II, and III are recognized, and also those used by the AIPS convention and certain other keywords that existed in early drafts of the WCS papers as explained in <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> note 5.<p>
Given a character array containing a FITS image header, <b>wcspih</b>() identifies and reads all WCS keywords for the primary coordinate representation and up to 26 alternate representations. It returns this information as an array of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> structs.<p>
<b>wcspih</b>() invokes <a class="el" href="wcshdr_8h.html#6dd857f7b61a5b349cc8af5a4b6d8a1c" title="Tabular construction routine.">wcstab()</a> on each of the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> structs that it returns.<p>
Use <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> in preference to <b>wcspih</b>() for FITS headers of unknown type; <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> can parse image headers as well as binary table and pixel list headers.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>header</em> </td><td>Character array containing the (entire) FITS image header from which to identify and construct the coordinate representations, for example, as might be obtained conveniently via the CFITSIO routine <em>fits_hdr2str()</em>. <br>
Each header "keyrecord" (formerly "card image") consists of exactly 80 7-bit ASCII printing characters in the range 0x20 to 0x7e (which excludes NUL, BS, TAB, LF, FF and CR) especially noting that the keyrecords are NOT null-terminated. <br>
For negative values of ctrl (see below), header[] is modified so that WCS keyrecords processed by <b>wcspih</b>() are removed from it.</td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>nkeyrec</em> </td><td>Number of keyrecords in header[]. </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>relax</em> </td><td>Degree of permissiveness:<ul>
<li>0: Recognize only FITS keywords defined by the published WCS standard.</li><li><a class="el" href="wcshdr_8h.html#0b9b53e5cfd05653cbca75cf1aa8b2ed" title="Bit mask for wcspih() and wcsbth() - accept all extensions.">WCSHDR_all</a>: Admit all recognized informal extensions of the WCS standard.</li></ul>
Fine-grained control of the degree of permissiveness is also possible as explained in <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> note 5. </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>ctrl</em> </td><td>Error reporting and other control options for invalid WCS and other header keyrecords:<ul>
<li>0: Do not report any rejected header keyrecords.</li><li>1: Produce a one-line message stating the number of WCS keyrecords rejected (nreject).</li><li>2: Report each rejected keyrecord and the reason why it was rejected.</li><li>3: As above, but also report all non-WCS keyrecords that were discarded, and the number of coordinate representations (nwcs) found.</li></ul>
The report is written to stderr. <br>
For ctrl < 0, WCS keyrecords processed by <b>wcspih</b>() are removed from header[]:<ul>
<li>-1: Remove only valid WCS keyrecords whose values were successfully extracted, nothing is reported.</li><li>-2: Also remove WCS keyrecords that were rejected, reporting each one and the reason that it was rejected.</li><li>-3: As above, and also report the number of coordinate representations (nwcs) found.</li><li>-11: Same as -1 but preserving the basic keywords <code><b>'</b>{<b>DATE</b></code>,<code><b>MJD</b>}<b>-</b>{<b>OBS</b></code>,<code><b>AVG</b>}<b>'</b></code> and <code><b>'OBSGEO-</b>{<b>X</b></code>,<code><b>Y</b></code>,<code><b>Z</b>}<b>'</b></code>.</li></ul>
If any keyrecords are removed from header[] it will be null-terminated (NUL not being a legal FITS header character), otherwise it will contain its original complement of nkeyrec keyrecords and possibly not be null-terminated.</td></tr>
<tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>nreject</em> </td><td>Number of WCS keywords rejected for syntax errors, illegal values, etc. Keywords not recognized as WCS keywords are simply ignored. Refer also to <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> note 5. </td></tr>
<tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>nwcs</em> </td><td>Number of coordinate representations found. </td></tr>
<tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>wcs</em> </td><td>Pointer to an array of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> structs containing up to 27 coordinate representations. <br>
Memory for the array is allocated by <b>wcspih</b>() which also invokes <a class="el" href="wcs_8h.html#2afc8255fde0965dddaa374463666d45" title="Default constructor for the wcsprm struct.">wcsini()</a> for each struct to allocate memory for internal arrays and initialize their members to default values. Refer also to <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> note 8. Note that <a class="el" href="wcs_8h.html#e5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct.">wcsset()</a> is not invoked on these structs. <br>
This allocated memory must be freed by the user, first by invoking <a class="el" href="wcs_8h.html#4ab38bc642c4656f62c43acf84a849f1" title="Destructor for the wcsprm struct.">wcsfree()</a> for each struct, and then by freeing the array itself. A routine, <a class="el" href="wcshdr_8h.html#27465844aaeea0623133f8151ca4fd9b" title="Free the array of wcsprm structs.">wcsvfree()</a>, is provided to do this (see below).</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Status return value:<ul>
<li>0: Success.</li><li>1: Null <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> pointer passed.</li><li>2: Memory allocation failed.</li><li>4: Fatal error returned by Flex parser.</li></ul>
</dd></dl>
<b>Notes:</b> <br>
Refer to <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> notes 1, 2, 3, 5, 7, and 8.
</div>
</div><p>
<a class="anchor" name="dc053d80a9c4da454a52eed34e123633"></a><!-- doxytag: member="wcshdr.h::wcsbth" ref="dc053d80a9c4da454a52eed34e123633" args="(char *header, int nkeyrec, int relax, int ctrl, int keysel, int *colsel, int *nreject, int *nwcs, struct wcsprm **wcs)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wcsbth </td>
<td>(</td>
<td class="paramtype">char * </td>
<td class="paramname"> <em>header</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>nkeyrec</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>relax</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>ctrl</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>keysel</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int * </td>
<td class="paramname"> <em>colsel</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int * </td>
<td class="paramname"> <em>nreject</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int * </td>
<td class="paramname"> <em>nwcs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> ** </td>
<td class="paramname"> <em>wcs</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>wcsbth</b>() is a high-level FITS WCS routine that parses a binary table header. It handles image array and pixel list WCS keywords which may be present together in one header.<p>
As an extension of the FITS WCS standard, <b>wcsbth</b>() also recognizes image header keywords in a binary table header. These may be used to provide default values via an inheritance mechanism discussed in note 5 (c.f. <a class="el" href="wcshdr_8h.html#0e8eb873389e9c15bd6079a96c41ad60" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of an auxiliary...">WCSHDR_AUXIMG</a> and <a class="el" href="wcshdr_8h.html#33d67fd81c52448aead9e09f32ba9cca" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of all image header...">WCSHDR_ALLIMG</a>), or may instead result in <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> structs that are not associated with any particular column. Thus <b>wcsbth</b>() can handle primary image and image extension headers in addition to binary table headers (it ignores <code><b>NAXIS</b></code> and does not rely on the presence of the <code><b>TFIELDS</b></code> keyword).<p>
All WCS keywords defined in Papers I, II, and III are recognized, and also those used by the AIPS convention and certain other keywords that existed in early drafts of the WCS papers as explained in note 5 below.<p>
<b>wcsbth</b>() sets the colnum or colax[] members of the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> structs that it returns with the column number of an image array or the column numbers associated with each pixel coordinate element in a pixel list. <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> structs that are not associated with any particular column, as may be derived from image header keywords, have colnum == 0.<p>
Note 6 below discusses the number of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> structs returned by <b>wcsbth</b>(), and the circumstances in which image header keywords cause a struct to be created. See also note 9 concerning the number of separate images that may be stored in a pixel list.<p>
The API to <b>wcsbth</b>() is similar to that of <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> except for the addition of extra arguments that may be used to restrict its operation. Like <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a>, <b>wcsbth</b>() invokes <a class="el" href="wcshdr_8h.html#6dd857f7b61a5b349cc8af5a4b6d8a1c" title="Tabular construction routine.">wcstab()</a> on each of the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> structs that it returns.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>header</em> </td><td>Character array containing the (entire) FITS binary table, primary image, or image extension header from which to identify and construct the coordinate representations, for example, as might be obtained conveniently via the CFITSIO routine <em>fits_hdr2str()</em>. <br>
Each header "keyrecord" (formerly "card image") consists of exactly 80 7-bit ASCII printing characters in the range 0x20 to 0x7e (which excludes NUL, BS, TAB, LF, FF and CR) especially noting that the keyrecords are NOT null-terminated. <br>
For negative values of ctrl (see below), header[] is modified so that WCS keyrecords processed by <b>wcsbth</b>() are removed from it.</td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>nkeyrec</em> </td><td>Number of keyrecords in header[]. </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>relax</em> </td><td>Degree of permissiveness:<ul>
<li>0: Recognize only FITS keywords defined by the published WCS standard.</li><li><a class="el" href="wcshdr_8h.html#0b9b53e5cfd05653cbca75cf1aa8b2ed" title="Bit mask for wcspih() and wcsbth() - accept all extensions.">WCSHDR_all</a>: Admit all recognized informal extensions of the WCS standard.</li></ul>
Fine-grained control of the degree of permissiveness is also possible, as explained in note 5 below. </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>ctrl</em> </td><td>Error reporting and other control options for invalid WCS and other header keyrecords:<ul>
<li>0: Do not report any rejected header keyrecords.</li><li>1: Produce a one-line message stating the number of WCS keyrecords rejected (nreject).</li><li>2: Report each rejected keyrecord and the reason why it was rejected.</li><li>3: As above, but also report all non-WCS keyrecords that were discarded, and the number of coordinate representations (nwcs) found.</li></ul>
The report is written to stderr. <br>
For ctrl < 0, WCS keyrecords processed by <b>wcsbth</b>() are removed from header[]:<ul>
<li>-1: Remove only valid WCS keyrecords whose values were successfully extracted, nothing is reported.</li><li>-2: Also remove WCS keyrecords that were rejected, reporting each one and the reason that it was rejected.</li><li>-3: As above, and also report the number of coordinate representations (nwcs) found.</li><li>-11: Same as -1 but preserving the basic keywords <code><b>'</b>{<b>DATE</b></code>,<code><b>MJD</b>}<b>-</b>{<b>OBS</b></code>,<code><b>AVG</b>}<b>'</b></code> and <code><b>'OBSGEO-</b>{<b>X</b></code>,<code><b>Y</b></code>,<code><b>Z</b>}<b>'</b></code>.</li></ul>
If any keyrecords are removed from header[] it will be null-terminated (NUL not being a legal FITS header character), otherwise it will contain its original complement of nkeyrec keyrecords and possibly not be null-terminated. </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>keysel</em> </td><td>Vector of flag bits that may be used to restrict the keyword types considered:<ul>
<li><a class="el" href="wcshdr_8h.html#b65e929c7d525d735ae240046d4f0d9c" title="Bit mask for wcsbth() - restrict to image header keywords only.">WCSHDR_IMGHEAD</a>: Image header keywords.</li><li><a class="el" href="wcshdr_8h.html#a7c5021293b0db20ece0e82c3702a159" title="Bit mask for wcsbth() - restrict to binary table image array keywords only.">WCSHDR_BIMGARR</a>: Binary table image array.</li><li><a class="el" href="wcshdr_8h.html#7bf13ab87b23ecdbbb4b4847d4944070" title="Bit mask for wcsbth() - restrict to pixel list keywords only.">WCSHDR_PIXLIST</a>: Pixel list keywords.</li></ul>
If zero, there is no restriction. <br>
Keywords such as <code><b>EQUI</b>na</code> or <code><b>RFRQ</b>na</code> that are common to binary table image arrays and pixel lists (including <code><b>WCSN</b>na</code> and <code><b>TWCS</b>na</code>, as explained in note 4 below) are selected by both <a class="el" href="wcshdr_8h.html#a7c5021293b0db20ece0e82c3702a159" title="Bit mask for wcsbth() - restrict to binary table image array keywords only.">WCSHDR_BIMGARR</a> and <a class="el" href="wcshdr_8h.html#7bf13ab87b23ecdbbb4b4847d4944070" title="Bit mask for wcsbth() - restrict to pixel list keywords only.">WCSHDR_PIXLIST</a>. Thus if inheritance via <a class="el" href="wcshdr_8h.html#33d67fd81c52448aead9e09f32ba9cca" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of all image header...">WCSHDR_ALLIMG</a> is enabled as discussed in note 5 and one of these shared keywords is present, then <a class="el" href="wcshdr_8h.html#b65e929c7d525d735ae240046d4f0d9c" title="Bit mask for wcsbth() - restrict to image header keywords only.">WCSHDR_IMGHEAD</a> and <a class="el" href="wcshdr_8h.html#7bf13ab87b23ecdbbb4b4847d4944070" title="Bit mask for wcsbth() - restrict to pixel list keywords only.">WCSHDR_PIXLIST</a> alone may be sufficient to cause the construction of coordinate descriptions for binary table image arrays. </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>colsel</em> </td><td>Pointer to an array of table column numbers used to restrict the keywords considered by <b>wcsbth</b>(). <br>
A null pointer may be specified to indicate that there is no restriction. Otherwise, the magnitude of cols[0] specifies the length of the array:<ul>
<li>cols[0] > 0: the columns are included,</li><li>cols[0] < 0: the columns are excluded.</li></ul>
For the pixel list keywords <code><b>TP</b>n<b>_</b>ka</code> and <code><b>TC</b>n<b>_</b>ka</code> (and <code><b>TPC</b>n<b>_</b>ka</code> and <code><b>TCD</b>n<b>_</b>ka</code> if <a class="el" href="wcshdr_8h.html#e8a768f544fe3ae81436b73dca3099fb" title="Bit mask for wcspih() and wcsbth() - accept long forms of the alternate binary table...">WCSHDR_LONGKEY</a> is enabled), it is an error for one column to be selected but not the other. This is unlike the situation with invalid keyrecords, which are simply rejected, because the error is not intrinsic to the header itself but arises in the way that it is processed.</td></tr>
<tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>nreject</em> </td><td>Number of WCS keywords rejected for syntax errors, illegal values, etc. Keywords not recognized as WCS keywords are simply ignored, refer also to note 5 below. </td></tr>
<tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>nwcs</em> </td><td>Number of coordinate representations found. </td></tr>
<tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>wcs</em> </td><td>Pointer to an array of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> structs containing up to 27027 coordinate representations, refer to note 6 below. <br>
Memory for the array is allocated by <b>wcsbth</b>() which also invokes <a class="el" href="wcs_8h.html#2afc8255fde0965dddaa374463666d45" title="Default constructor for the wcsprm struct.">wcsini()</a> for each struct to allocate memory for internal arrays and initialize their members to default values. Refer also to note 8 below. Note that <a class="el" href="wcs_8h.html#e5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct.">wcsset()</a> is not invoked on these structs. <br>
This allocated memory must be freed by the user, first by invoking <a class="el" href="wcs_8h.html#4ab38bc642c4656f62c43acf84a849f1" title="Destructor for the wcsprm struct.">wcsfree()</a> for each struct, and then by freeing the array itself. A routine, <a class="el" href="wcshdr_8h.html#27465844aaeea0623133f8151ca4fd9b" title="Free the array of wcsprm structs.">wcsvfree()</a>, is provided to do this (see below).</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Status return value:<ul>
<li>0: Success.</li><li>1: Null <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> pointer passed.</li><li>2: Memory allocation failed.</li><li>3: Invalid column selection.</li><li>4: Fatal error returned by Flex parser.</li></ul>
</dd></dl>
<b>Notes:</b> <br>
<ol>
<li>
<a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> determines the number of coordinate axes independently for each alternate coordinate representation (denoted by the "a" value in keywords like <code><b>CTYPE</b>ia</code>) from the higher of<p>
<ol type="a">
<li>
<code><b>NAXIS</b></code>, </li>
<li>
<code><b>WCSAXES</b>a</code>, </li>
<li>
The highest axis number in any parameterized WCS keyword. The keyvalue, as well as the keyword, must be syntactically valid otherwise it will not be considered. </li>
</ol>
<p>
If none of these keyword types is present, i.e. if the header only contains auxiliary WCS keywords for a particular coordinate representation, then no coordinate description is constructed for it.<p>
<b>wcsbth</b>() is similar except that it ignores the <code><b>NAXIS</b></code> keyword if given an image header to process.<p>
The number of axes, which is returned as a member of the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> struct, may differ for different coordinate representations of the same image.<p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <b>wcsbth</b>() enforce correct FITS "keyword = value" syntax with regard to "= " occurring in columns 9 and 10.<p>
However, they do recognize free-format character (NOST 100-2.0, Sect. 5.2.1), integer (Sect. 5.2.3), and floating-point values (Sect. 5.2.4) for all keywords.<p>
</li>
<li>
Where <code><b>CROTA</b>n</code>, <code><b>CD</b>i<b>_</b>ja</code>, and <code><b>PC</b>i<b>_</b>ja</code> occur together in one header <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <b>wcsbth</b>() treat them as described in the prologue to <a class="el" href="wcs_8h.html">wcs.h</a>.<p>
</li>
<li>
WCS Paper I mistakenly defined the pixel list form of <code><b>WCSNAME</b>a</code> as <code><b>TWCS</b>na</code> instead of <code><b>WCSN</b>na</code>; the <code>'<b>T</b>'</code> is meant to substitute for the axis number in the binary table form of the keyword - note that keywords defined in WCS Papers II and III that are not parameterised by axis number have identical forms for binary tables and pixel lists. Consequently <b>wcsbth</b>() always treats <code><b>WCSN</b>na</code> and <code><b>TWCS</b>na</code> as equivalent.<p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <b>wcsbth</b>() interpret the <em>relax</em> argument as a vector of flag bits to provide fine-grained control over what non-standard WCS keywords to accept. The flag bits are subject to change in future and should be set by using the preprocessor macros (see below) for the purpose.<p>
<ul>
<li>
<a class="el" href="wcshdr_8h.html#92a0007f672a5498ab1b6ccc6a4a002b" title="Bit mask for wcspih() and wcsbth() - reject all extensions.">WCSHDR_none</a>: Don't accept any extensions (not even those in the errata). Treat non-conformant keywords in the same way as non-WCS keywords in the header, i.e. simply ignore them.<p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#0b9b53e5cfd05653cbca75cf1aa8b2ed" title="Bit mask for wcspih() and wcsbth() - accept all extensions.">WCSHDR_all</a>: Accept all extensions recognized by the parser.<p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#fd6d52bed79bd48230f651ac48eb5ca6" title="Bit mask for wcspih() and wcsbth() - reject non-standard keywords.">WCSHDR_reject</a>: Reject non-standard keywords (that are not otherwise accepted). A message will optionally be printed on stderr, as determined by the ctrl argument, and nreject will be incremented.<p>
This flag may be used to signal the presence of non-standard keywords, otherwise they are simply passed over as though they did not exist in the header.<p>
Useful for testing conformance of a FITS header to the WCS standard.<p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#017f1e817bdb2114ba765e7a9ef73bac" title="Bit mask for wcspih() and wcsbth() - accept CROTAia, iCROTna, TCROTna.">WCSHDR_CROTAia</a>: Accept <code><b>CROTA</b>i</code>a (<a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a>), <code>i<b>CROT</b>n</code>a (<b>wcsbth</b>()), <code><b>TCROT</b>na</code> (<b>wcsbth</b>()). </li>
<li>
<a class="el" href="wcshdr_8h.html#5feeef18919b1cbb79729bbfa75976ec" title="Bit mask for wcspih() and wcsbth() - accept EPOCHa.">WCSHDR_EPOCHa</a>: Accept <code><b><code><b>EPOCH</b></code></b>a</code>. </li>
<li>
<a class="el" href="wcshdr_8h.html#fc0a5a6b475a8e50b77d4be099790985" title="Bit mask for wcspih() and wcsbth() - accept VELREFa.">WCSHDR_VELREFa</a>: Accept <code><b><code><b>VELREF</b></code></b>a</code>. <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> always recognizes the AIPS-convention keywords, <code><b>CROTA</b>n</code>, <code><b>EPOCH</b></code>, and <code><b>VELREF</b></code> for the primary representation (a = ' ') but alternates are non-standard.<p>
<b>wcsbth</b>() accepts <code><b><code><b>EPOCH</b></code></b>a</code> and <code><b><code><b>VELREF</b></code></b>a</code> only if <a class="el" href="wcshdr_8h.html#0e8eb873389e9c15bd6079a96c41ad60" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of an auxiliary...">WCSHDR_AUXIMG</a> is also enabled.<p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#63eb554461f3df5dc64a25f71891b9f1" title="Bit mask for wcspih() and wcsbth() - accept CD00i00j.">WCSHDR_CD00i00j</a>: Accept <code><b>CD00</b>i<b>00</b>j</code> (<a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a>). </li>
<li>
<a class="el" href="wcshdr_8h.html#3dea9d7548bdbc9a7cc8d0a04cdd46fb" title="Bit mask for wcspih() and wcsbth() - accept PC00i00j.">WCSHDR_PC00i00j</a>: Accept <code><b>PC00</b>i<b>00</b>j</code> (<a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a>). </li>
<li>
<a class="el" href="wcshdr_8h.html#ee4fe41274945f9e34009d2eb309c922" title="Bit mask for wcspih() and wcsbth() - accept PROJPn.">WCSHDR_PROJPn</a>: Accept <code><b>PROJP</b>n</code> (<a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a>). These appeared in early drafts of WCS Paper I+II (before they were split) and are equivalent to <code><b>CD</b>i<b>_</b>ja</code>, <code><b>PC</b>i<b>_</b>ja</code>, and <code><b>PV</b>i<b>_</b>ma</code> for the primary representation (a = ' '). <code><b>PROJP</b>n</code> is equivalent to <code><b>PV</b>i<b>_</b>ma</code> with <code>m = n</code> <img class="formulaInl" alt="$\le$" src="form_64.png"> 9, and is associated exclusively with the latitude axis.<p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#1d506ef2ad493a963426e0732a6328ca" title="Bit mask for wcspih() and wcsbth() - accept RADECSYS.">WCSHDR_RADECSYS</a>: Accept <code><b>RADECSYS</b></code>. This appeared in early drafts of WCS Paper I+II and was subsequently replaced by <code><b>RADESYS</b>a</code>.<p>
<b>wcsbth</b>() accepts <code><b>RADECSYS</b></code> only if <a class="el" href="wcshdr_8h.html#0e8eb873389e9c15bd6079a96c41ad60" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of an auxiliary...">WCSHDR_AUXIMG</a> is also enabled.<p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#1b66d50d7f1927222a170bc88f9db51e" title="Bit mask for wcspih() and wcsbth() - accept VSOURCEa.">WCSHDR_VSOURCE</a>: Accept <code><b>VSOURCE</b>a</code> or <code><b>VSOU</b>na</code> (<b>wcsbth</b>()). This appeared in early drafts of WCS Paper III and was subsequently dropped in favour of <code><b>ZSOURCE</b>a</code> and <code><b>ZSOU</b>na</code>.<p>
<b>wcsbth</b>() accepts <code><b>VSOURCE</b>a</code> only if <a class="el" href="wcshdr_8h.html#0e8eb873389e9c15bd6079a96c41ad60" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of an auxiliary...">WCSHDR_AUXIMG</a> is also enabled.<p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#dff9a101a373a634f3a1baab29e92534" title="Bit mask for wcspih() and wcsbth() - accept DOBSn.">WCSHDR_DOBSn</a> (<b>wcsbth</b>() only): Allow <code><b>DOBS</b>n</code>, the column-specific analogue of <code><b>DATE-OBS</b></code>. By an oversight this was never formally defined in the standard.<p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#e8a768f544fe3ae81436b73dca3099fb" title="Bit mask for wcspih() and wcsbth() - accept long forms of the alternate binary table...">WCSHDR_LONGKEY</a> (<b>wcsbth</b>() only): Accept long forms of the alternate binary table and pixel list WCS keywords, i.e. with "a" non- blank. Specifically <hr>
<table border="0>" cellspacing="3" cellpadding="3">
<tr>
<td><code>j<b>CRPX</b>n</code>a </td><td><code><b>TCRPX</b>n</code>a </td><td>: </td><td><code>j<b>CRPX</b>n</code> </td><td><code>j<b>CRP</b>na</code> </td><td><code><b>TCRPX</b>n</code> </td><td><code><b>TCRP</b>na</code> </td><td><code><b>CRPIX</b>ja</code> </td></tr>
<tr>
<td></td><td><code><b>TPC</b>n<b>_</b>ka</code> </td><td>: </td><td></td><td><code>ij<b>PC</b>na</code> </td><td></td><td><code><b>TP</b>n<b>_</b>ka</code> </td><td><code><b>PC</b>i<b>_</b>ja</code> </td></tr>
<tr>
<td></td><td><code><b>TCD</b>n<b>_</b>ka</code> </td><td>: </td><td></td><td><code>ij<b>CD</b>na</code> </td><td></td><td><code><b>TC</b>n<b>_</b>ka</code> </td><td><code><b>CD</b>i<b>_</b>ja</code> </td></tr>
<tr>
<td><code>i<b>CDLT</b>n</code>a </td><td><code><b>TCDLT</b>n</code>a </td><td>: </td><td><code>i<b>CDLT</b>n</code> </td><td><code>i<b>CDE</b>na</code> </td><td><code><b>TCDLT</b>n</code> </td><td><code><b>TCDE</b>na</code> </td><td><code><b>CDELT</b>ia</code> </td></tr>
<tr>
<td><code>i<b>CUNI</b>n</code>a </td><td><code><b>TCUNI</b>n</code>a </td><td>: </td><td><code>i<b>CUNI</b>n</code> </td><td><code>i<b>CUN</b>na</code> </td><td><code><b>TCUNI</b>n</code> </td><td><code><b>TCUN</b>na</code> </td><td><code><b>CUNIT</b>ia</code> </td></tr>
<tr>
<td><code>i<b>CTYP</b>n</code>a </td><td><code><b>TCTYP</b>n</code>a </td><td>: </td><td><code>i<b>CTYP</b>n</code> </td><td><code>i<b>CTY</b>na</code> </td><td><code><b>TCTYP</b>n</code> </td><td><code><b>TCTY</b>na</code> </td><td><code><b>CTYPE</b>ia</code> </td></tr>
<tr>
<td><code>i<b>CRVL</b>n</code>a </td><td><code><b>TCRVL</b>n</code>a </td><td>: </td><td><code>i<b>CRVL</b>n</code> </td><td><code>i<b>CRV</b>na</code> </td><td><code><b>TCRVL</b>n</code> </td><td><code><b>TCRV</b>na</code> </td><td><code><b>CRVAL</b>ia</code> </td></tr>
<tr>
<td><code>i<b>PV</b>n<b>_</b>ma</code> </td><td><code><b>TPV</b>n<b>_</b>ma</code> </td><td>: </td><td></td><td><code>i<b>V</b>n<b>_</b>ma</code> </td><td></td><td><code><b>TV</b>n<b>_</b>ma</code> </td><td><code><b>PV</b>i<b>_</b>ma</code> </td></tr>
<tr>
<td><code>i<b>PS</b>n<b>_</b>ma</code> </td><td><code><b>TPS</b>n<b>_</b>ma</code> </td><td>: </td><td></td><td><code>i<b>S</b>n<b>_</b>ma</code> </td><td></td><td><code><b>TS</b>n<b>_</b>ma</code> </td><td><code><b>PS</b>i<b>_</b>ma</code> </td></tr>
</table>
<hr>
<p>
where the primary and standard alternate forms together with the image-header equivalent are shown rightwards of the colon.<p>
The long form of these keywords could be described as quasi- standard. <code><b>TPC</b>n<b>_</b>ka</code>, <code>i<b>PV</b>n<b>_</b>ma</code>, and <code><b>TPV</b>n<b>_</b>ma</code> appeared by mistake in the examples in WCS Paper II and subsequently these and also <code><b>TCD</b>n<b>_</b>ka</code>, <code>i<b>PS</b>n<b>_</b>ma</code> and <code><b>TPS</b>n<b>_</b>ma</code> were legitimized by the errata to the WCS papers.<p>
Strictly speaking, the other long forms are non-standard and in fact have never appeared in any draft of the WCS papers nor in the errata. However, as natural extensions of the primary form they are unlikely to be written with any other intention. Thus it should be safe to accept them provided, of course, that the resulting keyword does not exceed the 8-character limit.<p>
If <a class="el" href="wcshdr_8h.html#df57a609a5c3f7288452cce86210260e" title="Bit mask for wcspih() and wcsbth() - accept iCNAMn, TCNAMn, iCRDEn, TCRDEn, iCSYEn...">WCSHDR_CNAMn</a> is enabled then also accept <hr>
<table border="0>" cellspacing="3" cellpadding="3">
<tr>
<td><code>i<b>CNAM</b>n</code>a </td><td><code><b>TCNAM</b>n</code>a </td><td>: </td><td>--- </td><td><code>i<b>CNA</b>na</code> </td><td>--- </td><td><code><b>TCNA</b>na</code> </td><td><code><b>CNAME</b>ia</code> </td></tr>
<tr>
<td><code>i<b>CRDE</b>n</code>a </td><td><code><b>TCRDE</b>n</code>a </td><td>: </td><td>--- </td><td><code>i<b>CRD</b>na</code> </td><td>--- </td><td><code><b>TCRD</b>na</code> </td><td><code><b>CRDER</b>ia</code> </td></tr>
<tr>
<td><code>i<b>CSYE</b>n</code>a </td><td><code><b>TCSYE</b>n</code>a </td><td>: </td><td>--- </td><td><code>i<b>CSY</b>na</code> </td><td>--- </td><td><code><b>TCSY</b>na</code> </td><td><code><b>CSYER</b>ia</code> </td></tr>
</table>
<hr>
<p>
Note that <code><b>CNAME</b>ia</code>, <code><b>CRDER</b>ia</code>, <code><b>CSYER</b>ia</code>, and their variants are not used by WCSLIB but are stored in the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> struct as auxiliary information.<p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#df57a609a5c3f7288452cce86210260e" title="Bit mask for wcspih() and wcsbth() - accept iCNAMn, TCNAMn, iCRDEn, TCRDEn, iCSYEn...">WCSHDR_CNAMn</a> (<b>wcsbth</b>() only): Accept <code>i<b>CNAM</b>n</code>, <code>i<b>CRDE</b>n</code>, <code>i<b>CSYE</b>n</code>, <code><b>TCNAM</b>n</code>, <code><b>TCRDE</b>n</code>, and <code><b>TCSYE</b>n</code>, i.e. with "a" blank. While non-standard, these are the obvious analogues of <code>i<b>CTYP</b>n</code>, <code><b>TCTYP</b>n</code>, etc.<p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#0e8eb873389e9c15bd6079a96c41ad60" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of an auxiliary...">WCSHDR_AUXIMG</a> (<b>wcsbth</b>() only): Allow the image-header form of an auxiliary WCS keyword with representation-wide scope to provide a default value for all images. This default may be overridden by the column-specific form of the keyword.<p>
For example, a keyword like <code><b>EQUINOX</b>a</code> would apply to all image arrays in a binary table, or all pixel list columns with alternate representation "a" unless overridden by <code><b>EQUI</b>na</code>.<p>
Specifically the keywords are: <hr>
<table border="0>" cellspacing="3" cellpadding="3">
<tr>
<td><code><b>LATPOLE</b>a</code> </td><td>for <code><b>LATP</b>na</code> </td></tr>
<tr>
<td><code><b>LONPOLE</b>a</code> </td><td>for <code><b>LONP</b>na</code> </td></tr>
<tr>
<td><code><b>RESTFREQ</b></code> </td><td>for <code><b>RFRQ</b>na</code> </td></tr>
<tr>
<td><code><b>RESTFRQ</b>a</code> </td><td>for <code><b>RFRQ</b>na</code> </td></tr>
<tr>
<td><code><b>RESTWAV</b>a</code> </td><td>for <code><b>RWAV</b>na</code> </td></tr>
</table>
<hr>
<p>
whose keyvalues are actually used by WCSLIB, and also keywords that provide auxiliary information that is simply stored in the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> struct: <hr>
<table border="0>" cellspacing="3" cellpadding="3">
<tr>
<td><code><b>EPOCH</b></code> </td><td></td><td>... (No column-specific form.) </td></tr>
<tr>
<td><code><b><code><b>EPOCH</b></code></b>a</code> </td><td></td><td>... Only if <a class="el" href="wcshdr_8h.html#5feeef18919b1cbb79729bbfa75976ec" title="Bit mask for wcspih() and wcsbth() - accept EPOCHa.">WCSHDR_EPOCHa</a> is set. </td></tr>
<tr>
<td><code><b>EQUINOX</b>a</code> </td><td>for <code><b>EQUI</b>na</code> </td></tr>
<tr>
<td><code><b>RADESYS</b>a</code> </td><td>for <code><b>RADE</b>na</code> </td></tr>
<tr>
<td><code><b>RADECSYS</b></code> </td><td>for <code><b>RADE</b>na</code> </td><td>... Only if <a class="el" href="wcshdr_8h.html#1d506ef2ad493a963426e0732a6328ca" title="Bit mask for wcspih() and wcsbth() - accept RADECSYS.">WCSHDR_RADECSYS</a> is set. </td></tr>
<tr>
<td><code><b>SPECSYS</b>a</code> </td><td>for <code><b>SPEC</b>na</code> </td></tr>
<tr>
<td><code><b>SSYSOBS</b>a</code> </td><td>for <code><b>SOBS</b>na</code> </td></tr>
<tr>
<td><code><b>SSYSSRC</b>a</code> </td><td>for <code><b>SSRC</b>na</code> </td></tr>
<tr>
<td><code><b>VELOSYS</b>a</code> </td><td>for <code><b>VSYS</b>na</code> </td></tr>
<tr>
<td><code><b>VELANGL</b>a</code> </td><td>for <code><b>VANG</b>na</code> </td></tr>
<tr>
<td><code><b>VELREF</b></code> </td><td></td><td>... (No column-specific form.) </td></tr>
<tr>
<td><code><b><code><b>VELREF</b></code></b>a</code> </td><td></td><td>... Only if <a class="el" href="wcshdr_8h.html#fc0a5a6b475a8e50b77d4be099790985" title="Bit mask for wcspih() and wcsbth() - accept VELREFa.">WCSHDR_VELREFa</a> is set. </td></tr>
<tr>
<td><code><b>VSOURCE</b>a</code> </td><td>for <code><b>VSOU</b>na</code> </td><td>... Only if <a class="el" href="wcshdr_8h.html#1b66d50d7f1927222a170bc88f9db51e" title="Bit mask for wcspih() and wcsbth() - accept VSOURCEa.">WCSHDR_VSOURCE</a> is set. </td></tr>
<tr>
<td><code><b>WCSNAME</b>a</code> </td><td>for <code><b>WCSN</b>na</code> </td><td>... Or <code><b>TWCS</b>na</code> (see below). </td></tr>
<tr>
<td><code><b>ZSOURCE</b>a</code> </td><td>for <code><b>ZSOU</b>na</code> </td></tr>
</table>
<hr>
<hr>
<table border="0>" cellspacing="3" cellpadding="3">
<tr>
<td><code><b>DATE-AVG</b></code> </td><td>for <code><b>DAVG</b>n</code> </td></tr>
<tr>
<td><code><b>DATE-OBS</b></code> </td><td>for <code><b>DOBS</b>n</code> </td></tr>
<tr>
<td><code><b>MJD-AVG</b></code> </td><td>for <code><b>MJDA</b>n</code> </td></tr>
<tr>
<td><code><b>MJD-OBS</b></code> </td><td>for <code><b>MJDOB</b>n</code> </td></tr>
<tr>
<td><code><b>OBSGEO-X</b></code> </td><td>for <code><b>OBSGX</b>n</code> </td></tr>
<tr>
<td><code><b>OBSGEO-Y</b></code> </td><td>for <code><b>OBSGY</b>n</code> </td></tr>
<tr>
<td><code><b>OBSGEO-Z</b></code> </td><td>for <code><b>OBSGZ</b>n</code> </td></tr>
</table>
<hr>
<p>
where the image-header keywords on the left provide default values for the column specific keywords on the right.<p>
Keywords in the last group, such as <code><b>MJD-OBS</b></code>, apply to all alternate representations, so <code><b>MJD-OBS</b></code> would provide a default value for all images in the header.<p>
This auxiliary inheritance mechanism applies to binary table image arrays and pixel lists alike. Most of these keywords have no default value, the exceptions being <code><b>LONPOLE</b>a</code> and <code><b>LATPOLE</b>a</code>, and also <code><b>RADESYS</b>a</code> and <code><b>EQUINOX</b>a</code> which provide defaults for each other. Thus the only potential difficulty in using <a class="el" href="wcshdr_8h.html#0e8eb873389e9c15bd6079a96c41ad60" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of an auxiliary...">WCSHDR_AUXIMG</a> is that of erroneously inheriting one of these four keywords.<p>
Unlike <a class="el" href="wcshdr_8h.html#33d67fd81c52448aead9e09f32ba9cca" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of all image header...">WCSHDR_ALLIMG</a>, the existence of one (or all) of these auxiliary WCS image header keywords will not by itself cause a <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> struct to be created for alternate representation "a". This is because they do not provide sufficient information to create a non-trivial coordinate representation when used in conjunction with the default values of those keywords, such as <code><b>CTYPE</b>ia</code>, that are parameterized by axis number.<p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#33d67fd81c52448aead9e09f32ba9cca" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of all image header...">WCSHDR_ALLIMG</a> (<b>wcsbth</b>() only): Allow the image-header form of *all* image header WCS keywords to provide a default value for all image arrays in a binary table (n.b. not pixel list). This default may be overridden by the column-specific form of the keyword.<p>
For example, a keyword like <code><b>CRPIX</b>ja</code> would apply to all image arrays in a binary table with alternate representation "a" unless overridden by <code>j<b>CRP</b>na</code>.<p>
Specifically the keywords are those listed above for <a class="el" href="wcshdr_8h.html#0e8eb873389e9c15bd6079a96c41ad60" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of an auxiliary...">WCSHDR_AUXIMG</a> plus <hr>
<table border="0>" cellspacing="3" cellpadding="3">
<tr>
<td><code><b>WCSAXES</b>a</code> </td><td>for <code><b>WCAX</b>na</code> </td></tr>
</table>
<hr>
<p>
which defines the coordinate dimensionality, and the following keywords which are parameterized by axis number: <hr>
<table border="0>" cellspacing="3" cellpadding="3">
<tr>
<td><code><b>CRPIX</b>ja</code> </td><td>for <code>j<b>CRP</b>na</code> </td></tr>
<tr>
<td><code><b>PC</b>i<b>_</b>ja</code> </td><td>for <code>ij<b>PC</b>na</code> </td></tr>
<tr>
<td><code><b>CD</b>i<b>_</b>ja</code> </td><td>for <code>ij<b>CD</b>na</code> </td></tr>
<tr>
<td><code><b>CDELT</b>ia</code> </td><td>for <code>i<b>CDE</b>na</code> </td></tr>
<tr>
<td><code><b>CROTA</b>i</code> </td><td>for <code>i<b>CROT</b>n</code> </td></tr>
<tr>
<td><code><b>CROTA</b>i</code>a </td><td></td><td>... Only if <a class="el" href="wcshdr_8h.html#017f1e817bdb2114ba765e7a9ef73bac" title="Bit mask for wcspih() and wcsbth() - accept CROTAia, iCROTna, TCROTna.">WCSHDR_CROTAia</a> is set. </td></tr>
<tr>
<td><code><b>CUNIT</b>ia</code> </td><td>for <code>i<b>CUN</b>na</code> </td></tr>
<tr>
<td><code><b>CTYPE</b>ia</code> </td><td>for <code>i<b>CTY</b>na</code> </td></tr>
<tr>
<td><code><b>CRVAL</b>ia</code> </td><td>for <code>i<b>CRV</b>na</code> </td></tr>
<tr>
<td><code><b>PV</b>i<b>_</b>ma</code> </td><td>for <code>i<b>V</b>n<b>_</b>ma</code> </td></tr>
<tr>
<td><code><b>PS</b>i<b>_</b>ma</code> </td><td>for <code>i<b>S</b>n<b>_</b>ma</code> </td></tr>
</table>
<hr>
<hr>
<table border="0>" cellspacing="3" cellpadding="3">
<tr>
<td><code><b>CNAME</b>ia</code> </td><td>for <code>i<b>CNA</b>na</code> </td></tr>
<tr>
<td><code><b>CRDER</b>ia</code> </td><td>for <code>i<b>CRD</b>na</code> </td></tr>
<tr>
<td><code><b>CSYER</b>ia</code> </td><td>for <code>i<b>CSY</b>na</code> </td></tr>
</table>
<hr>
<p>
where the image-header keywords on the left provide default values for the column specific keywords on the right.<p>
This full inheritance mechanism only applies to binary table image arrays, not pixel lists, because in the latter case there is no well-defined association between coordinate axis number and column number.<p>
Note that <code><b>CNAME</b>ia</code>, <code><b>CRDER</b>ia</code>, <code><b>CSYER</b>ia</code>, and their variants are not used by WCSLIB but are stored in the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> struct as auxiliary information.<p>
Note especially that at least one <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> struct will be returned for each "a" found in one of the image header keywords listed above:<p>
<ul>
<li>
If the image header keywords for "a" <b><em>are not</em></b> inherited by a binary table, then the struct will not be associated with any particular table column number and it is up to the user to provide an association.<p>
</li>
<li>
If the image header keywords for "a" <b><em>are</em></b> inherited by a binary table image array, then those keywords are considered to be "exhausted" and do not result in a separate <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> struct. </li>
</ul>
</li>
</ul>
<p>
For example, to accept <code><b>CD00</b>i<b>00</b>j</code> and <code><b>PC00</b>i<b>00</b>j</code> and reject all other extensions, use <div class="fragment"><pre class="fragment"> relax = <a class="code" href="wcshdr_8h.html#fd6d52bed79bd48230f651ac48eb5ca6" title="Bit mask for wcspih() and wcsbth() - reject non-standard keywords.">WCSHDR_reject</a> | <a class="code" href="wcshdr_8h.html#63eb554461f3df5dc64a25f71891b9f1" title="Bit mask for wcspih() and wcsbth() - accept CD00i00j.">WCSHDR_CD00i00j</a> | <a class="code" href="wcshdr_8h.html#3dea9d7548bdbc9a7cc8d0a04cdd46fb" title="Bit mask for wcspih() and wcsbth() - accept PC00i00j.">WCSHDR_PC00i00j</a>;
</pre></div><p>
The parser always treats <code><b>EPOCH</b></code> as subordinate to <code><b>EQUINOX</b>a</code> if both are present, and <code><b>VSOURCE</b>a</code> is always subordinate to <code><b>ZSOURCE</b>a</code>.<p>
Likewise, <code><b>VELREF</b></code> is subordinate to the formalism of WCS Paper III, see <a class="el" href="spc_8h.html#615d3ef3a505a8be7da1578d9338d218" title="Translate AIPS-convention spectral keywords.">spcaips()</a>.<p>
Neither <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> nor <b>wcsbth</b>() currently recognize the AIPS-convention keywords <code><b>ALTRPIX</b></code> or <code><b>ALTRVAL</b></code> which effectively define an alternative representation for a spectral axis.<p>
</li>
<li>
Depending on what flags have been set in its <em>relax</em> argument, <b>wcsbth</b>() could return as many as 27027 <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> structs:<p>
<ul>
<li>
Up to 27 unattached representations derived from image header keywords.<p>
</li>
<li>
Up to 27 structs for each of up to 999 columns containing an image arrays.<p>
</li>
<li>
Up to 27 structs for a pixel list. </li>
</ul>
<p>
Note that it is considered legitimate for a column to contain an image array and also form part of a pixel list, and in particular that <b>wcsbth</b>() does not check the <code><b>TFORM</b></code> keyword for a pixel list column to check that it is scalar.<p>
In practice, of course, a realistic binary table header is unlikely to contain more than a handful of images.<p>
In order for <b>wcsbth</b>() to create a <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> struct for a particular coordinate representation, at least one WCS keyword that defines an axis number must be present, either directly or by inheritance if <a class="el" href="wcshdr_8h.html#33d67fd81c52448aead9e09f32ba9cca" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of all image header...">WCSHDR_ALLIMG</a> is set.<p>
When the image header keywords for an alternate representation are inherited by a binary table image array via <a class="el" href="wcshdr_8h.html#33d67fd81c52448aead9e09f32ba9cca" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of all image header...">WCSHDR_ALLIMG</a>, those keywords are considered to be "exhausted" and do not result in a separate <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> struct. Otherwise they do.<p>
</li>
<li>
Neither <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> nor <b>wcsbth</b>() check for duplicated keywords, in most cases they accept the last encountered.<p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <b>wcsbth</b>() use <a class="el" href="wcs_8h.html#42b2578d76ace7ca6114d82b7ae46a89" title="Memory allocation for PVi_ma.">wcsnpv()</a> and <a class="el" href="wcs_8h.html#e790c9ce6c9b7a4845cf1c3c97b1e97a" title="Memory allocation for PSi_ma.">wcsnps()</a> (refer to the prologue of <a class="el" href="wcs_8h.html">wcs.h</a>) to match the size of the pv[] and ps[] arrays in the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> structs to the number in the header. Consequently there are no unused elements in the pv[] and ps[] arrays, indeed they will often be of zero length.<p>
</li>
<li>
The FITS WCS standard for pixel lists assumes that a pixel list defines one and only one image, i.e. that each row of the binary table refers to just one event, e.g. the detection of a single photon or neutrino.<p>
In the absence of a formal mechanism for identifying the columns containing pixel coordinates (as opposed to pixel values or ancillary data recorded at the time the photon or neutrino was detected), Paper I discusses how the WCS keywords themselves may be used to identify them.<p>
In practice, however, pixel lists have been used to store multiple images. Besides not specifying how to identify columns, the pixel list convention is also silent on the method to be used to associate table columns with image axes.<p>
<b>wcsbth</b>() simply collects all WCS keywords for a particular coordinate representation (i.e. the "a" value in <code><b>TCTY</b>na</code>) into one <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> struct. However, these alternates need not be associated with the same table columns and this allows a pixel list to contain up to 27 separate images. As usual, if one of these representations happened to contain more than two celestial axes, for example, then an error would result when <a class="el" href="wcs_8h.html#e5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct.">wcsset()</a> is invoked on it. In this case the "colsel" argument could be used to restrict the columns used to construct the representation so that it only contained one pair of celestial axes. </li>
</ol>
</div>
</div><p>
<a class="anchor" name="6dd857f7b61a5b349cc8af5a4b6d8a1c"></a><!-- doxytag: member="wcshdr.h::wcstab" ref="6dd857f7b61a5b349cc8af5a4b6d8a1c" args="(struct wcsprm *wcs)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wcstab </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> * </td>
<td class="paramname"> <em>wcs</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>wcstab</b>() assists in filling in the information in the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> struct relating to coordinate lookup tables.<p>
Tabular coordinates (<code>'<b>TAB</b>'</code>) present certain difficulties in that the main components of the lookup table - the multidimensional coordinate array plus an index vector for each dimension - are stored in a FITS binary table extension (BINTABLE). Information required to locate these arrays is stored in <code><b>PV</b>i<b>_</b>ma</code> and <code><b>PS</b>i<b>_</b>ma</code> keywords in the image header.<p>
<b>wcstab</b>() parses the <code><b>PV</b>i<b>_</b>ma</code> and <code><b>PS</b>i<b>_</b>ma</code> keywords associated with each <code>'<b>TAB</b>'</code> axis and allocates memory in the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> struct for the required number of <a class="el" href="structtabprm.html" title="Tabular transformation parameters.">tabprm</a> structs. It sets as much of the <a class="el" href="structtabprm.html" title="Tabular transformation parameters.">tabprm</a> struct as can be gleaned from the image header, and also sets up an array of <a class="el" href="structwtbarr.html" title="Extraction of coordinate lookup tables from BINTABLE.">wtbarr</a> structs (described in the prologue of <a class="el" href="wcs_8h.html">wcs.h</a>) to assist in extracting the required arrays from the BINTABLE extension(s).<p>
It is then up to the user to allocate memory for, and copy arrays from the BINTABLE extension(s) into the <a class="el" href="structtabprm.html" title="Tabular transformation parameters.">tabprm</a> structs. A CFITSIO routine, <a class="el" href="getwcstab_8h.html#96c804d78d44901bc5d497b30e47b7ad" title="FITS 'TAB' table reading routine.">fits_read_wcstab()</a>, has been provided for this purpose, see <a class="el" href="getwcstab_8h.html">getwcstab.h</a>. <a class="el" href="wcs_8h.html#e5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct.">wcsset()</a> will automatically take control of this allocated memory, in particular causing it to be free'd by <a class="el" href="wcs_8h.html#4ab38bc642c4656f62c43acf84a849f1" title="Destructor for the wcsprm struct.">wcsfree()</a>; the user must not attempt to free it after <a class="el" href="wcs_8h.html#e5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct.">wcsset()</a> has been called.<p>
Note that <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> and <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> automatically invoke <b>wcstab</b>() on each of the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> structs that they return.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>wcs</em> </td><td>Coordinate transformation parameters (see below). <br>
<b>wcstab</b>() sets ntab, tab, nwtb and wtb, allocating memory for the tab and wtb arrays. This allocated memory will be free'd automatically by <a class="el" href="wcs_8h.html#4ab38bc642c4656f62c43acf84a849f1" title="Destructor for the wcsprm struct.">wcsfree()</a>.</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Status return value:<ul>
<li>0: Success.</li><li>1: Null <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> pointer passed.</li><li>2: Memory allocation failed.</li><li>3: Invalid tabular parameters.</li></ul>
For returns > 1, a detailed error message is set in <a class="el" href="structwcsprm.html#f54ce939604be183231f0ee006e2f8ed">wcsprm::err</a> if enabled, see <a class="el" href="wcserr_8h.html#1691b8bd184d40ca6fda255be078fa53" title="Enable/disable error messaging.">wcserr_enable()</a>. </dd></dl>
</div>
</div><p>
<a class="anchor" name="6174a483baad91dae3fa1c30b0e4cde5"></a><!-- doxytag: member="wcshdr.h::wcsidx" ref="6174a483baad91dae3fa1c30b0e4cde5" args="(int nwcs, struct wcsprm **wcs, int alts[27])" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wcsidx </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>nwcs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> ** </td>
<td class="paramname"> <em>wcs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>alts</em>[27]</td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>wcsidx</b>() returns an array of 27 indices for the alternate coordinate representations in the array of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> structs returned by <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a>. For the array returned by <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> it returns indices for the unattached (colnum == 0) representations derived from image header keywords - use <a class="el" href="wcshdr_8h.html#16e35904c64fe6b0aab144bd022c722f" title="Index alternate coordinate representions.">wcsbdx()</a> for those derived from binary table image arrays or pixel lists keywords.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>nwcs</em> </td><td>Number of coordinate representations in the array. </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>wcs</em> </td><td>Pointer to an array of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> structs returned by <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> or <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a>.</td></tr>
<tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>alts</em> </td><td>Index of each alternate coordinate representation in the array: alts[0] for the primary, alts[1] for 'A', etc., set to -1 if not present. <br>
For example, if there was no 'P' representation then <div class="fragment"><pre class="fragment"> alts[<span class="charliteral">'P'</span>-<span class="charliteral">'A'</span>+1] == -1;
</pre></div> <br>
Otherwise, the address of its <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> struct would be <div class="fragment"><pre class="fragment"> wcs + alts[<span class="charliteral">'P'</span>-<span class="charliteral">'A'</span>+1];
</pre></div></td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Status return value:<ul>
<li>0: Success.</li><li>1: Null <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> pointer passed. </li></ul>
</dd></dl>
</div>
</div><p>
<a class="anchor" name="16e35904c64fe6b0aab144bd022c722f"></a><!-- doxytag: member="wcshdr.h::wcsbdx" ref="16e35904c64fe6b0aab144bd022c722f" args="(int nwcs, struct wcsprm **wcs, int type, short alts[1000][28])" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wcsbdx </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>nwcs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> ** </td>
<td class="paramname"> <em>wcs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">short </td>
<td class="paramname"> <em>alts</em>[1000][28]</td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>wcsbdx</b>() returns an array of 999 x 27 indices for the alternate coordinate representions for binary table image arrays xor pixel lists in the array of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> structs returned by <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a>. Use <a class="el" href="wcshdr_8h.html#6174a483baad91dae3fa1c30b0e4cde5" title="Index alternate coordinate representations.">wcsidx()</a> for the unattached representations derived from image header keywords.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>nwcs</em> </td><td>Number of coordinate representations in the array. </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>wcs</em> </td><td>Pointer to an array of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> structs returned by <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a>. </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>type</em> </td><td>Select the type of coordinate representation:<ul>
<li>0: binary table image arrays,</li><li>1: pixel lists.</li></ul>
</td></tr>
<tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>alts</em> </td><td>Index of each alternate coordinate represention in the array: alts[col][0] for the primary, alts[col][1] for 'A', to alts[col][26] for 'Z', where col is the 1-relative column number, and col == 0 is used for unattached image headers. Set to -1 if not present. <br>
alts[col][27] counts the number of coordinate representations of the chosen type for each column. <br>
For example, if there was no 'P' represention for column 13 then <div class="fragment"><pre class="fragment"> alts[13][<span class="charliteral">'P'</span>-<span class="charliteral">'A'</span>+1] == -1;
</pre></div> <br>
Otherwise, the address of its <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> struct would be <div class="fragment"><pre class="fragment"> wcs + alts[13][<span class="charliteral">'P'</span>-<span class="charliteral">'A'</span>+1];
</pre></div></td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Status return value:<ul>
<li>0: Success.</li><li>1: Null <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> pointer passed. </li></ul>
</dd></dl>
</div>
</div><p>
<a class="anchor" name="27465844aaeea0623133f8151ca4fd9b"></a><!-- doxytag: member="wcshdr.h::wcsvfree" ref="27465844aaeea0623133f8151ca4fd9b" args="(int *nwcs, struct wcsprm **wcs)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wcsvfree </td>
<td>(</td>
<td class="paramtype">int * </td>
<td class="paramname"> <em>nwcs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> ** </td>
<td class="paramname"> <em>wcs</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>wcsvfree</b>() frees the memory allocated by <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a> or <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> for the array of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> structs, first invoking <a class="el" href="wcs_8h.html#4ab38bc642c4656f62c43acf84a849f1" title="Destructor for the wcsprm struct.">wcsfree()</a> on each of the array members.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>nwcs</em> </td><td>Number of coordinate representations found; set to 0 on return. </td></tr>
<tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>wcs</em> </td><td>Pointer to the array of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> structs; set to 0 on return.</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Status return value:<ul>
<li>0: Success.</li><li>1: Null <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> pointer passed. </li></ul>
</dd></dl>
</div>
</div><p>
<a class="anchor" name="0b8372e555a2e2bcc63a11f3dc7a1bf6"></a><!-- doxytag: member="wcshdr.h::wcshdo" ref="0b8372e555a2e2bcc63a11f3dc7a1bf6" args="(int relax, struct wcsprm *wcs, int *nkeyrec, char **header)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wcshdo </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>relax</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> * </td>
<td class="paramname"> <em>wcs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int * </td>
<td class="paramname"> <em>nkeyrec</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char ** </td>
<td class="paramname"> <em>header</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>wcshdo</b>() translates a <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> struct into a FITS header. If the colnum member of the struct is non-zero then a binary table image array header will be produced. Otherwise, if the colax[] member of the struct is set non-zero then a pixel list header will be produced. Otherwise, a primary image or image extension header will be produced.<p>
If the struct was originally constructed from a header, e.g. by <a class="el" href="wcshdr_8h.html#c75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers.">wcspih()</a>, the output header will almost certainly differ in a number of respects:<p>
<ul>
<li>The output header only contains WCS-related keywords. In particular, it does not contain syntactically-required keywords such as <code><b>SIMPLE</b></code>, <code><b>NAXIS</b></code>, <code><b>BITPIX</b></code>, or <code><b>END</b></code>.</li></ul>
<p>
<ul>
<li>Deprecated (e.g. <code><b>CROTA</b>n</code>) or non-standard usage will be translated to standard (this is partially dependent on whether <a class="el" href="wcsfix_8h.html#89e1b5b4d2fa89af03f5d1143352b05f" title="Translate a non-standard WCS struct.">wcsfix()</a> was applied).</li></ul>
<p>
<ul>
<li>Quantities will be converted to the units used internally, basically SI with the addition of degrees.</li></ul>
<p>
<ul>
<li>Floating-point quantities may be given to a different decimal precision.</li></ul>
<p>
<ul>
<li>Elements of the <code><b>PC</b>i<b>_</b>ja</code> matrix will be written if and only if they differ from the unit matrix. Thus, if the matrix is unity then no elements will be written.</li></ul>
<p>
<ul>
<li>Additional keywords such as <code><b>WCSAXES</b>a</code>, <code><b>CUNIT</b>ia</code>, <code><b>LONPOLE</b>a</code> and <code><b>LATPOLE</b>a</code> may appear.</li></ul>
<p>
<ul>
<li>The original keycomments will be lost, although <b>wcshdo</b>() tries hard to write meaningful comments.</li></ul>
<p>
<ul>
<li>Keyword order may be changed.</li></ul>
<p>
Keywords can be translated between the image array, binary table, and pixel lists forms by manipulating the colnum or colax[] members of the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> struct.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>relax</em> </td><td>Degree of permissiveness:<ul>
<li>0: Recognize only FITS keywords defined by the published WCS standard.</li><li>-1: Admit all informal extensions of the WCS standard.</li></ul>
Fine-grained control of the degree of permissiveness is also possible as explained in the notes below.</td></tr>
<tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>wcs</em> </td><td>Pointer to a <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> struct containing coordinate transformation parameters. Will be initialized if necessary.</td></tr>
<tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>nkeyrec</em> </td><td>Number of FITS header keyrecords returned in the "header" array. </td></tr>
<tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>header</em> </td><td>Pointer to an array of char holding the header. Storage for the array is allocated by <b>wcshdo</b>() in blocks of 2880 bytes (32 x 80-character keyrecords) and must be free'd by the user to avoid memory leaks. <br>
Each keyrecord is 80 characters long and is *NOT* null-terminated, so the first keyrecord starts at (*header)[0], the second at (*header)[80], etc.</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Status return value (associated with wcs_errmsg[]):<ul>
<li>0: Success.</li><li>1: Null <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters.">wcsprm</a> pointer passed.</li><li>2: Memory allocation failed.</li><li>3: Linear transformation matrix is singular.</li><li>4: Inconsistent or unrecognized coordinate axis types.</li><li>5: Invalid parameter value.</li><li>6: Invalid coordinate transformation parameters.</li><li>7: Ill-conditioned coordinate transformation parameters.</li></ul>
For returns > 1, a detailed error message is set in <a class="el" href="structwcsprm.html#f54ce939604be183231f0ee006e2f8ed">wcsprm::err</a> if enabled, see <a class="el" href="wcserr_8h.html#1691b8bd184d40ca6fda255be078fa53" title="Enable/disable error messaging.">wcserr_enable()</a>.</dd></dl>
<b>Notes:</b> <br>
<b>wcshdo</b>() interprets the <em>relax</em> argument as a vector of flag bits to provide fine-grained control over what non-standard WCS keywords to write. The flag bits are subject to change in future and should be set by using the preprocessor macros (see below) for the purpose.<p>
<ul>
<li>
<a class="el" href="wcshdr_8h.html#54634ed49425e8842874e9e2b77899df" title="Bit mask for wcshdo() - don't write any extensions.">WCSHDO_none</a>: Don't use any extensions.<p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#5592649ee4c25e118559c6d283c51930" title="Bit mask for wcshdo() - write all extensions.">WCSHDO_all</a>: Write all recognized extensions, equivalent to setting each flag bit.<p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#446914676e0b3f55ac6a080015a52b43" title="Bit mask for wcshdo() - write safe extensions only.">WCSHDO_safe</a>: Write all extensions that are considered to be safe and recommended.<p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#6779d48001260a0011b3dcffdcb64cb6" title="Bit mask for wcshdo() - write DOBSn.">WCSHDO_DOBSn</a>: Write <code><b>DOBS</b>n</code>, the column-specific analogue of <code><b>DATE-OBS</b></code> for use in binary tables and pixel lists. WCS Paper III introduced <code><b>DATE-AVG</b></code> and <code><b>DAVG</b>n</code> but by an oversight <code><b>DOBS</b>n</code> (the obvious analogy) was never formally defined by the standard. The alternative to using <code><b>DOBS</b>n</code> is to write <code><b>DATE-OBS</b></code> which applies to the whole table. This usage is considered to be safe and is recommended.<p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#96b787f84207faa42599e50e6e078d21" title="Bit mask for wcshdo() - write TPCn_ka.">WCSHDO_TPCn_ka</a>: WCS Paper I defined<p>
<ul>
<li>
<code><b>TP</b>n<b>_</b>ka</code> and <code><b>TC</b>n<b>_</b>ka</code> for pixel lists </li>
</ul>
<p>
but WCS Paper II uses <code><b>TPC</b>n<b>_</b>ka</code> in one example and subsequently the errata for the WCS papers legitimized the use of<p>
<ul>
<li>
<code><b>TPC</b>n<b>_</b>ka</code> and <code><b>TCD</b>n<b>_</b>ka</code> for pixel lists </li>
</ul>
<p>
provided that the keyword does not exceed eight characters. This usage is considered to be safe and is recommended because of the non-mnemonic terseness of the shorter forms.<p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#222a5bd7659f3e1ea1a9ed21f54c50ef" title="Bit mask for wcshdo() - write iPVn_ma, TPVn_ma, iPSn_ma, TPSn_ma.">WCSHDO_PVn_ma</a>: WCS Paper I defined<p>
<ul>
<li>
<code>i<b>V</b>n<b>_</b>ma</code> and <code>i<b>S</b>n<b>_</b>ma</code> for bintables and </li>
<li>
<code><b>TV</b>n<b>_</b>ma</code> and <code><b>TS</b>n<b>_</b>ma</code> for pixel lists </li>
</ul>
<p>
but WCS Paper II uses <code>i<b>PV</b>n<b>_</b>ma</code> and <code><b>TPV</b>n<b>_</b>ma</code> in the examples and subsequently the errata for the WCS papers legitimized the use of<p>
<ul>
<li>
<code>i<b>PV</b>n<b>_</b>ma</code> and <code>i<b>PS</b>n<b>_</b>ma</code> for bintables and </li>
<li>
<code><b>TPV</b>n<b>_</b>ma</code> and <code><b>TPS</b>n<b>_</b>ma</code> for pixel lists </li>
</ul>
<p>
provided that the keyword does not exceed eight characters. This usage is considered to be safe and is recommended because of the non-mnemonic terseness of the shorter forms.<p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#ace96fb8c1499616dd1333af3e8340b0" title="Bit mask for wcshdo() - write jCRPXna, TCRPXna, iCDLTna, TCDLTna, iCUNIna, TCUNIna...">WCSHDO_CRPXna</a>: For historical reasons WCS Paper I defined<p>
<ul>
<li>
<code>j<b>CRPX</b>n</code>, <code>i<b>CDLT</b>n</code>, <code>i<b>CUNI</b>n</code>, <code>i<b>CTYP</b>n</code>, and <code>i<b>CRVL</b>n</code> for bintables and </li>
<li>
<code><b>TCRPX</b>n</code>, <code><b>TCDLT</b>n</code>, <code><b>TCUNI</b>n</code>, <code><b>TCTYP</b>n</code>, and <code><b>TCRVL</b>n</code> for pixel lists </li>
</ul>
<p>
for use without an alternate version specifier. However, because of the eight-character keyword constraint, in order to accommodate column numbers greater than 99 WCS Paper I also defined<p>
<ul>
<li>
<code>j<b>CRP</b>na</code>, <code>i<b>CDE</b>na</code>, <code>i<b>CUN</b>na</code>, <code>i<b>CTY</b>na</code> and <code>i<b>CRV</b>na</code> for bintables and </li>
<li>
<code><b>TCRP</b>na</code>, <code><b>TCDE</b>na</code>, <code><b>TCUN</b>na</code>, <code><b>TCTY</b>na</code> and <code><b>TCRV</b>na</code> for pixel lists </li>
</ul>
<p>
for use with an alternate version specifier (the "a"). Like the PC, CD, PV, and PS keywords there is an obvious tendency to confuse these two forms for column numbers up to 99. It is very unlikely that any parser would reject keywords in the first set with a non-blank alternate version specifier so this usage is considered to be safe and is recommended.<p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#95325b53ebd8d7d0a371a65b27b3d04a" title="Bit mask for wcshdo() - write iCNAMna, TCNAMna, iCRDEna, TCRDEna, iCSYEna, TCSYEna...">WCSHDO_CNAMna</a>: WCS Papers I and III defined<p>
<ul>
<li>
<code>i<b>CNA</b>na</code>, <code>i<b>CRD</b>na</code>, and <code>i<b>CSY</b>na</code> for bintables and </li>
<li>
<code><b>TCNA</b>na</code>, <code><b>TCRD</b>na</code>, and <code><b>TCSY</b>na</code> for pixel lists </li>
</ul>
<p>
By analogy with the above, the long forms would be<p>
<ul>
<li>
<code>i<b>CNAM</b>n</code>a, <code>i<b>CRDE</b>n</code>a, and <code>i<b>CSYE</b>n</code>a for bintables and </li>
<li>
<code><b>TCNAM</b>n</code>a, <code><b>TCRDE</b>n</code>a, and <code><b>TCSYE</b>n</code>a for pixel lists </li>
</ul>
<p>
Note that these keywords provide auxiliary information only, none of them are needed to compute world coordinates. This usage is potentially unsafe and is not recommended at this time.<p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#9a70ad2a355a9736711d8017535bf72b" title="Bit mask for wcshdo() - write WCSNna instead of TWCSna.">WCSHDO_WCSNna</a>: In light of <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> note 4, write <code><b>WCSN</b>na</code> instead of <code><b>TWCS</b>na</code> for pixel lists. While <a class="el" href="wcshdr_8h.html#dc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers.">wcsbth()</a> treats <code><b>WCSN</b>na</code> and <code><b>TWCS</b>na</code> as equivalent, other parsers may not. Consequently, this usage is potentially unsafe and is not recommended at this time. </li>
</ul>
</div>
</div><p>
<hr><h2>Variable Documentation</h2>
<a class="anchor" name="06cd9297f8315235ba1cf13d1cc115e1"></a><!-- doxytag: member="wcshdr.h::wcshdr_errmsg" ref="06cd9297f8315235ba1cf13d1cc115e1" args="[]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char * <a class="el" href="wcshdr_8h.html#06cd9297f8315235ba1cf13d1cc115e1">wcshdr_errmsg</a>[] </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Error messages to match the status value returned from each function. Use wcs_errmsg[] for status returns from <b>wcshdo</b>().
</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Tue Oct 4 19:02:30 2011 for WCSLIB 4.8.2 by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>
|