File input and output functions
||FileHeader is designed to provide a consistent interface to all other sunpy classes that expect a generic file.|
Class Inheritance Diagram¶
FITS File Reader
-  FITS files allow comments to be attached to every value in the header. This is implemented in this module as a KEYCOMMENTS dictionary in the sunpy header. To add a comment to the file on write, add a comment to this dictionary with the same name as a key in the header (upcased).
 Due to the way PyFITS works with images the header dictionary may differ depending on whether is accessed before or after the fits.data is requested. If the header is read before the data then the original header will be returned. If the header is read after the data has been accessed then the data will have been scaled and a modified header reflecting these changes will be returned: BITPIX may differ and BSCALE and B_ZERO may be dropped in the modified version.
 The verify(‘fix’) call attempts to handle violations of the FITS standard. For example, nan values will be converted to “nan” strings. Attempting to cast a pyfits header to a dictionary while it contains invalid header tags will result in an error so verifying it early on makes the header easier to work with later.
||Read a fits file|
||Read a fits file and return just the headers for all HDU’s.|
||Take a data header pair and write a FITS file.|
||Attempt to read the wavelength unit from a given FITS header.|
JPEG 2000 File Reader
ANA File Reader
The reading and writing of ana file is not supported under Windows or Python 3. The C extensions will not be built in either case.
ANA is a script that allows people to access compressed ana files. It accesses a C library, based on Michiel van Noort’s IDL DLM library ‘f0’ which contains a cleaned up version of the original anarw routines.
Created by Tim van Werkhoven (email@example.com) on 2009-02-11. Copyright (c) 2009–2011 Tim van Werkhoven.
||Loads an ANA file and returns the data and a header in a list of (data, header) tuples.|
||Loads an ANA file and only return the header consisting of the dimensions, size (defined as the product of all dimensions times the size of the datatype, this not relying on actual filesize) and comments.|
||Saves a 2D numpy array as an ANA file and returns the bytes written or NULL|