File: docstrings.py

package info (click to toggle)
python-astropy 1.3-8~bpo8%2B2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 44,292 kB
  • sloc: ansic: 160,360; python: 137,322; sh: 11,493; lex: 7,638; yacc: 4,956; xml: 1,796; makefile: 474; cpp: 364
file content (2278 lines) | stat: -rw-r--r-- 60,905 bytes parent folder | download | duplicates (2)
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
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import absolute_import, division, print_function, unicode_literals

# It gets to be really tedious to type long docstrings in ANSI C
# syntax (since multi-line string literals are not valid).
# Therefore, the docstrings are written here in doc/docstrings.py,
# which are then converted by setup.py into docstrings.h, which is
# included by pywcs.c

from . import _docutil as __

a = """
``double array[a_order+1][a_order+1]`` Focal plane transformation
matrix.

The `SIP`_ ``A_i_j`` matrix used for pixel to focal plane
transformation.

Its values may be changed in place, but it may not be resized, without
creating a new `~astropy.wcs.Sip` object.
"""

a_order = """
``int`` (read-only) Order of the polynomial (``A_ORDER``).
"""

all_pix2world = """
all_pix2world(pixcrd, origin) -> ``double array[ncoord][nelem]``

Transforms pixel coordinates to world coordinates.

Does the following:

    - Detector to image plane correction (if present)

    - SIP distortion correction (if present)

    - FITS WCS distortion correction (if present)

    - wcslib "core" WCS transformation

The first three (the distortion corrections) are done in parallel.

Parameters
----------
pixcrd : double array[ncoord][nelem]
    Array of pixel coordinates.

{0}

Returns
-------
world : double array[ncoord][nelem]
    Returns an array of world coordinates.

Raises
------
MemoryError
    Memory allocation failed.

SingularMatrixError
    Linear transformation matrix is singular.

InconsistentAxisTypesError
    Inconsistent or unrecognized coordinate axis types.

ValueError
    Invalid parameter value.

ValueError
    Invalid coordinate transformation parameters.

ValueError
    x- and y-coordinate arrays are not the same size.

InvalidTransformError
    Invalid coordinate transformation.

InvalidTransformError
    Ill-conditioned coordinate transformation parameters.
""".format(__.ORIGIN())

alt = """
``str`` Character code for alternate coordinate descriptions.

For example, the ``"a"`` in keyword names such as ``CTYPEia``.  This
is a space character for the primary coordinate description, or one of
the 26 upper-case letters, A-Z.
"""

ap = """
``double array[ap_order+1][ap_order+1]`` Focal plane to pixel
transformation matrix.

The `SIP`_ ``AP_i_j`` matrix used for focal plane to pixel
transformation.  Its values may be changed in place, but it may not be
resized, without creating a new `~astropy.wcs.Sip` object.
"""

ap_order = """
``int`` (read-only) Order of the polynomial (``AP_ORDER``).
"""

axis_types = """
``int array[naxis]`` An array of four-digit type codes for each axis.

- First digit (i.e. 1000s):

  - 0: Non-specific coordinate type.

  - 1: Stokes coordinate.

  - 2: Celestial coordinate (including ``CUBEFACE``).

  - 3: Spectral coordinate.

- Second digit (i.e. 100s):

  - 0: Linear axis.

  - 1: Quantized axis (``STOKES``, ``CUBEFACE``).

  - 2: Non-linear celestial axis.

  - 3: Non-linear spectral axis.

  - 4: Logarithmic axis.

  - 5: Tabular axis.

- Third digit (i.e. 10s):

  - 0: Group number, e.g. lookup table number

- The fourth digit is used as a qualifier depending on the axis type.

  - For celestial axes:

    - 0: Longitude coordinate.

    - 1: Latitude coordinate.

    - 2: ``CUBEFACE`` number.

  - For lookup tables: the axis number in a multidimensional table.

``CTYPEia`` in ``"4-3"`` form with unrecognized algorithm code will
have its type set to -1 and generate an error.
"""

b = """
``double array[b_order+1][b_order+1]`` Pixel to focal plane
transformation matrix.

The `SIP`_ ``B_i_j`` matrix used for pixel to focal plane
transformation.  Its values may be changed in place, but it may not be
resized, without creating a new `~astropy.wcs.Sip` object.
"""

b_order = """
``int`` (read-only) Order of the polynomial (``B_ORDER``).
"""

bounds_check = """
bounds_check(pix2world, world2pix)

Enable/disable bounds checking.

Parameters
----------
pix2world : bool, optional
    When `True`, enable bounds checking for the pixel-to-world (p2x)
    transformations.  Default is `True`.

world2pix : bool, optional
    When `True`, enable bounds checking for the world-to-pixel (s2x)
    transformations.  Default is `True`.

Notes
-----
Note that by default (without calling `bounds_check`) strict bounds
checking is enabled.
"""

bp = """
``double array[bp_order+1][bp_order+1]`` Focal plane to pixel
transformation matrix.

The `SIP`_ ``BP_i_j`` matrix used for focal plane to pixel
transformation.  Its values may be changed in place, but it may not be
resized, without creating a new `~astropy.wcs.Sip` object.
"""

bp_order = """
``int`` (read-only) Order of the polynomial (``BP_ORDER``).
"""

cd = """
``double array[naxis][naxis]`` The ``CDi_ja`` linear transformation
matrix.

For historical compatibility, three alternate specifications of the
linear transformations are available in wcslib.  The canonical
``PCi_ja`` with ``CDELTia``, ``CDi_ja``, and the deprecated
``CROTAia`` keywords.  Although the latter may not formally co-exist
with ``PCi_ja``, the approach here is simply to ignore them if given
in conjunction with ``PCi_ja``.

`~astropy.wcs.Wcsprm.has_pc`, `~astropy.wcs.Wcsprm.has_cd` and
`~astropy.wcs.Wcsprm.has_crota` can be used to determine which of
these alternatives are present in the header.

These alternate specifications of the linear transformation matrix are
translated immediately to ``PCi_ja`` by `~astropy.wcs.Wcsprm.set` and
are nowhere visible to the lower-level routines.  In particular,
`~astropy.wcs.Wcsprm.set` resets `~astropy.wcs.Wcsprm.cdelt` to unity
if ``CDi_ja`` is present (and no ``PCi_ja``).  If no ``CROTAia`` is
associated with the latitude axis, `~astropy.wcs.Wcsprm.set` reverts
to a unity ``PCi_ja`` matrix.
"""

cdelt = """
``double array[naxis]`` Coordinate increments (``CDELTia``) for each
coord axis.

If a ``CDi_ja`` linear transformation matrix is present, a warning is
raised and `~astropy.wcs.Wcsprm.cdelt` is ignored.  The ``CDi_ja``
matrix may be deleted by::

  del wcs.wcs.cd

An undefined value is represented by NaN.
"""

cdfix = """
cdfix()

Fix erroneously omitted ``CDi_ja`` keywords.

Sets the diagonal element of the ``CDi_ja`` matrix to unity if all
``CDi_ja`` keywords associated with a given axis were omitted.
According to Paper I, if any ``CDi_ja`` keywords at all are given in a
FITS header then those not given default to zero.  This results in a
singular matrix with an intersecting row and column of zeros.

Returns
-------
success : int
    Returns ``0`` for success; ``-1`` if no change required.
"""

cel_offset = """
``boolean`` Is there an offset?

If `True`, an offset will be applied to ``(x, y)`` to force ``(x, y) =
(0, 0)`` at the fiducial point, (phi_0, theta_0).  Default is `False`.
"""

celfix = """
Translates AIPS-convention celestial projection types, ``-NCP`` and
``-GLS``.

Returns
-------
success : int
    Returns ``0`` for success; ``-1`` if no change required.
"""

cname = """
``list of strings`` A list of the coordinate axis names, from
``CNAMEia``.
"""

colax = """
``int array[naxis]`` An array recording the column numbers for each
axis in a pixel list.
"""

