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_idradeccoo_err_majcoo_err_mincoo_err_anglecoo_wavelengthcoo_bibcode
degdegmasmasdeg
objectfloat64float64float32float32int16str1object
FHES J0534.5+220183.632759622.0203278------G2018ApJS..237...32A
PLCKERC -070 G184.55-05.7883.62522.016666666666666------F2016MNRAS.458.3619C
SCOPE G184.56-05.7883.63522.009999999999998------S2019MNRAS.485.2895E
SCOPE G184.56-05.7983.62922.012------S2019MNRAS.485.2895E
JCMTSF J053427.4+22022783.61422.042000000000005------S2019MNRAS.485.2895E
JCMTSF J053430.4+22015183.62822.034------S2019MNRAS.485.2895E
SCOPE G184.54-05.7783.63422.039------S2019MNRAS.485.2895E
SCOPE G184.55-05.7683.6522.032------S2019MNRAS.485.2895E
M 183.632422.01745000.05000.090X2022A&A...661A..38P
........................
[LBC2011] 4083.6349166666666522.037533333333336------I2011ApJS..194...30L
[LBC2011] 3683.6450416666666622.033147222222222------I2011ApJS..194...30L
[LBC2011] 4983.6172522.036800000000003------I2011ApJS..194...30L
[LBC2011] 2783.6531249999999922.01733611111111------I2011ApJS..194...30L
[LBC2011] 3383.6479166666666522.031108333333332------I2011ApJS..194...30L
[LBC2011] 5183.6150000000000122.03098888888889------I2011ApJS..194...30L
[LBC2011] 5583.6369999999999922.01075------I2011ApJS..194...30L
[LBC2011] 4583.62987522.029730555555556------I2011ApJS..194...30L
V* CM Tau83.6331144560922.014487138340.07320.060690O2020yCat.1350....0G
[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)