Wolfram Language

FITS Updates

Version 12 introduces significant improvements to "FITS" import, including new elements, efficient partial access, rich support for metadata import and complete support for table header data units (HDUs).

As one of the fundamental updates, the Wolfram Language now fully supports import of image and table header data units. This file has an image HDU and a binary table HDU.

You can ask for a property such as "Dimensions".

If you query for an import element such as "ImageSize", you only get the result for image HDUs. Notice that from the resulting association, it is clear for which HDUs the element is returned.

In the same way, if you ask for a table-specific property, such as "TableHeaders", you get the result only for table HDUs.

The new "RawData" import element returns the most compact data representation as a NumericArray object for image HDUs.

Yet another new and nice feature is that partial access is now fully supported when importing a FITS file. You can specify the HDUs to be imported.

You can also access parts of a particular HDUfor example, a part of the first image stored in the first HDU.

The great thing about partial access is that you do not need to load all the data into memory. This way, you save both memory and time. Here is a quick comparison to show the effectiveness of partial access.

Timing and maximum memory used when using efficient partial import.

Timing and maximum memory used without efficient partial import.

Comparison of results.

Related Examples

de es fr ja ko pt-br zh