update(self, *args, **kwargs)
update
accepts either a dict-like object or an iterable. In the former case the keys must be header keywords and the values may be either scalar values or (value, comment) tuples. In the case of an iterable the items must be (keyword, value) tuples or (keyword, value, comment) tuples.
Arbitrary arguments are also accepted, in which case the update() is called again with the kwargs dict as its only argument. That is,
>>> header.update(NAXIS1=100, NAXIS2=100)
is equivalent to:
header.update({'NAXIS1': 100, 'NAXIS2': 100})
As this method works similarly to :None:None:`dict.update`
it is very different from the Header.update()
method in Astropy v0.1. Use of the old API was deprecated for a long time and is now removed. Most uses of the old API can be replaced as follows:
Replace :
header.update(keyword, value)
with :
header[keyword] = value
Replace :
header.update(keyword, value, comment=comment)
with :
header[keyword] = (value, comment)
Replace :
header.update(keyword, value, before=before_keyword)
with :
header.insert(before_keyword, (keyword, value))
Replace :
header.update(keyword, value, after=after_keyword)
with :
header.insert(after_keyword, (keyword, value), after=True)
See also :None:meth:`Header.set`
which is a new method that provides an interface similar to the old Header.update()
and may help make transition a little easier.
Update the Header with new keyword values, updating the values of existing keywords and appending new keywords otherwise; similar to :None:None:`dict.update`
.
The following pages refer to to this document either explicitly or contain code examples using this.
astropy.io.fits.header.Header.add_history
astropy.io.fits.header.Header.update
astropy.io.fits.header.Header.add_blank
astropy.io.fits.header.Header.add_comment
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