write

sunpy.io.ana.write(filename, data, comments=False, compress=1, debug=False)[source] [edit on github]

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) – Name of data to be stored.
  • comments (FileHeader, optional) – The comments to be stored as a header.
  • compress (int, optional) – To compress the data or not. 1 is to compress, 0 is uncompressed
  • debug (bool, optional) – Prints verbose debug information.
Returns:

out (ANA compressed archive) – A new ANA compressed archive containing the data and header.

Examples

>>> written = sunpy.io.ana.write(filename, data, comments=Falsem, compress=1)   # doctest: +SKIP