Tutorial: Authenticating from TOPCat outside the Science Platform

This tutorial shows you how to access the Rubin Science Platform datasets from outside the Science Platform with user tokens. This example specifically shows how to access table data from the Science Platform’s TAP service with TOPCAT, a popular viewer and editor for tabular and catalog data.

  1. Follow the steps in Creating user tokens to create a new user token. Ensure that the token has read:tap scope.

    Create token dialog

    Be sure to copy the token string shown after you click Create. The Science Platform won’t show you the token string again after you dismiss the dialog.

  2. On your local machine open up TOPCAT. This will require having Java installed.

  3. From TOPCAT, select VO ‣ Table Access Protocol (TAP) Query.

The VO menue
  1. This will bring up a window with a list of available TAP services. We want to use a service with a known endpoint. Enter https://data.lsst.cloud/api/tap/ in the box at the bottom of the page labeled TAP URL.

    The TAP service configuration window.
  2. Clicking Use Service will bring up a username/password dialog. Set the User to x-oauth-basic. Paste the entire access token into the Password field.

    Username and password dialog.
  3. If authentication is successful, the window will change to the TAP service window and information about the various tables in the service will appear in the left portion of the upper panes. If you select a table, you will see information about the columns in the table to the right of the table listing.

    This example uses the wise_00.allwise_p3as_mep table. Make a query by entering the ADQL in the box at the bottom and click the Run Query button.

    The example query selects three magnitudes from a circular region on the sky.

    SELECT w1mpro_ep, w2mpro_ep, w3mpro_ep FROM wise_00.allwise_p3as_mep WHERE CONTAINS(POINT('ICRS', ra, decl), CIRCLE('ICRS', 192.85, 27.13, .2)) = 1
    
    Query window
  4. Once the query returns, you can make plots like this color-color diagram. Create two synthetic columns from the magnitude to create colors for the plot.

    A color color plot from wise data.