pythonastropyastroquery

Astropy - Astroquery How to find magnitudes in Simbad?


among other parameters, I am trying to find the magnitudes of some objects using astroquery and Simbad. I think the magnitudes are in 'measurements' votable, but when I invoke Simbad.add_votable_fields('measurements') I get an error:

Exception: No table found in VOTABLE file

The full code example:

from astroquery.simbad import Simbad
import pandas as pd

inputObject = 'ABELL 2218; M33; M31; M101; M42; M98'
listObject = inputObject.split(';')

Simbad.add_votable_fields('z_value','rv_value','dim_majaxis','dim_minaxis','measurements')

dff = Simbad.query_objects(listObject).to_pandas()


dff.drop(dff.iloc[:, 3:11], inplace=True, axis=1)   #delete some columns
dff.drop(dff.columns[-1], axis=1, inplace=True)     #also drop last column
Simbad.remove_votable_fields('z_value','rv_value','dim_majaxis','dim_minaxis','measurements')
#show data
dff.style.format(precision=5,na_rep='No data')

Solution

  • mags are in the VOtable fields:

    flux(B), flux(V), flux(R), flux(I)