CCfits  2.6
CCfits Documentation
CCfits requires CFITSIO
Return To CCfits Home Page


CCfits is an object oriented interface to the CFITSIO library. CFITSIO is a widely used library for manipulating FITS (Flexible Image Transport System) formatted files. This following documentation assumes prior knowledge of the FITS format and some knowledge of the use of the CFITSIO library, which is in wide use, well developed, and available on many platforms.

For information about FITS and CFITSIO, refer to:

The CCfits library provides an interface that allows the user to manipulate FITS format data through the high-level building blocks of FITS files and Header-Data Units (HDUs). The implementation is designed to hide the details of performing FITS I/O from the user, who will write calls that manipulate FITS objects by passing filenames and lists of strings that represent HDUs, keywords, image data and data columns. Unlike CFITSIO, which typically requires several calls to access data (e.g. open file, move to correct header, determine column containing table data, read data) CCfits is designed to make reading data atomic. For example, it exploits internally existing optimization techniques for FITS I/O, choosing the optimal reading strategy as available [see the CFITSIO manual, Chapter 13] when data are read on initialization. Data written by CCfits will also be compliant with the FITS standard by specification of class constructors representing FITS dataset elements.

CCfits necessarily works in a fundamentally different way than CFITSIO. The general pattern of usage for CCfits is: create a FITS object, which either opens a disk file or creates a new disk file, create references to existing or new HDU objects within it, and manipulated the data through the references. For files with Write access the library is designed to keep the FITS object on disk in sync with the memory copy. The additional memory copy increases the resources required by a calling program in return for some flexibility in accessing the data.

About this Manual

This document lays out the specification for the CCfits library.

The hyperlinks below document the installation procedure, and the demonstration program cookbook which gives examples of usage with comments.

Release Notes for Version 2.6 May 2021

Backwards Compatibility Issues:


Bug Fixes:

For a more complete listing, see the CHANGES file distributed with the software. For earlier versions, see Previous Release Notes.

Authors and Acknowledgements

CCfits was written as part of a re-engineering effort for the X-Ray data analysis program, XSPEC. It was designed using Rational Rose and originally implemented on a Solaris platform by Ben Dorman. Sandhia Bansal worked on part of the implementation, and Paul Kunz wrote the configuration scheme and dispensed helpful advice: both are also thanked profusely for the port to Windows2000/ Thanks to R. Mathar (MPIA) and Patrik Jonsson (Lick Obs.) for contributing many helpful suggestions and bug reports, and ports to HP-UX and AIX respectively.

CCfits is currently maintained by Craig Gordon, Bryan Irby, and Kristin Rutkowski (ccfit.nosp@m.s@he.nosp@m.asarc.nosp@m..gsf.nosp@m.c.nas.nosp@m.a.go.nosp@m.v). Suggestions and bug reports are welcome, as are offers to fill out parts of the implementation that are missing. We are also interested in knowing which parts of CFITSIO that are not currently supported should be the highest priority for future extensions.