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 or NULL.

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 with True (the default).

  • debug (bool, optional) – Prints verbose debug information, defaults to False.

Returns:

str – A new ANA compressed archive containing the data and header.

Examples

>>> written = sunpy.io.ana.write(filename, data, comments=False, compress=True)