write#
- sunpy.io.ana.write(filename, data, comments=False, compress=True, debug=False)[source]#
Deprecated since version 6.0: The ANA reader may be removed in a future version of sunpy, please comment here if you are using this code: https://community.openastronomy.org/t/possible-deprecation-of-ana-file-readers-and-writers-in-sunpy
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:
str
– A new ANA compressed archive containing the data and header.
Examples
>>> written = sunpy.io.ana.write(filename, data, comments=False, compress=True)