09.1. How to apply a filter to the results table

RSP Aspect: Portal

Contact authors: Greg Madejski and Melissa Graham

Last verified to run: 2025-02-04

Targeted learning level: beginner

Introduction: This tutorial demonstrates how to apply constraints on columns in order to filter a table in the Portal results tab.

1. Execute a query. Go to the Portal’s DP0.2 Catalogs tab, switch to the ADQL interface, and execute the query below. This query will retrieve a small sample of point-like objects (stars) brighter than 25th magnitude (as in preceding tutorials).

SELECT coord_dec, coord_ra, detect_isPrimary, refExtendedness,
       u_cModelFlux, g_cModelFlux, r_cModelFlux,
       i_cModelFlux, z_cModelFlux, y_cModelFlux
FROM dp02_dc2_catalogs.Object
WHERE CONTAINS(POINT('ICRS', coord_ra, coord_dec),
      CIRCLE('ICRS', 62, -37, 0.167)) =1
      AND (detect_isPrimary =1 AND refExtendedness =1
           AND u_cModelFlux >360 AND g_cModelFlux >360
           AND r_cModelFlux >360 AND i_cModelFlux >360
           AND z_cModelFlux >360 AND y_cModelFlux >360)

2. View the default table (Figure 1). Only one query has been executed, so there is only one tab in the table panel (A in Figure 1).

The default view of the table panel.

Figure 1: The table panel that results from the query in step 1. The third row has been clicked on and is highlighted orange.

3. Apply a filter. Filter the table such that only objects with Right Ascension coordinates \(<\) 61.9 degrees are shown by typing < 61.9 into the filter entry box at the top of the coord_ra column as shown in Figure 2 (item A). See how all panels update to show only the filtered objects.

The full Results tab when rows have been filtered by the right ascension coordinate.

Figure 2: The full Results tab after a filter for objects with RA \(<\) 61.9 degrees is applied (item A).

4. Remove the constraint. Click the “unfilter” icon at upper right in the table panel to remove the filter (B in Figure 2).

Return to the list of DP0.2 Portal tutorials.