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
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
|
Log of Changes Made to CFITSIO
Version 2.501 - 2 December 2004
New Routines:
- added fits_open_diskfile and fits_create_diskfile routines that simply
open or create a FITS file with a specified name. CFITSIO does not
try to parse the name using the extended filename syntax.
- 2 new C functions, CFITS2Unit and CUnit2FITS, were added to convert
between the C fitsfile pointer value and the Fortran unit number.
These functions may be useful in mixed language C and Fortran programs.
Enhancements:
- added the ability to recognize and open a compressed FITS file
(compressed with gzip or unix compress) on the stdin standard input
stream.
- Craig Markwardt (GSFC) provided 2 more lexical parser functions:
accum(x) and seqdiff(x) that compute the cummulative sum and the
sequential difference of the values of x.
- modified putcole.c and putcold.c so that when writing arrays of
pixels to the FITS image or column that contain null values, and
there are also numerical overflows when converting some of the
non-null values to the FITS values, CFITSIO will now ignore the
overflow error until after all the data have been written. Previously,
in some circumstances CFITSIO would have simply stopped writing any
data after the first overflow error.
- modified fitsio2.h to try to eliminate compiler warning messages
on some platforms about the use of 'long long' constants when
defining the value of LONGLONG_MAX (whether to use L or LL
suffix).
- modified region.c to support 'physical' regions in addition to
'image', 'fk4', etc.
- modified ffiurl (input filename parsing routine) to increase the
maximum allowed extension number that can be specified from 9999
to 99999 (e.g. 'myfile.fits+99999')
Bug Fixes:
- added check to fits_create_template to force it to start with
the primary array in the template file, in case an extension
number was specified as part of the template FITS file name.
Version 2.500 - 28 & 30 July 2004
New Routine:
- fits_file_exists tests whether the specified input file, or a
compressed version of the file, exists on disk.
Enhancements:
- modified the way CFITSIO reads and writes data in COMPLEX ('C') and
DBLCOMPLEX 'M' columns. Now, in all cases, when referring to the
number of elements in the vector, or the value of the offset to a
particular element within the vector, CFITSIO considers each pair of
numbers (the imaginary and real parts) as a single element instead of
treating each single number as an element. In particular, this changes
the behavior of fits_write_col_null when writing to complex columns.
It also changes the length of the 'nullarray' vector in the
fits_read_colnull routine; it is now only 1/2 as long as before.
Each element of the nullarray is set = 1 if either the real or
imaginary parts of the corresponding complex value have a null
value.(this change was added to version 2.500 on 30 July).
- Craig Markwardt, at GSFC, provided a number of significant enhancements
to the CFITSIO lexical parser that is used to evaluate expressions:
- the parser now can operate on bit columns ('X') in a similar
way as for other numeric columns (e.g., 'B' or 'I' columns)
- range checking has been implemented, so that the following
conditions return a Null value, rather than returning an error:
divide by zero, sqrt(negative), arccos(>1), arcsin(>1),
log(negative), log10(negative)
- new vector functions: MEDIAN, AVERAGE, STDDEV, and
NVALID (returns the number of non-null values in the vector)
- all the new functions (and SUM, MIN and MAX) ignore null values
- modified the iterator to support variable-length array columns
- modified configure to support AIX systems that have flock in a non-
standard location.
- modified configure to remove the -D_FILE_OFFSET_BITS flag when running
on Mac Darwin systems. This caused conflicts with the Fortran
wrappers, and should only be needed in any case when using CFITSIO
to read/write FITS files greater than 2.1 GB in size.
- modified fitsio2.h to support compilers that define LONG_LONG_MAX.
- modified ffrsim (resize an existing image) so that it supports changing
the datatype to an unsigned integer image using the USHORT_IMG and
ULONG_IMG definitions.
- modified the disk file driver (drvrfile.c) so that if an output
file is specified when opening an ordinary file (e.g. with the syntax
'myfile.fits(outputfile.fits)' then it will make a copy of the file,
close the original file and open the copy. Previously, the
specified output file would be ignored unless the file was compressed.
- modified f77_wrap.h and f77_wrap3.c to support the Fortran wrappers
on 64-bit AMD Opteron machines
Bug fixes:
- made small change to ffsrow in eval_f.c to avoid potential array
bounds overflow.
- made small change to group.c to fix problem where an 'int' was
incorrectly being cast to a 'long'.
- corrected a memory allocation error in the new fits_hdr2str routine
that was added in version 2.48
- The on-the-fly row-selection filtering would fail with a segfault
if the length of a table row (NAXIS1 value) was greater than
500000 bytes. A small change to eval_f.c was required to fix this.
Version 2.490 - 11 February 2004
Bug fixes:
- fixed a bug that was introduced in the previous release, which caused
the CFITSIO parser to no longer move to a named extension when opening
a FITS file, e.g., when opening myfile.fit[events] CFITSIO would just
open the primary array instead of moving to the EVENTS extension.
- new group.c file from the INTEGRAL Science Data Center. It fixes
a problem when you attach a child to a parent and they are both
is the same file, but, that parent contains groups in other files.
In certain cases the attach would not happen because it seemed that
the new child was already in the parent group.
- fixed bug in fits_calculator_rng when performing a calculation
on a range of rows in a table, so that it does not reset the
value in all the other rows that are not in the range = 0.
- modified fits_write_chksum so that it updates the TFORMn
keywords for any variable length vector table columns BEFORE
calculating the CHECKSUM values. Otherwise the CHECKSUM
value is invalidated when the HDU is subsequently closed.
Version 2.480 - 28 January 2004
New Routines:
- fits_get_img_equivtype - just like fits_get_img_type, except in
the case of scaled integer images, it returns the 'equivalent'
data type that is necessary to store the scaled data values.
- fits_hdr2str copies all the header keywords in the current HDU
into a single long character string. This is a convenient method
of passing the header information to other subroutines.
The user may exclude any specified keywords from the list.
Enhancements:
- modified the filename parser so that it accepts extension
names that begin with digits, as in 'myfile.fits[123TEST]'.
In this case CFITSIO will try to open the extension with
EXTNAME = '123TEST' instead of trying to move to the 123rd
extension in the file.
- the template keyword parser now preserves the comments on the
the mandatory FITS keywords if present, otherwise a standard
default comment is provided.
- modified the ftp driver file (drvrnet.c) to overcome a timeout
or hangup problem caused by some firewall software at the user's
end (Thanks to Bruce O'Neel for this fix).
- modified iraffits.c to incorporate Doug Mink's latest changes to
his wcstools library routines. The biggest change is that now
the actual image dimensions, rather than the physically stored
dimensions, are used when converting an IRAF file to FITS.
Bug fixes:
- when writing to ASCII FITS tables, the 'elemnum' parameter was
supposed to be ignored if it did not have the default value of 1.
In some cases however setting elemnum to a value other than 1
could cause the wrong number of rows to be produced in the output
table.
- If a cfitsio calculator expression was imported from a text file
(e.g. using the extended filename syntax 'file.fits[col @file.calc]')
and if any individual lines in that text file were greater than
255 characters long, then a space character would be inserted
after the 255th character. This could corrupt the line if the space
was inserted within a column name or keyword name token.
Version 2.480beta (used in the FTOOLS 5.3 release, 1 Nov 2003)
New Routines:
- fits_get_eqcoltype - just like fits_get_coltype, except in the
case of scaled integer columns, it returns the 'equivalent'
data type that is necessary to store the scaled data values.
- fits_split_names - splits an input string containing a comma or
space delimited list of names (typically file names or column
names) into individual name tokens.
Enhancements:
- changed fhist in histo.c so that it can make histograms of ASCII
table columns as well as binary table columns (as long as they
contain numeric data).
Bug fixes:
- removed an erroneous reference to listhead.c in makefile.vcc, that is
used to build the cfitsio dll under Windows. This caused a 'main'
routine to be added to the library, which causes problems when linking
fortran programs to cfitsio under windows.
- if an error occurs when opening for a 2nd time (with ffopen) a file that
is already open (e.g., the specified extension doesn't exist), and
if the file had been modified before attempting to reopen it, then
the modified buffers may not get written to disk and the internal
state of the file may become corrupted. ffclos was modified to
always set status=0 before calling ffflsh if the file has been
concurrently opened more than once.
Version 2.470 - 18 August 2003
Enhancements:
- defined 'TSBYTE' to represent the 'signed char' datatype (similar to
'TBYTE' that represents the 'unsigned char' datatype) and added
support for this datatype to all the routines that read or write
data to a FITS image or table. This was implemented by adding 2
new C source code files to the package: getcolsb.c and putcolsb.c.
- Defined a new '1S' shorthand data code for a signed byted column in
a binary table. CFITSIO will write TFORMn = '1B' and
TZEROn = -128 in this case, which is the convention used to
store signed byte values in a 'B' type column.
- in fitsio2.h, added test of whether `__x86_64__` is defined, to
support the new AMD Opteron 64-bit processor
- modified configure to not use the -fast compiler flag on Solaris
platforms when using the proprietary Solaris cc compilar. This
flag causes compilation problems in eval_y.c (compiler just
hangs forever).
Bug fixes:
- In the special case of writing 0 elements to a vector table column
that contains 0 rows, ffgcpr no longer adds a blank row to the table.
- added error checking code for cases where a ASCII string column
in a binary table is greater than 28800 characters wide, to avoid
going into an infinite loop.
- the fits_get_col_display_width routine was incorrectly returning
width = 0 for a 'A' binary table column that did not have an
explicit vector length character.
Version 2.460 - 20 May 2003
Enhancements:
- modified the HTTP driver in drvrnet.c so that CFITSIO can read
FITS files via a proxy HTTP server. (This code was contributed by
Philippe Prugniel, Obs. de Lyon). To use this feature, the
'http_proxy' environment variable must be defined with the
address (URL) and port number of the proxy server, i.e.,
> setenv http_proxy http://heasarc.gsfc.nasa.gov:3128
will use port 3128 on heasarc.gsfc.nasa.gov
- suppressed some compiler warnings by casting a variable of
type 'size_t' to type 'int' in fftkey (in fitscore.c) and
iraftofits and irafrdimge (in iraffits.c).
Version 2.450 - 30 April 2003
Enhancements:
- modified the WCS keyword reading routine (ffgics) to support cases
where some of the CDi_j keywords are omitted (with an assumed
value = 0).
- Made a change to http_open_network in drvrnet.c to add a 'Host: '
string to the open request. This is required by newer HTTP 1.1
servers (so-called virtual servers).
- modified ffgcll (read logical table column) to return the illegal
character value itself if the FITS file contains a logical value that is
not equal to T, F or zero. Previously it treated this case the
same as if the FITS file value was = 0.
- modified fits_movnam_hdu (ffmnhd) so that it will move to a tile-
compressed image (that is stored in a binary table) if the input
desired HDU type is BINARY_TBL as well as if the HDU type = IMAGE_HDU.
Bug fixes:
- in the routine that checks the data fill bytes (ffcdfl), the call
to ffmbyt should not ignore an EOF error when trying to read the bytes.
This is a little-used routine that is not called by any other CFITSIO
routine.
- fits_copy_file was not reporting an error if it hit the End Of File
while copying the last extension in the input file to the output file.
- fixed inconsistencies in the virtual file column filter parser
(ffedit_columns) to properly support expressions which create or
modify a keyword, instead of a column. Previously it was only possible
to modify keywords in a table extension (not an image), and the
keyword filtering could cause some of the table columns to not
get propagated into the virtual file. Also, spaces are now
allowed within the specified keyword comment field.
- ffdtyp was incorrectly returning the data type of FITS keyword
values of the form '1E-09' (i.e., an exponential value without
a decimal point) as integer rather than floating point.
- The enhancement in the previous 2.440 release to allow more files to be
opened at one time introduced a bug: if ffclos is called with
a non-zero status value, then any subsequent call to ffopen will likely
cause a segmentation fault. The fits_clear_Fptr routine was modified
to fix this.
- rearranged the order of some computations in fits_resize_img so as
to not exceed the range of a 32-bit integer when dealing with
large images.
- the template parser routine, ngp_read_xtension, was testing for
"ASCIITABLE" instead of "TABLE" as the XTENSION value of an ASCII
table, and it did not allow for optional trailing spaces in the IMAGE"
or "TABLE" string value.
Version 2.440 - 8 January 2003
Enhancements:
- modified the iterator function, ffiter, to operate on random
groups files.
- decoupled the NIOBUF (= 40) parameter from the limit on the number
FITS files that can be opened, so that more files may be opened
without the overhead of having to increase the number of NIOBUF
buffers. A new NMAXFILES parameter is defined in fitsio2.h which sets
the maximum number of opened FITS files. It is set = 300 by default.
Note however, that the underlying compiler or operating system may
not allow this many files to be opened at one time.
- updated the version of cfortran.h that is distributed with CFITSIO from
version 3.9 to version 4.4. This required changes to f77_wrap.h
and f77_wrap3.c. The original cfortran.h v4.4 file was modified
slightly to support CFITSIO and ftools (see comments in the header
of cfortran.h).
- modified ffhist so that it copies all the non-structural keywords from
the original binary table header to the binned image header.
- modified fits_get_keyclass so that it recognizes EXTNAME =
COMPRESSED_IMAGE as a special tile compression keyword.
- modified Makefile.in to support the standard --prefix convention
for specifying the install target directory.
Bug fixes:
- in fits_decompress_img, needed to add a call to ffpscl to turn
off the BZERO and BSCALE scaline when reading the compressed image.
Version 2.430 - 4 November 2002
Enhancements:
- modified fits_create_hdu/ffcrhd so that it returns without doing
anything and does not generate an error if the current HDU is
already an empty HDU. There is no need in this case to append
a new empty HDU to the file.
- new version of group.c (supplied by B. O'Neel at the ISDC) fixes 2
limitations: 1 - Groups now have 256 characters rather than 160
for the path lengths in the group tables. - ISDC SPR 1720. 2 -
Groups now can have backpointers longer than 68 chars using the long
string convention. - ISDC SPR 1738.
- small change to f77_wrap.h and f77_wrap3.c to support the fortran
wrappers on SUN solaris 64-bit sparc systems (see also change to v2.033)
- small change to find_column in eval_f.c to support unsigned long
columns in binary tables (with TZEROn = 2147483648.0)
- small modification to cfortran.h to support Mac OS-X, (Darwin)
Bug fixes:
- When reading tile-compress images, the BSCALE and BZERO scaling
keywords were not being applied, if present.
- Previous changes to the error message stack code caused the
tile compressed image routines to not clean up spurious error
messages properly.
- fits_open_image was not skipping over null primary arrays.
Version 2.420 - 19 July 2002
Enhancements:
- modified the virtual filename parser to support exponential notation
when specifing the min, max or binsize in a binning specifier, as in:
myfile.fits[binr X=1:10:1.0E-01, Y=1:10:1.0E-01]
- removed the limitation on the maximum number of HDUs in a FITS file
(limit used to be 1000 HDUs per file). Now any number of HDUs
can be written/read in a FITS file. (BUT files that have huge numbers
of HDUs can be difficult to manage and are not recommended);
- modified grparser.c to support HIERARCH keywords, based on
code supplied by Richard Mathar (Max-Planck)
- moved the ffflsh (fits_flush_buffer) from the private to the
public interface, since this routine may be useful for some
applications. It is much faster than ffflus.
- small change to the definition of OFF_T in fitsio.h to support
large files on IBM AIX operating systems.
Bug fixes:
- fixed potential problem reading beyond array bounds in ffpkls. This
would not have affected the content of any previously generated FITS
files.
- in the net driver code in drvrnet.c, the requested protocol string
was changed from "http/1.0" to "HTTP/1.0" to support apache 1.3.26.
- When using the virtual file syntax to open a vector cell in a binary
table as if it were a primary array image, there was a bug
in fits_copy_image_cell which garbled the data if the vector
was more than 30000 bytes long.
- fixed problem that caused fits_report_error to crash under Visual
C++ on Windows systems. The fix is to use the '/MD' switch
on the cl command line, or, in Visual Studio, under project
settings / C++ select use runtime library multithreaded DLL
- modified ffpscl so it does not attempt to reset the scaling values
in the internal structure if the image is tile-compressed.
- fixed multiple bugs in mem_rawfile_open which affected the case
where a raw binary file is read and converted on the fly into
a FITS file.
- several small changes to group.c to suppress compiler warnings.
Version 2.410 - 22 April 2002 (used in the FTOOLS 5.2 release)
New Routines:
- fits_open_data behaves similarly to fits_open_file except that it
also will move to the first HDU containing significant data if
and an explicit HDU name or number to open was not specified.
This is useful for automatically skipping over a null primary
array when opening the file.
- fits_open_table and fits_open_image behaves similarly to
fits_open_data, except they move to the first table or image
HDU in the file, respectively.
- fits_write_errmark and fits_clear_errmark routines can be use
to write an invisible marker to the CFITSIO error stack, and
then clear any more recent messages on the stack, back to
that mark. This preserves any older messages on the stack.
- fits_parse_range utility routine parses a row list string
and returns integer arrays giving the min and max row in each
range.
- fits_delete_rowrange deletes a specified list of rows or row
ranges.
- fits_copy_file copies all or part of the HDUs in the input file
to the output file.
- added fits_insert_card/ffikey to the publicly defined set
of routines (previously, it was a private routine).
Enhancements:
- changed the default numeric display format in ffgkys from 'E' format
to 'G' format, and changed the format for 'X' columns to a
string of 8 1s or 0s representing each bit value.
- modified ffflsh so the system 'fflush' call is not made in cases
where the file was opened with 'READONLY' access.
- modified the output filename parser so the "-.gz", and "stdout.gz"
now cause the output file to be initially created in memory,
and then compressed and written out to the stdout stream when
the file is closed.
- modified the routines that delete rows from a table to also
update the variable length array heap, to remove any orphaned
data from the heap.
- modified ffedit_columns so that wild card characters may be
used when specifying column names in the 'col' file filter
specifier (e.g., file.fits[col TIME; *RAW] will create a
virtual table contain only the TIME column and any other columns
whose name ends with 'RAW').
- modified the keyword classifier utility, fits_get_keyclass, to
support cases where the input string is just the keyword name,
not the entire 80-character card.
- modified configure.in and configure to see if a proprietary
C compiler is available (e.g. 'cc'), and only use 'gcc' if not.
- modified ffcpcl (copy columns from one table to another) so that
it also copies any WCS keywords related to that column.
- included an alternate source file that can be used to replace
compress.c, which is distributed under the GNU General Public
License. The alternate file contains non-functional stubs for
the compression routines, which can be used to make a version of
CFITSIO that does not have the GPL restrictions (and is also less
functional since it cannot read or write compressed FITS files).
- modifications to the iterator routine (ffiter) to support writing
tile compressed output images.
- modified ffourl to support the [compress] qualifier when specifying
the optional output file name. E.g., file.fit(out.file[compress])[3]
- modified imcomp_compress_tile to fully support implicit data type
conversion when writing to tile-compressed images. Previously,
one could not write a floating point array to an integer compressed
image.
- increased the number of internal 2880-byte I/O buffers allocated
by CFITSIO from 25 to 40, in recognition of the larger amount
of memory available on typical machines today compared with
a few years ago. The number of buffers can be set by the user
with the NIOBUF parameter in fitsio2.h. (Setting this too large
can actually hurt performance).
- modified the #if statements in fitsio2.h, f77_wrap.h and f77_wrap1.c
to support the new Itanium 64-bit Intel PC.
- a couple minor modifications to fitsio.h needed to support the off_t
datatype on debian linux systems.
- increased internal buffer sizes in ffshft and ffsrow to improve
the I/O performance.
Bug fixes:
- fits_get_keyclass could sometimes try to append to an unterminated
string, causing an overflow of a string array.
- fits_create_template no longer worked because of improvements made
to other routines. Had to modify ffghdt to not try to rescan
the header keywords if the file is still empty and contains no
keywords yet.
- ffrtnm, which returns the root filename, sometimes did not work
properly when testing if the 'filename+n' convention was used for
specifying an extension number.
- fixed minor problem in the keyword template parsing routine, ffgthd
which in rare cases could cause an improperly terminated string to
be returned.
- the routine to compare 2 strings, ffcmps, failed to find a match
in comparing strings like "*R" and "ERROR" where the match occurs
on the last character, but where the same matching character occurs
previously in the 2nd string.
- the region file reading routine (ffrrgn) did not work correctly if
the region file (created by POW and perhaps other programs) had an
'exclude' region (beginning with a '-' sign) as the first region
in the file. In this case all points outside the excluded region
should be accepted, but in fact no points were being accepted
in this case.
Version 2.401 - 28 Jan 2002
- added the imcopy example program to the release (and Makefile)
Bug fixes:
- fixed typo in the imcompress code which affected compression
of 3D datacubes.
- made small change to fficls (insert column) to allow colums with
TFORMn = '1PU' and '1PV' to be inserted in a binary table. The
'U' and 'V' are codes only used within CFITSIO to represent unsigned
16-bit and 32-bit integers; They get replaced by '1PI' and '1PJ'
respectively in the FITS table header, along with the appropriate
TZEROn keyword.
Version 2.400 - 18 Jan 2002
(N.B.: Application programs must be recompiled, not just relinked
with the new CFITSIO library because of changes made to fitsio.h)
New Routines:
- fits_write_subset/ffpss writes a rectangular subset (or the whole
image) to a FITS image.
- added a whole new family of routines to read and write arrays of
'long long' integers (64-bit) to FITS images or table columns. The
new routine names all end in 'jj': ffpprjj, ffppnjj, ffp2djj,
ffp3djj, ffppssjj, ffpgpjj, ffpcljj, ffpcnjj. ffgpvjj, ffgpfjj,
ffg2djj, ffg3djj, ffgsvjj, ffgsfjj, ffggpjj, ffgcvjj, and ffgcfjj.
- added a set of helper routines that are used in conjunction with
the new support for tiled image compression. 3 routines set the
parameters that should be used when CFITSIO compresses an image:
fits_set_compression_type
fits_set_tile_dim
fits_set_noise_bits
3 corresponding routines report back the current settings:
fits_get_compression_type
fits_get_tile_dim
fits_get_noise_bits
Enhancements:
- major enhancement was made to support writing to tile-compressed
images. In this format, the image is divided up into a rectangular
grid of tiles, and each tile of pixels is compressed individually
and stored in a row of a variable-length array column in a binary
table. CFITSIO has been able to transparently read this compressed
image format ever since version 2.1. Now all the CFITSIO image
writing routines also transparently support this format. There are
2 ways to force CFITSIO to write compressed images: 1) call the
fits_set_compression_type routine before writing the image header
keywords, or 2), specify that the image should be compressed when
entering the name of the output FITS file, using a new extended
filename syntax. (examples: "myfile.fits[compress]" will use the
default compression parameters, and "myfile.fits[compress GZIP
100,100] will use the GZIP compression algorithm with 100 x 100
pixel tiles.
- added new driver to support creating output .gz compressed fits
files. If the name of the output FITS file to be created ends with
'.gz' then CFITSIO will initially write the FITS file in memory and
then, when the FITS file is closed, CFITSIO will gzip the entire
file before writing it out to disk.
- when over-writing vectors in a variable length array in a binary
table, if the new vector to be written is less than or equal to
the length of the previously written vector, then CFITSIO will now
reuse the existing space in the heap, rather than always appending
the new array to the end of the heap.
- modified configure.in to support building cfitsio as a dynamic
library on Mac OS X. Use 'make shared' like on other UNIX platforms,
but a .dylib file will be created instead of .so. If installed in a
nonstandard location, add its location to the DYLD_LIBRARY_PATH
environment variable so that the library can be found at run time.
- made various modifications to better support the 8-byte long integer
datatype on more platforms. The 'LONGLONG' datatype is typedef'ed
to equal 'long long' on most Unix platforms and MacOS, and equal
to '__int64' on Windows machines.
- modified configure.in and makefile.in to better support cases
where the system has no Fortran compiler and thus the f77 wrapper
routines should not be compiled.
- made small modification to eval.y and eval_y.f to get rid of warning
on some platforms about redefinition of the 'alloca'.
Bug fixes:
- other recent bug fixes in ffdblk (delete blocks) caused ffdhdu (delete
HDU) to fail when trying to replace the primary array with a null
primary array.
- fixed bug that prevented inserting a new variable length column
into a table that already contained variable length data.
- modified fits_delete_file so that it will delete the file even if
the input status value is not equal to zero.
- in fits_resize_image, it was sometimes necessary to call ffrdef to
force the image structure to be defined.
- modified the filename parser to support input files with names like:
"myfile.fits.gz(mem://tmp)" in which the url type is specified for
the output file but not for the input file itself. This required
modifications to ffiurl and ffrtnm.
Version 2.301 - 7 Dec 2001
Enhancements:
- modified the http file driver so that if the filename to be opened
contains a '?' character (most likely a cgi related string) then it
will not attempt to append a .gz or .Z as it would normally do.
- added support for the '!' clobber character when specifying
the output disk file name in CFITSIO's extended filename syntax, e.g.,
'http://a.b.c.d/myfile.fits.gz(!outfile.fits)'
- added new device driver which is used when opening a compressed FITS
file on disk by uncompressing it into memory with READWRITE
access. This happens when specifying an output filename
'mem://'.
- added 2 other device drivers to open http and ftp files in memory
with write access.
- improved the error trapping and reporting in cases where program
attempts to write to a READONLY file (especially in cases where the
'file' resides in memory, as is the case when opening an ftp or http
file.
- modified the extended filename parser so that it is does not confuse
the bracket character '[' which is sometimes used in the root name
of files of type 'http://', as the start of an extname or row filter
expression. If the file is of type 'http://', the parser now
checks to see if the last character in the extended file name is
a ')' or ']'. If not, it does not try to parse the file name
any further.
- improved the efficiency when writing FITS files in memory, by
initially allocating enough memory for the entire HDU when it is
created, rather than incrementally reallocing memory 2880 bytes
at a time (modified ffrhdu and mem_truncate). This change also
means that the program will fail much sooner if it cannot allocate
enough memory to hold the entire FITS HDU.
Bug fixes:
- There was an error in the definition of the Fortran ftphtb wrapper
routine (writes required ASCII table header keywords) that caused
it to fail on DEC OSF and other platforms where sizeof(long) = 8.
Version 2.300 - 23 Oct 2001
New Routines:
- fits_comp_img and fits_decomp_img are now fully supported and
documented. These routine compress and decompress, respective,
a FITS image using a new algorithm in which the image is first
divided into a grid of rectangular tiles, then the compressed byte
stream from each tile is stored in a row of a binary table.
CFITSIO can transparently read FITS images stored in this
compressed format. Compression ratios of 3 - 6 are typically
achieved. Large compression ratios are achieved for floating
point images by throwing away non-significant noise bits in the
pixel values.
- fits_test_heap tests the integrity of the binary table heap and
returns statistics on the amount of unused space in the heap and
the amount of space that is pointed to by more than 1 descriptor.
- fits_compress_heap which will reorder the arrays in the binary
table heap, recovering any unused space.
Enhancements:
- made substantial internal changes to the code to support FITS
files containing 64-bit integer data values. These files have
BITPIX = 64 or TFORMn = 'K'. This new feature in CFITSIO is
currently only enabled if SUPPORT_64BIT_INTEGERS is defined = 1 in
the beginning of the fitsio2.h file. By default support for
64-bit integers is not enabled.
- improved the ability to read and return a table column value as a
formatted string by supporting quasi-legal TDISPn values which
have a lowercase format code letter, and by completely ignoring
other unrecognizable TDISPn values. Previously, unrecognized
TDISPn values could cause zero length strings to be returned.
- made fits_write_key_longstr more efficient when writing keywords
using the long string CONTINUE convention. It previously did not
use all the available space on each card when the string to be
written contained many single quote characters.
- added a new "CFITSIO Quick Start Guide" which provides all the
basic information needed to write C programs using CFITSIO.
- updated the standard COMMENT keywords that are written at the
beginning of every primary array to refer to the newly published
FITS Standard document in Astronomy and Astrophysics.
Note: because of this change, any FITS file created with this
version of CFITSIO will not be identical to the same file written
with a previous version of CFITSIO.
- replaced the 2 routines in pliocomp.c with new versions provided by
D Tody and N Zarate. These routines compress/uncompress image pixels
using the IRAF pixel list compression algorithm.
- modified fits_copy_hdu so that when copying a Primary Array
to an Image extension, the COMMENT cards which give the reference
to the A&A journal article about FITS are not copied. In the
inverse case the COMMENT keywords are inserted in the header.
- modified configure and Makefile.in to add capability to build a
shared version of the CFITSIO library. Type 'make shared' or
'make libcfitsio.so' to invoke this option.
- disabled some uninformative error messages on the error stack:
1) when calling ffclos (and then ffchdu) with input status > 0
2) when ffmahd tries to move beyond the end of file.
The returned status value remains the same as before, but the
annoying error messages no longer get written to the error stack.
- The syntax for column filtering has been modified so that
if one only specifies a list of column names, then only those
columns will be copied into the output file. This provides a simple
way to make a copy of a table containing only a specified list of
columns. If the column specifier explicitly deletes a column, however,
than all the other columns will be copied to the filtered input
file, regardless of whether the columns were listed or not.
Similarly, if the expression specifies only a column to be modified
or created, then all the other columns in the table will be
copied.
mytable.fit[1][col Time;Rate] - only the Time and Rate
columns will be copied to the filtered input file.
mytable.fit[1][col -Time ] - all but the Time column are copied
to the filtered input file.
mytable.fit[1][col Rate;-Time] - same as above.
- changed a '#if defined' statement in f77_wrap.h and f77_wrap1.c
to support the fortran wrappers on 64-bit IBM/RS6000 systems
- modified group.c so that when attaching one group (the child) to
another (the parent), check in each file for the existence of a
pointer to the other before adding the link. This is to prevent
multiple links from forming under all circumstances.
- modified the filename parser to accept 'STDIN', 'stdin',
'STDOUT' and 'stdout' in addition to '-' to mean read the
file from standard input or write to standard output.
- Added support for reversing an axis when reading a subsection
of a compressed image using the extended filename syntax, as in
myfile.fits+1[-*, *] or myfile.fits+1[600:501,501:600]
- When copying a compressed image to a uncompressed image, the
EXTNAME keyword is no longer copied if the value is equal to
'COMPRESSED_IMAGE'.
- slight change to the comment field of the DATE keyword to reflect
the fact that the Unix system date and time is not true UTC time.
Bug fixes:
- fits_write_key_longstr was not writing the keyword if a null
input string value was given.
- writing data to a variable length column, if that binary table is not
the last HDU in the FITS file, might overwrite the following HDU.
Fixed this by changing the order of a couple operations in ffgcpr.
- deleting a column from a table containing variable length columns
could cause the last few FITS blocks of the file to be reset = 0.
This bug occurred as a result of modifications to ffdblk in v2.202.
This mainly affects users of the 'compress_fits' utility
program.
- fixed obscure problem when writing bits to a variable length 'B'
column.
- when reading a subsection of an image, the BSCALE and BZERO pixel
scaling may not have been applied when reading image pixel values
(even though the scaling keywords were properly written in the
header).
- fits_get_keyclass was not returning 'TYP_STRUCT_KEY' for the
END keyword.
Version 2.204 - 26 July 2001
Bug fixes:
- Re-write of fits_clean_url in group.c to solve various problems
with invalid bounds checking.
Version 2.203 - 19 July 2001 (version in FTOOLS v5.1)
Enhancements:
- When a row selection or calculator expression is written in
an external file (and read by CFITSIO with the '@filename' syntax)
the file can now contain comment lines. The comment line must
begin with 2 slash characters as the first 2 characters on the
line. CFITSIO will ignore the entire line when reading the
expression.
Bug fixes:
- With previous versions of CFITSIO, the pixel values in a FITS
image could be read incorrectly in the following case: when
opening a subset of a FITS image (using the
'filename.fits[Xmin:Xmax,Ymin:Ymax]' notation) on a PC linux, PC
Windows, or DEC OSF machine (but not on a SUN or Mac). This
problem only occurs when reading more than 8640 bytes of data
(2160 4-byte integers) at a time, and usually only occurs if the
reading program reads the pixel data immediately after opening the
file, without first reading any header keywords. This error would
cause strips of zero valued pixels to appear at semi-random
positions in the image, where each strip usually would be 2880
bytes long. This problem does not affect cases where the input
subsetted image is simply copied to a new output FITS file.
Version 2.202 - 22 May 2001
Enhancements:
- revised the logic in the routine that tests if a point is
within a region: if the first region is an excluded region,
then it implicitly assumes a prior include region covering
the entire detector. It also now supports cases where a
smaller include region is within a prior exclude region.
- made enhancement to ffgclb (read bytes) so that it can
also read values from a logical column, returning an array
of 1s and 0s.
- defined 2 new grouping error status values (349, 350) in
cfitsio.h and made minor changes to group.c to use these new
status values.
- modified fits_open_file so that if it encounters an error while
trying to move to a user-specified extension (or select a subset
of the rows in an input table, or make a histogram of the
column values) it will close the input file instead of leaving
it open.
- when using the extended filename syntax to filter the rows in
an input table, or create a histogram image from the values in
a table column, CFITSIO now writes HISTORY keywords in the
output file to document the filtering expression that was used.
Bug fixes:
- ffdblk (called by ffdrow) could overwrite the last FITS block(s) in
the file in some cases where one writes data to a variable length
column and then calls ffdrow to delete rows in the table. This
bug was similar to the ffiblk bug that was fixed in v2.033.
- modified fits_write_col_null to fix a problem which under unusual
circumstances would cause a End-of-File error when trying to
read back the value in an ASCII string column, after initializing
if by writing a null value to it.
- fixed obscure bug in the calculator function that caused an
error when trying to modify the value of a keyword in a HDU
that does not have a NAXIS2 keyword (e.g., a null primary array).
- the iterator function (in putcol.c) had a bug when calculating
the optimum number rows to process in the case where the table
has very wide rows (>33120 bytes) and the calculator expression
involves columns from more than one FITS table. This could
cause an infinite loop in calls to the ffcalc calculator function.
- fixed bug in ffmvec, which modifies the length of an
existing vector column in a binary table. If the vector
was reduced in length, the FITS file could sometimes be left
in a corrupted state, and in all cases the values in the remaining
vector elements of that column would be altered.
- in drvrfile.c, replaced calls to fsetpos and fgetpos with
fseek and ftell (or fseeko and ftello) because the fpos_t
filetype used in fsetpos is incompatible with the off_t
filetype used in fseek, at least on some platforms (Linux 7.0).
(This fix was inserted into the V2.201 release on April 4).
- added "#define fits_write_pixnull ffppxn" to longnam.h
Version 2.201 - 15 March 2001
Enhancements
- enhanced the keyword reading routines so that they will do
implicit datatype conversion from a string keyword value
to a numeric keyword value, if the string consist of a
valid number enclosed in quotes. For example, the keyword
mykey = '37.5' can be read by ffgkye.
- modified ffiimg so that it is possible to insert a new
primary array at the beginning of the file. The original
primary array is then converted into an IMAGE extension.
- modified ffcpdt (copy data unit) to support the case where
the data unit is being copied between 2 HDUs in the same file.
- enhanced the fits_read_pix and fits_read_pixnull routines so
that they support the tiled image compression format that the
other image reading routines also support.
- modified the Extended File Name syntax to also accept a
minus sign (-) as well as an exclamation point (!) as
the leading character when specifying a column or or keyword
to be deleted, as in [col -time] will delete the TIME column.
- now completely support reading subimages, including pixel
increments in each dimension, for tile-compressed images
(where the compressed image tiles are stored in a binary
table).
Bug fixes:
- fixed confusion in the use of the fpos_t and off_t datatypes
in the fgetpos and fsetpos routines in drvrfile.c which caused
problems with the Windows VC++ compiler. (fpos_t is not
necessarily identical to off_t)
- fixed a typo in the fits_get_url function in group.c which
caused problems when determining the relative URL to a compressed
FITS file.
- included fitsio.h in the shared memory utility program,
smem.c, in order to define OFF_T.
- fixed typo in the datatype of 'nullvalue' in ffgsvi, which caused
attempts to read subsections of a short integer tiled compressed
image to fail with a bus error.
- fixed bug in ffdkey which sometimes worked incorrectly if one
tried to delete a nonexistent keyword beyond the end of the header.
- fixed problem in fits_select_image_section when it writes a dummy
value to the last pixel of the section. If the image contains
scaled integer pixels, then in some cases the pixel value could end
up out of range.
- fixed obscure bug in the ffpcn_ family of routines which gave
a floating exception when trying to write zero number of pixels to
a zero length array (why would anyone do this?)
Version 2.200 - 26 Jan 2001
Enhancements
- updated the region filtering code to support the latest region
file formats that are generated by the POW, SAOtng and ds9
programs. Region positions may now be given in HH:MM:SS.s,
DD:MM:SS.s format, and region sizes may be given arcsec or arcmin
instead of only in pixel units. Also changed the logic so that if
multiple 'include' regions are specified in the region file, they
are ORed together, instead of ANDed, so that the filtering keeps
points that are located within any of the 'include' regions, not
just the intersection of the regions.
- added support for reading raw binary data arrays by converting
them on the fly into virtual FITS files.
- modified ffpmsg, which writes error messages to CFITSIO's internal
error stack, so that messages > 80 characters long will be wrapped
around into multiple 80 character messages, instead of just
being truncated at 80 characters.
- modified the CFITSIO parser so that expression which involve
scaled integer columns get cast to double rather than int.
- Modified the keyword template parsing routine, ffgthd, to
support the HIERARCH keyword.
- modified ffainit and ffbinit so that they don't unnecessarily
allocate 0 bytes of memory if there are no columns (TFIELDS = 0)
in the table that is being opened.
- modified fitsio2.h to support NetBSD on Alpha OSF platforms
(NetBSD does not define the '__unix__' symbol).
- changed the way OFF_T is defined in fitsio.h for greater
portability.
- changed drvrsmem.c so it is compiled only when HAVE_SHMEM_SERVICES
is defined in order to removed the conditional logic from the Makefile
- reorganized the CFITSIO User's guide to make it
clearer and easier for new users to learn the basic routines.
- fixed ffhdef (which reserves space for more header keywords) so
that is also updates the start position of the next HDU. This
affected the offset values returned by ffghof.
Version 2.100 - 18 Oct 2000
Enhancements
- made substantial modification to the code to support Large files,
i.e., files larger than 2**31 bytes = 2.1GB. FITS files up to
6 terabytes in size may now be read and written on platforms
that support Large files (currently only Solaris).
- modified ffpcom and ffphis, which write COMMENT and HISTORY
keywords, respectively, so that they now use columns 9 - 80,
instead of only columns 11 - 80. Previously, these routines
avoided using columns 9 and 10, but this is was unnecessarily
restrictive.
- modified ffdhdu so that instead of refusing to delete the
primary array, it will replace the current primary array
with a null primary array containing the bare minimum of
required keywords and no data.
New Routines
- fits_read_pix, fits_read_pixnull, fits_read_subset, and fits_write_pix
routines were added to enable reading and writing of Large images,
with more than 2.1e9 pixels. These new routines are now recommended
as the basic routines for reading and writing all images.
- fits_get_hduoff returns the byte offset in the file to
the start and end of the current HDU. This routine replaces the
now obsolete fits_get_hduaddr routine; it uses 'off_t' instead of
'long' as the datatype of the arguments and can support offsets
in files greater than 2.1GB in size.
Bug fixes:
- fixed bug in fits_select_image_section that caused an integer
overflow when reading very large image sections (bigger than
8192 x 8192 4-byte pixels).
- improved ffptbb, the low-level table writing routine, so that
it will insert additional rows in the table if the table is
not already big enough. Previously it would have just over-
written any HDUs following the table in the FITS file.
- fixed a bug in the fits_write_col_bit/ffpclx routine which
could not write to a bit 'X' column if that was the first column
in the table to be written to. This bug would not appear if
any other datatype column was written to first.
- nonsensible (but still formally legal) binary table TFORM values
such as '8A15', or '1A8' or 'A8' would confuse CFITSIO and cause it
to return a 308 error. When parsing the TFORMn = 'rAw' value,
the ffbnfm routine has been modified to ignore the 'w' value in cases
where w > r.
- fixed bug in the blsearch routine in iraffits.c which sometimes
caused an out-of-bounds string pointer to be returned when searching
for blank space in the header just before the 'END' keyword.
- fixed minor problem in ffgtcr in group.c, which sometimes failed
while trying to move to the end of file before appending a
grouping table.
- on Solaris, with Sun CC 5.0, one must check for '__unix' rather
than '__unix__' or 'unix' as it's symbol. Needed to modify this
in drvrfile.c in 3 places.
- in ffextn, the FITS file would be left open if the named
extension doesn't exist, thus preventing the file from being
opened again later with write access.
- fixed bug in ffiimg that would cause attempts to insert a new
image extension following a table extension, and in front of any
other type of extension, to fail.
Version 2.037 - 6 July 2000
Enhancements
- added support in the extended filename syntax for flipping
an image along any axis either by specifying a starting
section pixel number greater than the ending pixel number,
or by using '-*' to flip the whole axis. Examples:
"myfile.fits[1:100, 50:10]" or "myfile.fits[-*,*]".
- when reading a section of an image with the extended filename
syntax (e.g. image.fits[1:100:2, 1:100:2), any CDi_j WCS keywords
will be updated if necessary to transfer the world coordinate
system from the imput image to the output image section.
- on UNIX platforms, added support for filenames that begin
with "~/" or "~user/". The "~" symbol will get expanded
into a string that gives the user's home directory.
- changed the filename parser to support disk file names that
begin with a minus sign. Previously, the leading minus sign would
cause CFITSIO to try to read/write the file from/to stdin/stdout.
- modified the general fits_update_key routine, which writes
or updates a keyword value, to use the 'G' display format
instead of the 'E' format for floating point keyword values.
This will eliminate trailing zeros from appearing in the value.
- added support for the "-CAR" celestial coordinate projection
in the ffwldp and ffxypx routines. The "-CAR" projection is
the default simplest possible linear projection.
- added new fits_create_memfile/ffimem routine to create a new
fits file at a designated memory location.
- ported f77_wrap.h and f77_wrap1.c so that the Fortran interface
wrappers work correctly on 64-bit SGI operating systems. In this
environment, C 'long's are 8-bytes long, but Fortran 'integers'
are still only 4-bytes long, so the words have to be converted
by the wrappers.
- minor modification to cfortran.h to automatically detect when it
is running on a linux platform, and then define f2cFortran in that
case. This eliminates the need to define -Df2cFortran on the
command line.
- modified group.c to support multiple "/" characters in
the path name of the file to be opened/created.
- minor modifications to the parser (eval.y, eval_f.c, eval_y.c)
to a) add the unary '+' operator, and b) support copying the
TDIMn keyword from the input to the output image under certain
circumstances.
- modified the lexical parser in eval_l.y and eval_l.c to
support #NULL and #SNULL constants which act to set the
value to Null. Support was also added for the C-conditional
expression: 'boolean ? trueVal : falseVal'.
- small modification to eval_f.c to write an error message to
the error stack if numerical overflow occurs when evaluating
an expression.
- configure and configure.in now support the egcs g77 compiler
on Linux platforms.
Bug fixes:
- fixed a significant bug when using the extended filename binning
syntax to generate a 2-dimensional image from a histogram of the
values in 2 table columns. This bug would cause table events that
should have been located in the row just below the bottom row of
the image (and thus should have been excluded from the histogram)
to be instead added into the first row of the image. Similarly,
the first plane of a 3-D or 4-D data cube would include the events
that should have been excluded as falling in the previous plane of
the cube.
- fixed minor bug when parsing an extended filename that contains
nested pairs of square brackets (e.g., '[col newcol=oldcol[9]]').
- fixed bug when reading unsigned integer values from a table or
image with fits_read_col_uint/ffgcvuk. This bug only occurred on
systems like Digital Unix (now Tru64 Unix) in which 'long'
integers are 8 bytes long, and only when reading more than 7200
elements at a time. This bug would generally cause the program to
crash with a segmentation fault.
- modified ffgcpr to update 'heapstart' as well as 'numrows' when
writing more rows beyond the end of the table. heapstart
is needed to calculate if more space needs to be inserted in the
table when inserting columns into the table.
- modified fficls (insert column), ffmvec, ffdrow and ffdcol to
not use the value of the NAXIS2 keyword as the number of rows
in the table, and instead use the value that is stored in
an internal structure, because the keyword value may not
be up to date.
- Fixed bug in the iterator function that affected the handling
of null values in string columns in ASCII and binary tables.
- Reading a subsample of pixels in very large images, (e.g.,
file = myfile.fits[1:10000:10,1:10000:10], could cause a
long integer overflow (value > 2**31) in the computation of the
starting byte offset in the file, and cause a return error status
= 304 (negative byte address). This was fixed by changing the
order of the arithmetic operations in calculating the value of
'readptr' in the ffgcli, ffgclj, ffgcle, ffgcld, etc. routines.
- In version 2.031, a fix to prevent compressed files from being
opened with write privilege was implemented incorrectly. The fix
was intended to not allow a compressed FITS file to be opened
except when a local uncompressed copy of the file is being
produced (then the copy is opened with write access), but in fact
the opposite behavior occurred: Compressed files could be opened
with write access, EXCEPT when a local copy is produced. This
has been fixed in the mem_compress_open and file_compress_open
routines.
- in iraffits.c, a global variable called 'val' caused multiply
defined symbols warning when linking cfitsio and IRAF libraries.
This was fixed by making 'val' a local variable within the
routine.
Version 2.036 - 1 Feb 2000
- added 2 new generic routines, ffgpf and ffgcf which are analogous
to ffgpv and ffgcv but return an array of null flag values instead
of setting null pixels to a reserved value.
- minor change to eval_y.c and eval.y to "define alloca malloc"
on all platforms, not just VMS.
- added support for the unsigned int datatype (TUINT) in the
generic ffuky routine and changed ffpky so that unsigned ints
are cast to double instead of long before being written to
the header.
- modified ffs2c so that if a null string is given as input then
a null FITS string (2 successive single quotes) will be returned.
Previously this routine would just return a string with a single
quote, which could cause an illegal keyword record to be written.
- The file flush operation on Windows platforms apparently
changes the internal file position pointer (!) in violation of the
C standard. Put a patch into the file_flush routine to explicitly
seek back to the original file position.
- changed the name of imcomp_get_compressed_image_parms to
imcomp_get_compressed_image_par to not exceed the 31 character
limit on some compilers.
- modified the filename parser (which is used when moving to a
named HDU) to support EXTNAME values which contain embedded blanks.
- modified drvrnet.c to deal with ftp compressed files better so
that even fits files returned from cgi queries which have the wrong
mime types and/or wrong types of file names should still decompress.
- modified ffgics to reduce the tolerance for acceptable skewness
between the axes, and added a new warning return status =
APPROX_WCS_KEY in cases where there is significant skewness
between the axes.
- fixed bug in ffgics that affected cases where the first coordinate
axis was DEC, not RA, and the image was a mirror image of the sky.
- fixed bug in ffhist when trying to read the default binning
factor keyword, TDBIN.
- modified ffhist so that is correctly computes the rotation angle
in a 2-D image if the first histogram column has a CROTA type
keyword but the 2nd column does not.
- modified ffcpcl so that it preserves the comment fields on the
TTYPE and TFORM keywords when the column is copied to a new file.
- make small change to configure.in to support FreeBSD Linux
by setting CFLAGS = -Df2cFortran instead of -Dg77Fortran. Then
regenerated configure with autoconf 2.13 instead of 2.12.
Version 2.035 - 7 Dec 1999 (internal release only, FTOOLS 5.0.2)
- added new routine called fits_get_keyclass/ffgkcl that returns
the general class of the keyword, e.g., required structural
keyword, WCS keyword, Comment keyword, etc. 15 classes of
keywords have been defined in fitsio.h
- added new routine called fits_get_img_parm/ffgipr that is similar
to ffgphd but it only return the bitpix, naxis, and naxisn values.
- added 3 new routines that support the long string keyword
convention: fits_insert_key_longstr, fits_modify_key_longstr
fits_update_key_longstr.
- modified ffgphd which reads image header keywords to support
the new experimental compressed image format.
- when opening a .Z compressed file, CFITSIO tries to allocate
memory equal to 3 times the file size, which may be excessive
in some cases. This was changed so that if the allocation fails,
then CFITSIO will try again to allocate only enough memory
equal to 1 times the file size. More memory will be allocated
later if this turns out to be too small.
- improved the error checking in the fits_insert_key routine
to check for illegal characters in the keyword.
Version 2.034 - 23 Nov 1999
- enhanced support for the new 'CD' matrix world coordinate system
keywords in the ffigics routine. This routine has been enhanced
to look for the new 'CD' keywords, if present, and convert them
back to the old CDELTn and CROTAn values, which are then returned.
The routine will also swap the WCS parameters for the 2 axes if
the declination-like axis is the first WCS axis.
- modified ffphbn in putkey.c to support the 'U' and 'V" TFORM characters
(which represent unsigned short and unsigned int columns) in variable
length array columns. (previously only supported these types in
fixed length columns).
- added checks when reading gzipped files to detect unexpected EOF.
Previously, the 'inflate_codes' routine would just sit in an infinite
loop if the file ended unexpectedly.
- modified fits_verify_chksum/ffvcks so that checksum keywords with
a blank value string are treated as undefined, the same as
if the keyword did not exist at all.
- fixed ffghtb and ffghbn so that they return the extname value
in cases where there are no columns in the table.
- fixed bug in the ffgtwcs routine (this is a little utility
routine to aid in interfacing to Doug Mink's WCS routines);
it was not correctly padding the length of string-valued keywords
in the returned string.
- fixed bug in 'iraffits.c' that prevented Type-2 IRAF images from
being correctly byte-swapped on PCs and DEC-OSF machines.
- fixed tiny memory leak in irafncmp in iraffits.c. Only relevant when
reading IRAF .imh files.
- fixed a bug (introduced in version 2.027) that caused the keyword
reading routines to sometimes not find a matching keyword if the
input name template used the '*' wildcard as the last character.
(e.g., if input name = 'COMMENT*' then it would not find the
'COMMENT' keywords. (It would have found longer keywords like
'COMMENTX' correctly). The fix required a minor change to ffgcrd
in getkey.c
- modified the routine (ffswap8) that does byteswapping of
double precision numbers. Some linux systems have reported floating
point exceptions because they were trying to interpret the bytes
as a double before the bytes had been swapped.
- fixed bug in the calculation of the position of the last byte
in the string of bits to be read in ffgcxuk and ffgcxui. This
bug generally caused no harm, but could cause the routine to
exit with an invalid error message about trying to read
beyond the size of the field.
- If a unix machine did not have '__unix__', 'unix', or '__unix'
C preprocessor symbols defined, then CFITSIO would correctly open
one FITS file, but would not correctly open subsequent files. Instead
it would think that the same file was being opened multiple times.
This problem has only been seen on an IBM/AIX machine. The fits_path2url
and fits_url2path routines in group.c were modified to fix the problem.
- fixed bug in group.c, which affected WINDOWS platforms only, that
caused programs to go into infinite loop when trying to open
certain files.
- the ftrsim Fortran wrapper routine to ffrsim was not defined
correctly, which caused the naxis(2) value to be passed incorrectly
on Dec OSF machines, where sizeof(long) != sizeof(int).
Version 2.033 - 17 Sept 1999
- New Feature: enhanced the row selection parser so that comparisons
between values in different rows of the table are allowed, and the
string comparisons with <, >, <=, and >= are supported.
- added new routine the returns the name of the keyword in the
input keyword record string. The name is usually the first
8 characters of the record, except if the HIERARCH convention
is being used in which case the name may be up to 67 characters
long.
- added new routine called fits_null_check/ffnchk that checks to
see if the current header contains any null (ASCII 0) characters.
These characters are illegal in FITS headers, but they go undetected
by the other CFITSIO routines that read the header keywords.
- the group.c file has been replaced with a new version as supplied
by the ISDC. The changes are mainly to support partial URLs and
absolute URLs more robustly. Host dependent directory paths are
now converted to true URLs before being read from/written to
grouping tables.
- modified ffnmhd slightly so that it will move to the first extension
in which either the EXTNAME or the HDUNAME keyword is equal to the
user-specified name. Previously, it only checked for HDUNAME if
the EXTNAME keyword did not exist.
- made small change to drvrnet.c so that it uncompress files
which end in .Z and .gz just as for ftp files.
- rewrote ffcphd (copy header) to handle the case where the
input and output HDU are in the same physical FITS file.
- fixed bug in how long string keyword values (using the CONTINUE
convention) were read. If the string keyword value ended in an
'&' character, then fits_read_key_longstr, fits_modify_key_str,
and fits_delete_key would interpret the following keyword as
a continuation, regardless of whether that keyword name was
'CONTINUE' as required by this convention. There was also a bug
in that if the string keyword value was all blanks, then
fits_modify_key_str could in certain unusual cases think
that the keyword ended in an '&' and go into an infinite loop.
- modified ffgpv so that it calls the higher level ffgpv_ routine
rather than directly calling the lower level ffgcl_ routine. This
change is needed to eventually support reading compressed images.
- added 3 new routines to get the image datatype, image dimensions,
and image axes length. These support the case where the image is
compressed and stored in a binary table.
- fixed bug in ffiblk that could sometimes cause it to insert a
new block in a file somewhere in the middle of the data, instead
of at the end of the HDU. This fortunately is a rare problem,
mainly only occurring in certain cases when inserting rows in a binary
table that contains variable length array data (i.e., has a heap).
- modified fits_write_tdim so that it double checks the TFORMn
value directly if the column repeat count stored in the internal
structure is not equal to the product of all the dimensions.
- fixed bug that prevented ffitab or ffibin from inserting a new
table after a null primary array (can't read NAXIS2 keyword).
Required a small change to ffrdef.
- modified testprog.c so that it will continue to run even if
it cannot open or process the template file testprog.tpt.
- modified the logic in lines 1182-1185 of grparser.c so that
it returns the correct status value in case of an error.
- added test in fitsio2.h to see if __sparcv9 is defined; this
identifies a machine running Solaris 7 in 64-bit mode where
long integers are 64 bits long.
Version 2.032 - 25 May 1999
- the distribution .tar file was changed so that all the files
will be untarred into a subdirectory by default instead of
into the current directory.
- modified ffclos so that it always frees the space allocated by
the fptr pointer, even when another fptr points to the same file.
- plugged a potential (but rare in practice) memory leak in ffpinit
- fixed bug in all the ffp3d_ and ffg3d_ routines in cases where
the data cube that has been allocated in memory has more planes
than the data cube in the FITS file.
- modified drvrsmem.c so that it allocates a small shared
memory segment only if CFITSIO tries to read or write a
FITS file in shared memory. Previously it always allocated
the segment whether it was needed or not. Also, this small
segment is removed if 0 shared memory segments remain in
the system.
- put "static" in front of 7 DECLARE macros in compress.c
because these global variables were causing conflicts with other
applications programs that had variables with the same names.
- modified ffasfm to return datatype = TDOUBLE instead of TFLOAT
if the ASCII table column has TFORMn = 'Ew.d' with d > 6.
- modified the column reading routines to a) print out the offending
entry if an error occurs when trying to read a numeric ASCII table
column, and b) print out the column number that had the error
(the messages are written to CFITSIOs error stack)
- major updates to the Fortran FITSIO User's Guide to include many
new functions that have been added to CFITSIO in the past year.
- modified fitsio2.h so that the test for __D_FLOAT etc. is only
made on Alpha VMS machines, to avoid syntax errors on some other
platforms.
- modified ffgthd so that it recognizes a floating point value
that uses the 'd' or 'D' exponent character.
- removed the range check in fftm2s that returned an error if
'decimals' was less than zero. A negative value is OK and is
used to return only the date and not the time in the string.
Version 2.031 - 31 Mar 1999
- moved the code that updates the NAXIS2 and PCOUNT keywords from
ffchdu into the lower lever ffrdef routine. This ensures that
other routines which call ffrdef will correctly update these 2
keywords if required. Otherwise, for instance, calling
fits_write_checksum before closing the HDU could cause the NAXIS2
keyword (number of rows in the table) to not be updated.
- fixed bug (introduced in version 2.030) when writing null values
to a primary array or image extension. If trying to set more
than 1 pixel to null at a time, then typically only 1 null would
be written. Also fixed related bug when writing null values to
rows in a table that are beyond the currently defined size of the
table (the size of the table was not being expanded properly).
- enhanced the extended filename parser to support '*' in image
section specifiers, to mean use the whole range of the axis.
myfile.fits[*,1:100] means use the whole range of the first
axis and pixels 1 to 100 in the second axis. Also supports
an increment, as in myfile.fits[*:2, *:2] to use just the
odd numbered rows and columns.
- modified fitscore.c to set the initial max size of the header, when
first reading it, to the current size of the file, rather than to
2 x 10**9 to avoid rare cases where CFITSIO ends up writing a huge
file to disk.
- modified file_compress_open so that it will not allow a compressed
FITS file to be opened with write access. Otherwise, a program
could write to the temporary copy of the uncompressed file, but
the modification would be lost when the program exits.
Version 2.030 - 24 Feb 1999
- fixed bug in ffpclu when trying to write a null value to a row
beyond the current size of the table (wouldn't append new rows
like it should).
- major new feature: enhanced the routines that read ASCII string
columns in tables so that they can read any table column, including
logical and numeric valued columns. The column values are returned
as a formatted string. The format is determined by the TDISPn
keyword if present, otherwise a default format based on the
datatype of the column is used.
- new routine: fits_get_col_display_width/ffgcdw returns the length
of the formatted strings that will be returned by the routines that
read table columns as strings.
- major new feature: added support for specifying an 'image section'
when opening an image: e.g, myfile.fits[1:512:2,2:512:2] to
open a 256x256 pixel image consisting of the odd columns and the
even numbered rows of the input image.
- added supporting project files and instructions for building
CFITSIO under Windows NT with the Microsoft Visual C++ compiler.
- changed the variable 'template' to 'templt' in testprog.c since
it conflicted with a reserved word on some compilers.
- modified group.c to conditionally include sys/stat.h only on
unix platforms
- fixed bug in the ffiter iterator function that caused it to always
pass 'firstn' = 1 to the work function when reading from the
primary array or IMAGE extension. It worked correctly for tables.
- fixed bug in the template header keyword parser (ffgthd) in cases
where the input template line contains a logical valued keyword
(T or F) without any following comment string. It was previously
interpreting this as a string-valued keyword.
- modified ffrhdu that reads and opens a new HDU, so that it
ignores any leading blank characters in the XTENSION name, e.g.,
XTENSION= ' BINTABLE' will not cause any errors, even though
this technically violates the FITS Standard.
- modified ffgtbp that reads the required table keywords to make
it more lenient and not exit with an error if the THEAP keyword
in binary tables cannot be read as an integer. Now it will
simply ignore this keyword if it cannot be read.
- added test for 'WIN32' as well as '__WIN32__' in fitsio2.h,
eval.l and eval_l.c in a preprocessor statement.
- changed definition of strcasecmp and strncasecmp in fitsio2.h,
eval.l and eval_l.c to conform to the function prototypes under
the Alpha VMS v7.1 compiler.
- corrected the long function names in longnam.h for the new WCS
utility functions in wcssubs.c
Version 2.029 - 11 Feb 1999
- fixed bug in the way NANs and underflows were being detected on
VAX and Alpha VMS machines.
- enhanced the filename parser to distinguish between a VMS-style
directory name (e.g. disk:[directory]myfile.fits) and a CFITSIO
filter specifier at the end of the name.
- modified ffgthd to support the HIERARCH convention for keyword
names that are longer than 8 characters or contain characters
that would be illegal in standard FITS keyword names.
- modified the include statements in grparser.c so that malloc.h
and memory.h are only included on the few platforms that really
need them.
- modified the file_read routine in drvrfile.c to ignore the last
record in the FITS file it it only contains a single character that
is equal to 0, 10 or 32. Text editors sometimes append a character
like this to the end of the file, so CFITSIO will ignore it and
treat it as if it had reached the end of file.
- minor modifications to fitsio.h to help support the ROOT environment.
- installed new version of group.c and group.h; the main change
is to support relative paths (e.g. "../filename") in the URLs
- modified the histogramming routines so that it looks for the
default preferred column axes in a keyword of the form
CPREF = 'Xcol, Ycol'
instead of separate keywords of the form
CPREF1 = 'Xcol'
CPREF2 = 'Ycol'
- fixed bug so that if the binning spec is just a single integer,
as in [bin 4] then this will be interpreted as meaning to make
a 2D histogram using the preferred or default axes, with the
integer taken as the binning factor in both axes.
Version 2.028 - 27 Jan 1999
- if the TNULLn keyword value was outside the range of a 'I' or 'B'
column, an overflow would occur when setting the short or char
to the TNULLn value, leading to incorrect values being flagged as
being undefined. This has been fixed so that CFITSIO will ignore
TNULLn values that are beyond the range of the column data type.
- changed a few instances of the string {"\0"} to {'\0'} in the
file groups.c
- installed new version of the grparser.c file from the ISDC
- added new WCS support routines (in wcssub.c) which make it easier
to call Doug Mink's WCSlib routines for converting between plate
and sky coordinates. The CFITSIO routines themselves never
call a WCSlib routine, so CFITSIO is not dependent on WCSlib.
- modified ffopen so that if you use the extended filename
syntax to both select rows in a table and then bin columns into
a histogram, then CFITSIO will simply construct an array listing
the good row numbers to be used when making the histogram,
instead of making a whole new temporary FITS file containing
the selected rows.
- modified ffgphd which parses the primary array header keywords
when opening a file, to not choke on minor format errors in
optional keywords. Otherwise, this prevents CFITSIO from
even opening the file.
- changed a few more variable declarations in compress.c from global
to static.
Version 2.027 - 12 Jan 1999
- modified the usage of the output filename specifier so that it,
a) gives the name of the binned image, if specified, else,
b) gives the name of column filtered and/or row filtered table, if
specified, else
c) is the name for a local copy of the ftp or http file, else,
d) is the name for the local uncompressed version of the compressed
FITS file, else,
e) the output filename is ignored.
- fixed minor bug in ffcmps, when comparing 2 strings while using
a '*' wild card character.
- fixed bug in ftgthd that affected cases where the template string
started with a minus sign and contained 2 tokens (to rename a
keyword).
- added support for the HIERARCH keyword convention for reading
and writing keywords longer than 8 characters or that contain
ASCII characters not allowed in normal FITS keywords.
- modified the extended filename syntax to support opening images
that are contained in a single cell of a binary table with syntax:
filename.fits[extname; col_name(row_expression)]
Version 2.026 - 23 Dec 1998
- modified the group parser to:
a) support CFITSIO_INCLUDE_FILES environment variable, which can
point to the location of template files, and,
b) the FITS file parameter passed to the parser no longer has to point
to an empty file. If there are already HDUs in the file, then the
parser appends new HDUs to the end of the file.
- make a small change to the drvrnet.c file to accommodate creating
a static version of the CFITSIO library.
- added 2 new routines to read consecutive bits as an unsigned integer
from a Bit 'X' or Byte 'B' column (ffgcxui and ffgcxuk).
- modified the logic for determining histogram boundaries in ffhisto
to add one more bin by default, to catch values that are right on
the upper boundary of the histogram, or are in the last partial bin.
- modified cfitsio2.h to support the new Solaris 7 64-bit mode operating
system.
- Add utility routine, CFits2Unit, to the Fortran wrappers which searches
the gFitsFiles array for a fptr, returning its element (Fortran unit
number), or allocating a new element if one doesn't already
exists... for C calling Fortran calling CFITSIO.
- modified configure so that it does not use the compiler optimizer
when using gcc 2.8.x on Linux
- (re)added the fitsio.* documentation files that describe the
Fortran-callable FITSIO interface to the C routines.
- modified the lexical parser in eval_f.c to fix bug in null detections
and bug in ffsrow when nrows = 0.
- modified ffcalc so that it creates a TNULLn keyword if appropriate
when a new column is created. Also fixed detection of OVERFLOWs
so that it ignores null values.
- added hyperbolic trig and rounding functions to
the lexical parser in the eval* files.
- improved error message that gets written when the group number is
out of range when reading a 'random groups' array.
- added description of shared memory, grouping, and template parsing
error messages to ffgerr and to the User's Guide. Moved the error
code definitions from drvsmem.h to fitsio.h.
- modified grparser.c to compile correctly on Alpha/OSF machines
- modified drvrnet.c to eliminate compiler warnings
- Modified Makefile.in to include targets for building all the sample
programs that are included with CFITSIO.
Version 2.025 - 1 Dec 1998
- modified ffgphd and ffgtbp so that they ignores BLANK and TNULLn keywords
that do not have a valid integer value. Also, any error while reading
the BSCALE, BZERO, TSCALn, or TZEROn keywords will be ignored.
Previously, CFITSIO would have simply refused to read an HDU that had
such an invalid keyword.
- modified the parser in eval_f.c to accept out of order times in GTIs
- updated cfitsio_mac.sit.hqx to fix bad target parameters for Mac's
speed test program
- modified template parser in grparser.c to: 1) not write GRPNAME keyword
twice, and 2) assign correct value for EXTVERS keyword.
- fixed minor bugs in group.c; mainly would only affect users of the
INTEGRAL Data Access Layer.
- temporarily removed the prototype for ffiwcs from fitsio.h until
full WCS support is added to CFITSIO in the near future.
- modified the HTTP driver to send a User-Agent string:
HEASARC/CFITSIO/<version number>
- declared local variables in compress.c as 'static' to avoid
conflicts with other libraries.
Version 2.024 - 9 Nov 1998
- added new function fits_url_type which returns the driver prefix string
associated with a particular FITS file pointer.
Version 2.023 - 1 Nov 1998 - first full release of CFITSIO 2.0
- slightly modified the way real keyword values are formatted, to ensure
that it includes a decimal point. E.g., '1.0E-09' instead of '1E-09'
- added new function to support template files when creating new FITS files.
- support the TCROTn WCS keyword in tables, when reading the WCS keywords.
- modified the iterator to support null values in logical columns in
binary tables.
- fixed bug in iterator to support null values in integer columns in
ASCII tables.
- changed the values for FLOATNULLVALUE and DOUBLENULLVALUE to make them
less likely to duplicate actual values in the data.
- fixed major bug when freeing memory in the iterator function. It caused
mysterious crashes on a few platforms, but had no effect on most others.
- added support for reading IRAF format image (.imh files)
- added more error checking to return an error if the size of the FITS
file exceeds the largest value of a long integer (2.1 GB on 32-bit
platforms).
- CFITSIO now will automatically insert space for additional table rows
or add space to the data heap, if one writes beyond the current end
of the table or heap. This prevents any HDUs which might follow
the current HDU from being overwritten. It is thus no longer necessary
to explicitly call fits_insert_rows before writing new rows of data
to the FITS file.
- CFITSIO now automatically keeps track of the number of rows that have
been written to a FITS table, and updates the NAXIS2 keyword accordingly
when the table is closed. It is no longer necessary for the application
program to updated NAXIS2.
- When reading from a FITS table, CFITSIO will now return an error if the
application tries to read beyond the end of the table.
- added 2 routines to get the number of rows or columns in a table.
- improved the undocumented feature that allows a '20A' column to be
read as though it were a '20B' column by fits_read_col_byt.
- added overflow error checking when reading keywords. Previously, the
returned value could be silently truncated to the maximum allowed value
for that data type. Now an error status is returned whenever an
overflow occurs.
- added new set of routines dealing with hierarchical groups of files.
These were provided by Don Jennings of the INTEGRAL Science Data Center.
- added new URL parsing routines.
- changed the calling sequence to ffghad (get HDU address) from
ffghad(fitsfile *fptr, > long *headstart, long *dataend) to
ffghad(fitsfile *fptr, > long *headstart, long datastart,
long *dataend, int *status)
- major modification to support opening the same FITS file more
than once. Now one can open the same file multiple times and
read and write simultaneously to different HDUs within the file.
fits_open_file automatically detects if the file is already opened.
- added the ability to clobber/overwrite an existing file
with the same name when creating a new output file. Just
preceed the output file name with '!' (an exclamation mark)
- changed the ffpdat routine which writes the DATE keyword
to use the new 'YYYY-MM-DDThh:mm:ss' format.
- added several new routines to create or parse the new date/time
format string.
- changed ifdef for DECFortran in f77_wrap.h and f77_wrap1.c:
expanded to recognize Linux/Alpha
- added new lexical parsing routines (from Peter Wilson):
eval_l.c, eval_y.c, eval_f.c, eval_defs.h, and eval_tab.h.
These are used when doing on-the-fly table row selections.
- added new family of routines to support reading and writing
'unsigned int' data type values in keywords, images or tables.
- restructured all the putcol and getcol routines to provide
simpler and more robust support for machines which have
sizeof(long) = 8. Defined a new datatype INT32BIT which is
always 32 bits long (platform independent) and is used internally
in CFITSIO when reading or writing BITPIX = 32 images or 'J'
columns. This eliminated the need for specialize routines like
ffswaplong, ffunswaplong, and ffpacklong.
- overhauled cfileio.c (and other files) to use loadable drivers for
doing data I/O to different devices. Now CFITSIO support network
access to ftp:// and http:// files, and to shared memory files.
- removed the ffsmem routine and replaced it with ffomem. This will
only affect software that reads an existing file in core memory.
(written there by some other process).
- modified all the ffgkn[] routines (get an array of keywords) so
that the 'nfound' parameter is = the number of keywords returned,
not the highest index value on the returned keywords. This makes
no difference if the starting index value to look for = 1.
This change is not backward compatible with previous versions
of CFITSIO, but is the way that FITSIO behaved.
- added new error code = 1 for any application error external
to CFITSIO. Also reports "unknown error status" if the
value doesn't match a known CFITSIO error.
Version 1.42 - 30 April 1998 (included in FTOOLS 4.1 release)
- modified the routines which read a FITS float values into
a float array, or read FITS double values into a double array,
so that the array value is also explicitly set in addition
to setting the array of flag values, if the FITS value is a NaN.
This ensures that no NaN values get passed back to the calling
program, which can cause serious problems on some platforms (OSF).
- added calls to ffrdef at the beginning of the insert
or delete rows or columns routines in editcol.c to make sure
that CFITSIO has correctly initialized the HDU information.
- added new routine ffdrws to delete a list of rows in a table
- added ffcphd to copy the header keywords from one hdu to another
- made the anynul parameter in the ffgcl* routines optional
by first checking to see if the pointer is not null before
initializing it.
- modified ffbinit and ffainit to ignore minor format
errors in header keywords so that cfitsio can at least
move to an extension that contains illegal keywords.
- modified all the ffgcl* routines to simply return without
error if nelem = 0.
- added check to ffclose to check the validity of the fitsfile
pointer before closing it. This should prevent program crashes
when someone tries to close the same file more than once.
- replaced calls to strcmp and strncmp with macros FSTRCMP and
FSTRNCMP in a few places to improve performance when reading
header keywords (suggested by Mike Noble)
Bug Fixes:
- fixed typo in macro definition of error 504 in the file fitsio.h.
- in ffopen, reserved space for 4 more characters in the input
file name in case a '.zip' suffix needs to be added.
- small changes to ffpclx to fix problems when writing bit (X) data
columns beyond the current end of file.
- fixed small bug in ffcrhd where a dummy pointer was not initialized
- initialized the dummy variable in ffgcfe and ffgcfd which
was causing crashes under OSF in some cases.
- increased the length of the allocated string ffgkls by 2
to support the case of reading a numeric keyword as a string
which doesn't have the enclosing quote characters.
Version 1.4 - 6 Feb 1998
- major restructuring of the CFITSIO User's Guide
- added the new 'iterator' function. The fortran wrapper is
in f77_iter.c for now.
- enhanced ffcrtb so that it writes a dummy primary array
if none currently exists before appending the table.
- removed the ffgcl routine and replaced it with ffgcvl
- modified ffpcnl to just take a single input null value instead
of an entire array of null value flags.
- modified ffcmps and ffgnxk so that, for example, the string 'rate'
is not considered a match to the string 'rate2', and 'rate*'
is a match to the string 'rate'.
- modified ffgrsz to also work with images, in which case
it returns the optimum number of pixels to process at
one time.
- modified ffgthd to support null valued keywords
- added a new source file 'f77_wrap.c' that includes all the
Fortran77 wrapper routines for calling CFITSIO. This will
eventually replace the Fortran FITSIO library.
- added new routines:
ffppn - generic write primary array with null values
ffpprn - write null values to primary array
ffuky - 'update' a keyword value, with any specified datatype.
ffrprt - write out report of error status and error messages
ffiter - apply a user function iteratively to all the rows of a table
ffpkyc - write complex-valued keyword
ffpkym - write double complex-valued keyword
ffpkfc - write complex-valued keyword in fixed format
ffpkfm - write double complex-valued keyword in fixed format
ffgkyc - read complex-valued keyword
ffgkym - read double complex-valued keyword
ffmkyc - modify complex-valued keyword
ffmkym - modify double complex-valued keyword
ffmkfc - modify complex-valued keyword in fixed format
ffmkfm - modify double complex-valued keyword in fixed format
ffukyc - update complex-valued keyword
ffukym - update double complex-valued keyword
ffukfc - update complex-valued keyword in fixed format
ffukfm - update double complex-valued keyword in fixed format
ffikyc - insert complex-valued keyword
ffikym - insert double complex-valued keyword
ffikfc - insert complex-valued keyword in fixed format
ffikfm - insert double complex-valued keyword in fixed format
ffpktp - write or modify keywords using ASCII template file
ffcpcl - copy a column from one table to another
ffcpky - copy an indexed keyword from one HDU to another
ffpcnl - write logical values, including nulls, to binary table
ffpcns - write string values, including nulls, to table
ffmnhd - move to HDU with given exttype, EXTNAME and EXTVERS values
ffthdu - return the total number of HDUs in the file
ffghdt - return the type of the CHDU
ffflnm - return the name of the open FITS file
ffflmd - return the mode of the file (READONLY or READWRITE)
- modified ffmahd and ffmrhd (to move to a new extension) so that
a null pointer may be given for the returned HDUTYPE argument.
- worked around a bug in the Mac CWpro2 compiler by changing all
the statements like "#if BYTESWAPPED == TRUE" to "if BYTESWAPPED".
- modified ffitab (insert new ASCII table) to allow tables with
zero number of columns
- modified Makefile.in and configure to define the -Dg77Fortran
CFLAGS variable on Linux platforms. This is needed to
compile the new f77_wrap.c file (which includes cfortran.h)
Bug Fixes:
- fixed small bug in ffgrz (get optimum row size) which sometimes
caused it to return slightly less than the maximum optimum size.
This bug would have done no harm to application programs.
- fixed bug in ffpclk and ffgclk to add an 'else' case
if size of int is not equal to size of short or size of long.
- added test to ffgkls to check if the input string is not null before
allocating memory for it.
Version 1.32 - 21 November 1997 (internal release only)
- fixed bug in the memory deallocation (free) statements
in the ffopen routine in the cfileio.c file.
- modified ffgphd to tolerate minor violations of the FITS
standard in the format of the XTENSION = 'IMAGE '
keyword when reading FITS files. Extra trailing spaces
are now allowed in the keyword value. (FITS standard
will be changed so that this is not a violation).
Version 1.31 - 4 November 1997 (internal release only)
Enhancements:
- added support for directly reading compressed FITS files
by copying the algorithms from the gzip program. This
supports the Unix compress, gzip and pkzip algorithms.
- modified ffiimg, ffitab, and ffibin (insert HDUs into
a FITS file) so that if the inserted HDU is at the end of
the FITS file, then it simply appends a new empty HDU
and writes the required keywords. This allows space
to be reserved for additional keywords in the header
if desired.
- added the ffchfl and ffcdfl routines to check the header and
data fill values, for compatibility with the Fortran FITSIO
library.
- added the ffgsdt routine to return the system date
for compatibility with the Fortran FITSIO library.
- added a diagnostic error message (written to the error stack)
if the routines that read data from image or column fail.
- modified ffgclb so that it simply copies the bytes from
an ASCII 'nA' or 'An' format column into the user's byte
array. Previously, CFITSIO would return an error when
trying to read an 'A' column with ffgclb.
- modified ffpclb so that it simply copies the input array
of bytes to an ASCII 'nA' or 'An' format column.
Previously, CFITSIO would return an error when
trying to write to an 'A' column with ffpclb.
Bug Fixes:
- ffgkls was allocating one too few bytes when reading continued
string keyword values.
- in testprog.c added code to properly free the memory that
had been allocated for string arrays.
- corrected typographical errors in the User's Guide.
Version 1.30 - 11 September 1997
- major overhaul to support reading and writing FITS files
in memory. The new routines fits_set_mem_buff and
fits_write_mem_buff have been added to initialize and
copy out the memory buffer, respectively.
- added support for reading FITS files piped in on 'stdin'
and piped out on 'stdout'. Just specify the file name as '-'
when opening or creating the FITS file.
- added support for 64-bit SGI IRIX machines. This required
adding routines to pack and unpack 32-bit integers into
64-bit integers.
- cleaned up the code that supports G_FLOAT and IEEE_FLOAT
on Alpha VMS systems. Now, the type of float is determined
at compile time, not run time.
Bug Fixes:
- replaced the malloc calls in the error message stack routines
with a static fixed size array. The malloc's cause more
problems than they solved, and were prone to cause memory
leaks if users don't clear the error message stack when
closing the FITS file.
- when writing float or double keywords, test that the value
is not a special IEEE value such as a NaN. Some
compilers would write the string 'NaN' in this case into
the output value string.
- fixed bug in ffiblk, to ignore EOF status return if it is
inserting blocks at the end of the file.
- removed the 'l' from printf format string that is constructed
in the ffcfmt routine. This 'l' is non-standard and causes problems
with the Metrowerks compiler on a Mac.
- the default null value in images was mistakenly being set
equal to NO_NULL = 314, rather than NULL_UNDEFINED = 1234554321
in the ffgphd routine.
- check status value in ffgkls to make sure the keyword exists
before allocating memory for the value string.
- fixed the support for writing and reading unsigned long integer
keyword values in ffpky and ffgky by internally treating
the values as doubles. This required changes to ffc2r and
ffc2d as well.
- added explicit cast to 'double' in one place in putcolb.c and
6 places in pubcolui.c, to get rid of warning messages issued
by one compiler.
- in ffbinit and ffainit, it is necessary to test that tfield > 0
before trying to allocate memory with calloc. Otherwise, some
compilers return a null pointer which CFITSIO interprets to
mean the memory allocation failed.
- had to explicitly cast the null buffer pointer to a char
pointer (cptr = (char *)buffer;) in 4 places in the buffers.c
file to satisfy a picky C++ compiler.
- changed the test for an ALPHA VMS system to see if
'__VMS' is defined, rather than 'VMS'. The latter
is not defined by at least one C++ compiler.
- modified ffpcls so that it can write a null string to
a variable length string column, without going into
an infinite loop.
- fixed bug in ffgcfl that caused the 'next' variable to be
incremented twice.
- fixed bug in ffgcpr that caused it write 2x the number of
complex elements into the descriptor when writing to
a complex or double complex variable length array column.
- added call to ffrdef at the end of ffrsim to ensure that
the internal structures are updated to correspond to the
modified header keywords
Version 1.25 - 7 July 1997
- improved the efficiency of the ffiblk routine, when inserting
more than one block into the file.
- fixed bug in ffwend that in rare instances caused the beginning
of the following extension to be overwritten by blank fill.
- added new routine to modify the size of an existing primary
array or image extension: fits_resize_img/ffrsim.
- added support for null-valued keywords, e.g., keywords that
have no defined value. These keywords have an equal sign and
space in columns 9-10, but have not value string. Example:
KEYNAME = / null-valued keyword
Support for this feature required the following changes:
- modified ffpsvc to return a null value string without error
- modified ffc2[ilrd] to return error VALUE_UNDEFINED in this case
- modified ffgkn[sljed] to continue reading additional keywords
even if one or more keywords have undefined values.
- added 4 new routines: ffpkyu, ffikyu, ffmkyu, ffukyu to
write, insert, modify, or update an undefined keyword
- a new makefile.os2 file was added, for building CFITSIO
on OS/2 systems.
- modified ffgtkn so that if it finds an unexpected keyword
name, the returned error status = BAD_ORDER instead of
NOT_POS_INT.
- added 2 new routines, fits_write_key_unit/ffpunt and
fits_read_key_unit/ffgunt to write/read the physical
units of a keyword value. These routines use a local
FITS convention for storing the units in square brackets
following the '/' comment field separator, as in:
VELOCITY= 12 / [km/s] orbit speed
The testprog.c program was modified to test these
new routines.
- in the test of Alpha OSF/1 machines in fitsio2.h,
change 'defined(unix)' to 'defined(__unix__)' which
appears to be a more robust test.
- remove test for linux environment variable from fitsio2.h
Version 1.24 - 2 May 1997
- fixed bug in ffpbyt that incorrectly computed the current
location in the FITS file when writing > 10000 bytes.
- changed the datatype of the 'nbytes' parameter in ffpbyt
from 'int' to 'long'. Made corresponding datatype change
to some internal variables in ffshft.
- changed '(unsigned short *)' to '(short *)' in getcolui.c, and
changed '(unsigned long *)' to '(long *)' in getcoluj.c, to
work around problem with the VAX/VMS cc compiler.
Version 1.23 - 24 April 1997
- modified ffcins and ffdins (in editcol.c) to simply return
without error if there are no (zero) rows in the table.
Version 1.22 - 18 April 1997
- fixed bug in ffgcpr that caused it to think that all values were
undefined in ASCII tables columns that have TNULLn = ' '
(i.e., the TNULLn keyword value is a string of blanks.
- fixed bug in the ffgcl[bdeijk,ui,uj] family of routines
when parsing a numeric value in an ASCII table. The
returned values would have the decimal place shifted to
the left if the table field contained an explicit decimal
point followed by blanks. Example: in an F5.2 column,
the value '16. ' would be returned as 0.16. If the
trailing zeros were present, then cfitsio returned the
correct value (e.g., '16.00' returns 16.).
- fixed another bug in the ffgcl[bdeijk,ui,uj] family of routines
that caused them to misread values in an ASCII table in rows
following an undefined value when all the values were read
at once in a single call to the routine.
Version 1.21 - 26 March 1997
- added general support for reading and writing unsigned integer
keywords, images, and binary table column values.
- fixed bug in the way the column number was used in ffgsve and
similar routines. This bug caused cfitsio to read (colnum - 1)
rather than the desired column.
- fixed a bug in ftgkls that prevented it from reading more than one
continuation line of a long string keyword value.
- fixed the definition of fits_write_longwarn in longnam.h
Version 1.20 - 29 Jan 1997
- when creating a binary table with variable length vector columns, if the
calling routine does not specify a value for the maximum length of
the vector (e.g., TFORMn = '1PE(400)') then cfitsio will automatically
calculate the maximum value and append it to the TFORM value
when the binary table is first closed.
- added the set of routines to do coordinate system transformations
- added support for wildcards ('*', '?', and '#') in the input
keyword name when reading, modifying, or deleting keywords.
- added new general keyword reading routine, ffgnxk, to return
the next keyword whose name matches a list of template names,
but does not match any names on a second template list.
- modified ftgrec so that it simply moves to the beginning
of the header if the input keyword number = 0
- added check in ffdelt to make sure the input fits file pointer is
not already null
- added check in ffcopy to make sure the output HDU does not
already contain any keywords (it must be empty).
- modified ffgcls so that it does not test if each string column
value equals the null string value if the null string value
is longer than the width of the column.
- fixed bug in ftgtdm that caused it to fail if the TDIMn
keyword did not exist in the FITS file
- modified testprog.c to include tests of keyword wildcards
and the WCS coordinate transformation routines.
- added a test for 'EMX' in fitsio2.h so that cfitsio builds
correctly on a PC running OS/2.
Version 1.11 - 04 Dec 1996
- modified the testprog.c program that is included with the
distribution, so that the output FITS file is identical to
that produced by the Fortran FITSIO test program.
- changed all instances of the 'extname' variable to 'extnm'
to avoid a conflict with the -Dextname switch in cfortran.h
on HP machines.
- in all the routines like ffi4fi1, which convert an array
of values to integers just prior to writing them to the FITS
file, the integer value is now rounded to the nearest integer
rather than truncated. (ffi4fi1, ffi4fi2, ffi4fi4, etc)
- changed ffgcfl (and hence ffgcl) so that the input value
of the logical array element is not changed if the corresponding
FITS value is undefined.
- in ffgacl, the returned value of TBCOL was off by 1 (too small)
- fixed the comment of EXTNAME keyword to read 'binary table'
instead of 'ASCII table' in the header of binary tables.
Version 1.101 - 17 Nov 1996
- Made major I/O efficiency improvements by adding internal buffers
rather than directly reading or writing to disk. Access to
columns in binary tables is now 50 - 150 times faster. Access to
FITS image is also slightly faster.
- made significant speed improvements when reading numerical data
in FITS ASCII tables by writing my own number parsing routines
rather than using the sscanf C library routine. This change
requires that the -lm argument now be included when linking
a program that calls cfitsio (under UNIX).
- regrouped the source files into logically related sets of routines.
The Makefile now runs much faster since every single routine is
not split into a separate file.
- now use the memcpy function, rather than a 'for' loop in several
places for added efficiency
- redesigned the low-level binary table read and write routines
(ffpbytoff and ffgbytoff) for greater efficiency.
- added a new error status: 103 = too many open FITS files.
- added a 'extern "C"' statement around the function prototypes
in fitsio.h, to support use of cfitsio by C++ compilers.
- fixed routines for writing or reading fixed-length substrings
within a binary table ASCII column, with TFORM values of
of the form 'rAw' where 'r' is the total width of the ASCII
column and 'w' is the width of a substring within the column.
- no longer automatically rewrite the END card and following fill
values if they are already correct.
- all the 'get keyword value and comment' routines have been changed
so that the comment is not returned if the input pointer is NULL.
- added new routine to return the optimum number of tables rows
that should be read or written at one time for optimum efficiency.
- modified the way numerical values in ASCII tables are parsed so
that embedded spaces in the value are ignored, and implicit
decimal points are now supported. (e.g, the string '123E 12'
in a 'E10.2' format column will be interpreted as 1.23 * 10**12).
- modified ffpcl and ffgcl to support binary table columns of
all datatype (added logical, bit, complex, and double complex)
- when writing numerical data to ASCII table columns, the ffpcl_
routines now return an overflow error if a value is too large
to be expressed in the column format.
- closed small memory leak in ffpcls.
- initialized the 'incre' variable in ffgcpr to eliminate compiler warning.
Version 1.04 - 17 Sept 1996
- added README.MacOS and cfitsio_mac.sit.hqx to the distribution
to support the Mac platforms.
- fixed bug in ffpdfl that caused an EOF error (107) when a program
creates a new extension that is an exact multiple of 2880 bytes long,
AND the program does not write a value to the last element
in the table or image.
- fixed bug in all the ffgsf* and ffgcv* routines which caused
core dumps when reading null values in a table.
Version 1.03 - 20 August 1996
- added full support for reading and writing the C 'int'
data type. This was a problem on Alpha/OSF where short,
int, and long datatypes are 2, 4, and 8 bytes long, respectively.
- cleaned up the code in the byte-swapping routines.
- renamed the file 'longname.h' to 'longnam.h' to avoid conflict
with a file with the same name in another unrelated package.
Version 1.02 - 15 August 1996
- ffgtbp was not correctly reading the THEAP keyword, hence would
not correctly read variable length data in binary tables if
the heap was not at the default starting location (i.e.,
starting immediately after the fixed length table).
- now force the cbuff variable in ffpcl_ and ffgcl_ to be
aligned on a double word boundary. Non-alignment can
cause program to crash on some systems.
Version 1.01 - 12 August 1996
- initial public release
|