Changeset 33342
- Timestamp:
- Feb 23, 2012, 1:43:53 PM (14 years ago)
- Location:
- tags/ipp-20120216
- Files:
-
- 28 edited
- 1 copied
-
. (modified) (1 prop)
-
ippMonitor/def/lapExposures.d (modified) (1 diff)
-
ippScripts/scripts/camera_exp.pl (modified) (2 diffs)
-
ippScripts/scripts/ipp_apply_burntool_single.pl (modified) (1 prop)
-
ippToPsps/config/settings.xml (copied) (copied from trunk/ippToPsps/config/settings.xml )
-
ippToPsps/jython/batch.py (modified) (1 diff)
-
ippToPsps/jython/dvo.py (modified) (5 diffs)
-
ippToPsps/jython/ipptopspsdb.py (modified) (1 diff)
-
ippToPsps/jython/load.py (modified) (10 diffs)
-
ippToPsps/jython/metrics.py (modified) (2 diffs)
-
ippToPsps/jython/pslogger.py (modified) (2 diffs)
-
ippToPsps/jython/scratchdb.py (modified) (1 diff)
-
ippTools/src/camtool.c (modified) (1 diff)
-
ippTools/src/chiptool.c (modified) (6 diffs)
-
ippTools/src/chiptoolConfig.c (modified) (2 diffs)
-
ippTools/src/laptool.c (modified) (2 diffs)
-
ippTools/src/laptoolConfig.c (modified) (1 diff)
-
ippTools/src/pstamptool.c (modified) (1 diff)
-
ippTools/src/pstamptoolConfig.c (modified) (1 diff)
-
ippTools/src/pxchip.c (modified) (1 diff)
-
ippconfig/gpc1/psastro.config (modified) (1 diff)
-
psModules/src/detrend (modified) (1 prop)
-
psphot/src/psphotStackImageLoop.c (modified) (1 prop)
-
pstamp (modified) (1 prop)
-
pstamp/scripts/Makefile.am (modified) (1 diff)
-
pstamp/scripts/dquery_finish.pl (modified) (1 diff)
-
pstamp/scripts/dqueryparse.pl (modified) (8 diffs)
-
pstamp/scripts/pstamp_job_run.pl (modified) (3 diffs)
-
tools/czarcal (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-20120216
- Property svn:mergeinfo changed
/trunk (added) merged: 33289-33296,33299,33304,33310,33315,33317,33319,33321,33324,33326,33330-33337,33339-33340
- Property svn:mergeinfo changed
-
tags/ipp-20120216/ippMonitor/def/lapExposures.d
r31816 r33342 6 6 UNRESTRICTED WHERE 0=1 7 7 8 ARGS ARG1 rawImfile.exp_id=$lapExp.exp_id9 ARGS ARG2 chipRun.chip_id=$lapExp.chip_id10 ARGS ARG3 chipRun.chip_id=$lapExp.pair_id11 ARGS ARG4 camRun.cam_id=$camRun1.cam_id12 ARGS ARG5 camRun.cam_id=$camRun2.cam_id13 ARGS ARG6 fakeRun.fake_id=$fakeRun1.fake_id14 ARGS ARG7 fakeRun.fake_id=$fakeRun2.fake_id15 ARGS ARG8 warpRun.warp_id=$warpRun1.warp_id16 ARGS ARG9 warpRun.warp_id=$warpRun2.warp_id17 ARGS ARG10 diffRun.diff_id=$diffRun.diff_id8 ARGS ARG1 rawImfile.exp_id=$lapExp.exp_id 9 ARGS ARG2 chipRun.chip_id=$lapExp.chip_id 10 ARGS ARG3 chipRun.chip_id=$lapExp.pair_id 11 ARGS ARG4 camRun.cam_id=$camRun1.cam_id 12 ARGS ARG5 camRun.cam_id=$camRun2.cam_id 13 ARGS ARG6 fakeRun.fake_id=$fakeRun1.fake_id 14 ARGS ARG7 fakeRun.fake_id=$fakeRun2.fake_id 15 ARGS ARG8 warpRun.warp_id=$warpRun1.warp_id 16 ARGS ARG9 warpRun.warp_id=$warpRun2.warp_id 17 ARGS ARG10 diffRun.diff_id=$diffRun.diff_id 18 18 19 # field size format name show link to extras 20 FIELD lapRun.seq_id, 6, %d, seq_id 21 FIELD lapExp.lap_id, 6, %d, lap_id 22 FIELD lapExp.data_state, 6, %s, State (lapExp) 23 FIELD lapExp.exp_id, 6, %d, Exp ID, value, rawImfile.php, ARG1 24 FIELD lapExp.chip_id, 6, %d, Chip1 (lapExp.chip_id), value, chipStageExp.php, ARG2 25 FIELD chipRun1.state AS ch1state, 6, %s, Chip1 State 26 FIELD camRun1.cam_id AS cam_id_1, 6, %d, Cam1 ID, value, camStageExp.php, ARG4 27 FIELD camRun1.state AS ca1state, 6, %s, Cam1 State 28 FIELD fakeRun1.fake_id AS fake_id_1, 6, %d, Fake1 ID, value, fakeStageExp.php, ARG6 29 FIELD fakeRun1.state AS fa1state, 6, %s, Fake1 State 30 FIELD warpRun1.warp_id AS warp_id_1, 6, %d, Warp1 ID, value, warpStageExp.php, ARG8 31 FIELD warpRun1.state AS wa1state, 6, %s, Warp1 State 32 FIELD lapExp.pair_id, 6, %d, Chip2 ID (lapExp.chip_id), value, chipStageExp.php, ARG3 33 FIELD chipRun2.state AS ch2state, 6, %s, Chip2 State 34 FIELD camRun2.cam_id AS cam_id_2, 6, %d, Cam2 ID, value, camStageExp.php, ARG5 35 FIELD camRun2.state AS ca2state, 6, %s, Cam2 State 36 FIELD fakeRun2.fake_id AS fake_id_2, 6, %d, Fake2 ID, value, fakeStageExp.php, ARG7 37 FIELD fakeRun2.state AS fa2state, 6, %s, Fake2 State 38 FIELD warpRun2.warp_id AS warp_id_2, 6, %d, Warp2 ID, value, warpStageExp.php, ARG9 39 FIELD warpRun2.state AS wa2state, 6, %s, Warp2 State 40 FIELD diffRun.diff_id, 6, %d, Diff ID, value, diffStageExp.php, ARG10 41 FIELD diffRun.state AS diState, 6, %s, Diff State 42 FIELD lapRun.tess_id, 8, %s, tess_id 43 FIELD lapRun.projection_cell, 10, %s, ProjCell 44 FIELD lapRun.filter, 7, %s, Filter 45 FIELD lapRun.state, 15, %s, State (lapRun) 46 FIELD lapRun.label, 15, %s, Label 47 FIELD lapRun.dist_group, 15, %s, Dist Group 48 FIELD lapRun.registered, 19, %T, Registered 49 FIELD lapRun.fault, 3, %d, fault 50 FIELD lapRun.quick_sass_id, 6, %d, quick_sass_id 51 FIELD lapRun.final_sass_id, 6, %d, final_sass_id 52 FIELD lapExp.private, 2, %d, Private 53 FIELD lapExp.pairwise, 2, %d, Pairwise 54 FIELD lapExp.active, 2, %d, Active 55 FIELD rawExp.dateobs, 19, %T, Date/Time 56 FIELD rawExp.object, 8, %s, Object 57 FIELD rawExp.comment, 80, %s, Comment 19 # field size format name show link to extras 20 FIELD lapRun.seq_id, 6, %d, seq_id 21 FIELD lapExp.lap_id, 6, %d, lap_id 22 FIELD lapExp.data_state, 6, %s, State (lapExp) 23 FIELD lapExp.exp_id, 6, %d, Exp ID, value, rawImfile.php, ARG1 24 FIELD lapExp.chip_id, 6, %d, Chip1 (lapExp.chip_id), value, chipStageExp.php, ARG2 25 FIELD chipRun1.state AS ch1state, 6, %s, Chip1 State 26 FIELD camRun1.cam_id AS cam_id_1, 6, %d, Cam1 ID, value, camStageExp.php, ARG4 27 FIELD camRun1.state AS ca1state, 6, %s, Cam1 State 28 FIELD fakeRun1.fake_id AS fake_id_1, 6, %d, Fake1 ID, value, fakeStageExp.php, ARG6 29 FIELD fakeRun1.state AS fa1state, 6, %s, Fake1 State 30 FIELD warpRun1.warp_id AS warp_id_1, 6, %d, Warp1 ID, value, warpStageExp.php, ARG8 31 FIELD warpRun1.state AS wa1state, 6, %s, Warp1 State 32 FIELD lapExp.pair_id, 6, %d, Chip2 ID (lapExp.chip_id), value, chipStageExp.php, ARG3 33 FIELD chipRun2.state AS ch2state, 6, %s, Chip2 State 34 FIELD camRun2.cam_id AS cam_id_2, 6, %d, Cam2 ID, value, camStageExp.php, ARG5 35 FIELD camRun2.state AS ca2state, 6, %s, Cam2 State 36 FIELD fakeRun2.fake_id AS fake_id_2, 6, %d, Fake2 ID, value, fakeStageExp.php, ARG7 37 FIELD fakeRun2.state AS fa2state, 6, %s, Fake2 State 38 FIELD warpRun2.warp_id AS warp_id_2, 6, %d, Warp2 ID, value, warpStageExp.php, ARG9 39 FIELD warpRun2.state AS wa2state, 6, %s, Warp2 State 40 FIELD diffRun.diff_id, 6, %d, Diff ID, value, diffStageExp.php, ARG10 41 FIELD diffRun.state AS diState, 6, %s, Diff State 42 FIELD lapRun.tess_id, 8, %s, tess_id 43 FIELD lapRun.projection_cell, 10, %s, ProjCell 44 FIELD diffInputSkyfile.skycell_id, 10, %s, Skycell ID 45 FIELD lapRun.filter, 7, %s, Filter 46 FIELD lapRun.state, 15, %s, State (lapRun) 47 FIELD lapRun.label, 15, %s, Label 48 FIELD lapRun.dist_group, 15, %s, Dist Group 49 FIELD lapRun.registered, 19, %T, Registered 50 FIELD lapRun.fault, 3, %d, fault 51 FIELD lapRun.quick_sass_id, 6, %d, quick_sass_id 52 FIELD lapRun.final_sass_id, 6, %d, final_sass_id 53 FIELD lapExp.private, 2, %d, Private 54 FIELD lapExp.pairwise, 2, %d, Pairwise 55 FIELD lapExp.active, 2, %d, Active 56 FIELD rawExp.dateobs, 19, %T, Date/Time 57 FIELD rawExp.object, 8, %s, Object 58 FIELD rawExp.comment, 80, %s, Comment 58 59 59 60 # MODE summary -
tags/ipp-20120216/ippScripts/scripts/camera_exp.pl
r32562 r33342 156 156 { # Determine if FWHM is too large to bother continuing. 157 157 my $maxFWHM = 0; 158 # XXX: temporary hack if this is a CNP exposure set maxFWHM to a large 159 # value. 160 # Before the next tag we will put this into a recipe 161 if ($outroot =~ /CNP/) { 162 $maxFWHM = 25; 163 } else { 158 164 my $command = "$ppConfigDump -camera $camera -get-key MAX_ALLOWED_FWHM"; 159 165 my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 168 174 $maxFWHM = metadataLookupStr($cameraConfig, 'MAX_ALLOWED_FWHM'); 169 175 } 176 } 170 177 if ($maxFWHM) { 171 178 my $expFWHM; -
tags/ipp-20120216/ippScripts/scripts/ipp_apply_burntool_single.pl
- Property svn:mergeinfo changed (with no actual effect on merging)
-
tags/ipp-20120216/ippToPsps/jython/batch.py
r33259 r33342 377 377 378 378 self.logger.infoPair("Importing tables with filter", filter) 379 tables = stilts.treads(self.fits.getPath()) 379 380 try: 381 tables = stilts.treads(self.fits.getPath()) 382 except: 383 self.logger.errorPair("STILTS could not import from", self.fits.getPath()) 384 return False 380 385 381 386 count = 0 -
tags/ipp-20120216/ippToPsps/jython/dvo.py
r33272 r33342 39 39 self.logger = logger 40 40 self.config = config 41 self.logger.infoSeparator()42 41 43 42 # create database object … … 56 55 if not self.correctDvo: 57 56 print "*******************************************************************************" 58 response = raw_input("**** Wrong DVO in use. Do you want to reset and use '" + self.config.dvoLocation + "' instead(y/n)? ")57 response = raw_input("**** Wrong or no DVO in use. Do you want to reset and use '" + self.config.dvoLocation + "' (y/n)? ") 59 58 if response == "y": 60 59 response = raw_input("**** Are you ABSOLUTELY sure you want to do this? (y/n)? ") … … 180 179 181 180 halfSide = side/2.0 182 print "%f %f %f" % (ra, dec, side)183 181 self.setSkyArea(ra-halfSide, ra+halfSide, dec-halfSide, dec+halfSide) 184 185 182 186 183 ''' … … 198 195 199 196 # update the two meta tables, Images and SkyTable 200 self.loadImages()197 #self.loadImages() dont need a new Images table at this point 201 198 self.loadSkyTable() 202 199 … … 346 343 self.logger.infoPair("Nothing to ingest or purge", "finished ingest") 347 344 return True 345 346 # make sure we have an up-to-date Images table 347 self.loadImages() 348 348 349 349 # purge stuff -
tags/ipp-20120216/ippToPsps/jython/ipptopspsdb.py
r33266 r33342 717 717 718 718 ''' 719 Remove client 720 ''' 721 def removeClient(self, host, pid): 722 self.execute("DELETE FROM clients WHERE host = '" + host + "' AND pid = " + str(pid)) 723 724 ''' 725 Insert client 726 ''' 727 def insertClient(self, host, pid): 728 self.execute("INSERT INTO clients (timestamp, host, pid) VALUES (now(), '" + host + "', " + str(pid) + ")") 729 730 ''' 731 Update clients, or inserts it for the first time 732 ''' 733 def updateClient(self, host, pid): 734 735 try: 736 self.insertClient(host, pid) 737 except: 738 self.execute("UPDATE clients SET timestamp = now() WHERE host = '" + host + "' AND pid = " + str(pid)) 739 740 ''' 741 Is this client paused? 742 ''' 743 def isPaused(self, host, pid): 744 return self.getClientsColumnBoolean("paused", host, pid) 745 746 ''' 747 Is this client killed? 748 ''' 749 def isKilled(self, host, pid): 750 return self.getClientsColumnBoolean("killed", host, pid) 751 752 ''' 753 Returns boolean value for this column in clients table 754 ''' 755 def getClientsColumnBoolean(self, col, host, pid): 756 757 sql = "SELECT " + col + " \ 758 FROM clients \ 759 WHERE host = '" + host + "' AND pid = " + str(pid) 760 761 try: 762 rs = self.executeQuery(sql) 763 rs.first() 764 if rs.getInt(1) == 1: return True 765 else: return False 766 except: 767 self.logger.exception("Unable to check whether " + col + " is true or false in clients table") 768 769 return False 770 771 772 ''' 719 773 Destructor 720 774 ''' -
tags/ipp-20120216/ippToPsps/jython/load.py
r33271 r33342 5 5 # 6 6 7 import signal 7 8 import time 8 9 import sys 9 10 import os 10 import socket11 11 import logging.config 12 12 … … 115 115 batch.run() 116 116 117 # check that we should continue 118 checkClientStatus() 119 117 120 ippToPspsDb.lockBatchTable() 118 121 … … 123 126 124 127 ippToPspsDb.unlockTables() 128 129 ''' 130 Handler for Ctrl-C signal 131 ''' 132 def signal_handler(signal, frame): 133 134 exitProgram("Ctrl-C") 135 136 ''' 137 Cleanly exits program, prints to log the way it exited 138 ''' 139 def exitProgram(exitType): 140 141 logger.infoPair("Program exited", exitType) 142 ippToPspsDb.removeClient(logger.host, logger.pid) 143 sys.exit(0) 144 145 146 ''' 147 Checks if we should pause or kill loading, otherwise updates the clients table with current time 148 ''' 149 def checkClientStatus(): 150 151 ippToPspsDb.updateClient(logger.host, logger.pid) 152 153 if ippToPspsDb.isKilled(logger.host, logger.pid): exitProgram("killed") 154 155 PAUSEPERIOD = 60 156 while ippToPspsDb.isPaused(logger.host, logger.pid): 157 158 ippToPspsDb.updateClient(logger.host, logger.pid) 159 if ippToPspsDb.isKilled(logger.host, logger.pid): exitProgram("killed while paused") 160 logger.infoPair("Program paused for", "%d secs" % PAUSEPERIOD) 161 time.sleep(PAUSEPERIOD) 162 125 163 126 164 ''' … … 139 177 # open config file 140 178 config = Config(CONFIGPATH) 141 #logger = config.getLogger(sys.argv[0], 0, 1) 142 logger = config.getLogger(sys.argv[0]) 179 logger = config.getLogger(sys.argv[0], 1, 1) 143 180 144 181 # create various objects … … 148 185 datastore = Datastore(logger, config, ippToPspsDb) 149 186 187 checkClientStatus() 188 189 # catch Ctrl-C signal 190 signal.signal(signal.SIGINT, signal_handler) 191 150 192 # check we connected ok 151 193 if not gpc1Db.everythingOK: sys.exit(1) 152 194 if not ippToPspsDb.everythingOK: sys.exit(1) 153 195 154 # get values from the configutaion file155 196 POLLPERIOD = 600 156 197 … … 178 219 sys.exit(1) 179 220 221 180 222 ''' 181 223 Main processing loop: … … 206 248 207 249 while dec <= config.maxDec: 250 251 checkClientStatus() 208 252 209 253 # for each batch type … … 228 272 229 273 # do we pre-ingest stuff from DVO? 230 if smfsPerGB > 0:274 if smfsPerGB > 40: 231 275 if not dvo.sync(): 232 276 logger.errorPair("Could not sync DVO with MySQL", "skipping") … … 238 282 logger.infoBool("Using pre-ingested DVO data?", useFullTables) 239 283 processTheseItems(batchType, ids, useFullTables) 240 284 241 285 # in the test mode, we quit after submitting one batch 242 286 if config.test: break … … 253 297 time.sleep(POLLPERIOD) 254 298 255 299 exitProgram("end of program") 300 -
tags/ipp-20120216/ippToPsps/jython/metrics.py
r33264 r33342 55 55 56 56 # get a master list of IDs in DVO for this batch type 57 allIDs = gpc1Db.getIDsInThisDVODbForThisStage(config.dvoLabel, batchType, config.minRa, config.maxRa, config.minDec, config.maxDec) 57 #allIDs = gpc1Db.getIDsInThisDVODbForThisStage(config.dvoLabel, batchType, config.minRa, config.maxRa, config.minDec, config.maxDec) 58 allIDs = gpc1Db.getIDsInThisDVODbForThisStage(config.dvoLabel, batchType) 58 59 prevList = allIDs 59 60 numEverything = len(allIDs) … … 185 186 time.sleep(SECONDS) 186 187 else: break 188 config.refresh() 187 189 188 -
tags/ipp-20120216/ippToPsps/jython/pslogger.py
r33259 r33342 3 3 import os 4 4 import sys 5 import socket 5 6 6 7 class PSLogger(logging.getLoggerClass()): … … 17 18 if sendToFile: 18 19 19 HOST= socket.gethostname()20 PID= os.getpid()20 self.host = socket.gethostname() 21 self.pid = os.getpid() 21 22 22 23 # generate path 23 24 PATH = basePath + "/log" 24 25 if not os.path.exists(PATH): os.makedirs(PATH) 25 FULLPATH = PATH + "/" + name + "_" + dvoLabel + "_" + HOST + "_" + str(PID) + ".log"26 FULLPATH = PATH + "/" + name + "_" + dvoLabel + "_" + self.host + "_" + str(self.pid) + ".log" 26 27 27 28 # opens file to be appended -
tags/ipp-20120216/ippToPsps/jython/scratchdb.py
r33259 r33342 330 330 except: 331 331 self.logger.errorPair("No DVO files ingested for this path", path) 332 return True332 return False 333 333 334 334 ''' -
tags/ipp-20120216/ippTools/src/camtool.c
r30907 r33342 112 112 PXOPT_COPY_STR(config->args, where, "-reduction", "chipRun.reduction", "=="); 113 113 PXOPT_COPY_STR(config->args, where, "-data_group", "chipRun.data_group", "=="); 114 PXOPT_COPY_STR(config->args, where, "-obs_mode", "rawExp.obs_mode", "=="); 114 115 115 116 if (!psListLength(where->list) && -
tags/ipp-20120216/ippTools/src/chiptool.c
r33112 r33342 198 198 GET_VALUE (psS64, S64, exp_id, "exp_id"); 199 199 GET_VALUE (psString, Str, raw_workdir, "workdir"); 200 #ifdef notyet 201 GET_VALUE (psString, Str, old_workdir, "old_workdir"); 202 GET_VALUE (psString, Str, old_data_group, "old_data_group"); 203 #else 204 const char *old_workdir = NULL; 205 const char *old_data_group = NULL; 206 #endif 200 207 GET_VALUE (psString, Str, raw_label, "label"); 201 208 GET_VALUE (psString, Str, raw_reduction, "reduction"); … … 213 220 if (!pxchipQueueByExpTag(config, 214 221 exp_id, 215 workdir ? workdir : raw_workdir,222 workdir ? workdir : (old_workdir ? old_workdir : raw_workdir), 216 223 label ? label : raw_label, 217 data_group ? data_group : ( label ? label : raw_label),224 data_group ? data_group : (old_data_group ? old_data_group : (label ? label : raw_label)), 218 225 dist_group, 219 226 reduction ? reduction : raw_reduction, … … 345 352 pxAddLabelSearchArgs (config, where, "-label", "chipOld.label", "LIKE"); 346 353 pxAddLabelSearchArgs (config, where, "-data_group", "chipOld.data_group", "LIKE"); 354 PXOPT_COPY_STR(config->args, where, "-state", "chipOld.state", "=="); 347 355 348 356 // psListLength(where->list) is at least 1 because exp_type defaults to "object" … … 354 362 } 355 363 356 PXOPT_LOOKUP_STR(workdir, config->args, "-set_workdir", true, false);364 PXOPT_LOOKUP_STR(workdir, config->args, "-set_workdir", false, false); 357 365 PXOPT_LOOKUP_STR(label, config->args, "-set_label", true, false); 358 366 PXOPT_LOOKUP_STR(reduction, config->args, "-set_reduction", false, false); … … 468 476 PXOPT_COPY_S64(config->args, where, "-chip_id", "chipRun.chip_id", "=="); 469 477 pxAddLabelSearchArgs (config, where, "-label", "chipRun.label", "=="); 478 PXOPT_COPY_STR(config->args, where, "-class_id", "rawImfile.class_id", "=="); 470 479 471 480 psString query = pxDataGet("chiptool_pendingimfile.sql"); … … 2024 2033 return false; 2025 2034 } 2026 2027 2035 psFree(setHook); 2028 2036 psFree(query); 2037 2029 2038 // if we are updating a whole chipRun set lingering chips with poor quality to full data_state 2030 2039 if (!class_id) { -
tags/ipp-20120216/ippTools/src/chiptoolConfig.c
r32577 r33342 72 72 73 73 psMetadataAddStr(definecopyArgs, PS_LIST_TAIL, "-exp_type", PS_META_REPLACE, "search by exp_type", "object"); 74 75 psMetadataAddStr(definecopyArgs, PS_LIST_TAIL, "-set_workdir", 0, "define workdir (required)", NULL); 74 psMetadataAddStr(definecopyArgs, PS_LIST_TAIL, "-state", 0, "search by chipRun.state", NULL); 75 76 psMetadataAddStr(definecopyArgs, PS_LIST_TAIL, "-set_workdir", 0, "define workdir", NULL); 76 77 psMetadataAddStr(definecopyArgs, PS_LIST_TAIL, "-set_label", 0, "define label (required)", NULL); 77 78 psMetadataAddStr(definecopyArgs, PS_LIST_TAIL, "-set_reduction", 0, "define reduction class", NULL); … … 111 112 psMetadataAddS64(pendingimfileArgs, PS_LIST_TAIL, "-chip_id", 0, "search by chip ID", 0); 112 113 psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "search by label", 0); 114 psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-class_id", 0, "search by class_id", 0); 113 115 pxchipSetSearchArgs(pendingimfileArgs); 114 116 psMetadataAddU64(pendingimfileArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); -
tags/ipp-20120216/ippTools/src/laptool.c
r32422 r33342 390 390 391 391 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 392 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 392 393 393 394 psMetadata *where = psMetadataAlloc(); … … 411 412 psStringAppend(&query, " WHERE %s", whereClause); 412 413 psFree(whereClause); 414 } 415 if (limit) { 416 psString limitString = psDBGenerateLimitSQL(limit); 417 psStringAppend(&query, "\n %s", limitString); 418 psFree(limitString); 413 419 } 414 420 -
tags/ipp-20120216/ippTools/src/laptoolConfig.c
r32422 r33342 86 86 ADD_OPT(Str, listrunArgs, "-fault", "search by LAP run fault", NULL); 87 87 ADD_OPT(Bool,listrunArgs, "-simple", "use the simple output format", false); 88 ADD_OPT(U64, listrunArgs, "-limit", "limit result set to N items", 0); 88 89 89 90 // -updaterun -
tags/ipp-20120216/ippTools/src/pstamptool.c
r33119 r33342 780 780 PXOPT_COPY_S64(config->args, where, "-req_id", "req_id", "=="); 781 781 PXOPT_COPY_S64(config->args, where, "-dep_id", "dep_id", "=="); 782 PXOPT_COPY_STR(config->args, where, "-jobType", "jobType", "=="); 782 783 PXOPT_COPY_S64(config->args, where, "-fault", "fault", "=="); 783 784 -
tags/ipp-20120216/ippTools/src/pstamptoolConfig.c
r33119 r33342 154 154 psMetadataAddS64(listjobArgs, PS_LIST_TAIL, "-dep_id", 0, "select by dependent ID", 0); 155 155 psMetadataAddS16(listjobArgs, PS_LIST_TAIL, "-fault", 0, "select by fault", 0); 156 psMetadataAddStr(listjobArgs, PS_LIST_TAIL, "-jobType", 0, "select by jobType", 0); 156 157 psMetadataAddU64(listjobArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); 157 158 psMetadataAddBool(listjobArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); -
tags/ipp-20120216/ippTools/src/pxchip.c
r28258 r33342 71 71 psMetadataAddF32(md, PS_LIST_TAIL, "-sun_angle_min", 0, "search by min solar angle", NAN); 72 72 psMetadataAddF32(md, PS_LIST_TAIL, "-sun_angle_max", 0, "search by max solar angle", NAN); 73 psMetadataAddStr(md, PS_LIST_TAIL, "-object", 0, "search by exposure object ", NULL);73 psMetadataAddStr(md, PS_LIST_TAIL, "-object", 0, "search by exposure object (LIKE comparison)", NULL); 74 74 psMetadataAddStr(md, PS_LIST_TAIL, "-comment", 0, "search by comment field (LIKE comparison)", NULL); 75 75 psMetadataAddStr(md, PS_LIST_TAIL, "-obs_mode", 0, "search by observation mode", NULL); -
tags/ipp-20120216/ippconfig/gpc1/psastro.config
r31962 r33342 344 344 PSASTRO.MATCH.RADIUS.N7 F32 5 345 345 PSASTRO.MATCH.FIT.NITER S32 5 346 347 PSASTRO.CATDIR STR STS.PP5.REFCAT 346 348 END 347 349 -
tags/ipp-20120216/psModules/src/detrend
- Property svn:mergeinfo changed (with no actual effect on merging)
-
tags/ipp-20120216/psphot/src/psphotStackImageLoop.c
- Property svn:mergeinfo changed (with no actual effect on merging)
-
tags/ipp-20120216/pstamp
- Property svn:mergeinfo deleted
-
tags/ipp-20120216/pstamp/scripts/Makefile.am
r30469 r33342 29 29 detect_query_create \ 30 30 detect_response_create \ 31 dquery_job_run.pl \ 31 32 dquery_finish.pl \ 32 33 dqueryparse.pl \ -
tags/ipp-20120216/pstamp/scripts/dquery_finish.pl
r33286 r33342 143 143 144 144 if (-s $reg_list) { 145 my $command = " echo Skipping$dsreg --add $req_name --product $product --list $reg_list";145 my $command = "$dsreg --add $req_name --product $product --list $reg_list"; 146 146 $command .= " --copy --datapath $outdir"; 147 147 $command .= " --type MOPS_DETECTABILITY_RESPONSE"; -
tags/ipp-20120216/pstamp/scripts/dqueryparse.pl
r33318 r33342 100 100 101 101 102 # 103 # query is a hash which uses $fpa_id as the key 104 # The values are hash references which have the various parameter name as the key 105 # The values of the parameter hashes are arrays which contain the values for individual rows 106 # in the detectabilty query request 102 107 my %query = (); 103 my %image_list_hash = ();104 108 105 109 { 106 110 # 107 111 # Parse input request file using detect_query_read 112 # result is a simple text file 108 113 # 109 114 my $dqr_command = "$detect_query_read --dbname $imagedb --input $request_file"; … … 139 144 } 140 145 # 141 # Identify target images. This should properly collate targets on a single imfile.146 # Identify target components. This should properly collate targets on a single imfile. 142 147 # 143 148 my $query_id; … … 223 228 $option_mask |= $PSTAMP_SELECT_VARIANCE; 224 229 $option_mask |= $PSTAMP_SELECT_PSF; 225 my $need_magic = 1; 230 231 # magic is dead 232 my $need_magic = 0; 226 233 if ($stage eq 'stack') { 227 234 $need_magic = 0; … … 245 252 foreach my $this_image_ref (@{ $pstamp_images_ref }) { 246 253 247 if (0) { 248 foreach my $key (sort (keys %{ $this_image_ref } )) { 249 my $value = ${ $this_image_ref }{$key}; 250 if ($key eq 'row_index') { 251 $value = join ' ', @{ $this_image_ref->{$key} }; 252 } 253 print "$this_image_ref $key $value\n"; 254 } 255 } 256 257 254 # loop over the rows that this component matched 258 255 foreach my $valid_index (@{ $this_image_ref->{row_index} }) { 259 256 $query{$fpa_id}{IMAGE}[$valid_index] = $this_image_ref->{image}; … … 336 333 foreach my $fpa_id (keys %query) { 337 334 for (my $i = 0; $i <= $#{ $query{$fpa_id}{ROWNUM} }; $i++) { 338 # print WISDOM "$fpa_id\t";339 # foreach my $key (keys %{ $query{$fpa_id} }) {340 # print WISDOM "$key $query{$fpa_id}{$key}[$i]\t";341 # }342 # print WISDOM "\n";343 # my $data_state = $query{$fpa_id}{DATA_STATE}[$i];344 # if ($query{$fpa_id}{BAD_COMPONENT}[$i] == 0) {345 # if ($data_state ne 'full') {346 347 # @{ $update_request{$query{$fpa_id}{IMAGE}[$i]}{$query{$fpa_id}{FAULT}[$i]} } =348 # ($query{$fpa_id}{STATE}[$i],$query{$fpa_id}{STAGE}[$i],$query{$fpa_id}{STAGE_ID}[$i],349 # $query{$fpa_id}{COMPONENT_ID}[$i],$query{$fpa_id}{NEED_MAGIC}[$i],$query{$fpa_id}{IMAGE_DB}[$i]);350 # }351 # }352 335 if ($query{$fpa_id}{BAD_COMPONENT}[$i] == 0) { 353 336 push @{ $rows_for_component{$fpa_id}{$query{$fpa_id}{IMAGE}[$i]} }, $i; … … 358 341 } 359 342 360 my $job_num = 0; 343 # 344 # Finally build the parameter lists and queue jobs for each component 345 # 346 347 my $job_num = 1; 361 348 foreach my $fpa_id (keys %rows_for_component) { 362 349 foreach my $component (keys % {$rows_for_component{$fpa_id} } ) { … … 368 355 my $stage = $query{$fpa_id}{STAGE}[$i]; 369 356 my $stage_id = $query{$fpa_id}{STAGE_ID}[$i]; 370 my $component = $query{$fpa_id}{ STAGE_ID}[$i];357 my $component = $query{$fpa_id}{COMPONENT_ID}[$i]; 371 358 print "Need to UPDATE $stage $stage_id $component from $data_state\n"; 359 #### my ($req_id, $outdir, $label, $state, $stage, $stage_id, $component, $need_magic, $imagedb) = @_; 372 360 $dep_id = queue_update_run($req_id, $outdir, $label, $data_state, $stage, $stage_id, $component, 0, $imagedb); 373 361 } 374 362 375 363 my $outputBase = "$outdir/$job_num" . "_"; 364 365 # params_file is an mdc description containing the parameters for the job 376 366 my $params_file = $outputBase . "params.mdc"; 377 367 378 368 open PARAMS, ">$params_file" or my_die("failed to create $params_file", $PS_EXIT_UNKNOWN_ERROR); 369 370 # first the job params 379 371 print PARAMS "dqueryJobParams METADATA\n"; 380 372 foreach my $key (keys %{ $query{$fpa_id} } ) { … … 383 375 } 384 376 print PARAMS "END\n\n"; 377 378 # then one structure with the coordinates for each row 385 379 print PARAMS "dqueryCoord MULTI\n"; 386 380 381 my @coordkeys = qw(ROWNUM RA1_DEG DEC1_DEG RA2_DEG DEC2_DEG MAG); 387 382 foreach my $row ( @{ $rows_for_component{$fpa_id}{$component} }) { 388 my @coordkeys = qw(ROWNUM RA1_DEG DEC1_DEG RA2_DEG DEC2_DEG MAG);389 383 print PARAMS "\ndqueryCoord METADATA\n"; 390 384 foreach my $key (@coordkeys) { -
tags/ipp-20120216/pstamp/scripts/pstamp_job_run.pl
r33141 r33342 79 79 my $ppstamp = can_run('ppstamp') or (warn "Can't find ppstamp" and $missing_tools = 1); 80 80 my $pstamp_get_image_job = can_run('pstamp_get_image_job.pl') or (warn "Can't find pstamp_get_image_job.pl" and $missing_tools = 1); 81 my $dquery parse = can_run('dqueryparse.pl') or (warn "Can't find dqueryparse.pl" and $missing_tools = 1);81 my $dquery_job_run = can_run('dquery_job_run.pl') or (warn "Can't find dquery_job_run.pl" and $missing_tools = 1); 82 82 my $streaksreplace = can_run('streaksreplace') or (warn "Can't find streaksreplace" and $missing_tools = 1); 83 83 my $magicdstool = can_run('magicdstool') or (warn "Can't find magicdstool" and $missing_tools = 1); … … 303 303 } 304 304 } elsif ($jobType eq "detect_query") { 305 # detect_query jobs are basically holders to note that we need a file updated before we can continue. 306 # Load the argument list that dqueryparse should have created the first time it ran, so we know how to 307 # run it again the same way. 308 my $outdir = dirname($outputBase); 309 my $argslist = "$outdir/parse.args"; 310 open ARGSLIST, "<$argslist" or my_die("failed to open argslist file $argslist", $job_id, $PS_EXIT_UNKNOWN_ERROR); 311 my $argString = <ARGSLIST>; 312 close ARGSLIST; 313 chomp $argString; 305 # my $outdir = dirname($outputBase); 306 # my $argslist = "$outdir/parse.args"; 307 # open ARGSLIST, "<$argslist" or my_die("failed to open argslist file $argslist", $job_id, $PS_EXIT_UNKNOWN_ERROR); 308 # my $argString = <ARGSLIST>; 309 # close ARGSLIST; 310 # chomp $argString; 314 311 315 312 # XXX: should we do any other sanity checking? 316 my_die("arglist file $argslist is empty", $job_id, $PS_EXIT_DATA_ERROR) if !$argString;317 318 my $command = "$dquery parse --job_id $job_id $argString";313 # my_die("arglist file $argslist is empty", $job_id, $PS_EXIT_DATA_ERROR) if !$argString; 314 315 my $command = "$dquery_job_run --job_id $job_id --output_base $outputBase"; 319 316 $command .= " --dbname $dbname" if $dbname; 320 317 $command .= " --dbserver $dbserver" if $dbserver; … … 329 326 } else { 330 327 $jobStatus = $error_code >> 8; 331 my_die("dquery parse.pl failed with error code: $jobStatus", $job_id, $jobStatus);328 my_die("dquery_job_run.pl failed with error code: $jobStatus", $job_id, $jobStatus); 332 329 } 333 330 } elsif ($jobType eq "child") { -
tags/ipp-20120216/tools/czarcal
r33069 r33342 29 29 heather 30 30 bill 31 roy32 31 ); 33 32
Note:
See TracChangeset
for help on using the changeset viewer.