colnum = """
``int`` Column of FITS binary table associated with this WCS.

Where the coordinate representation is associated with an image-array
column in a FITS binary table, this property may be used to record the
relevant column number.

It should be set to zero for an image header or pixel list.
"""

compare = """
compare(other, cmp=0, tolerance=0.0)

Compare two Wcsprm objects for equality.

Parameters
----------

other : Wcsprm
    The other Wcsprm object to compare to.

cmp : int, optional
    A bit field controlling the strictness of the comparison.  When 0,
    (the default), all fields must be identical.

    The following constants may be or'ed together to loosen the
    comparison.

    - ``WCSCOMPARE_ANCILLARY``: Ignores ancillary keywords that don't
      change the WCS transformation, such as ``DATE-OBS`` or
      ``EQUINOX``.

    - ``WCSCOMPARE_TILING``: Ignore integral differences in
      ``CRPIXja``.  This is the 'tiling' condition, where two WCSes
      cover different regions of the same map projection and align on
      the same map grid.

    - ``WCSCOMPARE_CRPIX``: Ignore any differences at all in
      ``CRPIXja``.  The two WCSes cover different regions of the same
      map projection but may not align on the same grid map.
      Overrides ``WCSCOMPARE_TILING``.

tolerance : float, optional
    The amount of tolerance required.  For example, for a value of
    1e-6, all floating-point values in the objects must be equal to
    the first 6 decimal places.  The default value of 0.0 implies
    exact equality.

Returns
-------
equal : bool
"""

convert = """
convert(array)

Perform the unit conversion on the elements of the given *array*,
returning an array of the same shape.
"""

coord = """
``double array[K_M]...[K_2][K_1][M]`` The tabular coordinate array.

Has the dimensions::

    (K_M, ... K_2, K_1, M)

(see `~astropy.wcs.Tabprm.K`) i.e. with the `M` dimension
varying fastest so that the `M` elements of a coordinate vector are
stored contiguously in memory.
"""

copy = """
Creates a deep copy of the WCS object.
"""

cpdis1 = """
`~astropy.wcs.DistortionLookupTable`

The pre-linear transformation distortion lookup table, ``CPDIS1``.
"""

cpdis2 = """
`~astropy.wcs.DistortionLookupTable`

The pre-linear transformation distortion lookup table, ``CPDIS2``.
"""

crder = """
``double array[naxis]`` The random error in each coordinate axis,
``CRDERia``.

An undefined value is represented by NaN.
"""

crota = """
``double array[naxis]`` ``CROTAia`` keyvalues for each coordinate
axis.

For historical compatibility, three alternate specifications of the
linear transformations are available in wcslib.  The canonical
``PCi_ja`` with ``CDELTia``, ``CDi_ja``, and the deprecated
``CROTAia`` keywords.  Although the latter may not formally co-exist
with ``PCi_ja``, the approach here is simply to ignore them if given
in conjunction with ``PCi_ja``.

`~astropy.wcs.Wcsprm.has_pc`, `~astropy.wcs.Wcsprm.has_cd` and
`~astropy.wcs.Wcsprm.has_crota` can be used to determine which of
these alternatives are present in the header.

These alternate specifications of the linear transformation matrix are
translated immediately to ``PCi_ja`` by `~astropy.wcs.Wcsprm.set` and
are nowhere visible to the lower-level routines.  In particular,
`~astropy.wcs.Wcsprm.set` resets `~astropy.wcs.Wcsprm.cdelt` to unity
if ``CDi_ja`` is present (and no ``PCi_ja``).  If no ``CROTAia`` is
associated with the latitude axis, `~astropy.wcs.Wcsprm.set` reverts
to a unity ``PCi_ja`` matrix.
"""

crpix = """
``double array[naxis]`` Coordinate reference pixels (``CRPIXja``) for
each pixel axis.
"""

crval = """
``double array[naxis]`` Coordinate reference values (``CRVALia``) for
each coordinate axis.
"""

crval_tabprm = """
``double array[M]`` Index values for the reference pixel for each of
the tabular coord axes.
"""

csyer = """
``double array[naxis]`` The systematic error in the coordinate value
axes, ``CSYERia``.

An undefined value is represented by NaN.
"""

ctype = """
``list of strings[naxis]`` List of ``CTYPEia`` keyvalues.

The `~astropy.wcs.Wcsprm.ctype` keyword values must be in upper case
and there must be zero or one pair of matched celestial axis types,
and zero or one spectral axis.
"""

cubeface = """
``int`` Index into the ``pixcrd`` (pixel coordinate) array for the
``CUBEFACE`` axis.

This is used for quadcube projections where the cube faces are stored
on a separate axis.

The quadcube projections (``TSC``, ``CSC``, ``QSC``) may be
represented in FITS in either of two ways:

    - The six faces may be laid out in one plane and numbered as
      follows::


                                       0

                              4  3  2  1  4  3  2

                                       5

      Faces 2, 3 and 4 may appear on one side or the other (or both).
      The world-to-pixel routines map faces 2, 3 and 4 to the left but
      the pixel-to-world routines accept them on either side.

    - The ``COBE`` convention in which the six faces are stored in a
      three-dimensional structure using a ``CUBEFACE`` axis indexed
      from 0 to 5 as above.

These routines support both methods; `~astropy.wcs.Wcsprm.set`
determines which is being used by the presence or absence of a
``CUBEFACE`` axis in `~astropy.wcs.Wcsprm.ctype`.
`~astropy.wcs.Wcsprm.p2s` and `~astropy.wcs.Wcsprm.s2p` translate the
``CUBEFACE`` axis representation to the single plane representation
understood by the lower-level projection routines.
"""

cunit = """
``list of astropy.UnitBase[naxis]`` List of ``CUNITia`` keyvalues as
`astropy.units.UnitBase` instances.

These define the units of measurement of the ``CRVALia``, ``CDELTia``
and ``CDi_ja`` keywords.

As ``CUNITia`` is an optional header keyword,
`~astropy.wcs.Wcsprm.cunit` may be left blank but otherwise is
expected to contain a standard units specification as defined by WCS
Paper I.  `~astropy.wcs.Wcsprm.unitfix` is available to translate
commonly used non-standard units specifications but this must be done
as a separate step before invoking `~astropy.wcs.Wcsprm.set`.

For celestial axes, if `~astropy.wcs.Wcsprm.cunit` is not blank,
`~astropy.wcs.Wcsprm.set` uses ``wcsunits`` to parse it and scale
`~astropy.wcs.Wcsprm.cdelt`, `~astropy.wcs.Wcsprm.crval`, and
`~astropy.wcs.Wcsprm.cd` to decimal degrees.  It then resets
`~astropy.wcs.Wcsprm.cunit` to ``"deg"``.

For spectral axes, if `~astropy.wcs.Wcsprm.cunit` is not blank,
`~astropy.wcs.Wcsprm.set` uses ``wcsunits`` to parse it and scale
`~astropy.wcs.Wcsprm.cdelt`, `~astropy.wcs.Wcsprm.crval`, and
`~astropy.wcs.Wcsprm.cd` to SI units.  It then resets
`~astropy.wcs.Wcsprm.cunit` accordingly.

`~astropy.wcs.Wcsprm.set` ignores `~astropy.wcs.Wcsprm.cunit` for
other coordinate types; `~astropy.wcs.Wcsprm.cunit` may be used to
label coordinate values.
"""

cylfix = """
cylfix()

Fixes WCS keyvalues for malformed cylindrical projections.

Returns
-------
success : int
    Returns ``0`` for success; ``-1`` if no change required.
"""

data = """
``float array`` The array data for the
`~astropy.wcs.DistortionLookupTable`.
"""

data_wtbarr = """
``double array``

The array data for the BINTABLE.
"""

dateavg = """
``string`` Representative mid-point of the date of observation.

In ISO format, ``yyyy-mm-ddThh:mm:ss``.

See also
--------
astropy.wcs.Wcsprm.dateobs
"""

dateobs = """
``string`` Start of the date of observation.

In ISO format, ``yyyy-mm-ddThh:mm:ss``.

See also
--------
astropy.wcs.Wcsprm.dateavg
"""

datfix = """
datfix()

Translates the old ``DATE-OBS`` date format to year-2000 standard form
``(yyyy-mm-ddThh:mm:ss)`` and derives ``MJD-OBS`` from it if not
already set.

Alternatively, if `~astropy.wcs.Wcsprm.mjdobs` is set and
`~astropy.wcs.Wcsprm.dateobs` isn't, then `~astropy.wcs.Wcsprm.datfix`
derives `~astropy.wcs.Wcsprm.dateobs` from it.  If both are set but
disagree by more than half a day then `ValueError` is raised.

Returns
-------
success : int
    Returns ``0`` for success; ``-1`` if no change required.
"""

delta = """
``double array[M]`` (read-only) Interpolated indices into the coord
array.

Array of interpolated indices into the coordinate array such that
Upsilon_m, as defined in Paper III, is equal to
(`~astropy.wcs.Tabprm.p0` [m] + 1) + delta[m].
"""

det2im = """
Convert detector coordinates to image plane coordinates.
"""

det2im1 = """
A `~astropy.wcs.DistortionLookupTable` object for detector to image plane
correction in the *x*-axis.
"""

det2im2 = """
A `~astropy.wcs.DistortionLookupTable` object for detector to image plane
correction in the *y*-axis.
"""

dims = """
``int array[ndim]`` (read-only)

The dimensions of the tabular array
`~astropy.wcs.Wtbarr.data`.
"""

DistortionLookupTable = """
DistortionLookupTable(*table*, *crpix*, *crval*, *cdelt*)

Represents a single lookup table for a `distortion paper`_
transformation.

Parameters
----------
table : 2-dimensional array
    The distortion lookup table.

crpix : 2-tuple
    The distortion array reference pixel

crval : 2-tuple
    The image array pixel coordinate

cdelt : 2-tuple
    The grid step size
"""

equinox = """
``double`` The equinox associated with dynamical equatorial or
ecliptic coordinate systems.

``EQUINOXa`` (or ``EPOCH`` in older headers).  Not applicable to ICRS
equatorial or ecliptic coordinates.

An undefined value is represented by NaN.
"""

extlev = """
``int`` (read-only)

``EXTLEV`` identifying the binary table extension.
"""

extnam = """
``str`` (read-only)

``EXTNAME`` identifying the binary table extension.
"""

extrema = """
``double array[K_M]...[K_2][2][M]`` (read-only)

An array recording the minimum and maximum value of each element of
the coordinate vector in each row of the coordinate array, with the
dimensions::

    (K_M, ... K_2, 2, M)

(see `~astropy.wcs.Tabprm.K`).  The minimum is recorded
in the first element of the compressed K_1 dimension, then the
maximum.  This array is used by the inverse table lookup function to
speed up table searches.
"""

extver = """
``int`` (read-only)

``EXTVER`` identifying the binary table extension.
"""

find_all_wcs = """
find_all_wcs(relax=0, keysel=0)

Find all WCS transformations in the header.

Parameters
----------

header : str
    The raw FITS header data.

relax : bool or int
    Degree of permissiveness:

    - `False`: Recognize only FITS keywords defined by the published
      WCS standard.

    - `True`: Admit all recognized informal extensions of the WCS
      standard.

    - `int`: a bit field selecting specific extensions to accept.  See
      :ref:`relaxread` for details.

keysel : sequence of flags
    Used to restrict the keyword types considered:

    - ``WCSHDR_IMGHEAD``: Image header keywords.

    - ``WCSHDR_BIMGARR``: Binary table image array.

    - ``WCSHDR_PIXLIST``: Pixel list keywords.

    If zero, there is no restriction.  If -1, `wcspih` is called,
    rather than `wcstbh`.

Returns
-------
wcs_list : list of `~astropy.wcs.Wcsprm` objects
"""

fix = """
fix(translate_units='', naxis=0)

Applies all of the corrections handled separately by
`~astropy.wcs.Wcsprm.datfix`, `~astropy.wcs.Wcsprm.unitfix`,
`~astropy.wcs.Wcsprm.celfix`, `~astropy.wcs.Wcsprm.spcfix`,
`~astropy.wcs.Wcsprm.cylfix` and `~astropy.wcs.Wcsprm.cdfix`.

Parameters
----------

translate_units : str, optional
    Specify which potentially unsafe translations of non-standard unit
    strings to perform.  By default, performs all.

    Although ``"S"`` is commonly used to represent seconds, its
    translation to ``"s"`` is potentially unsafe since the standard
    recognizes ``"S"`` formally as Siemens, however rarely that may be
    used.  The same applies to ``"H"`` for hours (Henry), and ``"D"``
    for days (Debye).

    This string controls what to do in such cases, and is
    case-insensitive.

    - If the string contains ``"s"``, translate ``"S"`` to ``"s"``.

    - If the string contains ``"h"``, translate ``"H"`` to ``"h"``.

    - If the string contains ``"d"``, translate ``"D"`` to ``"d"``.

    Thus ``''`` doesn't do any unsafe translations, whereas ``'shd'``
    does all of them.

naxis : int array[naxis], optional
    Image axis lengths.  If this array is set to zero or ``None``,
    then `~astropy.wcs.Wcsprm.cylfix` will not be invoked.

Returns
-------
status : dict

    Returns a dictionary containing the following keys, each referring
    to a status string for each of the sub-fix functions that were
    called:

    - `~astropy.wcs.Wcsprm.cdfix`

    - `~astropy.wcs.Wcsprm.datfix`

    - `~astropy.wcs.Wcsprm.unitfix`

    - `~astropy.wcs.Wcsprm.celfix`

    - `~astropy.wcs.Wcsprm.spcfix`

    - `~astropy.wcs.Wcsprm.cylfix`
"""

get_offset = """
get_offset(x, y) -> (x, y)

Returns the offset as defined in the distortion lookup table.

Returns
-------
coordinate : coordinate pair
    The offset from the distortion table for pixel point (*x*, *y*).
"""

get_cdelt = """
get_cdelt() -> double array[naxis]

Coordinate increments (``CDELTia``) for each coord axis.

Returns the ``CDELT`` offsets in read-only form.  Unlike the
`~astropy.wcs.Wcsprm.cdelt` property, this works even when the header
specifies the linear transformation matrix in one of the alternative
``CDi_ja`` or ``CROTAia`` forms.  This is useful when you want access
to the linear transformation matrix, but don't care how it was
specified in the header.
"""

get_pc = """
get_pc() -> double array[naxis][naxis]

Returns the ``PC`` matrix in read-only form.  Unlike the
`~astropy.wcs.Wcsprm.pc` property, this works even when the header
specifies the linear transformation matrix in one of the alternative
``CDi_ja`` or ``CROTAia`` forms.  This is useful when you want access
to the linear transformation matrix, but don't care how it was
specified in the header.
"""

get_ps = """
get_ps() -> list of tuples

Returns ``PSi_ma`` keywords for each *i* and *m*.

Returns
-------
ps : list of tuples

    Returned as a list of tuples of the form (*i*, *m*, *value*):

    - *i*: int.  Axis number, as in ``PSi_ma``, (i.e. 1-relative)

    - *m*: int.  Parameter number, as in ``PSi_ma``, (i.e. 0-relative)

    - *value*: string.  Parameter value.

See also
--------
astropy.wcs.Wcsprm.set_ps : Set ``PSi_ma`` values
"""

