bundles / astropy latest / astropy / io / fits / hdu / base / _ValidHDU / add_datasum
function
astropy.io.fits.hdu.base:_ValidHDU.add_datasum
source: /astropy/io/fits/hdu/base.py :1240
Signature
def add_datasum ( self , when = None , datasum_keyword = DATASUM ) Summary
Add the DATASUM card to this HDU with the value set to the checksum calculated for the data.
Parameters
when: str, optionalComment string for the card that by default represents the time when the checksum was calculated
datasum_keyword: str, optionalThe name of the header keyword to store the datasum value in; this is typically 'DATASUM' per convention, but there exist use cases in which a different keyword should be used
Returns
checksum: intThe calculated datasum
Notes
For testing purposes, provide a when argument to enable the comment value in the card to remain consistent. This will enable the generation of a CHECKSUM card with a consistent value.
Aliases
-
astropy.io.fits.convenience._ValidHDU.add_datasum