File: example3_simbad.py

package info (click to toggle)
astroquery 0.3.9%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 16,220 kB
  • sloc: xml: 113,675; python: 31,588; makefile: 137; ansic: 88; sh: 46
file content (12 lines) | stat: -rw-r--r-- 216 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
from astroquery.simbad import Simbad

customSimbad = Simbad()
customSimbad.add_votable_fields('sptype')

result = customSimbad.query_object('g her')

result['MAIN_ID'][0]
# 'V* g Her'

result['SP_TYPE'][0]
# 'M6III'