get_pv = """
get_pv() -> list of tuples

Returns ``PVi_ma`` keywords for each *i* and *m*.

Returns
-------

    Returned as a list of tuples of the form (*i*, *m*, *value*):

    - *i*: int.  Axis number, as in ``PVi_ma``, (i.e. 1-relative)

    - *m*: int.  Parameter number, as in ``PVi_ma``, (i.e. 0-relative)

    - *value*: string. Parameter value.

See also
--------
astropy.wcs.Wcsprm.set_pv : Set ``PVi_ma`` values

Notes
-----

Note that, if they were not given, `~astropy.wcs.Wcsprm.set` resets
the entries for ``PVi_1a``, ``PVi_2a``, ``PVi_3a``, and ``PVi_4a`` for
longitude axis *i* to match (``phi_0``, ``theta_0``), the native
longitude and latitude of the reference point given by ``LONPOLEa``
and ``LATPOLEa``.
"""

has_cd = """
has_cd() -> bool

Returns `True` if ``CDi_ja`` is present.

``CDi_ja`` is an alternate specification of the linear transformation
matrix, maintained for historical compatibility.

Matrix elements in the IRAF convention are equivalent to the product
``CDi_ja = CDELTia * PCi_ja``, but the defaults differ from that of
the ``PCi_ja`` matrix.  If one or more ``CDi_ja`` keywords are present
then all unspecified ``CDi_ja`` default to zero.  If no ``CDi_ja`` (or
``CROTAia``) keywords are present, then the header is assumed to be in
``PCi_ja`` form whether or not any ``PCi_ja`` keywords are present
since this results in an interpretation of ``CDELTia`` consistent with
the original FITS specification.

While ``CDi_ja`` may not formally co-exist with ``PCi_ja``, it may
co-exist with ``CDELTia`` and ``CROTAia`` which are to be ignored.

See also
--------
astropy.wcs.Wcsprm.cd : Get the raw ``CDi_ja`` values.
"""

has_cdi_ja = """
has_cdi_ja() -> bool

Alias for `~astropy.wcs.Wcsprm.has_cd`.  Maintained for backward
compatibility.
"""

has_crota = """
has_crota() -> bool

Returns `True` if ``CROTAia`` is present.

``CROTAia`` is an alternate specification of the linear transformation
matrix, maintained for historical compatibility.

In the AIPS convention, ``CROTAia`` may only be associated with the
latitude axis of a celestial axis pair.  It specifies a rotation in
the image plane that is applied *after* the ``CDELTia``; any other
``CROTAia`` keywords are ignored.

``CROTAia`` may not formally co-exist with ``PCi_ja``.  ``CROTAia`` and
``CDELTia`` may formally co-exist with ``CDi_ja`` but if so are to be
ignored.

See also
--------
astropy.wcs.Wcsprm.crota : Get the raw ``CROTAia`` values
"""

has_crotaia = """
has_crotaia() -> bool

Alias for `~astropy.wcs.Wcsprm.has_crota`.  Maintained for backward
compatibility.
"""

has_pc = """
has_pc() -> bool

Returns `True` if ``PCi_ja`` is present.  ``PCi_ja`` is the
recommended way to specify the linear transformation matrix.

See also
--------
astropy.wcs.Wcsprm.pc : Get the raw ``PCi_ja`` values
"""

has_pci_ja = """
has_pci_ja() -> bool

Alias for `~astropy.wcs.Wcsprm.has_pc`.  Maintained for backward
compatibility.
"""

i = """
``int`` (read-only)

Image axis number.
"""

imgpix_matrix = """
``double array[2][2]`` (read-only) Inverse of the ``CDELT`` or ``PC``
matrix.

Inverse containing the product of the ``CDELTia`` diagonal matrix and
the ``PCi_ja`` matrix.
"""

is_unity = """
is_unity() -> bool

Returns `True` if the linear transformation matrix
(`~astropy.wcs.Wcsprm.cd`) is unity.
"""

K = """
``int array[M]`` (read-only) The lengths of the axes of the coordinate
array.

An array of length `M` whose elements record the lengths of the axes of
the coordinate array and of each indexing vector.
"""

kind = """
``str`` (read-only)

Character identifying the wcstab array type:

    - ``'c'``: coordinate array,
    - ``'i'``: index vector.
"""

lat = """
``int`` (read-only) The index into the world coord array containing
latitude values.
"""

latpole = """
``double`` The native latitude of the celestial pole, ``LATPOLEa`` (deg).
"""

lattyp = """
``string`` (read-only) Celestial axis type for latitude.

For example, "RA", "DEC", "GLON", "GLAT", etc. extracted from "RA--",
"DEC-", "GLON", "GLAT", etc. in the first four characters of
``CTYPEia`` but with trailing dashes removed.
"""

lng = """
``int`` (read-only) The index into the world coord array containing
longitude values.
"""

lngtyp = """
``string`` (read-only) Celestial axis type for longitude.

For example, "RA", "DEC", "GLON", "GLAT", etc. extracted from "RA--",
"DEC-", "GLON", "GLAT", etc. in the first four characters of
``CTYPEia`` but with trailing dashes removed.
"""

lonpole = """
``double`` The native longitude of the celestial pole.

``LONPOLEa`` (deg).
"""

M = """
``int`` (read-only) Number of tabular coordinate axes.
"""

m = """
``int`` (read-only)

Array axis number for index vectors.
"""

map = """
``int array[M]`` Association between axes.

A vector of length `~astropy.wcs.Tabprm.M` that defines
the association between axis *m* in the *M*-dimensional coordinate
array (1 <= *m* <= *M*) and the indices of the intermediate world
coordinate and world coordinate arrays.

When the intermediate and world coordinate arrays contain the full
complement of coordinate elements in image-order, as will usually be
the case, then ``map[m-1] == i-1`` for axis *i* in the *N*-dimensional
image (1 <= *i* <= *N*).  In terms of the FITS keywords::

    map[PVi_3a - 1] == i - 1.

However, a different association may result if the intermediate
coordinates, for example, only contains a (relevant) subset of
intermediate world coordinate elements.  For example, if *M* == 1 for
an image with *N* > 1, it is possible to fill the intermediate
coordinates with the relevant coordinate element with ``nelem`` set to
1.  In this case ``map[0] = 0`` regardless of the value of *i*.
"""

