API to access CDS cross-match service

Juande Santander Vela jdsant at iaa.es
Wed Jan 30 12:07:28 PST 2013


Dear Thomas, thanks for the service!

I'm trying to see if I can crossmatch with the AMIGA catalogue already in VizieR, with the following Python code:

import requests

baseXmatchUrl = "http://cdsxmatch.u-strasbg.fr/xmatch/api/v1/sync"
xmatchParamsDict = {
  'REQUEST': 'xmatch',
  'RESPONSEFORMAT': 'votable',           # votable, json, csv, or tsv
  'cat1': 'vizier:II/306/sdss8',         # SDSS DR8
  'cat2': 'vizier:J/A+A/411/391/table1', # AMIGA revised positions
  'colRA1':  'RAJ2000',                  # RA and
  'colDec1': 'DEJ2000',                  # Dec columns for cat1,
  'colRA2':  'RAJ2000',                  # RA and 
  'colDec2': 'DEJ2000',                  # Dec columns for cat2
  # columns from cat1 to keep
  'cols1': 'RAJ2000,DEJ2000,objID,SpObjID',
  'cols2': 'RAJ2000,DEJ2000,CIG',        # columns from cat2 to keep
  'distMaxArcsec': 30.0,                 # matching tolerance (arcsecs)
  'selection': 'best'                    # either "all" or "best" match(es)
}

xmatchQuery = requests.post(
  url=baseXmatchUrl,
  data=xmatchParamsDict
)

print xmatchQuery.text

and the error I get is:

<INFO name="QUERY_STATUS" value="ERROR">
		 Message: colRA and colDec not compatible with VizieR catalogs!
		 Trace:
java.lang.Exception: colRA and colDec not compatible with VizieR catalogs!
	at cds.xmatch.servlet.SyncXMatch.getXMatchDataSet(SyncXMatch.java:297)
	at cds.xmatch.servlet.SyncXMatch.exec(SyncXMatch.java:587)
	at cds.xmatch.servlet.SyncXMatch.doPost(SyncXMatch.java:398)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395)
	at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:301)
	at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:183)
	at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:169)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)
</INFO>

It is not clear whose table is at fault, but I'd guess is the vizier:J/A+A/411/391/table1 , which as h:m:s RA and d:m:s Dec. Is that a current limitation of the API? Thanks!

El 30/01/2013, a las 11:11, Thomas Boch <thomas.boch at astro.unistra.fr> escribió:

> Dear all,
> 
> The CDS has released today the first version of an API allowing one to programmatically access its cross-match service. Through HTTP calls, any script or program can submit a list of positions (up to 2 million positions) and look for counterparts in one of the 10,000+ VizieR tables. The result can be retrieved in different formats, including VOTable.
> 
> Full documentation is available at http://cdsxmatch.u-strasbg.fr/xmatch/doc/cross-match-API.html , along with some usage examples in several languages (shell script, Python, Ruby, Java).
> Your comments, questions or feedback are welcome and can be sent to cds-question at unistra.fr
> 
> Cheers,
> Thomas

--
Juande Santander Vela
VIA-SKA Project Manager
Instituto de Astrofísica de Andalucía (IAA-CSIC)
Glorieta de la Astronomía s/n, E-18008, Granada, Spain

Felix Klein: Todo el mundo sabe lo que es una curva, hasta que estudia suficientes matemáticas como para confundirse con la innumerable cantidad de excepciones posibles.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ivoa.net/pipermail/apps/attachments/20130130/3d56b36b/attachment-0001.html>


More information about the apps mailing list