Analyze Tabular Data Stored in FITS
Version 12.0 implementation of "FITS" import and export has complete support for binary and ASCII table header data units (HDUs), as well as rich support for importing metadata. This example shows how to automatically use metadata to perform better analysis of tabular data stored in a file.
Start from importing the data stored in a FITS file.
This example looks at the table stored in the second HDU.
Look for the data description stored under "GENERAL INFORMATION" metadata.
You can see some information about how values are stored in the file. You can also find units corresponding to each column of the table. The tags of interest are "TUNIT*", where * is the index of the column.
You can do a small parsing on the result above to be able to associate to the actual data.
Now you need to take the data and apply the units.
You can go even one step further and combine the preceding result with the original image data stored in the file.