bundles / astropy latest / astropy / io / fits / convenience / append
function
astropy.io.fits.convenience:append
source: /astropy/io/fits/convenience.py :669
Signature
def append ( filename , data , header = None , checksum = False , verify = True , ** kwargs ) Summary
Append the header/data to FITS file if filename exists, create if not.
Extended Summary
If only data is supplied, a minimal header is created.
Parameters
filename: path-like or file-likeFile to write to. If opened, must be opened for update (rb+) unless it is a new file, then it must be opened for append (ab+). A file or GzipFile object opened for update will be closed after return.
data: array, :class:`~astropy.table.Table`, or `~astropy.io.fits.Group`The new data used for appending.
header: `Header` object, optionalThe header associated with
data. IfNone, an appropriate header will be created for the data object supplied.checksum: bool, optionalWhen
Trueadds bothDATASUMandCHECKSUMcards to the header of the HDU when written to the file.verify: bool, optionalWhen
True, the existing FITS file will be read in to verify it for correctness before appending. WhenFalse, content is simply appended to the end of the file. SettingverifytoFalsecan be much faster.**kwargsAdditional arguments are passed to:
Aliases
-
astropy.io.fits.append