Primary
astropy.io.fits.PrimaryHDU() ⚬|Documentation|1st|20251021191401-00-⌔
Header Data Unit — Astropy v7.2.0#astropy.io.fits.PrimaryHDU
class
astropy.io.fits.PrimaryHDU(data=None, header=None, do_not_scale_image_data=False, ignore_blank=False, uint=True, scale_back=None)Bases:
_ImageBaseHDUFITS primary HDU class.
Construct a primary HDU.
Parameters:
data:arrayorastropy.io.fits.hdu.base.DELAYED, optionalThe data in the HDU.
header:Header, optionalThe header to be used (as a template). If
headerisNone, a minimal header will be provided.
do_not_scale_image_data: bool, optionalIf
True, image data is not scaled using BSCALE/BZERO values when read. (default: False)
ignore_blank: bool, optionalIf
True, the BLANK header keyword will be ignored if present. Otherwise, pixels equal to this value will be replaced with NaNs. (default: False)
uint: bool, optionalInterpret signed integer data where
BZEROis the central value andBSCALE == 1as unsigned integer data. For example,int16data withBZERO = 32768andBSCALE = 1would be treated asuint16data. (default: True)
scale_back: bool, optionalIf
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. Pseudo-unsigned integers are automatically rescaled unless scale_back is explicitly set toFalse. (default: None)Printed 2026-06-28.
Link to original
Secondary
• • •