Changeset 35748
- Timestamp:
- Jul 3, 2013, 1:44:20 PM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130509
- Files:
-
- 14 edited
-
doc/stamps/stampsICD.tex (modified) (1 diff)
-
ippTasks (modified) (1 prop)
-
ippTasks/survey.pro (modified) (5 diffs)
-
ippToPsps (modified) (1 prop)
-
ippToPsps/config/settings.xml (modified) (1 diff)
-
ippToPsps/jython/detectionbatch.py (modified) (3 diffs)
-
ippToPsps/jython/dvo.py (modified) (2 diffs)
-
ippToPsps/jython/ippjython (modified) (1 diff)
-
ippToPsps/jython/ipptopspsdb.py (modified) (7 diffs)
-
ippToPsps/jython/queue.py (modified) (7 diffs)
-
ippToPsps/jython/stackbatch.py (modified) (9 diffs)
-
ppBackground/src/ppBackgroundArguments.c (modified) (1 diff)
-
ppMerge/src/ppMergeLoop.c (modified) (1 diff)
-
ppMerge/src/ppMergeReadChunk.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130509/doc/stamps/stampsICD.tex
r35495 r35748 310 310 PSTAMP\_SELECT\_MASK & 2 & create postage stamp of the mask pixels \\ 311 311 PSTAMP\_SELECT\_VARIANCE & 4 & create postage stamp of the variance pixels \\ 312 PSTAMP\_SELECT\_ CMF & 8 & returnthe sources file (.cmf) for the images' run \\312 PSTAMP\_SELECT\_SOURCES & 8 & extract sources from the region of interest from the sources file (.cmf) for the images' run \\ 313 313 PSTAMP\_SELECT\_PSF & 16 & return the psf file for the images' run \\ 314 314 PSTAMP\_SELECT\_BACKMDL & 32 & return the background model file for the images chipRun (applies only for chip) \\ 315 PSTAMP\_SELECT\_JPEG & 64 & return a jpeg format image of the stamp \\ 316 PSTAMP\_SELECT\_UNCOMPRESSED & 512 & do not use FITS image compression \\ 315 317 PSTAMP\_SELECT\_INVERSE & 1024 & make stamps from inverse difference images (applies only for diff) \\ 316 318 PSTAMP\_SELECT\_UNCONV & 2048 & make stamps from unconvolved stack images (applies only for stack) \\ -
branches/eam_branches/ipp-20130509/ippTasks
- Property svn:mergeinfo changed
/trunk/ippTasks merged: 35627,35676
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20130509/ippTasks/survey.pro
r35517 r35748 44 44 $SURVEY_TIMEOUT = 600 45 45 # the tasks for loading the release tabels for nightly science do not need to run very often 46 $SURVEY_RELEASE_EXEC 30046 $SURVEY_RELEASE_EXEC = 300 47 47 48 48 macro survey.on … … 382 382 macro survey.add.chip.bg 383 383 if ($0 != 4) 384 echo "USAGE: survey.add.chip.bg (label) ( dist_group) (muggle)"384 echo "USAGE: survey.add.chip.bg (label) (cam_label) (dist_group)" 385 385 break 386 386 end 387 387 book newpage SURVEY_CHIP_BG $1 388 book setword SURVEY_CHIP_BG $1 DIST_GROUP $2 389 book setword SURVEY_CHIP_BG $1 MUGGLE $3 388 book setword SURVEY_CHIP_BG $1 LABEL $1 389 book setword SURVEY_CHIP_BG $1 CAM_LABEL $2 390 book setword SURVEY_CHIP_BG $1 DIST_GROUP $3 390 391 book setword SURVEY_CHIP_BG $1 STATE PENDING 391 392 end … … 410 411 macro survey.add.warp.bg 411 412 if ($0 != 4) 412 echo "USAGE: survey.add.warp.bg (label) ( dist_group) (muggle)"413 echo "USAGE: survey.add.warp.bg (label) (warp_label) (dist_group)" 413 414 break 414 415 end 415 416 book newpage SURVEY_WARP_BG $1 416 book setword SURVEY_WARP_BG $1 DIST_GROUP $2 417 book setword SURVEY_WARP_BG $1 MUGGLE $3 417 book setword SURVEY_WARP_BG $1 LABEL $1 418 book setword SURVEY_WARP_BG $1 WARP_LABEL $2 419 book setword SURVEY_WARP_BG $1 DIST_GROUP $3 418 420 book setword SURVEY_WARP_BG $1 STATE PENDING 419 421 end … … 1312 1314 1313 1315 book setword SURVEY_CHIP_BG $label STATE DONE 1316 book getword SURVEY_CHIP_BG $label CAM_LABEL -var cam_label 1314 1317 book getword SURVEY_CHIP_BG $label DIST_GROUP -var dist_group 1315 book getword SURVEY_CHIP_BG $label MUGGLE -var muggle1318 # book getword SURVEY_CHIP_BG $label MUGGLE -var muggle 1316 1319 1317 $run = bgtool -definechip -label $label - set_dist_group $dist_group1318 if ($muggle == 0)1319 $run = $run -destreaked1320 end1320 $run = bgtool -definechip -label $label -cam_label $cam_label -set_dist_group $dist_group 1321 # if ($muggle == 0) 1322 # $run = $run -destreaked 1323 # end 1321 1324 1322 1325 if ($DB:n == 0) … … 1388 1391 1389 1392 book setword SURVEY_WARP_BG $label STATE DONE 1393 book getword SURVEY_WARP_BG $label WARP_LABEL -var warp_label 1390 1394 book getword SURVEY_WARP_BG $label DIST_GROUP -var dist_group 1391 book getword SURVEY_WARP_BG $label MUGGLE -var muggle1392 1395 1393 $run = bgtool -definewarp - warp_label $label -set_dist_group $dist_group1394 if ($muggle == 0)1395 $run = $run -destreaked1396 end1396 $run = bgtool -definewarp -set_label $label -chip_bg_label $label -warp_label $warp_label -set_dist_group $dist_group 1397 # if ($muggle == 0) 1398 # $run = $run -destreaked 1399 # end 1397 1400 1398 1401 -
branches/eam_branches/ipp-20130509/ippToPsps
- Property svn:mergeinfo changed
/trunk/ippToPsps merged: 35605,35656,35738-35739
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20130509/ippToPsps/config/settings.xml
r35503 r35748 6 6 <!-- path for storing logs --> 7 7 <!-- XXX Need to make this different for tests and real, also for different installations --> 8 <logPath>logs</logPath> 9 8 <logPath>SAS15</logPath> 10 9 <!-- local scratch Db section (REAL version) --> 11 10 <localdatabase> -
branches/eam_branches/ipp-20130509/ippToPsps/jython/detectionbatch.py
r35456 r35748 450 450 ,MOMENTS_XY \ 451 451 ,MOMENTS_YY \ 452 , AP_FLUX/ " + self.header['EXPTIME'] + " \452 ,POW(10.0, -0.4 *AP_MAG) / " + self.header['EXPTIME'] + " \ 453 453 ,KRON_FLUX / " + self.header['EXPTIME'] + " \ 454 454 ,KRON_FLUX_ERR / " + self.header['EXPTIME'] + " \ … … 469 469 # ,POW(10.0, (-0.4*PSF_INST_MAG)) / " + self.header['EXPTIME'] + " 470 470 # ,ABS((PSF_INST_MAG_SIG*(POW(10.0, (-0.4*PSF_INST_MAG)) / " + self.header['EXPTIME'] + ")) / 1.085736) 471 # ,POW(10.0, -0.4 *AP_MAG) / " + self.header['EXPTIME'] + " 471 472 # I need a way to choose the sql above based on the cmf version: V3 (LAP.PV1) does not have AP_FLUX 473 # AP_FLUX is no ,AP_FLUX / " + self.header['EXPTIME'] + " 472 474 473 475 self.scratchDb.execute(sql) … … 1035 1037 1036 1038 # XXX EAM NOTE : this is fragile : requires PS1_V4 1037 columns = "IPP_IDET X_PSF Y_PSF X_PSF_SIG Y_PSF_SIG PSF_INST_MAG PSF_INST_MAG_SIG PSF_INST_FLUX PSF_INST_FLUX_SIG PEAK_FLUX_AS_MAG PSF_MAJOR PSF_MINOR PSF_THETA EXT_NSIGMA PSF_QF MOMENTS_XX MOMENTS_XY MOMENTS_YY AP_MAG AP_FLUX KRON_FLUX KRON_FLUX_ERR FLAGS FLAGS2 SKY SKY_SIGMA EXT_NSIGMA PSF_QF_PERFECT PSF_CHISQ" 1039 # columns = "IPP_IDET X_PSF Y_PSF X_PSF_SIG Y_PSF_SIG PSF_INST_MAG PSF_INST_MAG_SIG PSF_INST_FLUX PSF_INST_FLUX_SIG PEAK_FLUX_AS_MAG PSF_MAJOR PSF_MINOR PSF_THETA EXT_NSIGMA PSF_QF MOMENTS_XX MOMENTS_XY MOMENTS_YY AP_MAG AP_FLUX KRON_FLUX KRON_FLUX_ERR FLAGS FLAGS2 SKY SKY_SIGMA EXT_NSIGMA PSF_QF_PERFECT PSF_CHISQ" 1040 1041 # XXX EAM NOTE : this is fragile : requires PS1_V4 1042 columns = "IPP_IDET X_PSF Y_PSF X_PSF_SIG Y_PSF_SIG PSF_INST_MAG PSF_INST_MAG_SIG PSF_INST_FLUX PSF_INST_FLUX_SIG PEAK_FLUX_AS_MAG PSF_MAJOR PSF_MINOR PSF_THETA EXT_NSIGMA PSF_QF MOMENTS_XX MOMENTS_XY MOMENTS_YY AP_MAG KRON_FLUX KRON_FLUX_ERR FLAGS FLAGS2 SKY SKY_SIGMA EXT_NSIGMA PSF_QF_PERFECT PSF_CHISQ" 1038 1043 1039 1044 return super(DetectionBatch, self).importIppTables(columns, regex) -
branches/eam_branches/ipp-20130509/ippToPsps/jython/dvo.py
r35417 r35748 65 65 if not self.correctDvo: 66 66 print "*******************************************************************************" 67 self.logger.warning("Wrong or no DVO in use. Do you want to reset and use '" + self.skychunk.dvoLocation + "'?") 68 response = raw_input("(y/n) ") 69 if response == "y": 70 self.logger.warning("Are you ABSOLUTELY sure you want to do this?") 71 response = raw_input("(y/n) ") 72 if response == "y": 73 self.resetAllTables() 74 67 self.logger.warning("switching to a new dvo: " + self.skychunk.dvoLocation) 68 # response = raw_input("(y/n) ") 69 # if response == "y": 70 # self.logger.warning("Are you ABSOLUTELY sure you want to do this?") 71 # response = raw_input("(y/n) ") 72 # if response == "y": 73 self.resetAllTables() 75 74 76 75 ''' … … 597 596 self.ippToPspsDb.clearIngestedBoxes(self.scratchDb.dbHost) 598 597 599 ## print "*******************************************************************************" 600 ## self.logger.warning("about to delete detection table and re-ingest; is this correct?") 601 ## response = raw_input("(y/n) ") 602 ## if response != "y": 603 ## raise 604 ## self.logger.warning("Are you ABSOLUTELY sure you want to do this?") 605 ## response = raw_input("(y/n) ") 606 ## if response != "y": 607 ## raise 598 if True: 599 print "*******************************************************************************" 600 self.logger.warning("about to delete detection table and re-ingest; is this correct?") 601 #response = raw_input("(y/n) ") 602 #if response != "y": 603 # raise 604 #self.logger.warning("Are you ABSOLUTELY sure you want to do this?") 605 #response = raw_input("(y/n) ") 606 #if response != "y": 607 # raise 608 608 609 609 # blow away existing dvoDetection table & re-crate -
branches/eam_branches/ipp-20130509/ippToPsps/jython/ippjython
r35097 r35748 19 19 set JYTHON = $JARDIR/jython2.5.3b1/jython.jar 20 20 # set JYTHON = ~/jython2.5.3b1/jython.jar 21 #set JYTHON = $JARDIR/jython.jar 21 22 22 23 if (! -r $JYTHON) then -
branches/eam_branches/ipp-20130509/ippToPsps/jython/ipptopspsdb.py
r35311 r35748 785 785 survey, \ 786 786 dvo_db, \ 787 datastore_product \ 787 datastore_product, \ 788 comment \ 788 789 ) VALUES ( \ 789 790 '" + batchType + "', \ … … 791 792 '" + self.skychunk.survey + "', \ 792 793 '" + self.skychunk.dvoLabel + "', \ 793 '" + self.skychunk.datastoreProduct + "' \ 794 '" + self.skychunk.datastoreProduct + "', \ 795 '" + self.skychunk.name + "' \ 794 796 )" 795 797 self.logger.infoPair("heather:","sql") … … 1215 1217 ('" + self.skychunk.name + "', " + str(ra) + ", " + str(dec) + ", " + str(self.skychunk.boxSize) + ")" 1216 1218 1219 # print "insertBox: ", sql 1220 1217 1221 self.execute(sql) 1218 1222 id = self.getBoxId(ra, dec) … … 1556 1560 1557 1561 sql = "SELECT id, ra_center, dec_center \ 1558 FROM box \1559 WHERE skychunk = '" + self.skychunk.name+ "' \1562 FROM box join skychunk on box.skychunk = skychunk.name \ 1563 WHERE dvo_label = '" + self.skychunk.dvoLabel + "' \ 1560 1564 ORDER BY ra_center, dec_center" 1561 1565 … … 1599 1603 sql = "INSERT INTO all_pending (stage_id, ra_bore, dec_bore) \ 1600 1604 VALUES (%d, %f, %f)" % (row[0], row[1], row[2]) 1605 # print "sql 1: ", sql 1601 1606 self.execute(sql) 1602 1607 except: continue … … 1604 1609 count = self.getRowCount("all_pending") 1605 1610 self.logger.infoPair("Items written to Db", "%d" % count) 1611 1612 # try: 1613 # self.execute("DROP TABLE all_pending_alt") 1614 # except: 1615 # pass 1616 # 1617 # self.execute("CREATE TABLE all_pending_alt (stage_id bigint(20), ra_bore float, dec_bore float)") 1618 # for row in rows: 1619 # try: 1620 # sql = "INSERT INTO all_pending_alt (stage_id, ra_bore, dec_bore) \ 1621 # VALUES (%d, %f, %f)" % (row[0], row[1], row[2]) 1622 # print "sql 2: ", sql 1623 # self.execute(sql) 1624 # except: continue 1625 # 1626 # count = self.getRowCount("all_pending_alt") 1627 # self.logger.infoPair("Items written to alt Db", "%d" % count) 1606 1628 1607 1629 ''' … … 1624 1646 AND dec_bore BETWEEN " + str(minDEC) + " AND " + str(maxDEC) 1625 1647 1648 print "items: ", sql 1649 1626 1650 try: 1627 1651 rs = self.executeQuery(sql) -
branches/eam_branches/ipp-20130509/ippToPsps/jython/queue.py
r35417 r35748 37 37 self.datastore = Datastore(self.logger, self.skychunk, self.ippToPspsDb) 38 38 39 #print "made datastore"39 print "made datastore" 40 40 41 41 # connect to scratch database 42 42 self.scratchDb = ScratchDb(self.logger, self.config) 43 43 44 #print "connect to scratchdb"44 print "connect to scratchdb" 45 45 46 46 try: … … 50 50 raise 51 51 52 #print "got objects"52 print "got objects" 53 53 54 54 self.skychunk.printAll() … … 62 62 ''' 63 63 def run(self): 64 64 print "here" 65 65 # this outer while loop simply waits a few minutes then starts queuing again (as more stuff may appear in DVO over time) 66 66 while True: 67 67 68 68 self.ippToPspsDb.removeAllBoxes() 69 69 print "remove boxes" 70 70 # queue up batches that are processed but not loaded to datastore 71 71 for batchType in self.skychunk.batchTypes: 72 72 self.logger.infoPair("BatchType",batchType) 73 73 # self.logger.infoTitle("Previous failed datastore loads") 74 74 # self.publishAnyUnpublishedBatches(batchType) … … 76 76 # get totals for whole area to check if there is anything to do 77 77 processedIDs = self.ippToPspsDb.getProcessedIDs(batchType) 78 print "got processed ids" 78 79 consistantlyFailedIDs = self.ippToPspsDb.getConsistentlyFailedIDs(batchType) 79 80 print "got here" 80 81 # for object batches, get full list of stuff from Dvo 81 82 # XXX : need to fix 'dvo.setSkyArea' or this may not return the full list for a parallel dvo … … 133 134 134 135 dD = 0.5*self.skychunk.boxSize 136 135 137 dec = self.skychunk.minDec + dD 138 #dec = self.skychunk.minDec 139 136 140 if (dec > 85): raise 137 141 138 # print "dec, dD: ", dec, dD142 print "dec, dD: ", dec, dD ,self.skychunk.maxDec 139 143 140 144 # a given box centered at RA,DEC with (linear) size of SIDE has the following bounds 141 dR = 0.5*self.skychunk.boxSize / math.cos(math.radians(dec)) 145 #dR = 0.5*self.skychunk.boxSize / math.cos(math.radians(dec)) 146 dR = 0.5*self.skychunk.boxSize 147 142 148 ra = self.skychunk.minRa + dR 143 149 144 # print "ra, dR: ", ra, dR150 print "ra, dR, maxRa", ra, dR, self.skychunk.maxRa 145 151 146 152 # XXX not sure why this is not done with a for-loop... 147 153 while dec <= self.skychunk.maxDec: 148 154 while ra <= self.skychunk.maxRa: 149 155 print "here" 150 156 # a given box centered at RA,DEC with (linear) size of SIDE has the following bounds 151 157 minRA = ra - dR … … 165 171 len(ids))) 166 172 167 #print "box_id: ", box_id173 print "box_id: ", box_id 168 174 169 175 if len(ids) > 0: self.ippToPspsDb.insertPending(box_id, batchType, ids) … … 175 181 if (dec > 85): raise 176 182 177 dR = 0.5*self.skychunk.boxSize / math.cos(math.radians(dec)) 183 #dR = 0.5*self.skychunk.boxSize / math.cos(math.radians(dec)) 184 dR = 0.5*self.skychunk.boxSize 178 185 ra = self.skychunk.minRa + dR 179 186 -
branches/eam_branches/ipp-20130509/ippToPsps/jython/stackbatch.py
r35496 r35748 455 455 ,psfQf \ 456 456 ,psfQfPerfect \ 457 ,psfChiSq \ 457 458 ,momentXX \ 458 459 ,momentXY \ … … 469 470 ,kronFluxErr \ 470 471 ,kronRad \ 471 ,psfChiSq \472 472 ,nFrames \ 473 473 ,assocDate \ … … 495 495 ,PSF_QF \ 496 496 ,PSF_QF_PERFECT \ 497 ,PSF_CHISQ / PSF_NDOF \ 497 498 ,MOMENTS_XX \ 498 499 ,MOMENTS_XY \ … … 504 505 ,MOMENTS_R1 \ 505 506 ,MOMENTS_RH \ 506 , AP_FLUX/ " + str(self.expTime) + " \507 ,POW(10.0, -0.4*AP_MAG) / " + str(self.expTime) + " \ 507 508 ,NULL \ 508 509 ,KRON_FLUX / " + str(self.expTime) + " \ 509 510 ,KRON_FLUX_ERR / " + str(self.expTime) + " \ 510 511 ,MOMENTS_R1 * 2.5 \ 511 ,PSF_CHISQ / PSF_NDOF \512 512 ,N_FRAMES \ 513 513 , '" + self.dateStr + "' \ … … 520 520 # ,POW(10.0, -0.4*AP_MAG) / " + str(self.expTime) + " 521 521 522 # I need a way to choose the sql above based on the cmf version: V3 (LAP.PV1) does not have AP_FLUX 523 # ,AP_FLUX / " + str(self.expTime) + " 524 522 525 # print "sql: ", sql 523 526 # response = raw_input("ready to insert stack det ") … … 540 543 541 544 self.scratchDb.updateAllRows("StackDetection", "dataRelease", str(self.skychunk.dataRelease)) 542 545 #set primary F to 0 543 546 self.scratchDb.updateAllRows("StackDetection", "primaryF", "0") 544 547 … … 550 553 551 554 self.updateDvoIDsAndFlags("StackDetection") 555 #this now updates primary F as well 552 556 # response = raw_input("updated dvo ") 553 557 … … 725 729 726 730 # now update StackMeta with correct number of inputs 727 sql = "UPDATE StackMeta SET nP2Images = (SELECT COUNT( *) FROM StackToImage)"731 sql = "UPDATE StackMeta SET nP2Images = (SELECT COUNT(distinct(floor(imageID/100))) FROM StackToImage)" 728 732 self.scratchDb.execute(sql) 729 733 … … 940 944 a.objID = b.objID, \ 941 945 a.infoFlag = b.flags << 45 | a.infoFlag \ 946 a.primaryF = ((b.flags & 0x10000) >> 16 ) \ 942 947 WHERE a.ippDetectID = b.ippDetectID \ 943 948 AND b.imageID = " + str(imageID) -
branches/eam_branches/ipp-20130509/ppBackground/src/ppBackgroundArguments.c
r35118 r35748 69 69 70 70 if (!data->patternName && !data->backgroundName && !data->auxMaskName) { 71 psError(PPBACKGROUND_ERR_CONFIG, true, "Must specify at least one of -pattern and -background -auxmask");72 return false;71 // psError(PPBACKGROUND_ERR_CONFIG, true, "Must specify at least one of -pattern and -background -auxmask"); 72 // return false; 73 73 } 74 74 if (!data->imageName) { -
branches/eam_branches/ipp-20130509/ppMerge/src/ppMergeLoop.c
r33666 r35748 355 355 // call: pmDarkCombine(outCell, fileGroup->readouts, iter, rej, maskVal); 356 356 if (!psThreadJobAddPending(job)) { 357 goto ERROR; 357 // goto ERROR; 358 // continue; // I don't care. 358 359 } 359 360 break; -
branches/eam_branches/ipp-20130509/ppMerge/src/ppMergeReadChunk.c
r24798 r35748 24 24 "INPUTS.VARIANCES");// Do we have variances? 25 25 int rows = psMetadataLookupS32(NULL, config->arguments, "ROWS"); // Number of rows to read per chunk 26 26 int rejectedInputs = 0; 27 27 // select an available fileGroup 28 28 while (1) { … … 73 73 psWarning ("skipping video cell (1: %ld)", (long) pthread_self()); 74 74 inRO->process = false; 75 rejectedInputs++; 75 76 continue; 76 77 } … … 86 87 psWarning ("skipping video cell (2: %ld)", (long) pthread_self()); 87 88 inRO->process = false; 89 rejectedInputs++; 88 90 continue; 89 91 } … … 94 96 psWarning ("skipping video cell (3: %ld)", (long) pthread_self()); 95 97 inRO->process = false; 98 rejectedInputs++; 96 99 continue; 97 100 } … … 119 122 } 120 123 } 121 124 122 125 // fprintf (stderr, "%lx, %lx, %lx\n", (long int) inRO->image, (long int) inRO->mask, (long int) inRO->variance); 123 124 if (!keepReading) { 125 return NULL; 126 } 126 if (!keepReading) { 127 return NULL; 128 } 129 130 127 131 } 128 132 psLogMsg("ppMerge",PS_LOG_INFO,"%d %ld %d %d %d", 133 j,readouts->n,rejectedInputs,fileGroup->read,fileGroup->busy); 134 if (rejectedInputs >= readouts->n) { 135 fileGroup->read = false; 136 fileGroup->busy = false; 137 return NULL; 138 } 139 129 140 fileGroup->read = fileGroup->busy = true; 130 141 return fileGroup;
Note:
See TracChangeset
for help on using the changeset viewer.
