FITSIO Home
Next:
Contents
FITSIO User's Guide
A Subroutine Interface to FITS Format Files
for Fortran Programmers
Version 4.5
HEASARC
Code 662
Goddard Space Flight Center
Greenbelt, MD 20771
USA
Aug 2024
Contents
1
. Introduction
2
. Creating FITSIO/CFITSIO
2
.
1
Building the Library
2
.
2
Testing the Library
2
.
3
Linking Programs with FITSIO
2
.
4
Getting Started with FITSIO
2
.
5
Example Program
2
.
6
Legal Stuff
2
.
7
Acknowledgments
3
. A FITS Primer
4
. FITSIO Conventions and Guidelines
4
.
1
CFITSIO Size Limitations
4
.
2
Multiple Access to the Same FITS File
4
.
3
Current Header Data Unit (CHDU)
4
.
4
Subroutine Names
4
.
5
Subroutine Families and Datatypes
4
.
6
Implicit Data Type Conversion
4
.
7
Data Scaling
4
.
8
Error Status Values and the Error Message Stack
4
.
9
Variable-Length Array Facility in Binary Tables
4
.
10
Support for IEEE Special Values
4
.
11
When the Final Size of the FITS HDU is Unknown
4
.
12
Local FITS Conventions supported by FITSIO
4
.
12
.
1
Support for Long String Keyword Values.
4
.
12
.
2
Arrays of Fixed-Length Strings in Binary Tables
4
.
12
.
3
Keyword Units Strings
4
.
12
.
4
HIERARCH Convention for Extended Keyword Names
4
.
13
Optimizing Code for Maximum Processing Speed
4
.
13
.
1
Background Information: How CFITSIO Manages Data I/O
4
.
13
.
2
Optimization Strategies
5
. Basic Interface Routines
5
.
1
FITSIO Error Status Routines
5
.
2
File I/O Routines
5
.
3
Keyword I/O Routines
5
.
4
Data I/O Routines
6
. Advanced Interface Subroutines
6
.
1
FITS File Open and Close Subroutines:
6
.
2
HDU-Level Operations
6
.
3
Define or Redefine the structure of the CHDU
6
.
4
FITS Header I/O Subroutines
6
.
4
.
1
Header Space and Position Routines
6
.
4
.
2
Read or Write Standard Header Routines
6
.
4
.
3
Write Keyword Subroutines
6
.
4
.
4
Insert Keyword Subroutines
6
.
4
.
5
Read Keyword Subroutines
6
.
4
.
6
Modify Keyword Subroutines
6
.
4
.
7
Update Keyword Subroutines
6
.
4
.
8
Delete Keyword Subroutines
6
.
5
Data Scaling and Undefined Pixel Parameters
6
.
6
FITS Primary Array or IMAGE Extension I/O Subroutines
6
.
7
FITS ASCII and Binary Table Data I/O Subroutines
6
.
7
.
1
Column Information Subroutines
6
.
7
.
2
Low-Level Table Access Subroutines
6
.
7
.
3
Edit Rows or Columns
6
.
7
.
4
Read and Write Column Data Routines
6
.
8
Row Selection and Calculator Routines
6
.
9
Celestial Coordinate System Subroutines
6
.
10
File Checksum Subroutines
6
.
11
Date and Time Utility Routines
6
.
12
General Utility Subroutines
7
. The CFITSIO Iterator Function
8
. Extended File Name Syntax
8
.
1
Overview
8
.
2
Filetype
8
.
2
.
1
Notes about HTTP proxy servers
8
.
2
.
2
Notes about the stream filetype driver
8
.
2
.
3
Notes about the gsiftp filetype
8
.
2
.
4
Notes about the root filetype
8
.
2
.
5
Notes about the shmem filetype:
8
.
3
Base Filename
8
.
4
Output File Name when Opening an Existing File
8
.
5
Template File Name when Creating a New File
8
.
6
Image Tile-Compression Specification
8
.
7
HDU Location Specification
8
.
8
Image Section
8
.
9
Image Transform Filters
8
.
10
Column and Keyword Filtering Specification
8
.
11
Row Filtering Specification
8
.
11
.
1
General Syntax
8
.
11
.
2
Bit Masks
8
.
11
.
3
Vector Columns
8
.
11
.
4
Good Time Interval Filtering and Calculation
8
.
11
.
5
Spatial Region Filtering
8
.
11
.
6
Example Row Filters
8
.
12
Binning or Histogramming Specification
9
. Template Files
9
.
1
Detailed Template Line Format
9
.
2
Auto-indexing of Keywords
9
.
3
Template Parser Directives
9
.
4
Formal Template Syntax
9
.
5
Errors
9
.
6
Examples
10
. Summary of all FITSIO User-Interface Subroutines
11
. Parameter Definitions
12
. FITSIO Error Status Codes
About this document ...