CCfits 2.6

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

CCfits Documentation
CCfits requires CFITSIO
Return To CCfits Home Page

# Introduction

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:

- Details about the FITS format and the current standard
- Home page for the CFITSIO library

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.

- Installing the Package
- Getting Started
- What's Present, What's Missing, and Calling CFITSIO
- Implementation Notes

# Release Notes for Version 2.6 May 2021

Backwards Compatibility Issues:

- When copying keywords from one file to another, copyAllKeys() no longer copies the TYP_CKSUM_KEY, TYP_WCS_KEY, and TYP_CMPRS_KEY keyword types from the infile to the outfile, as they are file-specific keywords. As of 2.6, only TYP_REFSYS_KEY and TYP_USER_KEY keys are copied by default. Note that this affects only the copyAllKeys() function. readAllKeys() uses the same default keyword categories as before.
- As a result of the change described in the previous item, the array returned by the keywordCategories() function no longer applies to readAllKeys().
- For compatibility with C++17, removed dependencies on std::binary_function

Enhancements:

- Added special treatment to allow the stand-alone CCfits to build the cookbook even when build directory is not named "CCfits".
- Removed FITSBase pattern.
- Added capability for user to specify keyword categories to read/copy.
- Replaced all uses of std::auto_ptr with std::unique_ptr, in tandem with configuration changes to add a C++11 compiler flag when necessary.
- Enable support of long string keywords (which use the CONTINUE key).
- All std::bad_cast exceptions are now caught by reference.

Bug Fixes:

- Bug fix to writeHistory and writeComment functions. When copying via the get/write functions, mult-line input was not properly formatted upon output.
- Bug fix needed for creation of ColumnVectorData<unsigned short> objects.
- Fixes to updating of Columns' internal buffers for certain cases of writes or insertions which add rows to a table. Also includes a speed increase to internal Column write function.
- Bug fix to HDUCreator::getScaling function. If BSCALE keyword isn't found, status flag must be reset to 0. Otherwise later call to fits_get_img_equivtype (if necessary) won't actually do anything. This matters for case where file is changing type from signed to unsigned integer-type, but only has a BZERO keyword.

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/VC++.net. 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.