02. How to execute a UI query

RSP Aspect: Portal

Contact authors: Greg Madejski and Melissa Graham

Last verified to run: 2025-02-03

Targeted learning level: beginner

Introduction: This tutorial demonstrates how to execute a simple query for table data with the Portal’s user interface (UI).

1. Go to the Portal’s DP0.2 Catalogs tab. The screen should look like Figure 1.

The graphical user interface for the Portal, offering drop-down menus to select catalogs and tables, entry fields for temporal and spatial constraints, and an interative view of the selected table schema.

Figure 1: The Portal User Interface (UI) for querying the DP0.2 catalogs.

2. Select collection and table. Set the collection to dp02_dc2_catalogs (A in Figure 1) and the table to Object (B in Figure 1). These are the defaults of a new Portal session and might be pre-selected.

3. Set spatial constraints (C in Figure 1). Select shape type “cone shape”, set the coordinates to 62, -37 (near the center of the DP0.2 simulation), and set the radius to 10 arcminutes (as in Figure 2).

Spatial constraints applied in the Portal UI.

Figure 2: Spatial constraints for a cone search centered on Right Ascension 62 degrees, Declination -37 degrees, and with a radius of 10 arcminutes.

4. Select columns to return. In the schema interface (D in Figure 1), select all of the columns listed below. Use the table search functionality, such as like '%_cModelFlux' as shown in Figure 3, to find the columns.

  • coord_ra

  • coord_dec

  • detect_isPrimary

  • refExtendedness

  • u_cModelFlux

  • g_cModelFlux

  • r_cModelFlux

  • i_cModelFlux

  • z_cModelFlux

  • y_cModelFlux

Selecting columns from the schema interface.

Figure 3: The schema interface, with a search for column names containin the string cModelFlux, and six columns selected.

5. Set column constraints. In the schema interface (D in Figure 1), click on the funnel icon to show only selected columns. Set the constraints in the list below, as shown in Figure 4.

  • detect_isPrimary \(= 1\) to return deblended objects and reject duplicates.

  • refExtendedness \(= 1\) to return objects that appear extended (likely galaxies, not stars).

  • All cModelFlux \(> 360\) nJy to return objects brighter than 25th mag. (Recall that \(m = -2.5 log(f) + 31.4\), where \(f\) is in units of nJy).

Applying column constraints in the schema interface.

Figure 4: The schema interface, with all desired columns selected and all column constraints applied. The funnel icon has been clicked so that only selected columns are shown.

Warning! Do not use the schema interface to apply spatial constraints, i.e., do not apply limits on coordinate columns (coord_ra, coord_dec). Only apply spatial constraints as instructed in Step 3, because cone and polygon searches are executed much more quickly than columns limits.

6. Execute the UI query. Leave the Row Limit (E in Figure 1) at the default of 50,000 and click Search (F in Figure 1). The query will be executed and the results will appear in the Results tab.

Default search results from a query.

Figure 5: The default results view layout for the query described above. Interacting with query results is covered in a separate tutorial.

Return to the list of DP0.2 Portal tutorials.