Overview of Astropy File I/O#
Astropy provides two main interfaces for reading and writing data:
High-level Unified I/O interface that is designed to be consistent and easy to use. This allows working with different types of data such as tables, images, and even cosmologies.
Low-level I/O sub-packages that are directly responsible for reading and writing data in specific formats such as FITS or VOTable.
In general we recommend starting with the high-level interface unless you have a specific need for the low-level interface.
High-level Unified I/O |
Low-level I/O |
---|---|
Use |
Interfaces are specific to format, e.g., |
Read and write entire file at once. |
Support varies, e.g., FITS has memory-mapped read access. |
Automatically determine file format in common cases. |
Specify format explicitly. |
Help documentation via class method, e.g., |
Help documentation varies, e.g., |