|
VSA Questions and AnswersBefore contacting vsa-support@roe.ac.uk if you have a query about accessing the VSA please see if it has already been covered in the Q&A listed below. (note: please do not contact individuals in the Wide-Field Astronomy Unit, use vsa-support@roe.ac.uk).
In general when querying the *Source table, you may find that certain catalogue quantities that you need are not present. This is because the table design in the VSA is to write only a subset of the most useful attributes available from *Detection into *Source (for efficiency reasons). For example, CASU standard source extraction produces 13 aperture magnitudes for every detection in every passband and these are of course present in *Detection, but in *Source you will only see a subset of 3 per passband - aperMags 3, 4 and 6 for example. How do you query if you are interested in an aperture magnitude other than 3, 4 or 6 - say aperMag2 in the J band for a VMC query? The answer is to do a join query between *Source and *Detection, noting that each row of *Source is a member of a frame set the details of which are stored in *MergeLog (hence the join has to include *MergeLog as well). The SQL syntax is best illustrated by an example: SELECT s.ra, s.dec, jd.aperMag2 as jAperMag2 FROM vmcSource AS s, vmcMergeLog AS l, vmcDetection as jd WHERE /* Join source to merge log for the frame set: */ s.frameSetID=l.frameSetID AND /* Join merge log to detection for the J frame: */ l.jmfID = jd.multiframeID AND l.jeNum = jd.extNum AND /* Join source to detection to look up the detection required: */ s.jSeqNum = jd.seqNum Note that the final predicate could be done via objID: ... AND s.jobjID = dj.objID but this is most inadvisable for efficiency reasons (the attribute combination multiframe number, extension number, sequence number is the primary key in *Detection so look-ups are very fast on that combination) and furthermore for the more subtle reasons detailed
Coordinates - decimal degrees, sexagesimal, radians: .
Home | Overview | Browser | Access | Login | Cookbook Listing | FreeSQL Links | Credits
WFAU, Institute for Astronomy, vsa-support@roe.ac.uk
|