Read FITS files.
Backend Library: Astropy
To use this plugin you have to install its backend:
pip install imageio[fits]
Flexible Image Transport System (FITS) is an open standard defining a digital file format useful for storage, transmission and processing of scientific and other images. FITS is the most commonly used digital file format in astronomy.
If the file name is a URL, ~astropy.utils.data.download_file is used to open the file. This specifies whether or not to save the file locally in Astropy’s download cache (default: True).
Interpret signed integer data where
BZEROis the central value and
BSCALE == 1as unsigned integer data. For example,
BZERO = 32768and
BSCALE = 1would be treated as
Note, for backward compatibility, the kwarg uint16 may be used instead. The kwarg was renamed when support was added for integers of any size.
Do not issue an exception when opening a file that is missing an
ENDcard in the last header.
- checksumbool or str
If True, verifies that both
CHECKSUMcard values (when present in the HDU header) match the header and data of all HDU’s in the file. Updates to a file that already has a checksum will preserve and update the existing checksums unless this argument is given a value of ‘remove’, in which case the CHECKSUM and DATASUM values are not checked, and are removed when saving changes to the file.
- disable_image_compressionbool, optional
If True, treats compressed image HDU’s like normal binary table HDU’s.
If True, image data is not scaled using BSCALE/BZERO values when read.
If True, the BLANK keyword is ignored if present.
If True, when saving changes to a file that contained scaled image data, restore the data to the original type and reapply the original BSCALE/BZERO values. This could lead to loss of accuracy if scaling back to integer values after performing floating point operations on the data.