Programmatically querying SIMBAD for flags such as spectroscopic binarity using Astropy

Hello!
I hope this is the right place to ask questions such as this.
I am attempting to query SIMBAD using Astropy to determine which stars in a set are flagged as spectroscopic binaries, eruptive variable stars, etc. I can see these flags in the web interface as strings separated by two dashes from the star name under “Basic data”, but I haven’t been able to find a way to return that string programmatically using Astropy. The usual Simbad.query_object(star_name) does not return this information. Thanks in advance; any pointers are much appreciated!

1 Like

You can set which fields are returned. To see what fields are available, use
Simbad.list_votable_fields().
Browse that list and hopefully the one you need is there!

Add it to the output with Simbad.add_votable_fields(‘field_i_need’)’).

More details here:
https://astroquery.readthedocs.io/en/latest/simbad/simbad.html#specifying-which-votable-fields-to-include-in-the-result

Hope this helps!
Kelle

1 Like

Thanks so much! I think this solves the problem.