astropy 5.0

ParametersBackRef
writeto(filename, data, header=None, output_verify='exception', overwrite=False, checksum=False)

Parameters

filename : path-like or file-like

File to write to. If opened, must be opened in a writable binary mode such as 'wb' or 'ab+'.

data : array or `~numpy.recarray` or `~astropy.io.fits.Group`

data to write to the new file

header : `Header` object, optional

the header associated with data . If :None:None:`None`, a header of the appropriate type is created for the supplied data. This argument is optional.

output_verify : str

Output verification option. Must be one of "fix" , "silentfix" , "ignore" , "warn" , or "exception" . May also be any combination of "fix" or "silentfix" with "+ignore" , +warn , or +exception" (e.g. ``"fix+warn" ). See astropy:verify for more info.

overwrite : bool, optional

If True , overwrite the output file if it exists. Raises an OSError if False and the output file exists. Default is False .

versionchanged

overwrite replaces the deprecated clobber argument.

checksum : bool, optional

If :None:None:`True`, adds both DATASUM and CHECKSUM cards to the headers of all HDU's written to the file.

Create a new FITS file using the supplied data/header.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

astropy.io.fits.convenience.append

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