0 votes
282 views

Hi Helpdesk,

I'm still very new with ADQL queries and haven't done anything fancy with it until now.

I'm trying a crossmatch between VHS DR5 and CatWISE but TOPCAT always throws and error ("IllegalArgumentException:net.sf.jsqlparser.JSQLParserException"). I don't know what I'm doing wrong or if this is at all possible.

I've adapted a query which I've found on the GAIA website so this might be a reason for error. It looks like this:

SELECT ra, dec, w1mpro, w2mpro, pmra, pmdec, japermag3
FROM catwise2020.main AS c
JOIN vhs_dr5.vhs_cat_v3 AS v
ON 1=CONTAINS(
    POINT('ICRS', v.ra2000, v.dec2000),
    CIRCLE('ICRS', c.ra, c.dec, 5./3600.))
WHERE abs(v.b)>=8
AND (v.mergedclass=-1 OR v.mergedclass=-2)
AND v.japermag3>=19
AND v.japermag3-c.w2mpro>=2
AND sqrt(power(c.pmra,2)+power(c.pmdec,2))>=0.15
AND (c.w1snr>=8.5 OR c.w2snr>=8.5)

Is there an obvious problem with the query?

by | 282 views

2 Answers

0 votes
Hi, thanks for reaching out. Our query parser does currently not support the ADQL geometry functions. For crossmatches please use the Q3C functions, which are demoed in several Data Lab example notebooks, e.g. here:

https://github.com/astro-datalab/notebooks-latest/blob/master/04_HowTos/CrossmatchTables/How_to_crossmatch_tables.ipynb

or here:

https://github.com/astro-datalab/notebooks-latest/blob/master/04_HowTos/CrossmatchTables/How_to_use_pre_crossmatched_tables.ipynb

You will need the qc3_radial_query() method. If you also want to return the matching distance, you need the q3c_dist() method. All are described here: https://github.com/segasai/q3c

Finally, please also see this Helpdesk question and response for another simple example:

https://datalab.noirlab.edu/help/index.php?qa=366&qa_1=dont-adql-functions-like-point-circle-work-query-interface&show=367#a367

Best,
Robert
by robertdemo (8.9k points)
0 votes
Thanks for answering @robertdemo

I guess I'll have to read into Python/Jupyter notebook to take the next step. :)
by

443 questions

459 answers

463 comments

657 users

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

Categories