mix = """
mix(mixpix, mixcel, vspan, vstep, viter, world, pixcrd, origin)

Given either the celestial longitude or latitude plus an element of
the pixel coordinate, solves for the remaining elements by iterating
on the unknown celestial coordinate element using
`~astropy.wcs.Wcsprm.s2p`.

Parameters
----------
mixpix : int
    Which element on the pixel coordinate is given.

mixcel : int
    Which element of the celestial coordinate is given. If *mixcel* =
    ``1``, celestial longitude is given in ``world[self.lng]``,
    latitude returned in ``world[self.lat]``.  If *mixcel* = ``2``,
    celestial latitude is given in ``world[self.lat]``, longitude
    returned in ``world[self.lng]``.

vspan : pair of floats
    Solution interval for the celestial coordinate, in degrees.  The
    ordering of the two limits is irrelevant.  Longitude ranges may be
    specified with any convenient normalization, for example
    ``(-120,+120)`` is the same as ``(240,480)``, except that the
    solution will be returned with the same normalization, i.e. lie
    within the interval specified.

vstep : float
    Step size for solution search, in degrees.  If ``0``, a sensible,
    although perhaps non-optimal default will be used.

viter : int
    If a solution is not found then the step size will be halved and
    the search recommenced.  *viter* controls how many times the step
    size is halved.  The allowed range is 5 - 10.

world : double array[naxis]
    World coordinate elements.  ``world[self.lng]`` and
    ``world[self.lat]`` are the celestial longitude and latitude, in
    degrees.  Which is given and which returned depends on the value
    of *mixcel*.  All other elements are given.  The results will be
    written to this array in-place.

pixcrd : double array[naxis].
    Pixel coordinates.  The element indicated by *mixpix* is given and
    the remaining elements will be written in-place.

{0}

Returns
-------
result : dict

    Returns a dictionary with the following keys:

    - *phi* (double array[naxis])

    - *theta* (double array[naxis])

        - Longitude and latitude in the native coordinate system of
          the projection, in degrees.

    - *imgcrd* (double array[naxis])

        - Image coordinate elements.  ``imgcrd[self.lng]`` and
          ``imgcrd[self.lat]`` are the projected *x*- and
          *y*-coordinates, in decimal degrees.

    - *world* (double array[naxis])

        - Another reference to the *world* argument passed in.

Raises
------
MemoryError
    Memory allocation failed.

SingularMatrixError
    Linear transformation matrix is singular.

InconsistentAxisTypesError
    Inconsistent or unrecognized coordinate axis types.

ValueError
    Invalid parameter value.

InvalidTransformError
    Invalid coordinate transformation parameters.

InvalidTransformError
    Ill-conditioned coordinate transformation parameters.

InvalidCoordinateError
    Invalid world coordinate.

NoSolutionError
    No solution found in the specified interval.

See also
--------
astropy.wcs.Wcsprm.lat, astropy.wcs.Wcsprm.lng
    Get the axes numbers for latitude and longitude

Notes
-----

Initially, the specified solution interval is checked to see if it's a
\"crossing\" interval.  If it isn't, a search is made for a crossing
solution by iterating on the unknown celestial coordinate starting at
the upper limit of the solution interval and decrementing by the
specified step size.  A crossing is indicated if the trial value of
the pixel coordinate steps through the value specified.  If a crossing
interval is found then the solution is determined by a modified form
of \"regula falsi\" division of the crossing interval.  If no crossing
interval was found within the specified solution interval then a
search is made for a \"non-crossing\" solution as may arise from a
point of tangency.  The process is complicated by having to make
allowance for the discontinuities that occur in all map projections.

Once one solution has been determined others may be found by
subsequent invocations of `~astropy.wcs.Wcsprm.mix` with suitably
restricted solution intervals.

Note the circumstance that arises when the solution point lies at a
native pole of a projection in which the pole is represented as a
finite curve, for example the zenithals and conics.  In such cases two
or more valid solutions may exist but `~astropy.wcs.Wcsprm.mix` only
ever returns one.

Because of its generality, `~astropy.wcs.Wcsprm.mix` is very
compute-intensive.  For compute-limited applications, more efficient
special-case solvers could be written for simple projections, for
example non-oblique cylindrical projections.
""".format(__.ORIGIN())

mjdavg = """
``double`` Modified Julian Date corresponding to ``DATE-AVG``.

``(MJD = JD - 2400000.5)``.

An undefined value is represented by NaN.

See also
--------
astropy.wcs.Wcsprm.mjdobs
"""

mjdobs = """
``double`` Modified Julian Date corresponding to ``DATE-OBS``.

``(MJD = JD - 2400000.5)``.

An undefined value is represented by NaN.

See also
--------
astropy.wcs.Wcsprm.mjdavg
"""

name = """
``string`` The name given to the coordinate representation
``WCSNAMEa``.
"""

naxis = """
``int`` (read-only) The number of axes (pixel and coordinate).

Given by the ``NAXIS`` or ``WCSAXESa`` keyvalues.

The number of coordinate axes is determined at parsing time, and can
not be subsequently changed.

It is determined from the highest of the following:

  1. ``NAXIS``

  2. ``WCSAXESa``

  3. 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.

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.

This value may differ for different coordinate representations of the
same image.
"""

nc = """
``int`` (read-only) Total number of coord vectors in the coord array.

Total number of coordinate vectors in the coordinate array being the
product K_1 * K_2 * ... * K_M.
"""

ndim = """
``int`` (read-only)

Expected dimensionality of the wcstab array.
"""

obsgeo = """
``double array[3]`` Location of the observer in a standard terrestrial
reference frame.

``OBSGEO-X``, ``OBSGEO-Y``, ``OBSGEO-Z`` (in meters).

An undefined value is represented by NaN.
"""

p0 = """
``int array[M]`` Interpolated indices into the coordinate array.

Vector of length `~astropy.wcs.Tabprm.M` of interpolated
indices into the coordinate array such that Upsilon_m, as defined in
Paper III, is equal to ``(p0[m] + 1) + delta[m]``.
"""

p2s = """
p2s(pixcrd, origin)

Converts pixel to world coordinates.

Parameters
----------

pixcrd : double array[ncoord][nelem]
    Array of pixel coordinates.

{0}

Returns
-------
result : dict
    Returns a dictionary with the following keys:

    - *imgcrd*: double array[ncoord][nelem]

      - Array of intermediate world coordinates.  For celestial axes,
        ``imgcrd[][self.lng]`` and ``imgcrd[][self.lat]`` are the
        projected *x*-, and *y*-coordinates, in pseudo degrees.  For
        spectral axes, ``imgcrd[][self.spec]`` is the intermediate
        spectral coordinate, in SI units.

    - *phi*: double array[ncoord]

    - *theta*: double array[ncoord]

      - Longitude and latitude in the native coordinate system of the
        projection, in degrees.

    - *world*: double array[ncoord][nelem]

      - Array of world coordinates.  For celestial axes,
        ``world[][self.lng]`` and ``world[][self.lat]`` are the
        celestial longitude and latitude, in degrees.  For spectral
        axes, ``world[][self.spec]`` is the intermediate spectral
        coordinate, in SI units.

    - *stat*: int array[ncoord]

      - Status return value for each coordinate. ``0`` for success,
        ``1+`` for invalid pixel coordinate.

Raises
------

MemoryError
    Memory allocation failed.

SingularMatrixError
    Linear transformation matrix is singular.

InconsistentAxisTypesError
    Inconsistent or unrecognized coordinate axis types.

ValueError
    Invalid parameter value.

ValueError
    *x*- and *y*-coordinate arrays are not the same size.

InvalidTransformError
    Invalid coordinate transformation parameters.

InvalidTransformError
    Ill-conditioned coordinate transformation parameters.

See also
--------
astropy.wcs.Wcsprm.lat, astropy.wcs.Wcsprm.lng
    Definition of the latitude and longitude axes
""".format(__.ORIGIN())

p4_pix2foc = """
p4_pix2foc(*pixcrd, origin*) -> double array[ncoord][nelem]

Convert pixel coordinates to focal plane coordinates using `distortion
paper`_ lookup-table correction.

Parameters
----------
pixcrd : double array[ncoord][nelem].
    Array of pixel coordinates.

{0}

Returns
-------
foccrd : double array[ncoord][nelem]
    Returns an array of focal plane coordinates.

Raises
------
MemoryError
    Memory allocation failed.

ValueError
    Invalid coordinate transformation parameters.
""".format(__.ORIGIN())

pc = """
``double array[naxis][naxis]`` The ``PCi_ja`` (pixel coordinate)
transformation matrix.

The order is::

  [[PC1_1, PC1_2],
   [PC2_1, PC2_2]]

For historical compatibility, three alternate specifications of the
linear transformations are available in wcslib.  The canonical
``PCi_ja`` with ``CDELTia``, ``CDi_ja``, and the deprecated
``CROTAia`` keywords.  Although the latter may not formally co-exist
with ``PCi_ja``, the approach here is simply to ignore them if given
in conjunction with ``PCi_ja``.

`~astropy.wcs.Wcsprm.has_pc`, `~astropy.wcs.Wcsprm.has_cd` and
`~astropy.wcs.Wcsprm.has_crota` can be used to determine which of
these alternatives are present in the header.

These alternate specifications of the linear transformation matrix are
translated immediately to ``PCi_ja`` by `~astropy.wcs.Wcsprm.set` and
are nowhere visible to the lower-level routines.  In particular,
`~astropy.wcs.Wcsprm.set` resets `~astropy.wcs.Wcsprm.cdelt` to unity
if ``CDi_ja`` is present (and no ``PCi_ja``).  If no ``CROTAia`` is
associated with the latitude axis, `~astropy.wcs.Wcsprm.set` reverts
to a unity ``PCi_ja`` matrix.
"""

phi0 = """
``double`` The native latitude of the fiducial point.

The point whose celestial coordinates are given in ``ref[1:2]``.  If
undefined (NaN) the initialization routine, `~astropy.wcs.Wcsprm.set`,
will set this to a projection-specific default.

See also
--------
astropy.wcs.Wcsprm.theta0
"""

