next up previous contents FITSIO Home
Next: Basic Interface Routines Up: Programming Guidelines Previous: Optimizing Code for Maximum

FITSIO Array Size Limitations

In general, FITSIO places no limits on the sizes of the FITS files that it reads or writes. In particular there is no internal limit on the size of the dimensions of the primary array or IMAGE extension. Table extensions may have up to 999 columns (the maximum allowed by the FITS standard) and may have an arbitrarily large number of rows. There are a few other limits, however, which may affect some extreme cases:

1. The maximum number of FITS files that may be simultaneously opened by a single program is defined by the 'nb' parameter and is currently set to 20. To change this limit, one must globally edit the following parameter statement:

        parameter (nb = 20)
throughout the fitsio.f and the machine-specific source files. The number of physical buffers, as defined by the 'pb' parameter in the machine specific source file, must be set greater than or equal to the value of 'nb'. Increasing the value of 'pb' will also require that the size of the ftbuff common block be modified accordingly.

2. The total number of FITS table columns that can be accessed by FITSIO, when summed over the current HDU in all the open FITS files, cannot exceed the value of the 'nf' parameter in the fitsio.f source code. This is currently set to 3000, which, for example, will allow FITSIO to simultaneously read or write 3 FITS tables with 999 columns each, or 20 tables with 150 columns each, or any other combination that does not exceed 20 files and 3000 total columns. (A FITS primary array or image extension is equivalent to a 2 column table). FITSIO allocates 56 bytes of memory for each column to store various descriptive information so substantially raising or lowering the value of 'nf' can have a significant effect on the total amount of computer memory required to run a program.

3. The maximum number of extensions that can be read or written in a single FITS file is current set to 512 as defined by the 'ne' parameter statements throughout the fitsio.f and machine specific source code files. This value may be increased if necessary, but the access times to the later extensions in such files may become very long.

4. FITSIO can handle FITS files up to about 2.1 GB in size which is the maximum value of a signed long integer. Some machines that use 8-byte words for a long integer may support larger files, but this has not been tested.


next up previous contents FITSIO Home
Next: Basic Interface Routines Up: Programming Guidelines Previous: Optimizing Code for Maximum