I have a big amount of criteria queries to do on SIMBAD database like this one :
region(circle, 29.20 -0.214, 0.60d) & otypes in ('ClG','SCG','GrG','CGG','SC?','C?G','Gr?')& redshift > 0.037 & redshift < 0.0531
This query gives all objects of types ('ClG','SCG','GrG','CGG','SC?','C?G','Gr?') within a circle of 0.6 degrees centered at 29.20 -0.214, and with redshift between 0.037 and 0.0531. It works well on the web interface http://simbad.u-strasbg.fr/simbad/sim-fsam and for this example I get one object.
The problem is that I need to do a huge amount of query like this. I tried to use this package python http://astroquery.readthedocs.io/en/latest/simbad/simbad.html but I didn't succeed to do it work properly.
from astroquery.simbad import Simbad
from astropy import coordinates
query_cr="region(circle, 29.20 -0.214, 0.60d)" types=('ClG','SCG','GrG','CGG','SC?','C?G','Gr?')
result =Simbad.query_criteria(query_cr, otype=types)
Like this it does not work at all.
I tried with putting just one item for the otype
types='ClG'
and with this I get a table with a huge amount ogf objects (even the circle selection at 0.6 degrees does not work)
My goal is to extract the name, type, coordinate and redshifts of each of the objects matched with my criteria query.
Thanks you very much in advance for your help !
You were pretty close with your original attempt:
the result is:
Note that I only split this up into multiple lines for readability;
qry
is just the full string you would pass to SIMBAD. This is the resulting query astroquery sends: