Jump to my Home Page Send me a message Check out stuff on GitHub Check out my photography on Instagram Check out my profile on LinkedIn Check out my profile on reddit Check me out on Facebook

Mitch Richling: CFITSIO Example Programs

Author: Mitch Richling
Updated: 2023-11-15

Table of Contents

1. Introduction

Below are a couple simple CFITSIO programs illustrating the most basic use of the library. They should be useful for the CFITSIO beginner.

Get it all on github: https://github.com/richmit/ex-CFITSIO/

2. 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)

3. Helper Code

fitsUtil.c & fitsUtil.h
A little helper function to manage error handling.