astropy 5.0

Parameters
update(filename, data, *args, **kwargs)

Parameters

filename : path-like or file-like

File to update. If opened, mode must be update (rb+). An opened file object or GzipFile object will be closed upon return.

data : array, `~astropy.table.Table`, or `~astropy.io.fits.Group`

The new data used for updating.

header : `Header` object, optional

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

ext, extname, extver :

The rest of the arguments are flexible: the 3rd argument can be the header associated with the data. If the 3rd argument is not a Header , it (and other positional arguments) are assumed to be the extension specification(s). Header and extension specs can also be keyword arguments. For example:

update(file, dat, hdr, 'sci')  # update the 'sci' extension
update(file, dat, 3)  # update the 3rd extension
update(file, dat, hdr, 3)  # update the 3rd extension
update(file, dat, 'sci', 2)  # update the 2nd SCI extension
update(file, dat, 3, header=hdr)  # update the 3rd extension
update(file, dat, header=hdr, ext=5)  # update the 5th extension
**kwargs :

Any additional keyword arguments to be passed to astropy.io.fits.open .

Update the specified extension with the input data/header.

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#710
type: <class 'function'>
Commit: