Will there be external TAP access to RSP DP0.2 tables?

Sorry for the delay. I had to dig into the code a bit…

Anyway, @MelissaGraham pointed me to this useful piece Rubin DP0 Delegate documenation:
https://data.lsst.cloud/api-aspect .

Once you have your data.lsst.cloud TAP service token, you can either use it other TAP access services. I will give two cases: (1) via TOPCAT and (2) via a NOIRLAB DataLab Jupyter Notebook.

TOPCAT

  1. Start up TOPCAT.
    (see http://www.star.bris.ac.uk/~mbt/topcat/ )

  2. Click on 'Table Access Protocal (TAP) Query under the “VO” menu.

  3. Fill in https://data.lsst.cloud/api/tap in the “TAP URL” window and click the “Use Service” button.

  4. Fill in your security token under “User” in the Authentication window that pops up. Leave the “Password” blank. Click OK.

  5. Now you have access to the RSP TAP service from TOPCAT.

NOIRLAB Data Lab

Here, basically you want to use the basic pyvo commands, not the specialized DataLab convenience functions.

  1. Go to the NOIRLAB DataLab ( https://datalab.noirlab.edu/ ) and launch a Jupyter Notebook.

  2. At the very minumun, import the pyvo and requests python modules:

import pyvo
import requests
  1. Define the data.lsst.cloud TAP server URL and your security token:
tap_url = 'https://data.lsst.cloud/api/tap'
token = 'yy-xxxxxx'   # insert your own RSP TAP server security token here.
  1. Set up appropriate authorization to access the RSP TAP server:
s = requests.Session()
s.headers["Authorization"] = "Bearer " + token
auth = pyvo.auth.authsession.AuthSession()
auth.credentials.set("lsst-token", s)
auth.add_security_method_for_url(tap_url, "lsst-token")
auth.add_security_method_for_url(tap_url + "/sync", "lsst-token")
auth.add_security_method_for_url(tap_url + "/async", "lsst-token")
auth.add_security_method_for_url(tap_url + "/tables", "lsst-token")
  1. Access the RSP TAP servics:
tap = pyvo.dal.TAPService(tap_url, auth)
  1. Run a query:
query = "SELECT * FROM tap_schema.schemas"
results = tap.run_sync(query)
results.to_table()

Below, I have screenshots of a full Jupyter notebook running the above in the NOIRLAB DataLab (well, with my security token changed to a generic yy-XXXXX):



I hope this helps! Apologies for the gory details, but I hope to be able to go back to this and remind myself how this works in the future(!).

Thanks!