Changeset 35236 for branches/eam_branches/ipp-20130207/ippTools/share
- Timestamp:
- Mar 5, 2013, 2:24:05 PM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130207
- Files:
-
- 20 edited
- 9 copied
-
. (modified) (1 prop)
-
ippTools/share (modified) (1 prop)
-
ippTools/share/Makefile.am (modified) (2 diffs)
-
ippTools/share/bgtool_chip.sql (modified) (2 diffs)
-
ippTools/share/bgtool_chipinputs.sql (modified) (1 diff)
-
ippTools/share/bgtool_definechip.sql (modified) (1 diff)
-
ippTools/share/bgtool_definewarp.sql (modified) (1 diff)
-
ippTools/share/bgtool_tochip.sql (modified) (1 diff)
-
ippTools/share/bgtool_towarp.sql (modified) (1 diff)
-
ippTools/share/bgtool_warp.sql (modified) (1 diff)
-
ippTools/share/bgtool_warpinputs.sql (modified) (1 diff)
-
ippTools/share/camtool_find_pendingimfile.sql (modified) (1 prop)
-
ippTools/share/chiptool_setimfiletoupdate.sql (modified) (1 prop)
-
ippTools/share/difftool_definewarpstack.sql (modified) (1 diff)
-
ippTools/share/pxadmin_create_tables.sql (modified) (9 diffs, 1 prop)
-
ippTools/share/pxadmin_drop_tables.sql (modified) (1 diff)
-
ippTools/share/releasetool_definerelexp.sql (modified) (1 diff)
-
ippTools/share/releasetool_definerelgroup_select_data_group.sql (copied) (copied from trunk/ippTools/share/releasetool_definerelgroup_select_data_group.sql )
-
ippTools/share/releasetool_definerelgroup_select_exp_data_group.sql (copied) (copied from trunk/ippTools/share/releasetool_definerelgroup_select_exp_data_group.sql )
-
ippTools/share/releasetool_definerelgroup_select_exp_lap.sql (copied) (copied from trunk/ippTools/share/releasetool_definerelgroup_select_exp_lap.sql )
-
ippTools/share/releasetool_definerelgroup_select_lap.sql (copied) (copied from trunk/ippTools/share/releasetool_definerelgroup_select_lap.sql )
-
ippTools/share/releasetool_definerelstack.sql (copied) (copied from trunk/ippTools/share/releasetool_definerelstack.sql )
-
ippTools/share/releasetool_definerelstack_with_skycal.sql (copied) (copied from trunk/ippTools/share/releasetool_definerelstack_with_skycal.sql )
-
ippTools/share/releasetool_listrelexp.sql (modified) (2 diffs)
-
ippTools/share/releasetool_pendingrelgroup.sql (copied) (copied from trunk/ippTools/share/releasetool_pendingrelgroup.sql )
-
ippTools/share/releasetool_tocalibexp.sql (copied) (copied from trunk/ippTools/share/releasetool_tocalibexp.sql )
-
ippTools/share/reltool_pendinggroup.sql (copied) (copied from trunk/ippTools/share/reltool_pendinggroup.sql )
-
ippTools/share/warptool_scmap.sql (modified) (1 diff)
-
ippTools/share/warptool_towarped.sql (modified) (1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130207
- Property svn:mergeinfo changed
/trunk (added) merged: 35127-35128,35130,35133-35135,35141-35142,35148,35150-35159,35162-35167,35169-35200,35203-35218,35221-35228,35230,35232-35233
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20130207/ippTools/share
- Property svn:mergeinfo set to
-
branches/eam_branches/ipp-20130207/ippTools/share/Makefile.am
r34933 r35236 155 155 difftool_completed_runs.sql \ 156 156 difftool_coalesce_run.sql \ 157 difftool_definewarpstack.sql \ 157 158 difftool_definewarpstack_part1.sql \ 158 159 difftool_definewarpstack_part2.sql \ … … 463 464 sctool_list.sql \ 464 465 releasetool_listsurvey.sql \ 466 releasetool_tocalibexp.sql \ 465 467 releasetool_listrelease.sql \ 466 468 releasetool_listrelexp.sql \ 467 releasetool_definerelexp.sql 469 releasetool_definerelexp.sql \ 470 releasetool_definerelstack.sql \ 471 releasetool_definerelstack_with_skycal.sql \ 472 releasetool_definerelgroup_select_lap.sql \ 473 releasetool_definerelgroup_select_data_group.sql \ 474 releasetool_definerelgroup_select_exp_data_group.sql \ 475 releasetool_definerelgroup_select_exp_lap.sql \ 476 releasetool_pendingrelgroup.sql 468 477 -
branches/eam_branches/ipp-20130207/ippTools/share/bgtool_chip.sql
r35100 r35236 5 5 chipBackgroundRun.label, 6 6 chipBackgroundRun.data_group, 7 chipBackgroundRun.chip_id, 8 chipBackgroundRun.cam_id, 7 9 rawExp.exp_id, 8 10 rawExp.exp_name, … … 12 14 rawExp.ra, 13 15 rawExp.decl, 14 rawExp.exp_time, 15 chipRun.chip_id 16 rawExp.exp_time 16 17 FROM chipBackgroundRun 17 18 JOIN chipBackgroundImfile USING(chip_bg_id) -
branches/eam_branches/ipp-20130207/ippTools/share/bgtool_chipinputs.sql
r28486 r35236 1 1 SELECT 2 chipProcessedImfile.* 2 chipProcessedImfile.*, 3 camProcessedExp.path_base AS cam_path_base 3 4 FROM chipBackgroundRun 4 5 JOIN chipRun USING(chip_id) 5 6 JOIN chipProcessedImfile USING(chip_id) 7 LEFT JOIN camProcessedExp ON chipBackgroundRun.cam_id = camProcessedExp.cam_id 6 8 WHERE chipRun.state = 'full' 7 9 AND chipProcessedImfile.fault = 0 -
branches/eam_branches/ipp-20130207/ippTools/share/bgtool_definechip.sql
r35119 r35236 1 1 SELECT 2 chipRun.* 2 chipRun.*, 3 camRun.cam_id, 4 chip_bg_id, 5 CURRENT_TIMESTAMP AS registered 3 6 FROM chipRun 4 7 JOIN rawExp USING(exp_id) 5 LEFT JOIN chipBackgroundRun USING(chip_id) 6 WHERE chipRun.state = 'full' 8 JOIN chipRun as altChipRun USING(exp_id) 9 JOIN camRun ON altChipRun.chip_id = camRun.chip_id 10 JOIN camProcessedExp USING(cam_id) 11 LEFT JOIN chipBackgroundRun ON chipBackgroundRun.chip_id = chipRun.chip_id -- labelHook %s 12 WHERE chipRun.state = 'full' AND camRun.state ='full' AND camProcessedExp.quality = 0 -
branches/eam_branches/ipp-20130207/ippTools/share/bgtool_definewarp.sql
r28551 r35236 1 1 SELECT 2 warpRun.*, 3 chipBackgroundRun.chip_bg_id 2 warpRun.warp_id, 3 chipBackgroundRun.* 4 -- the following items are selected for aid in debugging 5 , 6 warpsChipRun.chip_id as warpschip_id, 7 chipRun.chip_id AS thischip_id, 8 warpBackgroundRun.warp_bg_id 4 9 FROM warpRun 5 10 JOIN fakeRun USING(fake_id) 6 11 JOIN camRun USING(cam_id) 7 JOIN chipRun USING(chip_id) 8 JOIN chipBackgroundRun USING(chip_id) 12 JOIN chipRun as warpsChipRun ON camRun.chip_id = warpsChipRun.chip_id 9 13 JOIN rawExp USING(exp_id) 10 LEFT JOIN warpBackgroundRun USING(chip_bg_id) 14 JOIN chipRun USING(exp_id) 15 JOIN chipBackgroundRun ON chipRun.chip_id = chipBackgroundRun.chip_id 16 AND (chipBackgroundRun.cam_id = camRun.cam_id OR chipBackgroundRun.cam_id = 0) 17 LEFT JOIN warpBackgroundRun ON chipBackgroundRun.chip_bg_id = warpBackgroundRun.warp_bg_id -- label hook %s 11 18 WHERE chipBackgroundRun.state = 'full' 12 AND warpRun.state IN ('full', 'cleaned', 'goto_cleaned') -- only need it to have been completed19 AND warpRun.state IN ('full', 'cleaned', 'goto_cleaned') -- need warp to have completed so warpSkyCellMap is populated -
branches/eam_branches/ipp-20130207/ippTools/share/bgtool_tochip.sql
r28486 r35236 16 16 AND (Label.active OR Label.active IS NULL) 17 17 -- WHERE hook %s 18 ORDER BY priority DESC, chip_bg_id 18 ORDER BY priority DESC, chip_bg_id, class_id -
branches/eam_branches/ipp-20130207/ippTools/share/bgtool_towarp.sql
r34589 r35236 24 24 AND (Label.active OR Label.active IS NULL) 25 25 -- WHERE hook %s 26 ORDER BY priority DESC, chip_bg_id26 ORDER BY priority DESC, warp_bg_id, skycell_id -
branches/eam_branches/ipp-20130207/ippTools/share/bgtool_warp.sql
r28743 r35236 2 2 warpBackgroundSkyfile.*, 3 3 warpBackgroundRun.state, 4 warpBackgroundRun.warp_id, 5 camRun.cam_id, 6 warpBackgroundRun.chip_bg_id, 4 7 warpBackgroundRun.workdir, 5 8 warpBackgroundRun.label, 9 warpRun.label as warp_label, 6 10 rawExp.exp_id, 7 11 rawExp.exp_name, -
branches/eam_branches/ipp-20130207/ippTools/share/bgtool_warpinputs.sql
r28747 r35236 11 11 JOIN chipBackgroundImfile USING(chip_bg_id, class_id) 12 12 JOIN fakeRun USING(fake_id) 13 JOIN camProcessedExp USING(cam_id)13 JOIN camProcessedExp ON camProcessedExp.cam_id = fakeRun.cam_id 14 14 WHERE warpRun.state IN ('full', 'cleaned', 'goto_cleaned') -- only need it to have been completed 15 15 AND warpSkyfile.fault = 0 -
branches/eam_branches/ipp-20130207/ippTools/share/camtool_find_pendingimfile.sql
- Property svn:mergeinfo changed
/trunk/ippTools/share/camtool_find_pendingimfile.sql (added) merged: 35150
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20130207/ippTools/share/chiptool_setimfiletoupdate.sql
- Property svn:mergeinfo changed
/trunk/ippTools/share/chiptool_setimfiletoupdate.sql (added) merged: 35150
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20130207/ippTools/share/difftool_definewarpstack.sql
r24572 r35236 1 -- Get list of warps that can be diffed, with any associated diff, 2 -- and the best stack to use as a template 3 -- Warps without an existing diff can be identified by a NULL diff_id 1 -- Get list of warp-stack pairs that can be diffed 2 -- and check results against existing diffs 4 3 SELECT 5 warpsToDiff.warp_id, 6 warpsToDiff.skycell_id, 7 warpsToDiff.tess_id, 8 warpsToDiff.filter, 9 warpsToDiff.good_frac, 10 warpsToDiff.diff_id, 11 current_stack_id, 12 best_stack_id, 13 exp_id 14 FROM ( 15 -- Get list of warps that can be diffed, with any associated diff 16 SELECT 17 warpSkyfile.warp_id, 18 warpSkyfile.skycell_id, 19 warpSkyfile.tess_id, 20 warpSkyfile.good_frac, 21 warpRun.label, 22 filter, 23 warpRun.label as warp_label, 24 diffInputs.diff_id, 25 diffInputs.stack2 AS current_stack_id, 26 rawExp.exp_id 27 FROM warpSkyfile 28 JOIN warpRun USING(warp_id) 29 JOIN fakeRun USING(fake_id) 30 JOIN camRun USING(cam_id) 31 JOIN chipRun USING(chip_id) 32 JOIN rawExp USING(exp_id) 33 -- Check if it has an associated diff 34 LEFT JOIN diffInputSkyfile AS diffInputs 35 ON diffInputs.warp1 = warpSkyfile.warp_id 36 AND diffInputs.skycell_id = warpSkyfile.skycell_id 37 AND diffInputs.stack2 IS NOT NULL 38 WHERE 39 warpSkyfile.fault = 0 40 AND warpSkyfile.quality = 0 41 -- warpsToDiff WHERE hook %s 42 ) AS warpsToDiff 43 -- Get best stack as a function of skycell_id, filter 44 JOIN ( 45 SELECT 46 MAX(stack_id) AS best_stack_id, -- most recent stack, by virtue of auto-increment 47 skycell_id, 48 filter 49 FROM stackRun 50 JOIN stackSumSkyfile USING(stack_id) 51 WHERE stackRun.state = 'full' 52 AND stackSumSkyfile.fault = 0 53 AND stackSumSkyfile.quality = 0 54 -- stacksForDiff WHERE hook %s 55 GROUP BY 56 skycell_id, 57 filter 58 ) AS stacksForDiff USING(skycell_id, filter) 4 exp_id, 5 warp_id, 6 rawExp.filter, 7 warpRun.label AS warpLabel, 8 warpRun.data_group AS warpDataGroup, 9 warpRun.tess_id, 10 warpSkyfile.skycell_id, 11 MAX(stack_id) AS stack_id, 12 stackRun.label AS stackLabel, 13 stackRun.data_group AS stackDataGroup, 14 diff_id, 15 diffRun.label AS diffLabel 16 FROM warpRun 17 JOIN fakeRun USING(fake_id) 18 JOIN camRun USING(cam_id) 19 JOIN chipRun USING(chip_id) 20 JOIN rawExp USING(exp_id) 21 JOIN warpSkyfile USING(warp_id) 22 JOIN stackRun ON 23 (stackRun.skycell_id = warpSkyfile.skycell_id AND 24 stackRun.filter = rawExp.filter AND 25 stackRun.tess_id = warpRun.tess_id) 26 JOIN stackSumSkyfile USING(stack_id) 27 LEFT JOIN diffInputSkyfile ON 28 (warp_id = diffInputSkyfile.warp1 AND 29 stack_id = diffInputSkyfile.stack2 AND 30 diffInputSkyfile.skycell_id = stackRun.skycell_id AND 31 diffInputSkyfile.tess_id = stackRun.tess_id) 32 LEFT JOIN diffRun USING(diff_id) 33 WHERE 34 warpRun.state = 'full' 35 AND stackRun.state = 'full' 36 AND warpSkyfile.fault = 0 37 AND warpSkyfile.quality = 0 38 AND stackSumSkyfile.fault = 0 39 AND stackSumSkyfile.quality = 0 40 AND exp_id IS NOT NULL 41 -- %s 42 GROUP BY exp_id,warp_id,skycell_id -
branches/eam_branches/ipp-20130207/ippTools/share/pxadmin_create_tables.sql
- Property svn:mergeinfo changed
r35110 r35236 521 521 deteff_uq FLOAT, 522 522 quality SMALLINT NOT NULL DEFAULT 0, 523 background_model SMALLINT, 523 524 PRIMARY KEY(cam_id), 524 525 KEY(fault), … … 1791 1792 chip_bg_id BIGINT AUTO_INCREMENT, -- unique identifier 1792 1793 chip_id BIGINT NOT NULL, -- link to chipRun 1794 cam_id BIGINT DEFAULT 0, -- optional link to camRun 1793 1795 state VARCHAR(64) NOT NULL, -- state of run (new, full, etc.) 1794 1796 workdir VARCHAR(255) NOT NULL, -- working directory … … 1843 1845 data_group VARCHAR(64), -- group for data 1844 1846 dist_group VARCHAR(64), -- group for distribution 1845 reduction VARCHAR(64), -- reduction class (for altering recipe)1847 reduction VARCHAR(64), -- reduction class (for altering recipe) 1846 1848 note VARCHAR(255), -- note 1847 1849 registered TIMESTAMP DEFAULT CURRENT_TIMESTAMP, -- time run was registered … … 2122 2124 zpt_obs FLOAT, 2123 2125 zpt_stdev FLOAT, 2126 fwhm_major FLOAT, 2127 fwhm_minor FLOAT, 2124 2128 quality SMALLINT NOT NULL, 2125 2129 hostname VARCHAR(64) NOT NULL, … … 2149 2153 2150 2154 CREATE TABLE survey ( 2151 surveyID INT (8),2155 surveyID INT, 2152 2156 surveyName VARCHAR(16) NOT NULL, 2153 2157 description VARCHAR(255), 2154 2158 PRIMARY KEY(surveyID), 2155 UNIQUE KEY( name)2159 UNIQUE KEY(surveyName) 2156 2160 ) ENGINE=InnoDB CHARSET=latin1; 2157 2161 2158 2159 2162 CREATE TABLE ippRelease ( 2160 rel_id INT (8)AUTO_INCREMENT,2161 surveyID INT (8),2162 release Name VARCHAR(64),2163 rel ase_state VARCHAR(16), -- active, pending, archive, drop2164 dataRelease INT (8), -- PSPS dataRelease2165 priority INT (8),2163 rel_id INT AUTO_INCREMENT, 2164 surveyID INT, 2165 release_name VARCHAR(64), 2166 release_state VARCHAR(16), -- active, pending, archive, drop 2167 dataRelease INT, -- PSPS dataRelease 2168 priority INT, 2166 2169 PRIMARY KEY(rel_id), 2167 KEY(release Name),2168 KEY( state),2170 KEY(release_name), 2171 KEY(release_state), 2169 2172 KEY(priority), 2170 2173 FOREIGN KEY(surveyID) REFERENCES survey(surveyID) … … 2173 2176 CREATE TABLE relExp ( 2174 2177 relexp_id BIGINT AUTO_INCREMENT, 2175 rel_id INT (8),2178 rel_id INT, 2176 2179 exp_id BIGINT, 2177 2180 chip_id BIGINT, -- links to the runs that supplied the data 2178 2181 cam_id BIGINT, -- for this release 2182 group_id INT, -- id of relGroup that this exposure is contained in 2179 2183 state VARCHAR(16), -- released, pending, archive, drop 2180 flags INT UNSIGNED, -- flags for relphot, relastro, ??2184 flags INT UNSIGNED, -- flags for relphot, relastro, ?? 2181 2185 zpt_obs FLOAT, -- calibrated zero point for this release of 2182 2186 zpt_stdev FLOAT, -- this exposure 2183 2187 path_base VARCHAR(255), -- path_base of any supporting files for this 2184 2188 -- release of this exposure. 2189 fault SMALLINT NOT NULL, 2185 2190 registered DATETIME, -- insertion time for this row 2186 2191 time_stamp DATETIME, -- time of last update for this row … … 2188 2193 FOREIGN KEY(rel_id) REFERENCES ippRelease(rel_id), 2189 2194 KEY (state), 2195 KEY (fault), 2190 2196 FOREIGN KEY(exp_id) REFERENCES rawExp(exp_id), 2191 2197 FOREIGN KEY(chip_id) REFERENCES chipRun(chip_id), … … 2195 2201 CREATE TABLE relStack ( 2196 2202 relstack_id BIGINT AUTO_INCREMENT, 2197 rel_id INT(8), 2203 rel_id INT, 2204 stack_id BIGINT, -- id of the stackRun 2198 2205 skycal_id BIGINT, -- id of the sky calibration run that supplied the calibration 2199 -- for this release. We get back to stack from here 2200 skycell_id varchar(64), 2201 tess_id varchar(64), 2206 -- for this release of this skycell. 2207 skycell_id VARCHAR(64), 2208 tess_id VARCHAR(64), 2209 filter VARCHAR(16), 2202 2210 state VARCHAR(16), -- released, pending, archive, drop 2203 2211 flags INT UNSIGNED, … … 2205 2213 zpt_obs FLOAT, -- calibrated zero point for this release of this skycell 2206 2214 zpt_stdev FLOAT, 2207 fwhm_major FLOAT, -- seeing as measured by staticsky2215 mjd_obs INT UNSIGNED, -- for nightly stacks the mjd_obs, zero for deep and reference 2208 2216 path_base VARCHAR(255), -- path_base of any supporting files, 2217 fault SMALLINT NOT NULL, 2209 2218 registered DATETIME, 2210 2219 time_stamp DATETIME, 2211 2220 PRIMARY KEY (relstack_id), 2212 2221 KEY (tess_id, skycell_id), 2213 KEY (rel_id, tess_id, skycell_id), 2222 KEY (rel_id, tess_id, skycell_id, filter, mjd_obs), 2223 KEY (stack_type), 2224 KEY (mjd_obs), 2225 KEY (state), 2226 KEY (fault), 2214 2227 FOREIGN KEY(rel_id) REFERENCES ippRelease(rel_id), 2215 FOREIGN KEY(skycal_id) REFERENCES skycalRun(skycal_id) 2228 FOREIGN KEY(stack_id) REFERENCES stackRun(stack_id) 2229 ) ENGINE=innodb DEFAULT CHARSET=latin1; 2230 2231 CREATE TABLE relGroup ( 2232 group_id INT AUTO_INCREMENT, 2233 rel_id INT, 2234 group_type VARCHAR(16), 2235 lap_id BIGINT, 2236 group_name VARCHAR(16), 2237 state VARCHAR(16), -- new full 2238 label VARCHAR(64), 2239 exp_list_path VARCHAR(255), 2240 fault SMALLINT NOT NULL, 2241 registered DATETIME, 2242 PRIMARY KEY (group_id), 2243 KEY (rel_id, group_name), 2244 KEY (group_type), 2245 KEY (lap_id), 2246 KEY (group_name), 2247 KEY (state), 2248 KEY (label), 2249 KEY (fault), 2250 FOREIGN KEY(rel_id) REFERENCES ippRelease(rel_id) 2251 ) ENGINE=innodb DEFAULT CHARSET=latin1; 2252 2253 CREATE TABLE lapGroup ( 2254 seq_id BIGINT, 2255 projection_cell VARCHAR(64), 2256 state VARCHAR(16), 2257 fault SMALLINT, 2258 PRIMARY KEY(seq_id, projection_cell), 2259 KEY(state), 2260 KEY(fault), 2261 FOREIGN KEY(seq_id) REFERENCES lapSequence(seq_id) 2216 2262 ) ENGINE=innodb DEFAULT CHARSET=latin1; 2217 2263 -
branches/eam_branches/ipp-20130207/ippTools/share/pxadmin_drop_tables.sql
r34913 r35236 109 109 DROP TABLE IF EXISTS skycalResult; 110 110 DROP TABLE IF EXISTS skycell; 111 DROP TABLE IF EXISTS relStack; 111 112 DROP TABLE IF EXISTS relExp; 113 DROP TABLE IF EXISTS relGroup; 112 114 DROP TABLE IF EXISTS ippRelease; 113 115 DROP TABLE IF EXISTS survey; 116 DROP TABLE IF EXISTS lapGroup; 114 117 115 118 SET FOREIGN_KEY_CHECKS=1 -
branches/eam_branches/ipp-20130207/ippTools/share/releasetool_definerelexp.sql
r34933 r35236 1 1 SELECT 2 2 ippRelease.rel_id, 3 ippRelease.release Name,3 ippRelease.release_name, 4 4 rawExp.exp_name, 5 5 rawExp.filter, -
branches/eam_branches/ipp-20130207/ippTools/share/releasetool_listrelexp.sql
r35048 r35236 2 2 relexp_id, 3 3 relExp.state, 4 ippRelease.releaseName, 4 relExp.fault, 5 ippRelease.release_name, 5 6 ippRelease.release_state, 6 7 ippRelease.rel_id, … … 21 22 camProcessedExp.path_base as cam_path_base, 22 23 camProcessedExp.fwhm_major, 24 camProcessedExp.fwhm_minor, 23 25 warpRun.warp_id, 24 26 warpRun.state as warp_state, -
branches/eam_branches/ipp-20130207/ippTools/share/warptool_scmap.sql
r32570 r35236 5 5 camProcessedExp.path_base as cam_path_base, 6 6 camProcessedExp.fault as cam_fault, 7 camProcessedExp.background_model AS cam_background_model, 7 8 chipProcessedImfile.chip_id, 8 9 chipRun.state, -
branches/eam_branches/ipp-20130207/ippTools/share/warptool_towarped.sql
- Property svn:mergeinfo changed
/trunk/ippTools/share/warptool_towarped.sql (added) merged: 35150
- Property svn:mergeinfo changed
Note:
See TracChangeset
for help on using the changeset viewer.
