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
-
Start up TOPCAT.
(see http://www.star.bris.ac.uk/~mbt/topcat/ ) -
Click on 'Table Access Protocal (TAP) Query under the “VO” menu.
-
Fill in
https://data.lsst.cloud/api/tapin the “TAP URL” window and click the “Use Service” button.
-
Fill in your security token under “User” in the Authentication window that pops up. Leave the “Password” blank. Click OK.
-
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.
-
Go to the NOIRLAB DataLab ( https://datalab.noirlab.edu/ ) and launch a Jupyter Notebook.
-
At the very minumun, import the
pyvoandrequestspython modules:
import pyvo
import requests
- 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.
- 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")
- Access the RSP TAP servics:
tap = pyvo.dal.TAPService(tap_url, auth)
- 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!





