Sloan Digital Sky Survey
SkyServer DR16  
Not logged in Login Help
 

DR16 Help
 Start Here
 FAQ
 Cooking with Sloan
     - General
     - Solar System
     - Stars
     - Galaxies
     - QSOs/Cosmology
     - Teaching/Labs
 Contact Help Desk
 
 Searching SDSS
 SQL Tutorial
 SQL in SkyServer
 Sample SQL Queries
 Query Limits
 Searching Advice
 
 About the Database
 Table Descriptions
 Schema Browser
 Glossary
 Algorithms
 API/Tools
Find Close Pairs

Back to General Tasks index

How do I...

Find closely paired objects?


One common task is to find objects that form close pairs on the sky. Such close pairs might indicate objects that are interacting in some way, or might help identify clusters of objects. You can search for closely paired objects with an SQL Search (link opens in a new window). To get to SQL Search from the astronomers' main page, look under Search Tools. From the public main page, look under SkyServer Tools, then Search.

To learn more about SQL, see SkyServer's SQL Tutorial and guide to Using SQL with SkyServer.

  1. In the large textbox of the SQL Search tool (new window), type the following query (or see it in the textbox at the bottom of this page):

    SELECT P1.objID as P1_ID, P1.ra as first_ra, P1.dec as first_dec,
        P2.objID as second_ID, P2.ra as second_ra, P2.dec as second_dec
        -- return object IDs and positions for both objects
    FROM PhotoTag P1 -- P1 is the first object
        JOIN Neighbors N ON N.objID = P1.objID -- N is pre-computed neighbors
        JOIN PhotoTag P2 ON P2.objID = p1.OBJid -- P2 is the second object
    WHERE N.Distance < .05 -- objects are within 3 arcseconds
  2. The query will return the object ID, ra, and dec of each of the two objects in each pair.

  3. If you would like to see thumbnail images of each of the objects that matches the query, go to the Image List tool (link opens in new window). From the astronomers' main page, look under Advanced Tools. From the public main page, look under SkyServer Tools.


Next: View thumbnail images of search results

 Go to the next page

Back to Cooking with Sloan main page
Back to Help main page
Contact Help Desk