The CFITSIO library should be tested by building and running the testprog.c program that is included with the release. On Unix systems, type:
% make testprog % testprog > testprog.lis % diff testprog.lis testprog.out % cmp testprog.fit testprog.stdOn VMS systems, (assuming cc is the name of the C compiler command), type:
$ cc testprog.c $ link testprog, cfitsio/lib $ run testprogThe testprog program should produce a FITS file called `testprog.fit' that is identical to the `testprog.std' FITS file included with this release. The diagnostic messages (which were piped to the file testprog.lis in the Unix example) should be identical to the listing contained in the file testprog.out. The 'diff' and 'cmp' commands shown above should not report any differences in the files.
The Fortran wrappers in CFITSIO may be tested with the testf77 program on Unix systems with:
% f77 -o testf77 testf77.f -L. -lcfitsio or % f77 -f -o testf77 testf77.f -L. -lcfitsio (under SUN O/S) or % f77 -o testf77 testf77.f -Wl,-L. -lcfitsio -lm (HP/UX) % testf77 > testf77.lis % diff testf77.lis testf77.out % cmp testf77.fit testf77.stdOn machines running SUN O/S, Fortran programs must be compiled with the '-f' option to force double precision variables to be aligned on 8-byte boundarys to make the fortran-declared variables compatible with C. A similar compiler option may be required on other platforms. Failing to use this option may cause the program to crash on FITSIO routines that read or write double precision variables.
Also note that on some systems, the output listing of the testf77 program may differ slightly from the testf77.std template, if leading zeros are not printed by default before the decimal point when using F format.
A few other utility programs are included with CFITSIO:
speed - measures the maximum throughput (in MB per second) for writing and reading FITS files with CFITSIO listhead - lists all the header keywords in any FITS file fitscopy - copies any FITS file (especially useful in conjunction with the CFITSIO's extended input filename syntax) iter_a, iter_b, iter_c - tests of the CFITSIO iterator routine