0 votes

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
    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?

asked Apr 7 by MartinKb | 41 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:


or here:


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:


answered Apr 11 by robertdemo (3,960 points)
0 votes
Thanks for answering @robertdemo

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

329 questions

341 answers


2,207 users

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