Skip to content

Latest commit

 

History

History
42 lines (25 loc) · 2.74 KB

DOCU_HDUS.md

File metadata and controls

42 lines (25 loc) · 2.74 KB

Quicklinks : Introduction | Files | HDUs | Bytes | Tables

Working with HDUs

Since a FITS file is simply a sequence of Header Data Units, lets taks about these. HDUs are basically a sequence of meta Information in blocks of 80 (ASCII) characters followed by the binary data block containing the stored information.

There are severa classes implemeting HDU properties

  • AnyHDU impelements is an open class with everything needed to read and write HeaderBlocks and dataUnit
  • AnyImageHDU implements routines for reading from and setting data to the dataUnit shared between PrimaryHDU and ImageHDU
  • PrimaryHDU implements routines for accessing image data and direct getter / setter for special properies like "random groups"
  • ImageHDU implements routinges for the Image Extension
  • TableHDU implements routinges for the (ASCII) Table Extension
  • BintableHDU implements routinges for the Bintable Extension

Header Blocks

Headers are treated as a fully flexible list of Keywords with values and comments. Following the FITS standard, there are Keywords with special semantics to them like BITPIX and NAXIS. All those can be fully modified by without any interference. But be aware before writing files, the validation-routine takes will check basic file integriy and modify two headers:

  • The SIMPLE keyworld will be set to T or F based on the success of the file validation
  • The END keyword will always be moved to the end to conclude the list

Data Units

The data unit of the HDU is represented as untempered Data block. Some HDUs like the TableHDU and BintableHDU provide acces to the information stored in the the HDU through special routines (see below). In order to work whith the raw Data, there are special routines in the FITSByte.

Special HDUs

Primary HDU

The PrimaryHDU is required in every FITSFile.

Image Extensions

The ImageHDU offers routines for reading and writing Image extensions via the routines implemented in AnyImageHDU.

Table Extensions

The TableHDU offers routines for reading and writng Table extensions

Bintable Extensions

The BintableHDU offers routines for reading and writng Table extensions