bundles / astropy 7.0.1 / astropy / io / fits / header / Header / tostring
function
astropy.io.fits.header:Header.tostring
source: /astropy/io/fits/header.py :667
Signature
def tostring ( self , sep = '' , endcard = True , padding = True ) Summary
Returns a string representation of the header.
Extended Summary
By default this uses no separator between cards, adds the END card, and pads the string with spaces to the next multiple of 2880 bytes. That is, it returns the header exactly as it would appear in a FITS file.
Parameters
sep: str, optionalThe character or string with which to separate cards. By default there is no separator, but one could use
'\\n', for example, to separate each card with a new lineendcard: bool, optionalIf True (default) adds the END card to the end of the header string
padding: bool, optionalIf True (default) pads the string with spaces out to the next multiple of 2880 characters
Returns
: strA string representing a FITS header.
Aliases
-
astropy.io.fits.Header.tostring