Below are a couple simple CFITSIO programs illustrating the most basic use of the library. They should be useful for the CFITSIO beginner... The makefile is here.
The basics: Reading and Writing
- dumpFitsHeader.c
- Shows how to query HDU count, and dump the content of the first HDU.
- fits2tga.c
- Convert a FITS file to TGA (understands common color FITS formats)
Helper Code
- fitsUtil.c fitsUtil.h
- A little helper function to manage error handling.