0 votes
69 views
Dear whom it may concern, I was running the crossmatch between nsc_dr1.object and nsc_dr1.meas tables and found out that, the unique object ID in the nsc_dr1.object table were all "1", which made the crossmatching impossible. I guess the "id" in the nsc_dr1.object table should corresponding to the "objectid" in the nsc_dr1.meas table. Could you please check it out? Thanks!
asked Jul 20 by anonymous | 69 views

1 Answer

0 votes

You are correct that "objectid" in nsc_dr1.meas corresponds to "id" in nsc_dr1.object.  Both are string types (made necessary by the chosen format of the identifier), so you have to make sure to compare strings.  For instance, this query:

result=qc.query("SELECT id,ra,dec from nsc_dr1.object LIMIT 10")
print(convert(result))

returns:

             id          ra        dec
0  188514.24591  318.350687 -66.606197
1  188514.48667  318.350906 -66.606002
2  188514.24758  318.350792 -66.606248
3  188514.46029  318.351096 -66.605730
4  188514.19996  318.352374 -66.606638
5  188514.15704  318.348066 -66.600734
6  188514.25380  318.349318 -66.602292
7  188514.11898  318.350985 -66.599728
8  188514.15703  318.354688 -66.601013
9  188514.34215  318.356654 -66.601968

It does look, however, that id in nsc_dr1.object is indicated to be type char[1], I wonder if this is the cause of the problem.  Will investigate.

answered Jul 20 by datalab (3,540 points)
Thanks very much! Also, if I use TAP service and run "select top 100 * from nsc_dr1.object", all the targets have the same "id" of "1" . Don't know why you have different result from mine. May be we are using different databases?
Hello again.  So we have edited the TAP schema to allow for more characters in the ID string, and that seems to have fixed the problem for TOPCAT (is that the client you were using?).  The Data Lab query tool continues to return the full ID string, as it did with the earlier TAP schema--why the problem did not manifest itself in all TAP clients remains a bit of a mystery...
Hi Knut, thanks very much! Yes, I'm using TOPCAT and now it is working~
Great, glad to hear it!

97 questions

84 answers

35 comments

430 users

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