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 | coo_err_maj | coo_err_min | coo_err_angle | coo_wavelength | coo_bibcode |
---|---|---|---|---|---|---|---|
deg | deg | mas | mas | deg | |||
object | float64 | float64 | float32 | float32 | int16 | str1 | object |
FHES J0534.5+2201 | 83.6327596 | 22.0203278 | -- | -- | -- | G | 2018ApJS..237...32A |
PLCKERC -070 G184.55-05.78 | 83.625 | 22.016666666666666 | -- | -- | -- | F | 2016MNRAS.458.3619C |
SCOPE G184.56-05.78 | 83.635 | 22.009999999999998 | -- | -- | -- | S | 2019MNRAS.485.2895E |
SCOPE G184.56-05.79 | 83.629 | 22.012 | -- | -- | -- | S | 2019MNRAS.485.2895E |
JCMTSF J053427.4+220227 | 83.614 | 22.042000000000005 | -- | -- | -- | S | 2019MNRAS.485.2895E |
JCMTSF J053430.4+220151 | 83.628 | 22.034 | -- | -- | -- | S | 2019MNRAS.485.2895E |
SCOPE G184.54-05.77 | 83.634 | 22.039 | -- | -- | -- | S | 2019MNRAS.485.2895E |
SCOPE G184.55-05.76 | 83.65 | 22.032 | -- | -- | -- | S | 2019MNRAS.485.2895E |
M 1 | 83.6324 | 22.0174 | 5000.0 | 5000.0 | 90 | X | 2022A&A...661A..38P |
... | ... | ... | ... | ... | ... | ... | ... |
[LBC2011] 40 | 83.63491666666665 | 22.037533333333336 | -- | -- | -- | I | 2011ApJS..194...30L |
[LBC2011] 36 | 83.64504166666666 | 22.033147222222222 | -- | -- | -- | I | 2011ApJS..194...30L |
[LBC2011] 49 | 83.61725 | 22.036800000000003 | -- | -- | -- | I | 2011ApJS..194...30L |
[LBC2011] 27 | 83.65312499999999 | 22.01733611111111 | -- | -- | -- | I | 2011ApJS..194...30L |
[LBC2011] 33 | 83.64791666666665 | 22.031108333333332 | -- | -- | -- | I | 2011ApJS..194...30L |
[LBC2011] 51 | 83.61500000000001 | 22.03098888888889 | -- | -- | -- | I | 2011ApJS..194...30L |
[LBC2011] 55 | 83.63699999999999 | 22.01075 | -- | -- | -- | I | 2011ApJS..194...30L |
[LBC2011] 45 | 83.629875 | 22.029730555555556 | -- | -- | -- | I | 2011ApJS..194...30L |
V* CM Tau | 83.63311445609 | 22.01448713834 | 0.0732 | 0.0606 | 90 | O | 2020yCat.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)