write#

sunpy.io._jp2.write(fname, data, header, **kwargs)[source]#

Take a data header pair and write a JPEG2000 file.

Parameters:
  • fname (str) – File name, with extension.

  • data (numpy.ndarray) – N-Dimensional data array.

  • header (dict) – A header dictionary.

  • kwargs – Additional keyword args are passed to glymur’s Jp2k constructor.

Notes

Saving as a JPEG2000 will cast the data array to uint8 values to support the JPEG2000 format.