Examples for the PanSTARRS 1 DR2 TAP service at STScI

Query with ADQL geometry: MeanObjectView

One of the tables (actually a view) in PanSTARRS 1 DR2 Catalog that is indexed for geometric queries in TAP dbo.MeanObjectView. The columns used for RA and Dec are RAMean and DecMean, respectively.

            SELECT TOP 10 * FROM dbo.MeanObjectView
            WHERE CONTAINS(POINT('ICRS', RAMean, DecMean),CIRCLE('ICRS',204.23963702,-29.875292,0.01667))=1
            AND nDetections > 5
          

Query with ADQL geometry: ForcedMeanObjectView

One of the tables (actually a view) in PanSTARRS 1 DR2 Catalog that is indexed for geometric queries in TAP dbo.ForcedMeanObjectView. The columns used for RA and Dec are RAMean and DecMean, respectively.

          SELECT TOP 10 * FROM dbo.ForcedMeanObjectView
          WHERE CONTAINS(POINT('ICRS', RAMean, DecMean),CIRCLE('ICRS',204.23963702,-29.875292,0.01667))=1
          AND nDetections > 5
        

Query with ADQL geometry: StackObjectView

One of the tables (actually a view) in PanSTARRS 1 DR2 Catalog that is indexed for geometric queries in TAP dbo.StackbjectView. The columns used for RA and Dec are also RAMean and DecMean, respectively.

            SELECT TOP 10 * FROM dbo.StackObjectView
            WHERE CONTAINS(POINT('ICRS', RAMean, DecMean),CIRCLE('ICRS',204.23963702,-29.875292,0.01667))=1
            AND gPSFMag > -999
            AND rPSFMag > -999
            AND iPSFMag > -999
            AND zPSFMag > -999
            AND yPSFMag > -999
          

Query with ADQL geometry: Detection

One of the tables in PanSTARRS 1 DR2 Catalog that is indexed for geometric queries in TAP dbo.Detection. This result set will return all the detections i.e. individual exposures so there will be multiples based up objid, so it might be worthwhile sorting by objid, distance. The columns used for RA and Dec are ra and dec, respectively.

            SELECT TOP 10 * FROM dbo.Detection
            WHERE CONTAINS(POINT('ICRS', ra, dec),CIRCLE('ICRS',204.23963702,-29.875292,0.01667))=1
            AND airMass > 1.1
            AND psfQfPerfect > 0.95
          

Query with ADQL geometry: Resolved object information

Given coordinates from a resolver, find the PanSTARRS object ID and some information from various filters:

              SELECT objID, RAMean, DecMean, nDetections, ng, nr, ni, nz, ny, gMeanPSFMag, 
                  rMeanPSFMag, iMeanPSFMag, zMeanPSFMag, yMeanPSFMag
              FROM dbo.MeanObjectView
              WHERE
              CONTAINS(POINT('ICRS', RAMean, DecMean),CIRCLE('ICRS',139.3344625554179,68.6350884268329,0.0002777777777777778))=1
              AND nDetections > 1
          

Query with ADQL geometry: All detections from an object ID

Given an object ID (see Resolved Object Information), find all detections with the relevant filter IDs.

              SELECT
                  objID, detectID, Detection.filterID as filterID, Filter.filterType, obsTime, ra, dec,
                  psfFlux, psfFluxErr, psfMajorFWHM, psfMinorFWHM, psfQfPerfect, 
                  apFlux, apFluxErr, infoFlag, infoFlag2, infoFlag3
              FROM Detection
              NATURAL JOIN Filter
              WHERE objID=190361393344112894
              ORDER BY filterID, obsTime