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=64
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 30.9+22 00 535518500.00018500.0000ER1995AuJPh..48..143S1
SCOPE G184.56-05.7905 34 31+22 00.744----0Ds2019MNRAS.485.2895E1
JCMTSF J053431.3+22004505 34 31.3+22 00 455510000.00010000.00090Em2008ApJS..175..277D1
PLCKERC -070 G184.55-05.7805 34 30+22 01.044----0EF2016MNRAS.458.3619C1
FL8Y J0534.5+2201i05 34.5+22 0133----0EG2019ApJ...875..123Y1
V* CM Tau05 34 31.9474+22 00 52.15314140.0730.06190AO2020yCat.1350....0G1
Trimble 2805 34 32.1+22 00 5655----0D1
2MASS J05343217+220056005 34 32.1831+22 00 56.00814140.1490.12490AO2020yCat.1350....0G1
3FGL J0534.5+2201s05 34 31.1993+22 01 12.0011111----0E2022ApJS..260...53A1
....................................
[LBC2011] 205 34 34.220+21 59 38.1777----0DI2011ApJS..194...30L1
[LBC2011] 4905 34 28.140+22 02 12.4877----0DI2011ApJS..194...30L1
SCOPE G184.54-05.7705 34 32+22 02.344----0Ds2019MNRAS.485.2895E1
[LBC2011] 3805 34 34.100+22 02 12.1177----0DI2011ApJS..194...30L1
NVSS J053434+22020705 34 34.90+22 02 07.2669000.0009000.00090DR1998AJ....115.1693C1
SCOPE G184.55-05.7605 34 36+22 01.944----0Ds2019MNRAS.485.2895E1
2MASS J05343759+220122205 34 37.5955+22 01 22.24414140.0790.06490AO2020yCat.1350....0G1
2MASS J05343821+220048605 34 38.2195+22 00 48.69214140.0380.02990AO2020yCat.1350....0G1
2MASS J05343755+220001005 34 37.55+22 00 01.06660.00060.00090CI2003yCat.2246....0C1
[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)