1 package nom.tam.fits.header; 2 3 /*- 4 * #%L 5 * nom.tam.fits 6 * %% 7 * Copyright (C) 1996 - 2024 nom-tam-fits 8 * %% 9 * This is free and unencumbered software released into the public domain. 10 * 11 * Anyone is free to copy, modify, publish, use, compile, sell, or 12 * distribute this software, either in source code form or as a compiled 13 * binary, for any purpose, commercial or non-commercial, and by any 14 * means. 15 * 16 * In jurisdictions that recognize copyright laws, the author or authors 17 * of this software dedicate any and all copyright interest in the 18 * software to the public domain. We make this dedication for the benefit 19 * of the public at large and to the detriment of our heirs and 20 * successors. We intend this dedication to be an overt act of 21 * relinquishment in perpetuity of all present and future rights to this 22 * software under copyright law. 23 * 24 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 27 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 28 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 29 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 30 * OTHER DEALINGS IN THE SOFTWARE. 31 * #L% 32 */ 33 34 /** 35 * Standard FITS keywords for defining world coordinate systems (WCS). Many (but not all) keywords listed here support 36 * alternative coordinate systems. These have a lower case 'a' at the end of their enum names, e.g. 37 * <code>WCSNAMEa</code>. The alternative coordinate system for these can be set via the {@link #alt(char)} method. 38 * 39 * @author Attila Kovacs 40 * 41 * @see DateTime 42 * 43 * @since 1.19 44 */ 45 public enum WCS implements IFitsHeader { 46 47 /** 48 * World coordinate system name 49 * 50 * @since 1.19 51 */ 52 WCSNAMEa(SOURCE.RESERVED, HDU.IMAGE, VALUE.STRING, "coordinate system name"), 53 54 /** 55 * Dimensionality of image coordinate system 56 * 57 * @since 1.19 58 */ 59 WCSAXESa(SOURCE.RESERVED, HDU.IMAGE, VALUE.INTEGER, "coordinate dimensions"), 60 61 /** 62 * Coordinate reference frame of major/minor axes.If absent the default value is 'FK5'. 63 * 64 * @since 1.19 65 */ 66 RADESYSa(SOURCE.RESERVED, HDU.IMAGE, VALUE.STRING, "celestial coordinate reference frame."), 67 68 /** 69 * Coordinate reference frame of major/minor axes (generic). 70 * 71 * @deprecated Deprecated in the current FITS standard, use {@link #RADESYSa} instead. 72 */ 73 RADECSYS(SOURCE.RESERVED, HDU.ANY, VALUE.STRING, "celestial coordinate reference frame."), 74 75 /** 76 * [deg] The longitude of the celestial pole (for spherical coordinates). 77 * 78 * @since 1.19 79 */ 80 LONPOLEa(SOURCE.RESERVED, HDU.IMAGE, VALUE.REAL, "[deg] celestial pole longitude"), 81 82 /** 83 * [deg] The latitude of the celestial pole (for spherical coordinates). 84 * 85 * @since 1.19 86 */ 87 LATPOLEa(SOURCE.RESERVED, HDU.IMAGE, VALUE.REAL, "[deg] celestial pole latitude"), 88 89 /** 90 * The value field shall contain a floating point number giving the equinox in years for the celestial coordinate 91 * system in which positions are expressed. Starting with Version 1, the Standard has deprecated the use of the 92 * EPOCH keyword and thus it shall not be used in FITS files created after the adoption of the standard; rather, the 93 * EQUINOX keyword shall be used. 94 * 95 * @deprecated Deprecated in the current FITS standard, use {@link #EQUINOXa} instead. 96 */ 97 @Deprecated 98 EPOCH(SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "[yr] equinox of celestial coordinate system"), 99 100 /** 101 * The value field shall contain a floating point number giving the equinox in years for the celestial coordinate 102 * system in which positions are expressed. 103 * 104 * @since 1.19 105 */ 106 EQUINOXa(SOURCE.RESERVED, HDU.IMAGE, VALUE.REAL, "[yr] equinox of celestial coordinate system"), 107 108 /** 109 * Coordinate axis name. 110 * 111 * @since 1.19 112 */ 113 CNAMEna(SOURCE.RESERVED, HDU.IMAGE, VALUE.STRING, "coordinate system display name"), 114 115 /** 116 * The value field shall contain a floating point number, identifying the location of a reference point along axis 117 * n, in units of the axis index. This value is based upon a counter that runs from 1 to NAXISn with an increment of 118 * 1 per pixel. The reference point value need not be that for the center of a pixel nor lie within the actual data 119 * array. Use comments to indicate the location of the index point relative to the pixel. 120 * 121 * @since 1.19 122 */ 123 CRPIXna(SOURCE.RESERVED, HDU.IMAGE, VALUE.REAL, "coordinate axis reference pixel"), 124 125 /** 126 * The value field shall contain a floating point number, giving the value of the coordinate specified by the CTYPEn 127 * keyword at the reference point CRPIXn. Units must follow the prescriptions of section 5.3 of the FITS Standard. 128 * 129 * @since 1.19 130 */ 131 CRVALna(SOURCE.RESERVED, HDU.IMAGE, VALUE.REAL, "coordinate axis value at reference pixel"), 132 133 /** 134 * The value field shall contain a character string, giving the name of the coordinate represented by axis n. 135 * 136 * @since 1.19 137 */ 138 CTYPEna(SOURCE.RESERVED, HDU.IMAGE, VALUE.STRING, "name of the coordinate axis"), 139 140 /** 141 * The value field shall contain a floating point number giving the partial derivative of the coordinate specified 142 * by the CTYPEn keywords with respect to the pixel index, evaluated at the reference point CRPIXn, in units of the 143 * coordinate specified by the CTYPEn keyword. These units must follow the prescriptions of section 5.3 of the FITS 144 * Standard. 145 * 146 * @since 1.19 147 */ 148 CDELTna(SOURCE.RESERVED, HDU.IMAGE, VALUE.REAL, "coordinate spacing along axis"), 149 150 /** 151 * Random coordinate error on axis <i>n</i> in the physical coordinate unit (if defined). 152 * 153 * @since 1.19 154 */ 155 CRDERna(SOURCE.RESERVED, HDU.IMAGE, VALUE.REAL, "random error in coordinate"), 156 157 /** 158 * Systematic coordinate error on axis <i>n</i> in the physical coordinate unit (if defined). 159 * 160 * @since 1.19 161 */ 162 CSYERna(SOURCE.RESERVED, HDU.IMAGE, VALUE.REAL, "systematic error in coordinate"), 163 164 /** 165 * Phase axis zero point 166 * 167 * @since 1.19 168 */ 169 CZPHSna(SOURCE.RESERVED, HDU.IMAGE, VALUE.REAL, "phase axis zero point"), 170 171 /** 172 * Phase axis period 173 */ 174 CPERIna(SOURCE.RESERVED, HDU.IMAGE, VALUE.REAL, "phase axis period"), 175 176 /** 177 * [Hz] Rest frequency of observed spectral line. 178 * 179 * @since 1.19 180 */ 181 RESTFRQa(SOURCE.RESERVED, HDU.IMAGE, VALUE.REAL, "[Hz] line rest frequency"), 182 183 /** 184 * [Hz] Rest frequeny of observed spectral line (generic). 185 * 186 * @deprecated Deprecated in the current FITS standard, use {@link #RESTFRQa} instead. 187 */ 188 RESTFREQ(SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "[Hz] observed line rest frequency"), 189 190 /** 191 * [m] Rest wavelength of observed spectral line in image. 192 * 193 * @since 1.19 194 */ 195 RESTWAVa(SOURCE.RESERVED, HDU.IMAGE, VALUE.REAL, "[m] line rest wavelength"), 196 197 /** 198 * Image spectral reference system name. 199 * 200 * @since 1.19 201 */ 202 SPECSYSa(SOURCE.RESERVED, HDU.IMAGE, VALUE.STRING, "spectral reference frame"), 203 204 /** 205 * Image spectral reference system name of observer. 206 * 207 * @since 1.19 208 */ 209 SSYSOBSa(SOURCE.RESERVED, HDU.IMAGE, VALUE.STRING, "spectral reference frame of observer"), 210 211 /** 212 * Spectral reference system name of source. 213 * 214 * @since 1.19 215 */ 216 SSYSSRCa(SOURCE.RESERVED, HDU.IMAGE, VALUE.STRING, "spectral reference frame of source"), 217 218 /** 219 * [m/s] Radial velocity of source in the spectral reference frame. 220 * 221 * @since 1.19 222 */ 223 VELOSYSa(SOURCE.RESERVED, HDU.IMAGE, VALUE.REAL, "[m/s] source radial velocity"), 224 225 /** 226 * Redshift value of source in the spectral reference frame. 227 * 228 * @since 1.19 229 */ 230 ZSOURCEa(SOURCE.RESERVED, HDU.IMAGE, VALUE.REAL, "source redshift value"), 231 232 /** 233 * [deg] True velocity angle of source 234 * 235 * @since 1.19 236 */ 237 VELANGLa(SOURCE.RESERVED, HDU.IMAGE, VALUE.REAL, "[deg] true velocity angle"), 238 239 /** 240 * [m] Geodetic location of observer (<i>x</i> coordinate). 241 * 242 * @since 1.19 243 */ 244 OBSGEO_X("OBSGEO-X", SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "[m] geodetic location x of observer"), 245 246 /** 247 * [m] Geodetic location of observer (<i>y</i> coordinate). 248 * 249 * @since 1.19 250 */ 251 OBSGEO_Y("OBSGEO-Y", SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "[m] geodetic location y of observer"), 252 253 /** 254 * [m] Geodetic location of observer (<i>z</i> coordinate). 255 * 256 * @since 1.19 257 */ 258 OBSGEO_Z("OBSGEO-Z", SOURCE.RESERVED, HDU.ANY, VALUE.REAL, "[m] geodetic location z of observer"), 259 260 /** 261 * WCS name for the array entries in the given column index. 262 * 263 * @since 1.19 264 */ 265 WCSNna(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "column coordinate syste name"), 266 267 /** 268 * [deg] The longitude of the celestial pole for the entries in the given column index (for spherical coordinates). 269 * 270 * @since 1.19 271 */ 272 LONPna(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "[deg] column celestial pole longitude"), 273 274 /** 275 * [deg] The latitude of the celestial pole for the entries in the given column index (for spherical coordinates). 276 * 277 * @since 1.19 278 */ 279 LATPna(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "[deg] column celestial pole latitude"), 280 281 /** 282 * [yr] Coordinate epoch for which the celestial coorinate system is defined for the given column index. 283 * 284 * @since 1.19 285 */ 286 EQUIna(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "[yr] column coordinate epoch"), 287 288 /** 289 * The equatorial coordinate frame used for the given column index, e.g. 'FK4', 'FK5', or 'ICRS'. 290 * 291 * @since 1.19 292 */ 293 RADEna(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "column equatorial coordinate frame"), 294 295 /** 296 * [Hz] The rest frequency of the line in the given column index. 297 * 298 * @since 1.19 299 */ 300 RFRQna(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "[Hz] line rest frequency in column"), 301 302 /** 303 * [Hz] The rest wavelength of the line in the given column index. 304 * 305 * @since 1.19 306 */ 307 RWAVna(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "[m] line rest wavelength in column"), 308 309 /** 310 * Spectral reference frame for the given column index. 311 * 312 * @since 1.19 313 */ 314 SPECna(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "column spectral reference frame"), 315 316 /** 317 * Spectral reference system of observer for the given column index. 318 * 319 * @since 1.19 320 */ 321 SOBSna(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "column observer spectral frame"), 322 323 /** 324 * Spectral reference system of source for the given column index. 325 * 326 * @since 1.19 327 */ 328 SSRCna(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "column source spectral frame"), 329 330 /** 331 * [m/s] Source radial velocity for the given column index. 332 * 333 * @since 1.19 334 */ 335 VSYSna(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "[m/s] column radial velocity"), 336 337 /** 338 * [deg] Angle of true velocity for the given column index. 339 * 340 * @since 1.19 341 */ 342 VANGna(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "[deg] angle of velocity in column"), 343 344 /** 345 * Source redshift value for the given column index. 346 * 347 * @since 1.19 348 */ 349 ZSOUna(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column redshift value"), 350 351 /** 352 * [m] Geodetic location (<i>x</i> coordinate) of observer for he given column index. 353 * 354 * @since 1.19 355 */ 356 OBSGXn(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "[m] column geodetic location x"), 357 358 /** 359 * [m] Geodetic location (<i>y</i> coordinate) of observer for he given column index. 360 * 361 * @since 1.19 362 */ 363 OBSGYn(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "[m] column geodetic location y"), 364 365 /** 366 * [m] Geodetic location (<i>z</i> coordinate) of observer for he given column index. 367 * 368 * @since 1.19 369 */ 370 OBSGZn(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "[m] column geodetic location z"), 371 372 /** 373 * The coordinate axis type for array entries in this column (trailing index). The number of coordinate axes 374 * (leading index) defined this way should match the dimensionality of the array elements in the column. This 375 * version does not support alternative coordinates systems. 376 * 377 * @see #nCTYna 378 * 379 * @since 1.19 380 */ 381 nCTYPn(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "column coordinate axis type"), 382 383 /** 384 * The coordinate axis type for array entries in this column (trailing index). The number of coordinate axes 385 * (leading index) defined this way should match the dimensionality of the array elements in the column. This 386 * version supports alternative coordinates systems. 387 * 388 * @see #nCTYPn 389 * 390 * @since 1.19 391 */ 392 nCTYna(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "column coordinate axis type"), 393 394 /** 395 * The coordinate axis name for array entries in this column (trailing index). The number of coordinate axes 396 * (leading index) defined this way should match the dimensionality of the array elements in the column. 397 * 398 * @since 1.19 399 */ 400 nCNAna(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "column coordinate axis type"), 401 402 /** 403 * The physical coordinate unit for array entries in this column (trailing index). The number of coordinate axes 404 * (leading index) defined this way should match the dimensionality of the array elements in the column. This 405 * version does not support alternative coordinates systems. 406 * 407 * @see #nCUNna 408 * 409 * @since 1.19 410 */ 411 nCUNIn(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "column coordinate axis unit"), 412 413 /** 414 * The physical coordinate unit for array entries in this column (trailing index). The number of coordinate axes 415 * (leading index) defined this way should match the dimensionality of the array elements in the column. This 416 * version supports alternative coordinates systems. 417 * 418 * @see #nCUNIn 419 * 420 * @since 1.19 421 */ 422 nCUNna(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "column coordinate axis unit"), 423 424 /** 425 * The coordinate reference value in the physical unit of the axis (if defined) for array entries in this column 426 * (trailing index). The number of coordinate axes (leading index) defined this way should match the dimensionality 427 * of the array elements in the column. This version does not support alternative coordinates systems. 428 * 429 * @see #nCRVna 430 * 431 * @since 1.19 432 */ 433 nCRVLn(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column coordinate axis reference value"), 434 435 /** 436 * The coordinate reference value in the physical unit of the axis (if defined) for array entries in this column 437 * (trailing index). The number of coordinate axes (leading index) defined this way should match the dimensionality 438 * of the array elements in the column. This version supports alternative coordinates systems. 439 * 440 * @see #nCRVLn 441 * 442 * @since 1.19 443 */ 444 nCRVna(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column coordinate axis reference value"), 445 446 /** 447 * The coordinate axis random error in the physical unit of the axis (if defined) for array entries in this column 448 * (trailing index). The number of coordinate axes (leading index) defined this way should match the dimensionality 449 * of the array elements in the column. 450 * 451 * @since 1.19 452 */ 453 nCRDna(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column coordinate axis random error"), 454 455 /** 456 * The coordinate axis systematic error in the physical unit of the axis (if defined) for array entries in this 457 * column (trailing index). The number of coordinate axes (leading index) defined this way should match the 458 * dimensionality of the array elements in the column. 459 * 460 * @since 1.19 461 */ 462 nCSYna(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column coordinate axis systematic error"), 463 464 /** 465 * Phase axis zero point on axis (leading index) for array entries in this column (trailing index) 466 * 467 * @since 1.19 468 */ 469 nCZPna(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "phase axis zero point"), 470 471 /** 472 * Phase axis period on axis (leading index) for array entries in this column (trailing index) 473 * 474 * @since 1.19 475 */ 476 nCPRna(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "phase axis period"), 477 478 /** 479 * The coordinate axis spacing in the physical unit of the axis (if defined) for array entries in this column 480 * (trailing index). The number of coordinate axes (leading index) defined this way should match the dimensionality 481 * of the array elements in the column. This version does not support alternative coordinates systems. 482 * 483 * @see #nCDEna 484 * 485 * @since 1.19 486 */ 487 nCDLTn(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column coordinate axis spacing"), 488 489 /** 490 * The coordinate axis spacing in the physical unit of the axis (if defined) for array entries in this column 491 * (trailing index). The number of coordinate axes (leading index) defined this way should match the dimensionality 492 * of the array elements in the column. This version supports alternative coordinates systems. 493 * 494 * @see #nCDLTn 495 * 496 * @since 1.19 497 */ 498 nCDEna(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column coordinate axis spacing"), 499 500 /** 501 * The 1-based coordinate reference pixel index in the physical unit of the axis (if defined) for array entries in 502 * this column (trailing index). The number of coordinate axes (leading index) defined this way should match the 503 * dimensionality of the array elements in the column. This version does not support alternative coordinates 504 * systems. 505 * 506 * @see #nCRPna 507 * 508 * @since 1.19 509 */ 510 nCRPXn(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column coordinate axis reference pixel"), 511 512 /** 513 * The 1-based coordinate reference pixel index in the physical unit of the axis (if defined) for array entries in 514 * this column (trailing index). The number of coordinate axes (leading index) defined this way should match the 515 * dimensionality of the array elements in the column. This version supports alternative coordinates systems. 516 * 517 * @see #nCRPXn 518 * 519 * @since 1.19 520 */ 521 nCRPna(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column coordinate axis reference pixel"), 522 523 /** 524 * @deprecated The FITS standard deprecated this keyword. Use {@link WCS#nnPCna} and {@link WCS#nnCDna}instead. 525 * [deg] The coordinate axis rotation in the physical unit of the axis (if defined) for array 526 * entries in this column (trailing index). The number of coordinate axes (leading index) defined 527 * this way should match the dimensionality of the array elements in the column. 528 * 529 * @since 1.19 530 */ 531 nCROTn(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "[deg] column coordinate axis rotation"), 532 533 /** 534 * Coordinate transformation matrix in the PC convention. from rectilinear coordinate index <i>i</i> (leading index) 535 * to coordinate index <i>j</i> (second index) for the for array entries in this column (trailing index). The number 536 * of coordinate axes (leading index) defined this way should match the dimensionality of the array elements in the 537 * column. 538 * 539 * @since 1.19 540 */ 541 nnPCna(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column coord. trans. matrix element"), 542 543 /** 544 * Coordinate transformation matrix in the CD convention. from rectilinear coordinate index <i>i</i> (leading index) 545 * to coordinate index <i>j</i> (second index) for the for array entries in this column (trailing index). The number 546 * of coordinate axes (leading index) defined this way should match the dimensionality of the array elements in the 547 * column. 548 * 549 * @since 1.19 550 */ 551 nnCDna(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column coord. trans. matrix element"), 552 553 /** 554 * The coordinate string parameter <i>m</i> (trailing index) for axis <i>i</i> (leading index) for array entries in 555 * this column (middle index). The number of coordinate axes (leading index) defined this way should match the 556 * dimensionality of the array elements in the column. The shorter {@link #nSn_na} form may be required for column 557 * indices >99 with alternate coordinate systems. 558 * 559 * @since 1.19 560 */ 561 nPSn_na(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "column axis parameter name"), 562 563 /** 564 * The coordinate string parameter <i>m</i> (trailing index) for axis <i>i</i> (leading index) for array entries in 565 * this column (middle index). The number of coordinate axes (leading index) defined this way should match the 566 * dimensionality of the array elements in the column. Same as {@link #nPSn_na}. This shorter form may be required 567 * for column indices >99 with alternate coordinate systems. 568 * 569 * @since 1.19 570 */ 571 nSn_na(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "column axis parameter name"), 572 573 /** 574 * The coordinate parameter value <i>m</i> (trailing index) for axis <i>i</i> (leading index) for array entries in 575 * this column (middle index). The number of coordinateaxes defined this way should match the dimensionality of the 576 * array elements in the column. The shorter {@link #nVn_na} form may be required for column indices >99 with 577 * alternate coordinate systems. 578 * 579 * @since 1.19 580 */ 581 nPVn_na(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column axis parameter value"), 582 583 /** 584 * The coordinate parameter value <i>m</i> (trailing index) for axis <i>i</i> (leading index) for array entries in 585 * this column (middle index). The number of coordinateaxes defined this way should match the dimensionality of the 586 * array elements in the column. Same as {@link #nPVn_na}. This shorter form may be required for column indices 587 * >99 with alternate coordinate systems. 588 * 589 * @since 1.19 590 */ 591 nVn_na(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column axis parameter value"), 592 593 /** 594 * The coordinate parameter array for axis <i>i</i> (leading index) in this column (middle index). The number of 595 * coordinate axes defined this way should match the dimensionality of the array elements in the column. 596 * 597 * @since 1.19 598 */ 599 nVn_Xa(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column parameter array"), 600 601 /** 602 * WCS name for the pixe list entries in the given column index. Same as {@link #TWCSna}. This shorter form may be 603 * required for column indices >99 with alternate coordinate systems. 604 * 605 * @since 1.19 606 */ 607 WCSna(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "column WCS name"), 608 609 /** 610 * WCS name for the pixe list entries in the given column index. The shorter form {@link #WCSna} may be required for 611 * column indices >99 with alternate coordinate systems. 612 * 613 * @since 1.19 614 */ 615 TWCSna(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "column WCS name"), 616 617 /** 618 * WCS dimensions for given column index. 619 * 620 * @since 1.19 621 */ 622 WCAXna(SOURCE.RESERVED, HDU.TABLE, VALUE.INTEGER, "column coordinate dimensions"), 623 624 /** 625 * The coordinate axis type for (1D) pixel lists in this column (trailing index). This version does not support 626 * alternative coordinates systems. 627 * 628 * @see #TCTYna 629 * 630 * @since 1.19 631 */ 632 TCTYPn(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "column pixel axis type"), 633 634 /** 635 * The coordinate axis type for (1D) pixel lists in this column (trailing index). This version supports alternative 636 * coordinates systems. 637 * 638 * @see #TCTYPn 639 * 640 * @since 1.19 641 */ 642 TCTYna(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "column pixel axis type"), 643 644 /** 645 * The coordinate axis name for (1D) pixel lists in this column (trailing index). 646 * 647 * @since 1.19 648 */ 649 TCNAna(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "column pixel axis name"), 650 651 /** 652 * The physical coordinate unit for (1D) pixel lists in this column (trailing index). This version does not support 653 * alternative coordinates systems. 654 * 655 * @see #TCUNna 656 * 657 * @since 1.19 658 */ 659 TCUNIn(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "column pixel axis unit"), 660 661 /** 662 * The physical coordinate unit for (1D) pixel lists in this column (trailing index). This version supports 663 * alternative coordinates systems. 664 * 665 * @see #TCUNIn 666 * 667 * @since 1.19 668 */ 669 TCUNna(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "column pixel axis unit"), 670 671 /** 672 * The coordinate reference value in the physical unit of the axis (if defined) for the (1D) pixel lists in this 673 * column (trailing index). This version does not support alternative coordinates systems. 674 * 675 * @see #TCRVna 676 * 677 * @since 1.19 678 */ 679 TCRVLn(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column pixel axis reference value"), 680 681 /** 682 * The coordinate reference value in the physical unit of the axis (if defined) for the (1D) pixel lists in this 683 * column (trailing index). This version supports alternative coordinates systems. 684 * 685 * @see #TCRVLn 686 * 687 * @since 1.19 688 */ 689 TCRVna(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column pixel axis reference value"), 690 691 /** 692 * The coordinate axis spacing in the physical unit of the axis (if defined) for the (1D_) pixel lists in this 693 * column (trailing index). This version does not support alternative coordinates systems. 694 * 695 * @see #TCDEna 696 * 697 * @since 1.19 698 */ 699 TCDLTn(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column pixel axis spacing"), 700 701 /** 702 * The coordinate axis spacing in the physical unit of the axis (if defined) for the (1D_) pixel lists in this 703 * column (trailing index). This version supports alternative coordinates systems. 704 * 705 * @see #TCDLTn 706 * 707 * @since 1.19 708 */ 709 TCDEna(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column pixel axis spacing"), 710 711 /** 712 * The coordinate axis random error in the physical unit of the axis (if defined) for the (1D_) pixel lists in this 713 * column (trailing index). 714 * 715 * @since 1.19 716 */ 717 TCRDna(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column pixel axis random error"), 718 719 /** 720 * The coordinate axis systematics error in the physical unit of the axis (if defined) for the (1D_) pixel lists in 721 * this column (trailing index). 722 * 723 * @since 1.19 724 */ 725 TCSYna(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column pixel axis random error"), 726 727 /** 728 * Phase axis zero point on axis (leading index) for array entries in this column (trailing index) 729 * 730 * @since 1.19 731 */ 732 TCZPna(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "phase axis zero point"), 733 734 /** 735 * Phase axis period on axis (leading index) for array entries in this column (trailing index) 736 * 737 * @since 1.19 738 */ 739 TCPRna(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "phase axis period"), 740 741 /** 742 * The 1-based coordinate reference pixel index in the physical unit of the axis (if defined) for the (1D) pixel 743 * lists in this column (trailing index). This version does not support alternative coordinates systems. 744 * 745 * @see #TCRPna 746 * 747 * @since 1.19 748 */ 749 TCRPXn(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column pixel axis reference pixel"), 750 751 /** 752 * The 1-based coordinate reference pixel index in the physical unit of the axis (if defined) for the (1D) pixel 753 * lists in this column (trailing index). This version supports alternative coordinates systems. 754 * 755 * @see #TCRPXn 756 * 757 * @since 1.19 758 */ 759 TCRPna(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column pixel axis reference pixel"), 760 761 /** 762 * Coordinate transformation matrix in the PC convention. from column index <i>n</i> (leading index) to column index 763 * <i>k</i> (second index) for the for the (1D) pixel lists in this column. The shorter form {@link #TPn_na} may be 764 * required for column indices >99 with alternate coordinate systems. 765 * 766 * @see #TPn_na 767 * 768 * @since 1.19 769 */ 770 TPCn_na(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column pix trans. matrix element"), 771 772 /** 773 * Coordinate transformation matrix in the PC convention. from column index <i>n</i> (leading index) to column index 774 * <i>k</i> (second index) for the for the (1D) pixel lists in this column. Same as {@link #TPCn_na}. This shorter 775 * form may be required for column indices >99 with alternate coordinate systems. 776 * 777 * @see #TPCn_na 778 * 779 * @since 1.19 780 */ 781 TPn_na(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column pix trans. matrix element"), 782 783 /** 784 * @deprecated The FITS standard deprecated this keyword. Use {@link WCS#TPCn_na} and {@link WCS#TCDn_na}instead. 785 * [deg] The coordinate axis rotation in the physical unit of the axis (if defined) for the (1D) 786 * pixel lists in this column (trailing index). 787 * 788 * @since 1.19 789 */ 790 TCROTn(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "[deg] column pixel axis rotation"), 791 792 /** 793 * Coordinate transformation matrix in the CD convention. from column index <i>n</i> (leading index) to column index 794 * <i>k</i> (second index) for the for the (1D) pixel lists in this column. The shorter form {@link #TCn_na} may be 795 * required for column indices >99 with alternate coordinate systems. 796 * 797 * @since 1.19 798 */ 799 TCDn_na(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column pix trans. matrix element"), 800 801 /** 802 * Coordinate transformation matrix in the CD convention. from column index <i>n</i> (leading index) to column index 803 * <i>k</i> (second index) for the for the (1D) pixel lists in this column. Same as {@link #TCDn_na}. This shorter 804 * form may be required for column indices >99 with alternate coordinate systems. 805 * 806 * @since 1.19 807 */ 808 TCn_na(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column pix trans. matrix element"), 809 810 /** 811 * The coordinate string parameter <i>m</i> (trailing index) for the (1D) pixel list entries in this column (leading 812 * index). This shorter form {@link #TSn_na} may be required for column indices >99 with alternate coordinate 813 * systems. 814 * 815 * @since 1.19 816 */ 817 TPSn_na(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "column axis parameter name"), 818 819 /** 820 * The coordinate string parameter <i>m</i> (trailing index) for the (1D) pixel list entries in this column (leading 821 * index). Same as {@link #TPSn_na}. This shorter form may be required for column indices >99 with alternate 822 * coordinate systems. 823 * 824 * @since 1.19 825 */ 826 TSn_na(SOURCE.RESERVED, HDU.TABLE, VALUE.STRING, "column axis parameter name"), 827 828 /** 829 * The coordinate parameter value <i>m</i> (trailing index) for the (1D) pixel list entries in this column (leading 830 * index). The shorter form {@link #TVn_na} may be required for column indices >99 with alternate coordinate 831 * systems. 832 * 833 * @since 1.19 834 */ 835 TPVn_na(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column pixel axis parameter value"), 836 837 /** 838 * The coordinate parameter value <i>m</i> (trailing index) for the (1D) pixel list entries in this column (leading 839 * index). Same as {@link #TPVn_na}. This shorter form may be required for column indices >99 with alternate 840 * coordinate systems. 841 * 842 * @since 1.19 843 */ 844 TVn_na(SOURCE.RESERVED, HDU.TABLE, VALUE.REAL, "column pixel axis parameter value"); 845 846 /** ICRS coordinate reference frame */ 847 public static final int WCSAXES_MAX_VALUE = 9; 848 849 /** ICRS coordinate reference frame */ 850 public static final String RADESYS_ICRS = "ICRS"; 851 852 /** IAU 1984 FK5 coordinate reference frame */ 853 public static final String RADESYS_FK5 = "FK5"; 854 855 /** Bessel-Newcomb FK4 coordinate reference frame */ 856 public static final String RADESYS_FK4 = "FK4"; 857 858 /** Bessel-Newcomb FK4 coordinate reference frame, without eccentricity terms */ 859 public static final String RADESYS_FK4_NO_E = "FK4-NO-E"; 860 861 /** Geocentric apparent place (IAU 1984) */ 862 public static final String RADESYS_GAPPT = "GAPPT"; 863 864 /** Logarithmically sampled algorithm code for {@link #CTYPEna} keywords */ 865 public static final String ALGO_LOG = "LOG"; 866 867 /** Detector sampling algorithm code for {@link #CTYPEna} keywords */ 868 public static final String ALGO_GRI = "GRI"; 869 870 /** Detector sampling algorithm code for {@link #CTYPEna} keywords */ 871 public static final String ALGO_GRA = "GRA"; 872 873 /** Irregular sampling algorithm code for {@link #CTYPEna} keywords */ 874 public static final String ALGO_TAB = "TAB"; 875 876 /** Spectral frequency coordinate value for {@link #CTYPEna} keywords */ 877 public static final String SPECTRAL_TYPE_FREQ = "FREQ"; 878 879 /** Spectral energy coordinate value for {@link #CTYPEna} keywords */ 880 public static final String SPECTRAL_TYPE_ENER = "ENER"; 881 882 /** Spectral wavenumber coordinate value for {@link #CTYPEna} keywords */ 883 public static final String SPECTRAL_TYPE_WAVN = "WAVN"; 884 885 /** Spectral radial velocity coordinate value for {@link #CTYPEna} keywords */ 886 public static final String SPECTRAL_TYPE_VRAD = "VRAD"; 887 888 /** Spectral vacuum wavenlength coordinate value for {@link #CTYPEna} keywords */ 889 public static final String SPECTRAL_TYPE_WAVE = "WAVE"; 890 891 /** Spectral optical velocity coordinate value for {@link #CTYPEna} keywords */ 892 public static final String SPECTRAL_TYPE_VOPT = "VOPT"; 893 894 /** Spectral redshift coordinate value for {@link #CTYPEna} keywords */ 895 public static final String SPECTRAL_TYPE_ZOPT = "ZOPT"; 896 897 /** Spectral wavelength in air coordinate value for {@link #CTYPEna} keywords */ 898 public static final String SPECTRAL_TYPE_AWAV = "AWAV"; 899 900 /** Spectral apparent radial velocity coordinate value for {@link #CTYPEna} keywords */ 901 public static final String SPECTRAL_TYPE_VELO = "VELO"; 902 903 /** Spectral beta factor (<i>v/c</i>) coordinate value for {@link #CTYPEna} keywords */ 904 public static final String SPECTRAL_TYPE_BETA = "BETA"; 905 906 /** Spectral frequency expressed as wavelength transformation code for {@link #CTYPEna} keywords */ 907 public static final String SPECTRAL_ALGO_F2W = "F2W"; 908 909 /** Spectral frequency expressed as apparent radial velocity transformation code for {@link #CTYPEna} keywords */ 910 public static final String SPECTRAL_ALGO_F2V = "F2V"; 911 912 /** Spectral frequency expressed as air wavelength transformation code for {@link #CTYPEna} keywords */ 913 public static final String SPECTRAL_ALGO_F2A = "F2A"; 914 915 /** Spectral wavelength expressed as frequency transformation code for {@link #CTYPEna} keywords */ 916 public static final String SPECTRAL_ALGO_W2F = "W2F"; 917 918 /** Spectral wavelength expressed as apparent radial velocity transformation code for {@link #CTYPEna} keywords */ 919 public static final String SPECTRAL_ALGO_W2V = "W2V"; 920 921 /** Spectral wavelength expressed as air wavelength transformation code for {@link #CTYPEna} keywords */ 922 public static final String SPECTRAL_ALGO_W2A = "W2A"; 923 924 /** Spectral radial velocity expressed as frequency transformation code for {@link #CTYPEna} keywords */ 925 public static final String SPECTRAL_ALGO_V2F = "V2F"; 926 927 /** Spectral radial velocity expressed as wavelength transformation code for {@link #CTYPEna} keywords */ 928 public static final String SPECTRAL_ALGO_V2W = "V2W"; 929 930 /** Spectral radial velocity expressed as air wavelength transformation code for {@link #CTYPEna} keywords */ 931 public static final String SPECTRAL_ALGO_V2A = "V2A"; 932 933 /** Spectral air wavelength expressed as frequency transformation code for {@link #CTYPEna} keywords */ 934 public static final String SPECTRAL_ALGO_A2F = "A2F"; 935 936 /** Spectral air wavelength expressed as vacuum wavelength transformation code for {@link #CTYPEna} keywords */ 937 public static final String SPECTRAL_ALGO_A2W = "A2W"; 938 939 /** 940 * Spectral air wavelength expressed as apparent radial velocity transformation code for {@link #CTYPEna} keywords 941 */ 942 public static final String SPECTRAL_ALGO_A2V = "A2V"; 943 944 private final FitsKey key; 945 946 WCS(SOURCE status, HDU hdu, VALUE valueType, String comment) { 947 this(null, status, hdu, valueType, comment); 948 } 949 950 WCS(String headerName, SOURCE status, HDU hdu, VALUE valueType, String comment) { 951 key = new FitsKey(headerName == null ? name() : headerName, status, hdu, valueType, comment); 952 FitsKey.registerStandard(this); 953 } 954 955 @Override 956 public final FitsKey impl() { 957 return key; 958 } 959 960 /** 961 * Specifying an alternative coordinate system. Alternative systems are labelled 'A' through 'Z'. This call is 962 * available only for the enums, which have a lower-case 'a' at the end of their Java names (such as 963 * {@link #WCSNAMEa}). Attempting to call this on WCS keywords that do not end with lower-case 'a' in their Java 964 * names (such as {@link #OBSGEO_X} will throw and {@link UnsupportedOperationException}. You will want to call this 965 * before chaining other calls to {@link IFitsHeader}. 966 * 967 * @param c The alternative coordinate system marker 'A' through 'Z' (case 968 * insensitive). 969 * 970 * @return The standard FITS keyword with the alternate coordinate system marker 971 * attached. 972 * 973 * @throws IllegalArgumentException if the marker is outside of the legal range of 'A' through 'Z' (case 974 * insensitive). 975 * @throws UnsupportedOperationException if the keyword does not support alternative coordinate systems 976 * 977 * @since 1.19 978 */ 979 public IFitsHeader alt(char c) throws IllegalArgumentException, UnsupportedOperationException { 980 if (!name().endsWith("a")) { 981 throw new UnsupportedOperationException("WCS keyword " + key.key() + " does not support alternatives."); 982 } 983 984 c = Character.toUpperCase(c); 985 if (c < 'A' || c > 'Z') { 986 throw new IllegalArgumentException("Expected 'A' through 'Z': Got '%c'"); 987 } 988 989 return new FitsKey(key() + Character.toUpperCase(c), status(), hdu(), valueType(), comment()); 990 } 991 992 }