How to open .FITS files on Mac
To open .FITS files on Mac, open SAOImage DS9 and use File → Open to load the .FITS file for viewing/analysis.
Step-by-step instructions
- Open SAOImage DS9 and use File → Open to load the .FITS file for viewing/analysis.
- For analysis in Python, use Astropy (astropy.io.fits) to read the HDU list and inspect the header and data arrays.
- If Finder/Preview can’t open it, that’s normal—use a FITS-aware app rather than a general photo viewer.
Recommended software
- Preview
- Photos
- GIMP
Alternative methods
- Open .FITS in a browser-based viewer if desktop apps fail.
- Try opening .FITS on Mac with a secondary app to rule out app-specific issues.
- Convert .FITS only with trusted tools when direct opening is not possible.
Common issues
The file won’t open in my normal photo viewer
FITS is a scientific data format and is not broadly supported by consumer image apps, even though it can store images.
- Open it with a FITS-capable viewer such as SAOImage DS9.
- If you need to process the data, use Python with astropy.io.fits to read the HDUs and extract the image array.
Opens, but looks black/blank or the contrast is wrong
Astronomical FITS images often contain high dynamic range data, non-8-bit pixel types, or values that require scaling/stretching to display properly.
- In a FITS viewer (e.g., DS9), adjust the display scale/stretch (common for astronomical images).
- Check the header keywords and data type by reading the file with astropy.io.fits to understand scaling and value ranges.
Error reading FITS: corrupted/truncated file or invalid header
FITS readers expect a strict structure (HDU headers and data blocks). Interrupted downloads or partial transfers can break that structure.
- Re-download or re-copy the file from the original source and compare file sizes if possible.
- Try opening with another FITS reader/library; many tools rely on CFITSIO, which may provide clearer error messages.
- If you have access to the producer software/instrument pipeline, regenerate or re-export the FITS file.
The FITS file has multiple extensions and I can’t find the image/table I need
A single FITS file can contain multiple HDUs (primary HDU plus extensions like images or tables). Some viewers open only the first HDU by default.
- In DS9, browse/select different extensions (HDU list) to view the desired image/plane.
- In Python, use astropy.io.fits to list HDUs and select the correct extension by index or name.
Security note
FITS files are data files (headers + data blocks) and do not typically contain active content like macros, but they can still be risky if opened with vulnerable parsers—use well-maintained tools and libraries (e.g., established FITS viewers and Astropy/CFITSIO-based readers).