bundles / astropy 7.0.1 / astropy / io / fits / hdu / base / _ValidHDU / add_checksum
function
astropy.io.fits.hdu.base:_ValidHDU.add_checksum
source: /astropy/io/fits/hdu/base.py :1275
Signature
def add_checksum ( self , when = None , override_datasum = False , checksum_keyword = CHECKSUM , datasum_keyword = DATASUM ) Summary
Add the CHECKSUM and DATASUM cards to this HDU with the values set to the checksum calculated for the HDU and the data respectively. The addition of the DATASUM card may be overridden.
Parameters
when: str, optionalcomment string for the cards; by default the comments will represent the time when the checksum was calculated
override_datasum: bool, optionaladd the
CHECKSUMcard onlychecksum_keyword: str, optionalThe name of the header keyword to store the checksum value in; this is typically 'CHECKSUM' per convention, but there exist use cases in which a different keyword should be used
datasum_keyword: str, optionalSee
checksum_keyword
Notes
For testing purposes, first call add_datasum with a when argument, then call add_checksum with a when argument and override_datasum set to True. This will provide consistent comments for both cards and enable the generation of a CHECKSUM card with a consistent value.
Aliases
-
astropy.io.fits.convenience._ValidHDU.add_checksum