write¶
- sunpy.io.ana.write(filename, data, comments=False, compress=True, debug=False)[source]¶
Saves a 2D
numpy.array
as an ANA file and returns the bytes written orNULL
.- Parameters
filename (
str
) – Name of file to be created.data (
numpy.ndarray
) – The data to be stored.comments (
FileHeader
, optional) – The comments to be stored as a header.compress (
bool
, optional) – Compress the data withTrue
(the default).debug (
bool
, optional) – Prints verbose debug information, defaults toFalse
.
- Returns
out (ANA compressed archive) – A new ANA compressed archive containing the data and header.
Examples
>>> written = sunpy.io.ana.write(filename, data, comments=False, compress=True)