1
CFITSIO Interface Library
3
CFITSIO is a library of ANSI C routines for reading and writing FITS
4
format data files. A set of Fortran-callable wrapper routines are also
5
included for the convenience of Fortran programmers. This README file
6
gives a brief summary of how to build and test CFITSIO, but the CFITSIO
7
User's Guide, found in the files cfitsio.doc (plain text), cfitsio.tex
8
(LaTeX source file), or cfitsio.ps (postscript format), should be
9
referenced for the latest and most complete information.
14
The CFITSIO code is contained in about 40 *.c source files and several *.h
15
header files. The CFITSIO library is built on Unix systems by typing:
20
at the operating system prompt. The 'configure' command customizes
21
the Makefile for your particular system, then the 'make' command
24
On VAX/VMS and ALPHA/VMS systems the make.com command file may be used
25
to build the cfitsio.olb object library using the default G-floating
26
point option for double variables. The make\_dfloat.com and make\_ieee.com
27
files may be used instead to build the library with the other floating
30
A precompiled DLL version of CFITSIO is available for IBM-PC users of
31
the Borland or Microsoft Visual C++ compilers in the files
32
cfitsiodll_2xxx_borland.zip and cfitsiodll_2xxx_vcc.zip, where '2xxx'
33
represents the current release number. These zip archives also
34
contains other files and instructions on how to use the CFITSIO DLL
35
library. The CFITSIO library may also be built from the source code
36
using the makefile.bc or makefile.vcc files. Finally, the makepc.bat
37
file gives an example of building CFITSIO with the Borland C++ v4.5
38
compiler using simpler DOS commands.
40
On OS/2 systems, CFITSIO can be built using the supplied makefile by
41
typing 'make -f makefile.os2'. This makefile requires the GCC compiler
42
and EMX library, which are available from many Internet sites
43
containing OS/2 software, such as
44
ftp-os2.nmsu.edu/pub/os2/dev/emx/v0.9c and
45
ftp.leo.org/pub/comp/os/os2/leo/devtools/emx+gcc.
47
When building on Mac OS-X, users should follow the Unix instructions,
48
above. Previous MacOS versions of the cfitsio library can be built by
49
(1) un binhex and unstuff cfitsio_mac.sit.hqx, (2) put CFitsioPPC.mcp
50
in the cfitsio directory, and (3) load CFitsioPPC.mcp into CodeWarrior
51
Pro 5 and make. This builds the cfitsio library for PPC. There are
52
also targets for both the test program and the speed test program.
54
To use the MacOS port you can add Cfitsio PPC.lib to your Codewarrior
55
Pro 5 project. Note that this only has been tested for the PPC and
62
The CFITSIO library should be tested by building and running
63
the testprog.c program that is included with the release.
64
On Unix systems, type:
67
% testprog > testprog.lis
68
% diff testprog.lis testprog.out
69
% cmp testprog.fit testprog.std
72
(assuming cc is the name of the C compiler command), type:
75
$ link testprog, cfitsio/lib
78
The testprog program should produce a FITS file called `testprog.fit'
79
that is identical to the testprog.std FITS file included in this
80
release. The diagnostic messages (which were piped to the file
81
testprog.lis in the Unix example) should be identical to the listing
82
contained in the file testprog.out. The 'diff' and 'cmp' commands
83
shown above should not report any differences in the files.
88
The CFITSIO User's Guide, contained in the files cfitsio.doc (plain
89
text file) and cfitsio.ps (postscript file), provides detailed
90
documentation about how to build and use the CFITSIO library.
91
It contains a description of every user-callable routine in the
94
The cookbook.c file provides some sample routines for performing common
95
operations on various types of FITS files. Programmers are urged to
96
examine these routines for recommended programming practices when using
97
CFITSIO. Users are free to copy or modify these routines for their own
103
CFITSIO has currently been tested on the following platforms:
105
Operating System Compiler
106
---------------- --------
107
OPERATING SYSTEM COMPILER
108
Sun OS gcc and cc (3.0.1)
109
Sun Solaris gcc and cc
110
Silicon Graphics IRIX gcc and cc
111
Silicon Graphics IRIX64 MIPS
112
Dec Alpha OSF/1 gcc and cc
113
DECstation Ultrix gcc
115
DEC VAX/VMS gcc and cc
120
Windows 95/98/NT Borland C++ V4.5
121
Windows 95/98/NT Microsoft/Compaq Visual C++ v5.0, v6.0
122
Windows 95/98/NT Cygwin gcc
124
MacOS 7.1 or greater Metrowerks 10.+
125
MacOS-X 10.1 or greater cc (gcc)
127
CFITSIO will probably run on most other Unix platforms without
128
modification. Cray supercomputers and IBM mainframe computers are
129
currently not supported.
131
Reports of any success or failure to run CFITSIO on other platforms
132
would be appreciated. Any problem reports or suggestions for
133
improvements are also welcome and should be sent to the primary author.
135
-------------------------------------------------------------------------
137
pence@tetra.gsfc.nasa.gov