How do I get photometry for spectroscopic objects? What is the SpecPhotoAll table?
The SpecPhotoAll table is a precomputed join between the Best PhotoObjAll and SpecObjAll tables. It includes the most requested parameters from these two tables, as well as a few pieces of information about tiling. It also includes the TargetObjID, which allows user to retrieve the Target version of the photometry. Note that all spectro-photo matches are not included in SpecPhotoAll, since there are additional JOIN conditions imposed on tiling and targeting information. The actual SQL fragment from the SpecPhotoAll construction is shown below to indicate all the JOINs involved: FROM SpecObjAll s JOIN TileAll w ON s.tile=w.tile LEFT OUTER JOIN TilingInfo t ON s.targetid=t.targetid and w.tileRun=t.tileRun JOIN TargetInfo i on s.targetObjid=i.targetObjid LEFT OUTER JOIN PhotoObjAll p WITH (nolock) ON s.bestObjid=p.objid LEFT OUTER JOIN PhotoTag q ON p.objid=q.objid SpecPhotoAll is very useful for viewing and comparing objects’ photometric and spectroscopic properties.