wiki:db/queries/003
Last modified 6 years ago Last modified on 01/31/2013 11:12:20 PM

Cone-magnitude-color search

SELECT  *
FROM    Object
WHERE   areaSpec_box(:raMin, :declMin, :raMax, :declMax)
   AND  zMag      BETWEEN :zMin  AND :zMax
   AND  gMag-rMag BETWEEN :grMin AND :grMax
   AND  iMag-zMag BETWEEN :izMin AND :izMax

There are two variations of this query:

  • color predicate provides best selectivity
  • ra, decl predicate provides best selectivity

Possible variation: how about objects within a cone of size D around RA/Dec, with magnitude less than M, and with a delta M greater than X within time T? (this would let you search for objects visible from your telescope that have varied recently, for example, or objects near your variable object that might have also shown variability). (suggested by Lynne Jones)