File: example3_simbad.py

package info (click to toggle)
astroquery 0.4.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 23,140 kB
  • sloc: xml: 114,036; python: 38,983; javascript: 161; makefile: 139; 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'