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_IDRADECRA_PRECDEC_PRECCOO_ERR_MAJACOO_ERR_MINACOO_ERR_ANGLECOO_QUALCOO_WAVELENGTHCOO_BIBCODESCRIPT_NUMBER_ID
"h:m:s""d:m:s"masmasdeg
objectstr13str13int16int16float32float32int16str1str1objectint32
M 105 34 31.8+22 01 03555000.0005000.00090DX2022A&A...661A..38P1
Trimble 2805 34 32.1+22 00 5655----0D1
2MASS J05343217+220056005 34 32.1831+22 00 56.00814140.1490.12490AO2020yCat.1350....0G1
FHES J0534.5+220105 34 31.8623+22 01 13.18088----0EG2018ApJS..237...32A1
V* CM Tau05 34 31.9474+22 00 52.15314140.0730.06190AO2020yCat.1350....0G1
3FGL J0534.5+2201s05 34 31.1993+22 01 12.0011111----0E2022ApJS..260...53A1
2MASS J05343187+220116105 34 31.8813+22 01 16.18714140.0920.07290AO2020yCat.1350....0G1
JCMTSF J053431.3+22004505 34 31.3+22 00 455510000.00010000.00090Em2008ApJS..175..277D1
SCOPE G184.56-05.7905 34 31+22 00.744----0Ds2019MNRAS.485.2895E1
....................................
[LBC2011] 305 34 34.650+21 59 48.1777----0DI2011ApJS..194...30L1
[LBC2011] 705 34 34.290+21 59 44.9577----0DI2011ApJS..194...30L1
[LBC2011] 4905 34 28.140+22 02 12.4877----0DI2011ApJS..194...30L1
[LBC2011] 105 34 34.310+21 59 40.6977----0DI2011ApJS..194...30L1
[LBC2011] 805 34 32.010+21 59 32.4577----0DI2011ApJS..194...30L1
2MASS J05343821+220048605 34 38.2195+22 00 48.69214140.0380.02990AO2020yCat.1350....0G1
[LBC2011] 205 34 34.220+21 59 38.1777----0DI2011ApJS..194...30L1
2MASS J05343755+220001005 34 37.55+22 00 01.06660.00060.00090CI2003yCat.2246....0C1
JCMTSF J053427.4+22022705 34 27+22 02.544----0Ds2019MNRAS.485.2895E1
[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)