Python and TAP Access to KOA Data
KOA provides a Python client, PyKOA, to discover and access raw (level 0) data for all instruments and quick-look extracted (level 1) files for five instruments for which an automated pipe pipeline available: HIRES, NIRSPEC, NIRC2, OSIRIS, and LWS. The reduced data are intended as a guide to the science content of the data are and not intended for scientific analysis. PyKOA supports access to public and protected data. Note that level 1 data created by pipelines developed under the WMKO Data Services Initiative (DSI) are not yet available through the Python client.
The database columns names for use in queriesInformation regarding the database columns available for PyKOA and TAP queries can be found in the following links:
PyKOA: A Python Interface to KOA DataPyKOA offers provides access to public raw science and calibration files acquired with any of the KOA instruments. Keck Observatory PIs may use the KOA credentials already assigned to them with PyKOA to access their protected data. PyKOA also enables a rich variety of searches, including cone, box, polygon, or all-sky spatial searches; temporal searches; searches on program infortmation; and complex searches on multiple attributes, through queries structured in the IVOA Astronomical Query Language (ADQL). Functionality For End UsersPyKOA supports the following methods for accessing KOA science and calibration data:
PyKOA writes the output metadata data to an output file, in the IPAC ASCII, VOTable, CSV or TSV data formats. InstallationPyKOA can be installed from PyPI: pip install --upgrade pykoa RequirementsRequires Python 3.6 (or above), plus table read and write functions from Astropy. We have tested with Astropy 4.0.1. We recommend using the Anaconda Python distribution. Jupyter NotebooksThese Jupyter Notebooks provide examples of the methods supported by PyKOA, and examples of how Keck PIs may login and access their protected data. TAP ClientsKOA supports synchronous and asychronous queries queries to three widely used IVOA Table Access Protocol (TAP) clients: PyVO, TOPCAT and IRSA Viewer. Protected (user-proprietary) data at KOA are inaccessible through these clients, as they do not support the security cookies required to access private data at KOA. PIs wishing to access their protected data through a Python API should use PyKOA. (The TAP+ client operating under astroquery has been deprecated and KOA queries to it are no longer supported). PyVOPyVO is a Python package that provides access to remote data and VO-compliant services. Jupyter NotebooksThese Jupyter Notebooks provide examples of the methods supported by PyVO. TOPCATTOPCAT is an interactive graphical viewer and editor for tabular data. It provides most of the capabilities astronomers need for analysis and manipulation of source catalogues and other tables. It is a stand-alone Java application that uses Virtual Observatory (VO) standards to access and integrate distributed data. The screenshots below show how to query for HIRES data in TOPCAT; substitute your favorite instrument for HIRES.
IRSA ViewerIRSA Viewer is a general purpose tool that offers discovery of and subsquent interaction with images, catalogs and time series data. To access KOA data:
Select KOA TAP service: Select koa_deimos table: Under "Enter Constraints," select Spatial, and enter NGC3109 in "Coordinates or Object Name". NED will resolve the position of this galaxy. Under "Radius", select degrees and then enter "1". Then click "Search" at the bottom left of the page. The return page will include a table of metadata observations at the bottom, a 2MASS image centered on the returned observations, and a scatter plot of the positions of the observations. Visit the return page to learn about functions for interacting with the data. |
|
Please acknowledge the use of KOA by including this text in your publications:
Privacy Policy Image Use Policy The Keck Observatory Archive (KOA) is a collaboration between the NASA Exoplanet Science Institute (NExScI) and the W. M. Keck Observatory (WMKO). NExScI is sponsored by NASA's Exoplanet Exploration Program, and operated by the California Institute of Technology in coordination with the Jet Propulsion Laboratory (JPL). |