astropy 5.0

Parameters
append(filename, data, header=None, checksum=False, verify=True, **kwargs)

If only data is supplied, a minimal header is created.

Parameters

filename : path-like or file-like

File 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, optional

The header associated with data . If :None:None:`None`, an appropriate header will be created for the data object supplied.

checksum : bool, optional

When :None:None:`True` adds both DATASUM and CHECKSUM cards to the header of the HDU when written to the file.

verify : bool, optional

When :None:None:`True`, the existing FITS file will be read in to verify it for correctness before appending. When :None:None:`False`, content is simply appended to the end of the file. Setting verify to :None:None:`False` can be much faster.

kwargs :

Additional arguments are passed to:

  • writeto if the file does not exist or is empty. In this case output_verify is the only possible argument.

  • open if verify is True or if filename is a file object.

  • Otherwise no additional arguments can be used.

Append the header/data to FITS file if filename exists, create if not.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /astropy/io/fits/convenience.py#636
type: <class 'function'>
Commit: