0 votes
11 views

SELECT ra,dec

FROM ls_dr7.tractor

 WHERE q3c_radial_query(ra,dec,150.000000, 30.000000,10.000000)

returns no values but changing the database from ls_dr7.tractor to something like gaia_dr1.gaia_source does. I tried changing the RA and DEC but I get a table with 0 rows always. This has to do with the q3c_radial_query function because removing it seems to give some results. Can someone help me with this query?

asked Dec 2 by Sunil | 11 views

1 Answer

0 votes
Best answer

Hi Sunil,

I tried your query and I _do_ get ra and dec values with ls_dr7.tractor. Here what I did:

from dl import queryClient as qc
from dl.helpers.utils import convert

q = """SELECT ra,dec
          FROM ls_dr7.tractor
          WHERE q3c_radial_query(ra,dec,150.000000, 30.000000,10.000000)""
res = qc.query(sql=q)
df = convert(res,'pandas')
print(df.head())
           ra        dec
0  147.522478  20.257198
1  147.525956  20.254218
2  147.528038  20.256896
3  147.530572  20.255945
4  147.532124  20.256417

Could you try this code snippet and report back if this still fails for you?

answered Dec 2 by datalab (3,880 points)

98 questions

85 answers

35 comments

464 users

Welcome to Data Lab Help Desk, where you can ask questions and receive answers from other members of the community.