pix2foc = """
pix2foc(*pixcrd, origin*) -> double array[ncoord][nelem]

Perform both `SIP`_ polynomial and `distortion paper`_ lookup-table
correction in parallel.

Parameters
----------
pixcrd : double array[ncoord][nelem]
    Array of pixel coordinates.

{0}

Returns
-------
foccrd : double array[ncoord][nelem]
    Returns an array of focal plane coordinates.

Raises
------
MemoryError
    Memory allocation failed.

ValueError
    Invalid coordinate transformation parameters.
""".format(__.ORIGIN())

piximg_matrix = """
``double array[2][2]`` (read-only) Matrix containing the product of
the ``CDELTia`` diagonal matrix and the ``PCi_ja`` matrix.
"""

print_contents = """
print_contents()

Print the contents of the `~astropy.wcs.Wcsprm` object to stdout.
Probably only useful for debugging purposes, and may be removed in the
future.

To get a string of the contents, use `repr`.
"""

print_contents_tabprm = """
print_contents()

Print the contents of the `~astropy.wcs.Tabprm` object to
stdout.  Probably only useful for debugging purposes, and may be
removed in the future.

To get a string of the contents, use `repr`.
"""

radesys = """
``string`` The equatorial or ecliptic coordinate system type,
``RADESYSa``.
"""

restfrq = """
``double`` Rest frequency (Hz) from ``RESTFRQa``.

An undefined value is represented by NaN.
"""

restwav = """
``double`` Rest wavelength (m) from ``RESTWAVa``.

An undefined value is represented by NaN.
"""

row = """
``int`` (read-only)

Table row number.
"""

s2p = """
s2p(world, origin)

Transforms world coordinates to pixel coordinates.

Parameters
----------
world : double array[ncoord][nelem]
    Array of world coordinates, in decimal degrees.

{0}

Returns
-------
result : dict
    Returns a dictionary with the following keys:

    - *phi*: double array[ncoord]

    - *theta*: double array[ncoord]

        - Longitude and latitude in the native coordinate system of
          the projection, in degrees.

    - *imgcrd*: double array[ncoord][nelem]

       - Array of intermediate world coordinates.  For celestial axes,
         ``imgcrd[][self.lng]`` and ``imgcrd[][self.lat]`` are the
         projected *x*-, and *y*-coordinates, in pseudo \"degrees\".
         For quadcube projections with a ``CUBEFACE`` axis, the face
         number is also returned in ``imgcrd[][self.cubeface]``.  For
         spectral axes, ``imgcrd[][self.spec]`` is the intermediate
         spectral coordinate, in SI units.

    - *pixcrd*: double array[ncoord][nelem]

        - Array of pixel coordinates.  Pixel coordinates are
          zero-based.

    - *stat*: int array[ncoord]

        - Status return value for each coordinate. ``0`` for success,
          ``1+`` for invalid pixel coordinate.

Raises
------
MemoryError
    Memory allocation failed.

SingularMatrixError
    Linear transformation matrix is singular.

InconsistentAxisTypesError
    Inconsistent or unrecognized coordinate axis types.

ValueError
    Invalid parameter value.

InvalidTransformError
   Invalid coordinate transformation parameters.

InvalidTransformError
    Ill-conditioned coordinate transformation parameters.

See also
--------
astropy.wcs.Wcsprm.lat, astropy.wcs.Wcsprm.lng
    Definition of the latitude and longitude axes
""".format(__.ORIGIN())

sense = """
``int array[M]`` +1 if monotonically increasing, -1 if decreasing.

A vector of length `~astropy.wcs.Tabprm.M` whose elements
indicate whether the corresponding indexing vector is monotonically
increasing (+1), or decreasing (-1).
"""

set = """
set()

Sets up a WCS object for use according to information supplied within
it.

Note that this routine need not be called directly; it will be invoked
by `~astropy.wcs.Wcsprm.p2s` and `~astropy.wcs.Wcsprm.s2p` if
necessary.

Some attributes that are based on other attributes (such as
`~astropy.wcs.Wcsprm.lattyp` on `~astropy.wcs.Wcsprm.ctype`) may not
be correct until after `~astropy.wcs.Wcsprm.set` is called.

`~astropy.wcs.Wcsprm.set` strips off trailing blanks in all string
members.

`~astropy.wcs.Wcsprm.set` recognizes the ``NCP`` projection and
converts it to the equivalent ``SIN`` projection and it also
recognizes ``GLS`` as a synonym for ``SFL``.  It does alias
translation for the AIPS spectral types (``FREQ-LSR``, ``FELO-HEL``,
etc.) but without changing the input header keywords.

Raises
------
MemoryError
    Memory allocation failed.

SingularMatrixError
    Linear transformation matrix is singular.

InconsistentAxisTypesError
    Inconsistent or unrecognized coordinate axis types.

ValueError
    Invalid parameter value.

InvalidTransformError
    Invalid coordinate transformation parameters.

InvalidTransformError
    Ill-conditioned coordinate transformation parameters.
"""

set_tabprm = """
set()

Allocates memory for work arrays.

Also sets up the class according to information supplied within it.

Note that this routine need not be called directly; it will be invoked
by functions that need it.

Raises
------
MemoryError
    Memory allocation failed.

InvalidTabularParameters
    Invalid tabular parameters.
"""

set_ps = """
set_ps(ps)

Sets ``PSi_ma`` keywords for each *i* and *m*.

Parameters
----------
ps : sequence of tuples

    The input must be a sequence of tuples of the form (*i*, *m*,
    *value*):

    - *i*: int.  Axis number, as in ``PSi_ma``, (i.e. 1-relative)

    - *m*: int.  Parameter number, as in ``PSi_ma``, (i.e. 0-relative)

    - *value*: string.  Parameter value.

See also
--------
astropy.wcs.Wcsprm.get_ps
"""

set_pv = """
set_pv(pv)

Sets ``PVi_ma`` keywords for each *i* and *m*.

Parameters
----------
pv : list of tuples

    The input must be a sequence of tuples of the form (*i*, *m*,
    *value*):

    - *i*: int.  Axis number, as in ``PVi_ma``, (i.e. 1-relative)

    - *m*: int.  Parameter number, as in ``PVi_ma``, (i.e. 0-relative)

    - *value*: float.  Parameter value.

See also
--------
astropy.wcs.Wcsprm.get_pv
"""

sip = """
Get/set the `~astropy.wcs.Sip` object for performing `SIP`_ distortion
correction.
"""

Sip = """
Sip(*a, b, ap, bp, crpix*)

The `~astropy.wcs.Sip` class performs polynomial distortion correction
using the `SIP`_ convention in both directions.

Parameters
----------
a : double array[m+1][m+1]
    The ``A_i_j`` polynomial for pixel to focal plane transformation.
    Its size must be (*m* + 1, *m* + 1) where *m* = ``A_ORDER``.

b : double array[m+1][m+1]
    The ``B_i_j`` polynomial for pixel to focal plane transformation.
    Its size must be (*m* + 1, *m* + 1) where *m* = ``B_ORDER``.

ap : double array[m+1][m+1]
    The ``AP_i_j`` polynomial for pixel to focal plane transformation.
    Its size must be (*m* + 1, *m* + 1) where *m* = ``AP_ORDER``.

bp : double array[m+1][m+1]
    The ``BP_i_j`` polynomial for pixel to focal plane transformation.
    Its size must be (*m* + 1, *m* + 1) where *m* = ``BP_ORDER``.

crpix : double array[2]
    The reference pixel.

Notes
-----
Shupe, D. L., M. Moshir, J. Li, D. Makovoz and R. Narron.  2005.
"The SIP Convention for Representing Distortion in FITS Image
Headers."  ADASS XIV.
"""

sip_foc2pix = """
sip_foc2pix(*foccrd, origin*) -> double array[ncoord][nelem]

Convert focal plane coordinates to pixel coordinates using the `SIP`_
polynomial distortion convention.

Parameters
----------
foccrd : double array[ncoord][nelem]
    Array of focal plane coordinates.

{0}

Returns
-------
pixcrd : double array[ncoord][nelem]
    Returns an array of pixel coordinates.

Raises
------
MemoryError
    Memory allocation failed.

ValueError
    Invalid coordinate transformation parameters.
""".format(__.ORIGIN())

sip_pix2foc = """
sip_pix2foc(*pixcrd, origin*) -> double array[ncoord][nelem]

Convert pixel coordinates to focal plane coordinates using the `SIP`_
polynomial distortion convention.

Parameters
----------
pixcrd : double array[ncoord][nelem]
    Array of pixel coordinates.

{0}

Returns
-------
foccrd : double array[ncoord][nelem]
    Returns an array of focal plane coordinates.

Raises
------
MemoryError
    Memory allocation failed.

ValueError
    Invalid coordinate transformation parameters.
""".format(__.ORIGIN())

spcfix = """
spcfix() -> int

Translates AIPS-convention spectral coordinate types.  {``FREQ``,
``VELO``, ``FELO``}-{``OBS``, ``HEL``, ``LSR``} (e.g. ``FREQ-LSR``,
``VELO-OBS``, ``FELO-HEL``)

Returns
-------
success : int
    Returns ``0`` for success; ``-1`` if no change required.
"""

spec = """
``int`` (read-only) The index containing the spectral axis values.
"""

specsys = """
``string`` Spectral reference frame (standard of rest), ``SPECSYSa``.

See also
--------
astropy.wcs.Wcsprm.ssysobs, astropy.wcs.Wcsprm.velosys
"""

sptr = """
sptr(ctype, i=-1)

Translates the spectral axis in a WCS object.

For example, a ``FREQ`` axis may be translated into ``ZOPT-F2W`` and
vice versa.

Parameters
----------
ctype : str
    Required spectral ``CTYPEia``, maximum of 8 characters.  The first
    four characters are required to be given and are never modified.
    The remaining four, the algorithm code, are completely determined
    by, and must be consistent with, the first four characters.
    Wildcarding may be used, i.e.  if the final three characters are
    specified as ``\"???\"``, or if just the eighth character is
    specified as ``\"?\"``, the correct algorithm code will be
    substituted and returned.

i : int
    Index of the spectral axis (0-relative).  If ``i < 0`` (or not
    provided), it will be set to the first spectral axis identified
    from the ``CTYPE`` keyvalues in the FITS header.

Raises
------
MemoryError
    Memory allocation failed.

SingularMatrixError
    Linear transformation matrix is singular.

InconsistentAxisTypesError
    Inconsistent or unrecognized coordinate axis types.

ValueError
    Invalid parameter value.

InvalidTransformError
    Invalid coordinate transformation parameters.

InvalidTransformError
    Ill-conditioned coordinate transformation parameters.

InvalidSubimageSpecificationError
    Invalid subimage specification (no spectral axis).
"""

ssysobs = """
``string`` Spectral reference frame.

The spectral reference frame in which there is no differential
variation in the spectral coordinate across the field-of-view,
``SSYSOBSa``.

See also
--------
astropy.wcs.Wcsprm.specsys, astropy.wcs.Wcsprm.velosys
"""

ssyssrc = """
``string`` Spectral reference frame for redshift.

The spectral reference frame (standard of rest) in which the redshift
was measured, ``SSYSSRCa``.
"""

sub = """
sub(axes)

Extracts the coordinate description for a subimage from a
`~astropy.wcs.WCS` object.

The world coordinate system of the subimage must be separable in the
sense that the world coordinates at any point in the subimage must
depend only on the pixel coordinates of the axes extracted.  In
practice, this means that the ``PCi_ja`` matrix of the original image
must not contain non-zero off-diagonal terms that associate any of the
subimage axes with any of the non-subimage axes.

`sub` can also add axes to a wcsprm object.  The new axes will be
created using the defaults set by the Wcsprm constructor which produce
a simple, unnamed, linear axis with world coordinates equal to the
pixel coordinate.  These default values can be changed before
invoking `set`.

Parameters
----------
axes : int or a sequence.

    - If an int, include the first *N* axes in their original order.

    - If a sequence, may contain a combination of image axis numbers
      (1-relative) or special axis identifiers (see below).  Order is
      significant; ``axes[0]`` is the axis number of the input image
      that corresponds to the first axis in the subimage, etc.  Use an
      axis number of 0 to create a new axis using the defaults.

    - If ``0``, ``[]`` or ``None``, do a deep copy.

    Coordinate axes types may be specified using either strings or
    special integer constants.  The available types are:

    - ``'longitude'`` / ``WCSSUB_LONGITUDE``: Celestial longitude

    - ``'latitude'`` / ``WCSSUB_LATITUDE``: Celestial latitude

    - ``'cubeface'`` / ``WCSSUB_CUBEFACE``: Quadcube ``CUBEFACE`` axis

    - ``'spectral'`` / ``WCSSUB_SPECTRAL``: Spectral axis

    - ``'stokes'`` / ``WCSSUB_STOKES``: Stokes axis

    - ``'celestial'`` / ``WCSSUB_CELESTIAL``: An alias for the
      combination of ``'longitude'``, ``'latitude'`` and ``'cubeface'``.

Returns
-------
new_wcs : `~astropy.wcs.WCS` object

Raises
------
MemoryError
    Memory allocation failed.

InvalidSubimageSpecificationError
    Invalid subimage specification (no spectral axis).

NonseparableSubimageCoordinateSystem
    Non-separable subimage coordinate system.

Notes
-----
Combinations of subimage axes of particular types may be extracted in
the same order as they occur in the input image by combining the
integer constants with the 'binary or' (``|``) operator.  For
example::

    wcs.sub([WCSSUB_LONGITUDE | WCSSUB_LATITUDE | WCSSUB_SPECTRAL])

would extract the longitude, latitude, and spectral axes in the same
order as the input image.  If one of each were present, the resulting
object would have three dimensions.

For convenience, ``WCSSUB_CELESTIAL`` is defined as the combination
``WCSSUB_LONGITUDE | WCSSUB_LATITUDE | WCSSUB_CUBEFACE``.

The codes may also be negated to extract all but the types specified,
for example::

    wcs.sub([
      WCSSUB_LONGITUDE,
      WCSSUB_LATITUDE,
      WCSSUB_CUBEFACE,
      -(WCSSUB_SPECTRAL | WCSSUB_STOKES)])

The last of these specifies all axis types other than spectral or
Stokes.  Extraction is done in the order specified by ``axes``, i.e. a
longitude axis (if present) would be extracted first (via ``axes[0]``)
and not subsequently (via ``axes[3]``).  Likewise for the latitude and
cubeface axes in this example.

The number of dimensions in the returned object may be less than or
greater than the length of ``axes``.  However, it will never exceed the
number of axes in the input image.
"""

tab = """
``list of Tabprm`` Tabular coordinate objects.

A list of tabular coordinate objects associated with this WCS.
"""

Tabprm = """
A class to store the information related to tabular coordinates,
i.e., coordinates that are defined via a lookup table.

This class can not be constructed directly from Python, but instead is
returned from `~astropy.wcs.Wcsprm.tab`.
"""

theta0 = """
``double``  The native longitude of the fiducial point.

The point whose celestial coordinates are given in ``ref[1:2]``.  If
undefined (NaN) the initialization routine, `~astropy.wcs.Wcsprm.set`,
will set this to a projection-specific default.

See also
--------
astropy.wcs.Wcsprm.phi0
"""

