...
1- Querying data services
It is There are several easy ways to see the content of a data service in VESPA.
• We stress that, independently from VO access, EPN-TAP provides a convenient way to describe personal datasets with a standard set of keywords (axes and physical quantities). You may want to use it to describe your own, private, datasets.
1.1 From portal and tools
• In the VESPA query interfaceportal, just click the "Submit" button. This will display the central panel displays a list of connected services with the number of entries in each service (if a query has already been submitted, click the "Reset" and "Submit" buttons in the left panel).
If you know which service you want to look at, click on the leftmost icon (table-shaped) on its lineservice name in this table. This will display the content of the service, paginated. You can change the number of entries per page, or navigate through pages. You can then select your data visually, possibly with the help of thumbnails.
Going back to the query pageIn the left panel, you'll find it easy to simply add a filter on target_name, target_class, or dataproduct_type parameters, or even on time_min / time_max.
• It may be useful to stress that, independently from VO access, EPN-TAP provides a convenient way to describe personal datasets with a standard set of keywords (axes and physical quantities).TOPCAT is another tool which easily sends TAP queries to TAP servers. See https://github.com/epn-vespa/tutorials/blob/master/misc/EPN-TAP-services-Using-TopCat-as-a-client/EPN-TAP_services-Using_TopCat_as_a_client.md
1.2 HTPP methods
TAP services can be queried this way from the command line:
(the example retrieves the latest creation_date)
• Get method:
• Post method (bash syntax):
EPN_TAP_URL="http://climso.irap.omp.eu/__system__/tap/run/tap/sync"
DATA='REQUEST=doQuery&lang=ADQL&query=SELECT+MAX(creation_date)+FROM+climso.epn_core&FORMAT=json'
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d "${DATA}" "${EPN_TAP_URL}"
2- Accessing data
Most data services provide links to data files. In EPN-TAP services, such links are available under the access_url parameter. To retrieve several files at once, you only need to click on selected lines and use the "Data Selection > Download" item from the menu on the bottom left; this will download a zip file.
In other cases, the data are included in the service table directly, together with the descriptive parameters.
Some services propose several versions of the data files, e.g. an ascii file and a conversion to VOtable. Beware that in some cases the ascii version is the native format available in an external archive, while the VOtable version may have a different, updated or corrected content (this is the case of IKS or spectro_planets). In other cases, the conversion from ascii is performed on the fly and the content is identical (this is the case of M4ast or Titan).
...
- Reading fits files in your environment should be obvious in most cases - fits libraries are widely available (however, TOPCAT will only open tables, while ds9 will only open images adn and cubes - other extensions may require specific processing).
- A VOtable can be read and used in TOPCAT. If you prefer to use a more familiar environment, you can save them from TOPCAT in various formats, including simple ascii, fits, or csv which can be read in many software - or even html or latex for use in documents.
- Several services provide a link to a web service under access_url, in particular for OGC/GIS services (e.g., CRISM, USGS_maps, M3…). Such links can be send from VESPA to QGIS through the EPN-TAP plug-in (jra-t4-tools-qgis-plugin).
...
VESPA's Google Sheet Add-on may also be handy in this case, see here: TAP Sheet (Google Sheets Add-On).
Finally, if you know on which TAP server the service is located, you can query a table directly from the command line and select the output format, e.g.:
wget "http://voparis-tap-planeto.obspm.fr/tap/sync?REQUEST=doQuery&LANG=ADQL&QUERY=SELECT * FROM exoplanet.epn_core WHERE "star_name" LIKE '%GJ 357%' &FORMAT=json"
(will retrieve description of exoplanets around star GJ 357. We're passing a TAP query via wget, which contains an ADQL query after the QUERY parameter. This mechanism applies to all EPN-TAP services. Available output formats depend on the server).
3- IDL
The most helpful IDL libraries in this context are NASA's Astron library, and possibly SSW.
The SSW (SolarSoftWare) library provides a complete VO interface, including queries to the registry and to individual services declared there (should work under Linux): http://www.lmsal.com/solarsoft/ssw_setup.html.
However, this library is not maintained and is partly obsolete, and so it may not work properly.
3.1 Fits files
...
IDL has WMS and WCS interfaces which allow it to browse the GIS servers referred to in underneath these EPN-TAP services (type ogc_wcs or ogc_wms in the IDL command line).
However, a direct call of the file url is OK and much simpler, especially if you've already selected files from the VESPA interface:
...
Similarly, if you already know the name of the files of interest, use VESPA's file grabbing web services with the IDLnetURL object. Usage from IDL is described here: File grabbing interface (fgi)
This type of access is intended for easy pipeline processing.
...
Routines exist to handle these two formats in the astropy library (: https://pyvowww.readthedocs.io/en/latest).astropy.org
4.2 PDS files
The PDS Small Bodies Node also provides routines to read PDS4 data under Python (no such files currently exist in EPN-TAP services): https://pdssbn.astro.umd.edu/tools/tools_readPDS.shtml
...
The file grabbing web services from VESPA (and their use from Python) are described here: File grabbing interface (fgi)
This type of access is intended for easy pipeline processing.
...
Astropy + pyvo libraries cover some VO access.most VO accesses: https://pyvo.readthedocs.io/
An example A short tutorial is available here (from Baptiste Cecconi), from a Jupyter notebook:
https://github.com/epn-vespa/tutorials/blob/master/misc/pythonicJupyter-notebook-access-tutorial/pythonic-access-tutorial.md/VVEX_demo.ipynb
Another example is provided hereAn example of query from Jupyter notebook is provided here (from Baptiste Cecconi):
Direct query via pyvo (from Florence Henry):
Code Block |
---|
In [1]: import pyvo In [2]: service = pyvo.dal.TAPService("http://voparis-tap-planeto.obspm.fr/tap") In [3]: query = "SELECT target_name, inclination, eccentricity FROM exoplanet.epn_core WHERE semi_major_axis < 5" In [4]: results = service.search(query) In [5]: results Out[5]: <Table masked=True length=2050> ... In [6]: type(results) Out[6]: pyvo.dal.tap.TAPResults In [7]: len(results) Out[7]: 2050 In [8]: results[0].get('target_name') Out[8]: '11 Com b' In [9]: results[2].get('target_name') Out[9]: '14 And b' |
4.5 Querying all EPN-TAP services via Python
The same query can be sent to all services found in the IVOA registry, see here: