Note
Go to the end to download the full example code.
Generating Data Tables#
DataTable objects are a means of tabulating Vizier data, and are particularly useful in the generation of DataPages (see the next tutorial). A DataTable can be generated by specifying a dict of Vizier catalogues and corresponding column names inside a "datatable" query().
This tutorial will generate a table of photometric data from Gaia and GALEX:
<DataTable DataSet>
.kind (str): DataTable
.targets (list): 587316166180416640 | 141.185° 8.031° (icrs, 2016-01-01T00:00:00.000, 3.0″)
.exception (bool): False
.data (list):
<DataTable>
table:
(astropy.Table)
survey: [gaia, gaia, ..., galex, galex]
catalogue: [I/355/gaiadr3, I/355/gaiadr3, ..., II/335/galex_ais, II/335/galex_ais]
correction: [full, full, ..., full, full]
parameter: [Gmag, BPmag, ..., NUVmag, FUVmag]
value: [18.8, 19.1, ..., 19.6, 19.7]
unit: [ mag, mag, ..., mag, mag]
separation (arcsec): [nan, nan, ..., 1.087, 1.087]
Available Methods: .add(), .apply(), .from_target(), .merge(), .open(), .plot(), .save(), .show(), .split(), .store()
The returned DataSet’s data attribute is a list containing a single DataTable object.pass
The DataTable can be plotted like any other plottable container, by calling the DataSet’s plot() or open() methods:
table.open()
Note
In this example, keys in rows are given as Vizier catalogue aliases. If a key is not found in the ATK Surveys file, it is instead interpreted as a Vizier catalogue ID.
For more information, see here.
Download this Tutorial
Total running time of the script: (0 minutes 0.151 seconds)