Much of ATpy’s functionality has now been incorporated into Astropy, and while we will continue to fix bugs, we are no longer actively developing new features in ATpy , instead focusing our efforts on Astropy. If you are a new user, and do not need the SQL-querying functionality, we recommend using Astropy Tables directly. If you are already using ATpy and are interested in migrating to Astropy, please read our Guide for Migrating to Astropy.
ATpy is a high-level Python package providing a way to manipulate tables of astronomical data in a uniform way. The two main features of ATpy are:
In addition, ATpy provides a TableSet class that can be used to contain multiple tables, and supports reading and writing to file/database formats that support this (FITS, VO, and SQL databases).
Finally, ATpy provides support for user-written read/write functions for file/database formats not supported by default. We encourage users to send us custom read/write functions to read commonly used formats, and would be happy to integrate them into the main distribution.
The following example shows how ATpy can be used to read, convert, and write a data file from FITS format to VO, HDF5, IPAC, and SQLite formats:
import atpy tbl = atpy.Table('some_fits_table_file.fits') # ATpy will automatically try to detect which type of file you're writing. tbl.write('new_votable.xml') # VO Table tbl.write('new_ipactable.tbl') # IPAC table tbl.write('new_ipactable.hdf5') # HDF5 table tbl.write('sqlite','new_sqlitetable.db') # SQLite database # You can easily access and modify data in the table: tbl.some_column = 4.5 tbl.remove_column('some_other_column')
This is only a small fraction of ATpy’s functionality. We strongly recommend that users read through the documentation, which is available below. For a quick introduction, we recommend the Constructing a table and Accessing Table Data sections. For information about format-specific features, see Supported Formats.