A FITS files is composed by one or more HDUs. NimCfitsio provides a number of functions to know how many HDUs are present in a FITS file and what is their content. (To create a new HDU you have first to decide which kind of HDU you want. Depending on the answer, you should read table-functions
or image-functions
.)
NimCfitsio (and CFITSIO itself) uses the concept of "current HDU". Each :nimFitsFile
variable is a stateful object. Instead of specifying on which HDU a NimCfitsio procedure should operate, the user must first select the HDU and then call the desired procedure.