Feb 11, 2010
ATpy - Astronomical Tables in PythonATpy is a high-level package providing a way to manipulate tables of astronomical data in a uniform way. A table is defined by any number of columns of data, each characterized by a column name, unit, null value, and description (the last three being optional), and can be supplemented with metadata in the form of keywords or comments. ATpy can be used to manipulate single tables as well as sets of tables.ATpy can be used to:* Seamlessly read and write table data to a number of table formats (FITS, VO, and IPAC tables, and SQLite/MySQL/PostgreSQL databases), building on existing python modules. More formats will be supported in future.* Remove, add, or rename columns.* Access and modify individual table cells.
* Create an empty table and populate it.* Create a new table from a selection of rows.* Add keywords and comments.* Read and write sets of tables.Example code for reading, converting, and writing a data file from FITS table to VO table, IPAC table, and SQLite:import atpytbl = atpy.Table()tbl.read('some_fits_table_file.fits')# ATpy will automatically try to detect which type of file you're writing.tbl.write('new_votable.xml') # VO Tabletbl.write('new_ipactable.tbl') # IPAC tabletbl.write('sqlite','new_sqlitetable.db') # SQLite database# You can easily access and modify data in the table:tbl.data['some_column'] = 4.5tbl.remove_column('some_other_column') Requirements: