Display tables resulting from an astroquery request#
This example implements the addition of two tables : - one resulting from an astroquery request on the Simbad database - the other is a table created locally
[1]:
from ipyaladin import Aladin
from astropy.table import QTable
import astropy.units as u
from astroquery.simbad import Simbad
From a query#
[2]:
table = Simbad.query_region("Messier 1", radius=0.03 * u.deg)
table
[2]:
Table length=65
MAIN_ID | RA | DEC | RA_PREC | DEC_PREC | COO_ERR_MAJA | COO_ERR_MINA | COO_ERR_ANGLE | COO_QUAL | COO_WAVELENGTH | COO_BIBCODE | SCRIPT_NUMBER_ID |
---|---|---|---|---|---|---|---|---|---|---|---|
"h:m:s" | "d:m:s" | mas | mas | deg | |||||||
object | str13 | str13 | int16 | int16 | float32 | float32 | int16 | str1 | str1 | object | int32 |
M 1 | 05 34 31.8 | +22 01 03 | 5 | 5 | 5000.000 | 5000.000 | 90 | D | X | 2022A&A...661A..38P | 1 |
Trimble 28 | 05 34 32.1 | +22 00 56 | 5 | 5 | -- | -- | 0 | D | 1 | ||
2MASS J05343217+2200560 | 05 34 32.1831 | +22 00 56.008 | 14 | 14 | 0.149 | 0.124 | 90 | A | O | 2020yCat.1350....0G | 1 |
FHES J0534.5+2201 | 05 34 31.8623 | +22 01 13.180 | 8 | 8 | -- | -- | 0 | E | G | 2018ApJS..237...32A | 1 |
V* CM Tau | 05 34 31.9474 | +22 00 52.153 | 14 | 14 | 0.073 | 0.061 | 90 | A | O | 2020yCat.1350....0G | 1 |
3FGL J0534.5+2201s | 05 34 31.1993 | +22 01 12.001 | 11 | 11 | -- | -- | 0 | E | 2022ApJS..260...53A | 1 | |
2MASS J05343187+2201161 | 05 34 31.8813 | +22 01 16.187 | 14 | 14 | 0.092 | 0.072 | 90 | A | O | 2020yCat.1350....0G | 1 |
JCMTSF J053431.3+220045 | 05 34 31.3 | +22 00 45 | 5 | 5 | 10000.000 | 10000.000 | 90 | E | m | 2008ApJS..175..277D | 1 |
SCOPE G184.56-05.79 | 05 34 31 | +22 00.7 | 4 | 4 | -- | -- | 0 | D | s | 2019MNRAS.485.2895E | 1 |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
[LBC2011] 3 | 05 34 34.650 | +21 59 48.17 | 7 | 7 | -- | -- | 0 | D | I | 2011ApJS..194...30L | 1 |
[LBC2011] 7 | 05 34 34.290 | +21 59 44.95 | 7 | 7 | -- | -- | 0 | D | I | 2011ApJS..194...30L | 1 |
[LBC2011] 49 | 05 34 28.140 | +22 02 12.48 | 7 | 7 | -- | -- | 0 | D | I | 2011ApJS..194...30L | 1 |
[LBC2011] 1 | 05 34 34.310 | +21 59 40.69 | 7 | 7 | -- | -- | 0 | D | I | 2011ApJS..194...30L | 1 |
[LBC2011] 8 | 05 34 32.010 | +21 59 32.45 | 7 | 7 | -- | -- | 0 | D | I | 2011ApJS..194...30L | 1 |
2MASS J05343821+2200486 | 05 34 38.2195 | +22 00 48.692 | 14 | 14 | 0.038 | 0.029 | 90 | A | O | 2020yCat.1350....0G | 1 |
[LBC2011] 2 | 05 34 34.220 | +21 59 38.17 | 7 | 7 | -- | -- | 0 | D | I | 2011ApJS..194...30L | 1 |
2MASS J05343755+2200010 | 05 34 37.55 | +22 00 01.0 | 6 | 6 | 60.000 | 60.000 | 90 | C | I | 2003yCat.2246....0C | 1 |
JCMTSF J053427.4+220227 | 05 34 27 | +22 02.5 | 4 | 4 | -- | -- | 0 | D | s | 2019MNRAS.485.2895E | 1 |
[3]:
aladin = Aladin(fov=0.4, target="Messier 1")
aladin
[3]:
[4]:
aladin.add_table(table, shape="rhomb", color="lightskyblue", source_size=20)
# This line also works with camelCase instead of snake_case: sourceSize=20
Display Astropy table created from scratch#
[5]:
ra = [83.63451584700, 83.61368056017, 83.58780251600]
dec = [22.05652591227, 21.97517807639, 21.99277764451]
name = [
"Gaia EDR3 3403818589184411648",
"Gaia EDR3 3403817661471500416",
"Gaia EDR3 3403817936349408000",
]
parallax = [1.7703, 0.5112, 0.3735] * u.mas
t = QTable(
[ra, dec, name, parallax],
names=("ra", "dec", "name", "parallax"),
meta={"name": "my_sample_table"},
)
[6]:
aladin.add_table(t)