CFITSIO User’s Reference Guide
An Interface to FITS Format Files
for C Programmers
Version 4.2
2.5cm
HEASARC
Code 662
Goddard Space Flight Center
Greenbelt, MD 20771
USA
Nov 2022
Contents
Introduction
A Brief Overview
Sources of FITS Software and Information
Acknowledgments
Legal Stuff
Creating the CFITSIO Library
Building the Library
Testing the Library
Linking Programs with CFITSIO
Using CFITSIO in Multi-threaded Environments
Getting Started with CFITSIO
Example Program
A FITS Primer
Programming Guidelines
CFITSIO Definitions
Current Header Data Unit (CHDU)
Function Names and Variable Datatypes
Support for Unsigned Integers and Signed Bytes
Dealing with Character Strings
Implicit Data Type Conversion
Data Scaling
Support for IEEE Special Values
Error Status Values and the Error Message Stack
Variable-Length Arrays in Binary Tables
Multiple Access to the Same FITS File
When the Final Size of the FITS HDU is Unknown
CFITSIO Size Limitations
Basic CFITSIO Interface Routines
CFITSIO Error Status Routines
FITS File Access Routines
HDU Access Routines
Header Keyword Read/Write Routines
Primary Array or IMAGE Extension I/O Routines
Image Compression
ASCII and Binary Table Routines
Utility Routines
The CFITSIO Iterator Function
The Iterator Work Function
The Iterator Driver Function
Guidelines for Using the Iterator Function
Complete List of Iterator Routines
World Coordinate System Routines
Self-contained WCS Routines
Hierarchical Grouping Routines
Grouping Table Routines
Group Member Routines
Specialized CFITSIO Interface Routines
FITS File Access Routines
HDU Access Routines
Specialized Header Keyword Routines
Define Data Scaling and Undefined Pixel Parameters
Specialized FITS Primary Array or IMAGE Extension I/O Routines
Specialized FITS ASCII and Binary Table Routines
Extended File Name Syntax
Overview
Filetype
Base Filename
Output File Name when Opening an Existing File
Template File Name when Creating a New File
Image Tile-Compression Specification
HDU Location Specification
Image Section
Image Transform Filters
Column and Keyword Filtering Specification
Row Filtering Specification
Binning or Histogramming Specification
Template Files
Detailed Template Line Format
Auto-indexing of Keywords
Template Parser Directives
Formal Template Syntax
Errors
Examples
Local FITS Conventions
64-Bit Long Integers
Long String Keyword Values.
Arrays of Fixed-Length Strings in Binary Tables
Keyword Units Strings
HIERARCH Convention for Extended Keyword Names
Tile-Compressed Image Format
Optimizing Programs
How CFITSIO Manages Data I/O
Optimization Strategies
Index of Routines
Parameter Definitions
CFITSIO Error Status Codes
This document was translated from L
A
T
E
X by
H
E
V
E
A
.