\contentsline {chapter}{\numberline {1}Introduction }{1}{chapter.1}
\contentsline {chapter}{\numberline {2} Creating FITSIO/CFITSIO }{3}{chapter.2}
\contentsline {section}{\numberline {2.1}Building the Library}{3}{section.2.1}
\contentsline {section}{\numberline {2.2}Testing the Library}{6}{section.2.2}
\contentsline {section}{\numberline {2.3}Linking Programs with FITSIO}{7}{section.2.3}
\contentsline {section}{\numberline {2.4}Getting Started with FITSIO}{7}{section.2.4}
\contentsline {section}{\numberline {2.5}Example Program}{8}{section.2.5}
\contentsline {section}{\numberline {2.6}Legal Stuff}{9}{section.2.6}
\contentsline {section}{\numberline {2.7}Acknowledgments}{10}{section.2.7}
\contentsline {chapter}{\numberline {3} A FITS Primer }{13}{chapter.3}
\contentsline {chapter}{\numberline {4}FITSIO Conventions and Guidelines }{15}{chapter.4}
\contentsline {section}{\numberline {4.1}CFITSIO Size Limitations}{15}{section.4.1}
\contentsline {section}{\numberline {4.2}Multiple Access to the Same FITS File}{16}{section.4.2}
\contentsline {section}{\numberline {4.3}Current Header Data Unit (CHDU)}{16}{section.4.3}
\contentsline {section}{\numberline {4.4}Subroutine Names}{16}{section.4.4}
\contentsline {section}{\numberline {4.5}Subroutine Families and Datatypes}{17}{section.4.5}
\contentsline {section}{\numberline {4.6}Implicit Data Type Conversion}{17}{section.4.6}
\contentsline {section}{\numberline {4.7}Data Scaling}{18}{section.4.7}
\contentsline {section}{\numberline {4.8}Error Status Values and the Error Message Stack}{18}{section.4.8}
\contentsline {section}{\numberline {4.9}Variable-Length Array Facility in Binary Tables}{19}{section.4.9}
\contentsline {section}{\numberline {4.10}Support for IEEE Special Values}{20}{section.4.10}
\contentsline {section}{\numberline {4.11}When the Final Size of the FITS HDU is Unknown}{21}{section.4.11}
\contentsline {section}{\numberline {4.12}Local FITS Conventions supported by FITSIO}{21}{section.4.12}
\contentsline {subsection}{\numberline {4.12.1}Support for Long String Keyword Values.}{21}{subsection.4.12.1}
\contentsline {subsection}{\numberline {4.12.2}Arrays of Fixed-Length Strings in Binary Tables}{22}{subsection.4.12.2}
\contentsline {subsection}{\numberline {4.12.3}Keyword Units Strings}{23}{subsection.4.12.3}
\contentsline {subsection}{\numberline {4.12.4}HIERARCH Convention for Extended Keyword Names}{23}{subsection.4.12.4}
\contentsline {section}{\numberline {4.13}Optimizing Code for Maximum Processing Speed}{24}{section.4.13}
\contentsline {subsection}{\numberline {4.13.1}Background Information: How CFITSIO Manages Data I/O}{24}{subsection.4.13.1}
\contentsline {subsection}{\numberline {4.13.2}Optimization Strategies}{25}{subsection.4.13.2}
\contentsline {chapter}{\numberline {5} Basic Interface Routines }{29}{chapter.5}
\contentsline {section}{\numberline {5.1}FITSIO Error Status Routines }{29}{section.5.1}
\contentsline {section}{\numberline {5.2}File I/O Routines}{30}{section.5.2}
\contentsline {section}{\numberline {5.3}Keyword I/O Routines}{32}{section.5.3}
\contentsline {section}{\numberline {5.4}Data I/O Routines}{33}{section.5.4}
\contentsline {chapter}{\numberline {6} Advanced Interface Subroutines }{35}{chapter.6}
\contentsline {section}{\numberline {6.1}FITS File Open and Close Subroutines: }{35}{section.6.1}
\contentsline {section}{\numberline {6.2}HDU-Level Operations }{38}{section.6.2}
\contentsline {section}{\numberline {6.3}Define or Redefine the structure of the CHDU }{41}{section.6.3}
\contentsline {section}{\numberline {6.4}FITS Header I/O Subroutines}{43}{section.6.4}
\contentsline {subsection}{\numberline {6.4.1}Header Space and Position Routines }{43}{subsection.6.4.1}
\contentsline {subsection}{\numberline {6.4.2}Read or Write Standard Header Routines }{43}{subsection.6.4.2}
\contentsline {subsection}{\numberline {6.4.3}Write Keyword Subroutines }{45}{subsection.6.4.3}
\contentsline {subsection}{\numberline {6.4.4}Insert Keyword Subroutines }{47}{subsection.6.4.4}
\contentsline {subsection}{\numberline {6.4.5}Read Keyword Subroutines }{47}{subsection.6.4.5}
\contentsline {subsection}{\numberline {6.4.6}Modify Keyword Subroutines }{49}{subsection.6.4.6}
\contentsline {subsection}{\numberline {6.4.7}Update Keyword Subroutines }{50}{subsection.6.4.7}
\contentsline {subsection}{\numberline {6.4.8}Delete Keyword Subroutines }{51}{subsection.6.4.8}
\contentsline {section}{\numberline {6.5}Data Scaling and Undefined Pixel Parameters }{51}{section.6.5}
\contentsline {section}{\numberline {6.6}FITS Primary Array or IMAGE Extension I/O Subroutines }{52}{section.6.6}
\contentsline {section}{\numberline {6.7}FITS ASCII and Binary Table Data I/O Subroutines}{55}{section.6.7}
\contentsline {subsection}{\numberline {6.7.1}Column Information Subroutines }{55}{subsection.6.7.1}
\contentsline {subsection}{\numberline {6.7.2}Low-Level Table Access Subroutines }{58}{subsection.6.7.2}
\contentsline {subsection}{\numberline {6.7.3}Edit Rows or Columns }{59}{subsection.6.7.3}
\contentsline {subsection}{\numberline {6.7.4}Read and Write Column Data Routines }{60}{subsection.6.7.4}
\contentsline {section}{\numberline {6.8}Row Selection and Calculator Routines }{64}{section.6.8}
\contentsline {section}{\numberline {6.9}Celestial Coordinate System Subroutines }{65}{section.6.9}
\contentsline {section}{\numberline {6.10}File Checksum Subroutines }{67}{section.6.10}
\contentsline {section}{\numberline {6.11} Date and Time Utility Routines }{68}{section.6.11}
\contentsline {section}{\numberline {6.12}General Utility Subroutines }{69}{section.6.12}
\contentsline {chapter}{\numberline {7} The CFITSIO Iterator Function }{77}{chapter.7}
\contentsline {chapter}{\numberline {8} Extended File Name Syntax }{79}{chapter.8}
\contentsline {section}{\numberline {8.1}Overview}{79}{section.8.1}
\contentsline {section}{\numberline {8.2}Filetype}{82}{section.8.2}
\contentsline {subsection}{\numberline {8.2.1}Notes about HTTP proxy servers}{82}{subsection.8.2.1}
\contentsline {subsection}{\numberline {8.2.2}Notes about the stream filetype driver}{83}{subsection.8.2.2}
\contentsline {subsection}{\numberline {8.2.3}Notes about the gsiftp filetype}{84}{subsection.8.2.3}
\contentsline {subsection}{\numberline {8.2.4}Notes about the root filetype}{84}{subsection.8.2.4}
\contentsline {subsection}{\numberline {8.2.5}Notes about the shmem filetype:}{86}{subsection.8.2.5}
\contentsline {section}{\numberline {8.3}Base Filename}{86}{section.8.3}
\contentsline {section}{\numberline {8.4}Output File Name when Opening an Existing File}{88}{section.8.4}
\contentsline {section}{\numberline {8.5}Template File Name when Creating a New File}{90}{section.8.5}
\contentsline {section}{\numberline {8.6}Image Tile-Compression Specification}{90}{section.8.6}
\contentsline {section}{\numberline {8.7}HDU Location Specification}{90}{section.8.7}
\contentsline {section}{\numberline {8.8}Image Section}{91}{section.8.8}
\contentsline {section}{\numberline {8.9}Image Transform Filters}{92}{section.8.9}
\contentsline {section}{\numberline {8.10}Column and Keyword Filtering Specification}{94}{section.8.10}
\contentsline {section}{\numberline {8.11}Row Filtering Specification}{97}{section.8.11}
\contentsline {subsection}{\numberline {8.11.1}General Syntax}{97}{subsection.8.11.1}
\contentsline {subsection}{\numberline {8.11.2}Bit Masks}{100}{subsection.8.11.2}
\contentsline {subsection}{\numberline {8.11.3}Vector Columns}{101}{subsection.8.11.3}
\contentsline {subsection}{\numberline {8.11.4}Good Time Interval Filtering}{103}{subsection.8.11.4}
\contentsline {subsection}{\numberline {8.11.5}Spatial Region Filtering}{103}{subsection.8.11.5}
\contentsline {subsection}{\numberline {8.11.6}Example Row Filters}{106}{subsection.8.11.6}
\contentsline {section}{\numberline {8.12} Binning or Histogramming Specification}{107}{section.8.12}
\contentsline {chapter}{\numberline {9}Template Files }{111}{chapter.9}
\contentsline {section}{\numberline {9.1}Detailed Template Line Format}{111}{section.9.1}
\contentsline {section}{\numberline {9.2}Auto-indexing of Keywords}{112}{section.9.2}
\contentsline {section}{\numberline {9.3}Template Parser Directives}{113}{section.9.3}
\contentsline {section}{\numberline {9.4}Formal Template Syntax}{114}{section.9.4}
\contentsline {section}{\numberline {9.5}Errors}{114}{section.9.5}
\contentsline {section}{\numberline {9.6}Examples}{114}{section.9.6}
\contentsline {chapter}{\numberline {10} Summary of all FITSIO User-Interface Subroutines }{117}{chapter.10}
\contentsline {chapter}{\numberline {11} Parameter Definitions }{125}{chapter.11}
\contentsline {chapter}{\numberline {12} FITSIO Error Status Codes }{131}{chapter.12}
