vsa logo
VSA will soon move to

VSA Home
Start Here
Data Overview
Known Issues
the Surveys
Coverage Maps
Schema browser
Data access
Archive Listing
Freeform SQL
SQL Cookbook
Release History
vsa logo bottom
Home | Overview | Browser | Access | Login | Cookbook 
  VSA logo

VSA Questions and Answers

Before 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). General look-ups between tables *Source and *Detection.
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
/* 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:
Coordinates in the VSA are primarily stored as decimal degrees. The region search page does accept sexagesimal format but the results are returned as decimal degrees. Note: RA and Dec values are returned as decimal degrees except when written to FITS files where radians are used


Home | Overview | Browser | Access | Login | Cookbook
Listing | FreeSQL
Links | Credits

WFAU, Institute for Astronomy,
Royal Observatory, Blackford Hill
Edinburgh, EH9 3HJ, UK