Changeset 27840 for branches/simtest_nebulous_branches/ippTools/share/difftool_definewarpwarp_select.sql
- Timestamp:
- May 3, 2010, 8:50:52 AM (16 years ago)
- Location:
- branches/simtest_nebulous_branches
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippTools/share/difftool_definewarpwarp_select.sql (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/simtest_nebulous_branches
- Property svn:mergeinfo changed
-
branches/simtest_nebulous_branches/ippTools/share/difftool_definewarpwarp_select.sql
r24174 r27840 3 3 inputWarpRun.tess_id AS tess_id, 4 4 inputRawExp.exp_id AS input_exp_id, 5 inputWarpRun.data_group AS input_data_group, 5 6 -- The following trick pulls out the warp_id that has the smallest distance 6 7 SUBSTRING_INDEX(GROUP_CONCAT(templateWarpRun.warp_id ORDER BY ABS(ASIN(SQRT(POW(SIN(0.5*(inputRawExp.decl - templateRawExp.decl)),2) + COS(inputRawExp.decl) * COS(templateRawExp.decl) * POW(SIN(0.5*(inputRawExp.ra - templateRawExp.ra)),2))))), ',', 1) AS template_warp_id … … 16 17 JOIN fakeRun AS templateFakeRun 17 18 ON templateFakeRun.fake_id = templateWarpRun.fake_id 19 AND templateFakeRun.fake_id != inputFakeRun.fake_id -- Don't use self as template! 18 20 JOIN camRun AS templateCamRun 19 21 ON templateCamRun.cam_id = templateFakeRun.cam_id 22 AND templateCamRun.cam_id != inputCamRun.cam_id -- Don't use self as template! 20 23 JOIN chipRun AS templateChipRun 21 24 ON templateChipRun.chip_id = templateCamRun.chip_id 25 AND templateChipRun.chip_id != inputChipRun.chip_id -- Don't use self as template! 22 26 JOIN rawExp AS templateRawExp 23 27 ON templateRawExp.exp_id = templateChipRun.exp_id 24 28 AND templateRawExp.filter = inputRawExp.filter 29 AND templateRawExp.exp_id != inputRawExp.exp_id -- Don't use self as template! 30 WHERE inputWarpRun.state = 'full' 31 AND templateWarpRun.state = 'full' 25 32 -- WHERE hook %s 26 33 GROUP BY input_warp_id
Note:
See TracChangeset
for help on using the changeset viewer.