to_header = """
to_header(relax=False)

`to_header` translates a WCS object into a FITS header.

The details of the header depends on context:

    - If the `~astropy.wcs.Wcsprm.colnum` member is non-zero then a
      binary table image array header will be produced.

    - Otherwise, if the `~astropy.wcs.Wcsprm.colax` member is set
      non-zero then a pixel list header will be produced.

    - Otherwise, a primary image or image extension header will be
      produced.

The output header will almost certainly differ from the input in a
number of respects:

    1. The output header only contains WCS-related keywords.  In
       particular, it does not contain syntactically-required keywords
       such as ``SIMPLE``, ``NAXIS``, ``BITPIX``, or ``END``.

    2. Deprecated (e.g. ``CROTAn``) or non-standard usage will be
       translated to standard (this is partially dependent on whether
       ``fix`` was applied).

    3. Quantities will be converted to the units used internally,
       basically SI with the addition of degrees.

    4. Floating-point quantities may be given to a different decimal
       precision.

    5. Elements of the ``PCi_j`` 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.

    6. Additional keywords such as ``WCSAXES``, ``CUNITia``,
       ``LONPOLEa`` and ``LATPOLEa`` may appear.

    7. The original keycomments will be lost, although
       `~astropy.wcs.Wcsprm.to_header` tries hard to write meaningful
       comments.

    8. Keyword order may be changed.

Keywords can be translated between the image array, binary table, and
pixel lists forms by manipulating the `~astropy.wcs.Wcsprm.colnum` or
`~astropy.wcs.Wcsprm.colax` members of the `~astropy.wcs.WCS`
object.

Parameters
----------

relax : bool or int
    Degree of permissiveness:

    - `False`: Recognize only FITS keywords defined by the published
      WCS standard.

    - `True`: Admit all recognized informal extensions of the WCS
      standard.

    - `int`: a bit field selecting specific extensions to write.
      See :ref:`relaxwrite` for details.

Returns
-------
header : str
    Raw FITS header as a string.
"""

ttype = """
``str`` (read-only)

``TTYPEn`` identifying the column of the binary table that contains
the wcstab array.
"""

unitfix = """
unitfix(translate_units='')

Translates non-standard ``CUNITia`` keyvalues.

For example, ``DEG`` -> ``deg``, also stripping off unnecessary
whitespace.

Parameters
----------
translate_units : str, optional
    Do potentially unsafe translations of non-standard unit strings.

    Although ``\"S\"`` is commonly used to represent seconds, its
    recognizes ``\"S\"`` formally as Siemens, however rarely that may
    be translation to ``\"s\"`` is potentially unsafe since the
    standard used.  The same applies to ``\"H\"`` for hours (Henry),
    and ``\"D\"`` for days (Debye).

    This string controls what to do in such cases, and is
    case-insensitive.

    - If the string contains ``\"s\"``, translate ``\"S\"`` to ``\"s\"``.

    - If the string contains ``\"h\"``, translate ``\"H\"`` to ``\"h\"``.

    - If the string contains ``\"d\"``, translate ``\"D\"`` to ``\"d\"``.

    Thus ``''`` doesn't do any unsafe translations, whereas ``'shd'``
    does all of them.

Returns
-------
success : int
    Returns ``0`` for success; ``-1`` if no change required.
"""

velangl = """
``double`` Velocity angle.

The angle in degrees that should be used to decompose an observed
velocity into radial and transverse components.

An undefined value is represented by NaN.
"""

velosys = """
``double`` Relative radial velocity.

The relative radial velocity (m/s) between the observer and the
selected standard of rest in the direction of the celestial reference
coordinate, ``VELOSYSa``.

An undefined value is represented by NaN.

See also
--------
astropy.wcs.Wcsprm.specsys, astropy.wcs.Wcsprm.ssysobs
"""

velref = """
``int`` AIPS velocity code.

From ``VELREF`` keyword.
"""

wcs = """
A `~astropy.wcs.Wcsprm` object to perform the basic `wcslib`_ WCS
transformation.
"""

Wcs = """
Wcs(*sip, cpdis, wcsprm, det2im*)

Wcs objects amalgamate basic WCS (as provided by `wcslib`_), with
`SIP`_ and `distortion paper`_ operations.

To perform all distortion corrections and WCS transformation, use
``all_pix2world``.

Parameters
----------
sip : `~astropy.wcs.Sip` object or `None`

cpdis : A pair of `~astropy.wcs.DistortionLookupTable` objects, or
  ``(None, None)``.

wcsprm : `~astropy.wcs.Wcsprm` object

det2im : A pair of `~astropy.wcs.DistortionLookupTable` objects, or
   ``(None, None)``.
"""

Wcsprm = """
Wcsprm(header=None, key=' ', relax=False, naxis=2, keysel=0, colsel=None)

`~astropy.wcs.Wcsprm` performs the core WCS transformations.

.. note::
    The members of this object correspond roughly to the key/value
    pairs in the FITS header.  However, they are adjusted and
    normalized in a number of ways that make performing the WCS
    transformation easier.  Therefore, they can not be relied upon to
    get the original values in the header.  For that, use
    `astropy.io.fits.Header` directly.

The FITS header parsing enforces correct FITS "keyword = value" syntax
with regard to the equals sign occurring in columns 9 and 10.
However, it does 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.

Parameters
----------
header : An `astropy.io.fits.Header`, string, or `None`.
  If ``None``, the object will be initialized to default values.

key : str, optional
    The key referring to a particular WCS transform in the header.
    This may be either ``' '`` or ``'A'``-``'Z'`` and corresponds to
    the ``\"a\"`` part of ``\"CTYPEia\"``.  (*key* may only be
    provided if *header* is also provided.)

relax : bool or int, optional

    Degree of permissiveness:

    - `False`: Recognize only FITS keywords defined by the published
      WCS standard.

    - `True`: Admit all recognized informal extensions of the WCS
      standard.

    - `int`: a bit field selecting specific extensions to accept.  See
      :ref:`relaxread` for details.

naxis : int, optional
    The number of world coordinates axes for the object.  (*naxis* may
    only be provided if *header* is `None`.)

keysel : sequence of flag bits, optional
    Vector of flag bits that may be used to restrict the keyword types
    considered:

        - ``WCSHDR_IMGHEAD``: Image header keywords.

        - ``WCSHDR_BIMGARR``: Binary table image array.

        - ``WCSHDR_PIXLIST``: Pixel list keywords.

    If zero, there is no restriction.  If -1, the underlying wcslib
    function ``wcspih()`` is called, rather than ``wcstbh()``.

colsel : sequence of int
    A sequence of table column numbers used to restrict the keywords
    considered.  `None` indicates no restriction.

Raises
------
MemoryError
     Memory allocation failed.

ValueError
     Invalid key.

KeyError
     Key not found in FITS header.
"""

Wtbarr = """
Classes to construct coordinate lookup tables from a binary table
extension (BINTABLE).

This class can not be constructed directly from Python, but instead is
returned from `~astropy.wcs.Wcsprm.wtb`.
"""

zsource = """
``double`` The redshift, ``ZSOURCEa``, of the source.

An undefined value is represented by NaN.
"""

WcsError = """
Base class of all invalid WCS errors.
"""

SingularMatrix = """
SingularMatrixError()

The linear transformation matrix is singular.
"""

InconsistentAxisTypes = """
InconsistentAxisTypesError()

The WCS header inconsistent or unrecognized coordinate axis type(s).
"""

InvalidTransform = """
InvalidTransformError()

The WCS transformation is invalid, or the transformation parameters
are invalid.
"""

InvalidCoordinate = """
InvalidCoordinateError()

One or more of the world coordinates is invalid.
"""

NoSolution = """
NoSolutionError()

No solution can be found in the given interval.
"""

InvalidSubimageSpecification = """
InvalidSubimageSpecificationError()

The subimage specification is invalid.
"""

NonseparableSubimageCoordinateSystem = """
NonseparableSubimageCoordinateSystemError()

Non-separable subimage coordinate system.
"""

NoWcsKeywordsFound = """
NoWcsKeywordsFoundError()

No WCS keywords were found in the given header.
"""

InvalidTabularParameters = """
InvalidTabularParametersError()

The given tabular parameters are invalid.
"""