Changeset 33948
- Timestamp:
- May 29, 2012, 5:07:20 PM (14 years ago)
- Location:
- branches/eam_branches/ipp-20120405
- Files:
-
- 6 deleted
- 60 edited
- 6 copied
-
ippToPsps/config/ippToPspsDbSchema.sql (modified) (8 diffs)
-
ippToPsps/config/settings.xml (modified) (1 diff)
-
ippToPsps/docs (deleted)
-
ippToPsps/jython/batch.py (modified) (4 diffs)
-
ippToPsps/jython/batchRepublisher.py (copied) (copied from trunk/ippToPsps/jython/batchRepublisher.py )
-
ippToPsps/jython/cleanup.py (modified) (9 diffs)
-
ippToPsps/jython/config.py (modified) (2 diffs)
-
ippToPsps/jython/console.py (copied) (copied from trunk/ippToPsps/jython/console.py )
-
ippToPsps/jython/datastore.py (modified) (1 diff)
-
ippToPsps/jython/datastoreRemover.py (modified) (1 diff)
-
ippToPsps/jython/detectionbatch.py (modified) (6 diffs)
-
ippToPsps/jython/dvo.py (modified) (6 diffs)
-
ippToPsps/jython/dvoToMySQL.py (deleted)
-
ippToPsps/jython/gpc1db.py (modified) (4 diffs)
-
ippToPsps/jython/initbatch.py (modified) (2 diffs)
-
ippToPsps/jython/ipptopsps.py (modified) (6 diffs)
-
ippToPsps/jython/ipptopspsdb.py (modified) (4 diffs)
-
ippToPsps/jython/loader.py (modified) (6 diffs)
-
ippToPsps/jython/metrics.py (modified) (1 diff)
-
ippToPsps/jython/mysql.py (modified) (6 diffs)
-
ippToPsps/jython/objectbatch.py (modified) (11 diffs)
-
ippToPsps/jython/odm.py (modified) (1 diff)
-
ippToPsps/jython/plot.py (modified) (1 diff)
-
ippToPsps/jython/plotter.py (modified) (1 diff)
-
ippToPsps/jython/pollOdm.py (modified) (3 diffs)
-
ippToPsps/jython/queue.py (modified) (5 diffs)
-
ippToPsps/jython/regionTest.py (deleted)
-
ippToPsps/jython/reportloadfailures.py (deleted)
-
ippToPsps/jython/republishbatch.py (deleted)
-
ippToPsps/jython/run.sh (modified) (1 diff)
-
ippToPsps/jython/scratchdb.py (modified) (3 diffs)
-
ippToPsps/jython/setupScratchDb.py (modified) (2 diffs)
-
ippToPsps/jython/stackbatch.py (modified) (4 diffs)
-
ippToPsps/jython/stilts.py (deleted)
-
ippToPsps/perl/pspsSchema2xml.pl (modified) (9 diffs)
-
ippToPsps/src/Dvo.c (modified) (1 diff)
-
ippconfig (modified) (1 prop)
-
ippconfig/Makefile.am (modified) (1 diff)
-
ippconfig/cfh12k/camera.config (modified) (1 diff)
-
ippconfig/configure.ac (modified) (1 diff)
-
ippconfig/esowfi/camera.config (modified) (1 diff)
-
ippconfig/gpc1-tdi (copied) (copied from trunk/ippconfig/gpc1-tdi )
-
ippconfig/gpc1-tdi/Makefile.am (copied) (copied from trunk/ippconfig/gpc1-tdi/Makefile.am )
-
ippconfig/gpc1-tdi/camera.config (copied) (copied from trunk/ippconfig/gpc1-tdi/camera.config )
-
ippconfig/gpc1-tdi/format_tdi_20120416.config (copied) (copied from trunk/ippconfig/gpc1-tdi/format_tdi_20120416.config )
-
ippconfig/gpc1/ghost.model.mdc (modified) (2 diffs)
-
ippconfig/gpc1/ppImage.config (modified) (1 diff)
-
ippconfig/gpc1/psastro.config (modified) (4 diffs)
-
ippconfig/isp/camera.config (modified) (1 diff)
-
ippconfig/lulin/camera.config (modified) (1 diff)
-
ippconfig/megacam/camera.config (modified) (1 diff)
-
ippconfig/mosaic2/camera.config (modified) (1 diff)
-
ippconfig/recipes/filerules-mef.mdc (modified) (1 diff)
-
ippconfig/recipes/filerules-simple.mdc (modified) (1 diff)
-
ippconfig/recipes/filerules-split.mdc (modified) (2 diffs)
-
ippconfig/recipes/ppImage.config (modified) (1 diff)
-
ippconfig/recipes/psastro.config (modified) (1 diff)
-
ippconfig/recipes/psphot.config (modified) (5 diffs)
-
ippconfig/recipes/reductionClasses.mdc (modified) (3 diffs, 1 prop)
-
ippconfig/sdssmosaic/camera.config (modified) (1 diff)
-
ippconfig/simmosaic/camera.config (modified) (1 diff)
-
ippconfig/simple/camera.config (modified) (1 diff)
-
ippconfig/ssp/camera.config (modified) (1 diff)
-
ippconfig/ssp/format.config (modified) (1 diff)
-
ippconfig/system.config (modified) (1 diff)
-
ippconfig/tek/camera.config (modified) (1 diff)
-
ippconfig/uh8k/camera.config (modified) (1 diff)
-
ippconfig/vysos20/camera.config (modified) (1 diff)
-
ippconfig/vysos5/camera.config (modified) (1 diff)
-
pstamp/scripts (modified) (1 prop)
-
pstamp/scripts/pstamp_cleanup.pl (modified) (2 diffs)
-
psvideophot (modified) (1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120405/ippToPsps/config/ippToPspsDbSchema.sql
r33593 r33948 45 45 `purged` tinyint(4) NOT NULL default '0', 46 46 PRIMARY KEY (`batch_id`) 47 ) ENGINE=InnoDB AUTO_INCREMENT=32 6479DEFAULT CHARSET=latin1;47 ) ENGINE=InnoDB AUTO_INCREMENT=328286 DEFAULT CHARSET=latin1; 48 48 SET character_set_client = @saved_cs_client; 49 49 … … 65 65 KEY `fk_config` (`config`), 66 66 CONSTRAINT `fk_config` FOREIGN KEY (`config`) REFERENCES `config` (`name`) ON DELETE CASCADE 67 ) ENGINE=InnoDB AUTO_INCREMENT= 25457DEFAULT CHARSET=latin1;67 ) ENGINE=InnoDB AUTO_INCREMENT=44588 DEFAULT CHARSET=latin1; 68 68 SET character_set_client = @saved_cs_client; 69 69 … … 87 87 PRIMARY KEY (`id`), 88 88 UNIQUE KEY `unique_key` (`host`,`pid`) 89 ) ENGINE=InnoDB AUTO_INCREMENT= 961DEFAULT CHARSET=latin1;89 ) ENGINE=InnoDB AUTO_INCREMENT=1227 DEFAULT CHARSET=latin1; 90 90 SET character_set_client = @saved_cs_client; 91 91 … … 110 110 `max_dec` double default '90', 111 111 `box_size` double default '4', 112 `base_path` varchar(1000) default NULL,112 `base_path` varchar(1000) default '/data/ipp005.0/ipptopsps/', 113 113 `data_release` smallint(6) default '0', 114 114 `delete_local` tinyint(1) default '0', … … 120 120 `queue_P2` tinyint(1) default '1', 121 121 `queue_ST` tinyint(1) default '0', 122 `queue_OB` tinyint(1) default '0', 123 `active` tinyint(1) default '1', 122 124 UNIQUE KEY `name` (`name`) 123 125 ) ENGINE=InnoDB DEFAULT CHARSET=latin1; … … 141 143 142 144 -- 145 -- Table structure for table `object` 146 -- 147 148 DROP TABLE IF EXISTS `object`; 149 SET @saved_cs_client = @@character_set_client; 150 SET character_set_client = utf8; 151 CREATE TABLE `object` ( 152 `batch_id` bigint(20) unsigned NOT NULL, 153 `region` varchar(50) default NULL, 154 KEY `batch_id` (`batch_id`), 155 CONSTRAINT `object_fk_1` FOREIGN KEY (`batch_id`) REFERENCES `batch` (`batch_id`) 156 ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 157 SET character_set_client = @saved_cs_client; 158 159 -- 143 160 -- Table structure for table `pending` 144 161 -- … … 151 168 `batch_type` varchar(10) default NULL, 152 169 `stage_id` bigint(20) default NULL, 153 `ra_bore` float default NULL,154 `dec_bore` float default NULL,155 170 UNIQUE KEY `a_key` (`box_id`,`stage_id`,`batch_type`), 171 UNIQUE KEY `stage_id_key` (`stage_id`), 156 172 CONSTRAINT `box_key` FOREIGN KEY (`box_id`) REFERENCES `box` (`id`) ON DELETE CASCADE 157 173 ) ENGINE=InnoDB DEFAULT CHARSET=latin1; … … 199 215 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 200 216 201 -- Dump completed on 2012-0 3-22 7:59:34217 -- Dump completed on 2012-04-10 6:00:59 -
branches/eam_branches/ipp-20120405/ippToPsps/config/settings.xml
r33594 r33948 5 5 6 6 <!-- path for storing logs --> 7 <logPath>/data/ipp005.0/ rhenders</logPath>7 <logPath>/data/ipp005.0/ipptopsps</logPath> 8 8 9 9 <!-- local scratch Db section --> -
branches/eam_branches/ipp-20120405/ippToPsps/jython/batch.py
r33672 r33948 39 39 useFullTables): 40 40 41 self.everythingOK = False42 41 self.readHeader = False 43 42 self.config = config … … 66 65 if not self.header: 67 66 logger.errorPair("Could not read FITS for id", "%d" % id) 68 r eturn67 raise 69 68 70 69 self.scratchDb.setUseFullTables(self.useFullTables) … … 115 114 self.logger.infoPair("Output path", self.localOutPath) 116 115 117 self.everythingOK = True118 116 119 117 ''' … … 510 508 def run(self): 511 509 512 if not self.everythingOK:513 self.logger.errorPair("Aborting this batch", "could not initialize")514 self.ippToPspsDb.updateProcessed(self.batchID, -1)515 return516 517 510 if not self.createEmptyPspsTables(): 518 511 self.logger.errorPair("Aborting this batch", "could not create empty PSPS tables") 519 512 self.ippToPspsDb.updateProcessed(self.batchID, -1) 520 r eturn513 raise 521 514 522 515 if not self.importIppTables(): 523 516 self.logger.errorPair("Aborting this batch", "could not import IPP tables") 524 517 self.ippToPspsDb.updateProcessed(self.batchID, -1) 525 r eturn518 raise 526 519 527 520 if not self.populatePspsTables(): 528 521 self.logger.errorPair("Aborting this batch", "unable to populate PSPS tables") 529 522 self.ippToPspsDb.updateProcessed(self.batchID, -1) 530 r eturn523 raise 531 524 532 525 if not self.exportPspsTablesToFits(): 533 526 self.logger.errorPair("Aborting this batch", "unable to export tables to FITS file") 534 527 self.ippToPspsDb.updateProcessed(self.batchID, -1) 535 r eturn528 raise 536 529 537 530 if self.writeBatchManifest(): -
branches/eam_branches/ipp-20120405/ippToPsps/jython/cleanup.py
r33708 r33948 7 7 import sys 8 8 import time 9 import traceback 9 10 import logging.config 10 11 … … 41 42 self.logger.infoPair("Config", self.config.name) 42 43 self.config.printDeletionPolicy() 44 self.clean("IN") 43 45 self.clean("P2") 44 46 self.clean("ST") … … 48 50 if not self.waitForPollTime(): break 49 51 52 ''' 53 Reports results of cleanup for this set of IDs 54 ''' 55 def reportResults(self, name, ids, success): 56 57 if len(ids) > 0: 58 self.logger.infoSeparator() 59 self.logger.infoPair("Removed from " + name, "%d of %d" % (success, len(ids))) 60 61 50 62 ''' 51 63 Finds stuff to delete for this batch type, then: … … 62 74 63 75 loadedDatastoreIDs = self.ippToPspsDb.getLoadedToODMButNotDeletedFromDatastore(batchType) 64 loadedDxlayerIDs = self.ippToPspsDb.getLoadedToODMButNotDeletedFromDXLayer(batchType)76 deleteFromDxLayerIDs = self.ippToPspsDb.getLoadedToODMButNotDeletedFromDXLayer(batchType) 65 77 mergedLocalIDs = self.ippToPspsDb.getMergedButNotDeletedFromLocalDisk(batchType) 66 78 … … 68 80 purgedLocalIDs = self.ippToPspsDb.getPurgedButNotDeletedFromLocalDisk(batchType) 69 81 70 self.logger.infoPair("Loaded to ODM but still on datastore", "%d" % len(loadedDatastoreIDs)) 71 self.logger.infoPair("Loaded to ODM but still in DXLayer", "%d" % len(loadedDxlayerIDs)) 72 self.logger.infoPair("Merged but still on local disk", "%d" % len(mergedLocalIDs)) 73 self.logger.infoPair("Purged but still on datastore", "%d" % len(purgedDatastoreIDs)) 74 self.logger.infoPair("Purged but still on local disk", "%d" % len(purgedLocalIDs)) 82 deleteFromDatastoreIDs = loadedDatastoreIDs + purgedDatastoreIDs 83 deleteFromLocalIDs = mergedLocalIDs + purgedLocalIDs 84 85 # report to log what we are going to do 86 self.logger.infoPair("To delete from datastore", "%d" % len(deleteFromDatastoreIDs)) 87 self.logger.infoPair("To delete from DXLayer", "%d" % len(deleteFromDxLayerIDs)) 88 self.logger.infoPair("To delete from local disk", "%d" % len(deleteFromLocalIDs)) 75 89 90 # delete stuff from local disk 76 91 if self.config.deleteLocal: 77 self.logger.infoSeparator()78 92 count = 0 79 ids = mergedLocalIDs + purgedLocalIDs 80 for id in ids: 93 for id in deleteFromLocalIDs: 81 94 82 95 if Batch.deleteFromDisk(self.logger, self.config.basePath, batchType, self.config.dvoLabel, id): … … 84 97 count = count + 1 85 98 86 self.logger.infoSeparator() 87 self.logger.infoPair("Removed from local disk", "%d" % count) 88 self.logger.infoPair("Remaining on local disk", "%d" % (len(ids) - count)) 89 99 self.reportResults("local disk", deleteFromLocalIDs, count) 90 100 101 # remove stuff from datastore 91 102 if self.config.deleteDatastore: 92 self.logger.infoSeparator()93 103 count = 0 94 ids = loadedDatastoreIDs + purgedDatastoreIDs 95 for id in ids: 104 for id in deleteFromDatastoreIDs: 96 105 97 106 batchName = Batch.getNameFromID(id) … … 100 109 count = count + 1 101 110 102 self.logger.infoSeparator() 103 self.logger.infoPair("Removed from datastore", "%d" % count) 104 self.logger.infoPair("Remaining on datastore", "%d" % (len(ids) - count)) 111 self.reportResults("datastore", deleteFromDatastoreIDs, count) 105 112 113 # remove stuff from DXLayer 106 114 if self.config.deleteDxLayer: 107 self.logger.infoSeparator()108 115 count = 0 109 for id in loadedDxlayerIDs:116 for id in deleteFromDxLayerIDs: 110 117 111 118 if self.dxlayer.deleteBatch(id): … … 113 120 count = count + 1 114 121 115 self.logger.infoSeparator() 116 self.logger.infoPair("Removed from DXLayer", "%d" % count) 117 self.logger.infoPair("Remaining on DXLayer", "%d" % (len(loadedDxlayerIDs) - count)) 122 self.reportResults("DXLayer", deleteFromDxLayerIDs, count) 118 123 119 120 124 ''' 121 125 Overrides base-class version … … 128 132 Start of program 129 133 ''' 130 cleanup = Cleanup(sys.argv) 131 cleanup.run() 132 cleanup.exitProgram("finished") 134 try: 135 cleanup = Cleanup(sys.argv) 136 cleanup.run() 137 cleanup.exitProgram("completed") 138 except Exception, e: 139 print str(e) 140 traceback.print_exc() -
branches/eam_branches/ipp-20120405/ippToPsps/jython/config.py
r33558 r33948 39 39 ''' 40 40 def printAll(self): 41 42 self.logger.infoTitle("Config") 41 43 42 44 try: … … 133 135 def getDbPassword(self, dbType): return self.settingsDoc.find(dbType +"/password").text 134 136 135 -
branches/eam_branches/ipp-20120405/ippToPsps/jython/datastore.py
r33259 r33948 102 102 103 103 firstInt = int(first[1:]) 104 lastInt = int(last[1:]) 104 lastInt = int(last[1:]) + 1 105 105 106 106 for i in range(firstInt, lastInt): -
branches/eam_branches/ipp-20120405/ippToPsps/jython/datastoreRemover.py
r33470 r33948 46 46 Start of program 47 47 ''' 48 datastoreRemover = DatastoreRemover(sys.argv) 49 datastoreRemover.run() 50 datastoreRemover.exitProgram("finished") 48 try: 49 datastoreRemover = DatastoreRemover(sys.argv) 50 datastoreRemover.run() 51 datastoreRemover.exitProgram("completed") 52 except: pass 51 53 -
branches/eam_branches/ipp-20120405/ippToPsps/jython/detectionbatch.py
r33353 r33948 53 53 useFullTables) 54 54 55 if not self.everythingOK: return56 57 55 # get camera meta data 58 56 meta = self.gpc1Db.getCameraStageMeta(self.id) 59 57 if not meta: 60 self. everythingOK = False61 r eturn58 self.logger.errorPair("Could not get", "camera metadata") 59 raise 62 60 63 61 self.expID = meta[0]; … … 93 91 # get a fre primary header values. if in test mode, then use defaults 94 92 if self.safeDictionaryAccessWithDefault(self.header, 'MJD-OBS', "1") == "NULL": 95 self. everythingOK = False96 r eturn93 self.logger.errorPair("Could not get", "MJD-OBS") 94 raise 97 95 98 96 if self.safeDictionaryAccessWithDefault(self.header, 'EXPTIME', "1") == "NULL": 99 self. everythingOK = False100 r eturn97 self.logger.errorPair("Could not get", "EXPTIME") 98 raise 101 99 102 100 if self.safeDictionaryAccessWithDefault(self.header, 'FILTERID', "g.0000") == "NULL": 103 self. everythingOK = False104 r eturn101 self.logger.errorPair("Could not get", "FILTERID") 102 raise 105 103 106 104 self.obsTime = float(self.header['MJD-OBS']) + (float(self.header['EXPTIME']) / 172800.0) … … 418 416 ,momentYY \ 419 417 ,apMag \ 418 ,kronFlux \ 419 ,kronFluxErr \ 420 420 ,infoFlag \ 421 421 ,sky \ … … 436 436 ,X_PSF_SIG \ 437 437 ,Y_PSF_SIG \ 438 ,POW(10.0, (-0.4*PSF_INST_MAG)) / " +self.header['EXPTIME']+" \439 ,ABS((PSF_INST_MAG_SIG*(POW(10.0, (-0.4*PSF_INST_MAG)) / " +self.header['EXPTIME']+")) / 1.085736) \440 ,POW(10.0, (-0.4*PEAK_FLUX_AS_MAG)) / " +self.header['EXPTIME']+" \438 ,POW(10.0, (-0.4*PSF_INST_MAG)) / " + self.header['EXPTIME'] + " \ 439 ,ABS((PSF_INST_MAG_SIG*(POW(10.0, (-0.4*PSF_INST_MAG)) / " + self.header['EXPTIME'] + ")) / 1.085736) \ 440 ,POW(10.0, (-0.4*PEAK_FLUX_AS_MAG)) / " + self.header['EXPTIME'] + " \ 441 441 ,PSF_MAJOR \ 442 442 ,PSF_MINOR \ … … 448 448 ,MOMENTS_YY \ 449 449 ,AP_MAG \ 450 ,KRON_FLUX / " + self.header['EXPTIME'] + " \ 451 ,KRON_FLUX_ERR / " + self.header['EXPTIME'] + " \ 450 452 ,FLAGS\ 451 453 ,SKY \ … … 755 757 else : regex = ".*.psf" 756 758 757 columns = "IPP_IDET X_PSF Y_PSF X_PSF_SIG Y_PSF_SIG PSF_INST_MAG PSF_INST_MAG_SIG PEAK_FLUX_AS_MAG PSF_MAJOR PSF_MINOR PSF_THETA EXT_NSIGMA PSF_QF MOMENTS_XX MOMENTS_XY MOMENTS_YY AP_MAG FLAGS SKY SKY_SIGMA EXT_NSIGMA"759 columns = "IPP_IDET X_PSF Y_PSF X_PSF_SIG Y_PSF_SIG PSF_INST_MAG PSF_INST_MAG_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 SKY SKY_SIGMA EXT_NSIGMA" 758 760 759 761 return super(DetectionBatch, self).importIppTables(columns, regex) -
branches/eam_branches/ipp-20120405/ippToPsps/jython/dvo.py
r33676 r33948 17 17 from java.sql import * 18 18 19 20 19 ''' 21 20 Abstract base-class for DVO classes … … 48 47 49 48 # connect to the specified scratch database 50 self.scratchDb = ScratchDb(self.logger, self.config, scratchDbName) 49 try: 50 self.scratchDb = ScratchDb(self.logger, self.config, scratchDbName) 51 except: raise 52 51 53 self.scratchDb.setUseFullTables(True) 52 54 … … 90 92 return 91 93 92 93 94 ''' 94 95 Loads the DVO Photcodes.dat FITS file … … 218 219 self.regionsAlreadyIngested = [] 219 220 self.regionsIngestedButOutOfDate = [] 221 tablesToCleanup = [] 220 222 221 223 # loop through all regions in DVO inside this bounding-box … … 256 258 continue 257 259 260 # we have no record of ingesting this region, but does the table exist? 261 # May hev been left behind after a crash, and therefore needs to be cleaned-up 262 for fileType in self.ingestFileTypes: 263 tableName = self.scratchDb.getDbFriendlyTableName(regionPath + "." + fileType) 264 if self.scratchDb.tableExists(tableName): 265 tablesToCleanup.append(tableName) 266 258 267 # check if we have out-of-date versions of any interested files, if so, add region to the purge list 259 268 outOfDate = False … … 279 288 self.sizeOfRegionsToPurge = self.getDiskSizeOfRegions(self.regionsToPurge) 280 289 self.sizeOfRegionsToIngest = self.getDiskSizeOfRegions(self.regionsToIngest) 290 291 # any tables need cleaning up? 292 if len(tablesToCleanup) > 0: 293 self.logger.infoPair("Found tables to be cleaned up", "%d" % len(tablesToCleanup)) 294 self.scratchDb.dropTables(tablesToCleanup) 295 281 296 282 297 ''' -
branches/eam_branches/ipp-20120405/ippToPsps/jython/gpc1db.py
r33527 r33948 72 72 elif batchType == "ST": 73 73 74 stage = "staticsky _multi"75 sql = "SELECT DISTINCT stack_id, ra , declFROM staticskyInput \74 stage = "staticsky" 75 sql = "SELECT DISTINCT stack_id, radeg, decdeg FROM staticskyInput \ 76 76 JOIN addRun ON(staticskyInput.sky_id = addRun.stage_id) \ 77 77 JOIN minidvodbRun USING(minidvodb_name) \ 78 78 JOIN minidvodbProcessed USING(minidvodb_id) \ 79 JOIN stackRun USING(stack_id) JOIN skycell s.skycellUSING(skycell_id) \79 JOIN stackRun USING(stack_id) JOIN skycell USING(skycell_id) \ 80 80 WHERE minidvodbRun.minidvodb_group = '" + dvoDb + "' \ 81 81 AND minidvodbRun.state = 'merged' \ … … 83 83 AND addRun.stage = '" + stage + "' \ 84 84 AND addRun.state = 'full' \ 85 AND dec lBETWEEN " + str(minDec) + " AND " + str(maxDec) + " \86 AND ra BETWEEN " + str(minRA) + " AND " + str(maxRA)85 AND decdeg BETWEEN " + str(minDec) + " AND " + str(maxDec) + " \ 86 AND radeg BETWEEN " + str(minRA) + " AND " + str(maxRA) 87 87 88 88 try: … … 266 266 AND minidvodbRun.minidvodb_group = '" + dvoDb + "' \ 267 267 AND minidvodbRun.state = 'merged' \ 268 AND stage = 'staticsky _multi'"268 AND stage = 'staticsky'" 269 269 ''' 270 270 … … 282 282 AND mergedvodbRun.state = 'full' \ 283 283 AND mergedvodbRun.mergedvodb = '" + dvoDb + "' \ 284 AND stage = 'staticsky _multi'"284 AND stage = 'staticsky'" 285 285 286 286 -
branches/eam_branches/ipp-20120405/ippToPsps/jython/initbatch.py
r33353 r33948 50 50 ''' 51 51 def importIppTables(self, filter=""): 52 self.logger.debug("importIppTables method here to satidfy base-class") 52 self.logger.debug("importIppTables method here to satisfy base-class") 53 return True 53 54 54 55 ''' … … 63 64 def populatePspsTables(self): 64 65 self.logger.debug("No processing required for this batch type") 65 return 166 return True 66 67 -
branches/eam_branches/ipp-20120405/ippToPsps/jython/ipptopsps.py
r33711 r33948 38 38 self.SECONDS = None 39 39 40 self.createNewConfig = False 41 self.rotateConfigs = False 42 # a new config? 43 if CONFIGNAME == "edit": self.createNewConfig = True 40 44 # should we rotate configs for this program? 41 if CONFIGNAME == "all": self.rotateConfigs = True 42 else: self.rotateConfigs = False 45 elif CONFIGNAME == "all": self.rotateConfigs = True 43 46 44 47 # set up config object … … 47 50 48 51 # create connection to databases database 49 self.ippToPspsDb = IppToPspsDb(self.logger, self.config) 52 try: 53 self.ippToPspsDb = IppToPspsDb(self.logger, self.config) 54 except: 55 self.exitProgram("Could not connect to ipptopsps Db") 56 raise 50 57 51 58 self.checkClientStatus() … … 59 66 self.logger.infoPair("Host", self.HOST) 60 67 self.logger.infoPair("PID", "%d" % self.PID) 61 self.logger.infoPair("Config", CONFIGNAME)68 self.logger.infoPair("Config", self.config.name) 62 69 63 70 ''' … … 97 104 98 105 # write message to log or stdout if no logger set up 99 msg = sys.argv[0] + " <configName|all > " + extra106 msg = sys.argv[0] + " <configName|all|edit> " + extra 100 107 try: 101 108 self.logger.errorPair("Usage:", msg) … … 103 110 print "*** Usage: " + msg 104 111 105 106 112 ''' 107 113 Refreshes the config then recreates objects with new settings 108 114 ''' 109 115 def refreshConfig(self): 116 117 # new config? 118 if self.createNewConfig: 119 self.ippToPspsDb.editConfig() 120 self.ippToPspsDb.setConfigForThisClient(self.config.name, self.HOST, self.PID) 121 self.createNewConfig = False 110 122 111 123 # if we are rotating configs, then look for next active one in list … … 163 175 # write message to log or stdout if no logger set up 164 176 try: 165 self.logger.infoPair( "Programexited", exitReason)177 self.logger.infoPair(self.PROGNAME + " exited", exitReason) 166 178 except: 167 179 print "*** Program exited: " + exitReason -
branches/eam_branches/ipp-20120405/ippToPsps/jython/ipptopspsdb.py
r33710 r33948 854 854 return configs 855 855 856 857 ''' 858 Writes current Config object to Db 859 ''' 860 def writeConfig(self): 861 862 sql = "UPDATE config \ 863 SET \ 864 datastore_product = '" + self.config.datastoreProduct + "' \ 865 ,datastore_type = '" + self.config.datastoreType + "' \ 866 ,datastore_publish = " + self.config.datastorePublishing + " \ 867 ,dvo_label = '" + self.config.dvoLabel + "' \ 868 ,dvo_location = '" + self.config.dvoLocation + "' \ 869 ,min_ra = " + self.config.minRa + " \ 870 ,max_ra = " + self.config.maxRa + " \ 871 ,min_dec = " + self.config.minDec + " \ 872 ,max_dec = " + self.config.maxDec + " \ 873 ,box_size = " + self.config.boxSize + " \ 874 ,base_path = '" + self.config.basePath + "' \ 875 ,data_release = " + self.config.dataRelease + " \ 876 ,delete_local = " + self.config.deleteLocal + " \ 877 ,delete_datastore = " + self.config.deleteDatastore + " \ 878 ,delete_dxlayer = " + self.config.deleteDxLayer + " \ 879 ,epoch = '" + self.config.epoch + "' \ 880 ,survey = '" + self.config.survey + "' \ 881 ,psps_survey = '" + self.config.pspsSurvey + "' \ 882 ,queue_P2 = " + self.config.queuingThisBatchType("P2") + " \ 883 ,queue_ST = " + self.config.queuingThisBatchType("ST") + " \ 884 ,queue_OB = " + self.config.queuingThisBatchType("OB") + " \ 885 WHERE name = '" + self.config.name + "'" 886 887 self.execute(sql) 856 ''' 857 Prompts user for info about a new or existing config and lets them neter the various details 858 ''' 859 def editConfig(self): 860 861 print " ********************************************************************" 862 print " * Config editor" 863 print " *" 864 response = raw_input(" * Name for new config, or existing config to edit? ") 865 if response == "": return 866 self.config.name = response 867 868 # attempt to insert new config, if it already exists then carry on with update 869 sql = "INSERT INTO config (name) VALUES ('" + self.config.name + "')" 870 try: 871 self.execute(sql) 872 except: pass 873 874 # for each column in the config table 875 sql = "SHOW COLUMNS FROM config" 876 rs = self.executeQuery(sql) 877 while (rs.next()): 878 879 field = rs.getString(1) 880 type = rs.getString(2) 881 null = rs.getString(3) 882 883 # things we don;t want the user to edit 884 if field == 'timestamp': continue 885 if field == 'name': continue 886 887 # get current value for this field, if any 888 try: 889 rs2 = self.executeQuery("SELECT " + field + " FROM config WHERE name = '" + self.config.name + "'") 890 rs2.first() 891 default = rs2.getString(1) 892 except: pass 893 894 question = " * " + field + " (" + type + ")" 895 896 # there may not be a default value 897 try: question = question + " hit return to accept default of: '" + default + "'" 898 except: pass 899 900 # prompt the user for new value or to accept existing value 901 question = question + "? " 902 response = raw_input(question) 903 if response != "": 904 if type.find("varchar") != -1 or type.find("timestamp") != -1: quotes = "'" 905 else: quotes = "" 906 self.execute("UPDATE config SET " + field + " = " + quotes + response + quotes + " WHERE name = '" + self.config.name + "'") 907 908 print " *" 909 print " ********************************************************************" 888 910 889 911 ''' … … 951 973 else: self.config.datastorePublishing = False 952 974 self.config.dvoLabel = rs.getString(4) 975 976 # if dvoLabel is null is can break queries, so set to something 977 if not self.config.dvoLabel: self.config.dvoLabel = "none" 953 978 self.config.dvoLocation = rs.getString(5) 954 979 self.config.minRa = rs.getDouble(6) … … 1255 1280 1256 1281 self.execute("CREATE TEMPORARY TABLE all_pending (stage_id bigint(20), ra_bore float, dec_bore float)") 1257 count = 01258 1282 for row in rows: 1259 1283 … … 1262 1286 VALUES (%d, %f, %f)" % (row[0], row[1], row[2]) 1263 1287 self.execute(sql) 1264 count += 11265 1288 except: continue 1266 1289 1267 self.logger.infoPair("All items written to Db", "%d" % count) 1290 count = self.getRowCount("all_pending") 1291 self.logger.infoPair("Items written to Db", "%d" % count) 1268 1292 1269 1293 ''' -
branches/eam_branches/ipp-20120405/ippToPsps/jython/loader.py
r33677 r33948 45 45 self.scratchDb.disconnect() 46 46 continue 47 self.logger.infoPair("Using scratch Db", self.scratchDb.dbName)48 47 break 49 48 50 if not self.scratchDb.connected: 51 self.logger.errorPair("Cannot connect to a", "scratch database") 49 if not self.scratchDb.connected: 50 self.exitProgram("Cannot connect to a scratch database") 51 raise 52 52 53 53 # create Datastore objects … … 108 108 ''' 109 109 def run(self): 110 111 if not self.scratchDb.connected: return 110 112 111 113 numAttempts = 0 … … 152 154 if batchType != "OB": 153 155 # look in DVO for this box (with extra border) 154 #self.dvoDetections.setSkyAreaAsBox(boxDim['RA'], boxDim['DEC'], boxSizeWithBorder) 155 self.dvoDetections.setSkyArea() 156 self.logger.infoPair("Querying DVO for this sky area", "") 157 self.dvoDetections.setSkyAreaAsBox(boxDim['RA'], boxDim['DEC'], boxSizeWithBorder) 158 #self.dvoDetections.setSkyArea() 156 159 sizeToBeIngested = self.dvoDetections.getDiskSizeOfRegionsToBeIngested() 157 160 if sizeToBeIngested == 0.0: smfsPerGB = 999999999 … … 160 163 self.logger.infoPair("smfs-per-GB", "%.1f" % smfsPerGB) 161 164 # should do we pre-ingest stuff from DVO? 162 if smfsPerGB > 30:165 if batchType == 'P2' and smfsPerGB > 30: 163 166 if not self.dvoDetections.sync(): 164 167 self.logger.errorPair("Could not sync DVO with MySQL", "skipping") … … 195 198 196 199 self.ippToPspsDb.unlockTables() 200 self.ippToPspsDb.deletePendingItem(batchType, id) 201 202 # catch any raised exceptions in batch constructors 203 try: 204 if batchType == "P2": 205 batch = DetectionBatch(self.logger, 206 self.config, 207 self.gpc1Db, 208 self.ippToPspsDb, 209 self.scratchDb, 210 id, 211 batchID, 212 useFullTables) 213 elif batchType == "ST": 214 batch = StackBatch(self.logger, 215 self.config, 216 self.gpc1Db, 217 self.ippToPspsDb, 218 self.scratchDb, 219 id, 220 batchID, 221 useFullTables) 222 223 elif batchType == "OB": 224 batch = ObjectBatch(self.logger, 225 self.config, 226 self.gpc1Db, 227 self.ippToPspsDb, 228 self.scratchDb, 229 id, 230 batchID, 231 useFullTables) 232 233 batch.run() 197 234 198 self.ippToPspsDb.deletePendingItem(batchType, id) 199 200 if batchType == "P2": 201 batch = DetectionBatch(self.logger, 202 self.config, 203 self.gpc1Db, 204 self.ippToPspsDb, 205 self.scratchDb, 206 id, 207 batchID, 208 useFullTables) 209 elif batchType == "ST": 210 batch = StackBatch(self.logger, 211 self.config, 212 self.gpc1Db, 213 self.ippToPspsDb, 214 self.scratchDb, 215 id, 216 batchID, 217 useFullTables) 218 219 elif batchType == "OB": 220 batch = ObjectBatch(self.logger, 221 self.config, 222 self.gpc1Db, 223 self.ippToPspsDb, 224 self.scratchDb, 225 id, 226 batchID, 227 useFullTables) 228 229 batch.run() 230 235 # if batch fails, ignore and move on to the next one 236 except: 237 self.logger.errorPair("Problem with this %s batch (%d)" % (batchType, id), "skipping") 238 pass 239 231 240 if not self.checkClientStatus(): return False 232 241 … … 253 262 loader = Loader(sys.argv) 254 263 loader.run() 255 loader.exitProgram(" finished")264 loader.exitProgram("completed") 256 265 except Exception, e: 257 266 print str(e) 258 267 traceback.print_exc() 268 -
branches/eam_branches/ipp-20120405/ippToPsps/jython/metrics.py
r33712 r33948 191 191 Start of program. 192 192 ''' 193 metrics = Metrics(sys.argv) 194 metrics.run() 195 metrics.exitProgram("finished") 196 197 198 193 try: 194 metrics = Metrics(sys.argv) 195 metrics.run() 196 metrics.exitProgram("completed") 197 except: pass 198 199 200 -
branches/eam_branches/ipp-20120405/ippToPsps/jython/mysql.py
r33683 r33948 34 34 self.dbPass = config.getDbPassword(dbType) 35 35 36 # a user friendly connection sring 37 connectionStr = self.dbName + "@" + self.dbHost 38 36 39 # set up JDBC connection 37 40 self.url = "jdbc:mysql://"+self.dbHost+"/"+self.dbName+"?autoReconnect=true&user="+self.dbUser+"&password="+self.dbPass … … 39 42 self.con = DriverManager.getConnection(self.url) 40 43 self.connectionID = self.getLastConnectionID() 41 self.logger. debug("MySQL connection to %s with ID %d" % (dbType, self.connectionID))44 self.logger.infoPair("Connected to MySQL Db", connectionStr) 42 45 except: 43 self.logger.error("Unable to connect to " + self.url) 44 self.everythingOK = False # TODO need this? 46 self.logger.errorPair("Unable to connect to", connectionStr) 45 47 self.connected = False 46 return 47 48 self.everythingOK = True 48 raise 49 49 50 self.connected = True 50 51 … … 88 89 sql = "KILL %d" % connectionID 89 90 self.execute(sql) 91 92 ''' 93 Checks whether this table exists 94 ''' 95 def tableExists(self, tableName): 96 97 sql = "SELECT COUNT(*) \ 98 FROM information_schema.tables \ 99 WHERE table_schema = '" + self.dbName + "' \ 100 AND table_name = '" + tableName + "'" 101 102 try: 103 rs = self.executeQuery(sql) 104 rs.first() 105 if rs.getInt(1) > 0: return True 106 else: return False 107 except: 108 self.logger.errorPair("Could not check if table exists", sql) 109 pass 110 111 return False 90 112 91 113 ''' … … 159 181 160 182 ''' 183 Drops a list of tables 184 ''' 185 def dropTables(self, tables): 186 for table in tables: self.dropTable(table) 187 188 ''' 161 189 Drops a table 162 190 ''' … … 224 252 except: pass 225 253 #self.logger.warn("Index already in place on '" + column + "' for table '" + table + "'") 254 255 ''' 256 Checks that we have a connection 257 ''' 258 def isConnected(self): 259 260 try: 261 self.con 262 self.connected = True 263 except: 264 self.logger.errorPair("Not connected to", self.url) 265 self.connected = False 266 267 return self.connected 268 226 269 ''' 227 270 TODO 228 271 ''' 229 272 def execute(self, sql): 273 274 if not self.isConnected(): raise 230 275 231 276 stmt = self.con.createStatement() … … 238 283 def executeQuery(self, sql): 239 284 285 if not self.isConnected(): raise 286 240 287 stmt = self.con.createStatement() 241 288 rs = stmt.executeQuery(sql) -
branches/eam_branches/ipp-20120405/ippToPsps/jython/objectbatch.py
r33715 r33948 51 51 1) 52 52 53 if not self.everythingOK: return 54 55 self.dvoObjects = DvoObjects(self.logger, self.config, self.scratchDb.dbName) 53 try: 54 self.dvoObjects = DvoObjects(self.logger, self.config, self.scratchDb.dbName) 55 except: 56 self.logger.errorPair("Unable to create instance of", "DvoObjects") 57 raise 56 58 57 59 # create an output filename, which is {dvoINDEX}.FITS … … 78 80 def alterPspsTables(self): 79 81 80 self.logger.debug("Altering PSPS tables") 82 # dec is reserved in MySQL, so STILTS replaces if with dec_, which PSPS doesn't like. so, force it back again using `` 83 self.scratchDb.execute("ALTER TABLE Object CHANGE dec_ `dec` double") 84 81 85 return True 82 86 … … 95 99 def insertMags(self, cpsTable): 96 100 97 # list of all filters we areinterested in98 allFilters = ['g', 'r', 'i', 'z', 'y']101 # list of all filters PSPS is interested in 102 interestedFilters = ['g', 'r', 'i', 'z', 'y'] 99 103 100 # this loop looks into the DVO Photcodes tables and gets the 'CODE' for each the filters above that are listed 101 filters = [] 102 for filter in allFilters: 103 code = self.scratchDb.getCodeForThisFilter(filter) 104 if code < 0: continue 105 filters.append([code, filter]) 104 filters = self.scratchDb.getOrderedListOfFiltersFromPhotcodesTable(interestedFilters) 106 105 107 106 # get a count of the available filters 108 107 filterCount = len(filters) 109 108 110 self.logger.infoPair("Available filters ", filters)109 self.logger.infoPair("Available filters in Photcodes", filters) 111 110 112 111 # the 'code' now defines the order in the cps file that the mags are listed for a given filter 112 self.logger.infoPair("Adding magnitudes from", "cps table") 113 113 for filter in filters: 114 114 115 115 sql = "UPDATE Object \ 116 JOIN " + cpsTable + " AS cps ON (cps.row = (Object.row*" + str(filterCount) + ")- " + str(filter[0]) + ") \116 JOIN " + cpsTable + " AS cps ON (cps.row = (Object.row*" + str(filterCount) + ")-(" + str(filterCount) + " - " + str(filter[0]) + ")) \ 117 117 SET \ 118 118 n" + filter[1] + " = NCODE \ … … 120 120 ," + filter[1] + "MeanFlux = 3631 * POW(10.0, (-0.4*MAG)) \ 121 121 ," + filter[1] + "MeanMagErr = MAG_ERR \ 122 ," + filter[1] + "Min = MAG_20 \123 ," + filter[1] + "Max = MAG_80 \122 ," + filter[1] + "Min = MAG_20/1000 \ 123 ," + filter[1] + "Max = MAG_80/1000 \ 124 124 " 125 125 126 self.scratchDb.execute(sql) 127 128 # now set to null all MeanMagErr values > 0.5 (cut set by Gene, 2012-04-12) 129 cut = 0.5 130 self.logger.infoPair("Setting to NULL all MeanMagErr value >", "%f" % cut) 131 for filter in filters: 132 133 sql = "UPDATE Object \ 134 SET " + filter[1] + "MeanMagErr = null \ 135 WHERE " + filter[1] + "MeanMagErr > " + str(cut) 126 136 self.scratchDb.execute(sql) 127 137 … … 131 141 def updateColors(self): 132 142 143 self.logger.infoPair("Calculating", "colors") 133 144 sql = "UPDATE Object \ 134 145 SET \ … … 147 158 self.logger.errorPair("Couldn't calculate colors", sql) 148 159 149 150 ''' 151 Does the processing, i.e. pulling stuff from IPP tables into PSPS tables 152 ''' 153 def populatePspsTables(self): 160 ''' 161 Populates the Object table 162 ''' 163 def populateObjectTable(self): 154 164 155 165 cptTableName = self.scratchDb.getDbFriendlyTableName(self.region + ".cpt") 156 166 cpsTableName = self.scratchDb.getDbFriendlyTableName(self.region + ".cps") 157 167 158 self.logger.infoPair("Inserting objects from", "cpt") 159 sql = "INSERT INTO Object (\ 168 self.logger.infoPair("Populating", "ObjectCalColor") 169 self.logger.infoPair("Inserting objects from", "cpt file") 170 171 # note `` around dec here, as this is a reserved word in MySQL 172 sql = "INSERT IGNORE INTO Object (\ 160 173 objID \ 161 174 ,ippObjID \ 162 175 ,objInfoFlag \ 176 ,varFlag \ 163 177 ,surveyID \ 164 178 ,ra \ 165 , dec_\179 ,`dec` \ 166 180 ,raErr \ 167 181 ,decErr \ 168 182 ,nDetections \ 183 ,dataRelease \ 169 184 ) \ 170 185 SELECT \ … … 172 187 ,CAT_ID*1000000000 + OBJ_ID \ 173 188 ,FLAGS \ 189 ,0 \ 174 190 ," + str(self.surveyID) + " \ 175 191 ,RA \ … … 178 194 ,DEC_ERR \ 179 195 ,NMEASURE \ 196 , " + str(self.config.dataRelease) + "\ 180 197 FROM " + cptTableName 181 198 … … 184 201 except: 185 202 self.logger.errorPair("Couldn't populate Object table", sql) 203 return False 186 204 187 205 # add row count columns so we can perform joins to get colors … … 190 208 self.scratchDb.addRowCountColumn(cpsTableName, "row") 191 209 192 self.logger.infoPair("Adding magnitudes from", "cps table")193 210 self.insertMags(cpsTableName) 194 211 195 self.logger.infoPair("Calculating", "colors")196 212 self.updateColors() 197 213 … … 205 221 return True 206 222 223 ''' 224 Populates the ObjectCalColor table 225 ''' 226 def populateObjectCalColorTable(self): 227 228 self.logger.infoPair("Populating", "ObjectCalColor") 229 230 sql = "INSERT INTO ObjectCalColor ( \ 231 objID \ 232 ,ippObjID \ 233 ,dataRelease \ 234 ) \ 235 SELECT \ 236 objID \ 237 ,ippObjID \ 238 ,dataRelease \ 239 FROM Object" 240 try: 241 self.scratchDb.execute(sql) 242 except: 243 self.logger.errorPair("Couldn't populate ObjectCalColor table", sql) 244 return False 245 246 return True 247 248 ''' 249 Does the processing, i.e. pulling stuff from IPP tables into PSPS tables 250 ''' 251 def populatePspsTables(self): 252 253 if not self.populateObjectTable(): return False 254 #if not self.populateObjectCalColorTable(): return False 255 256 # now remove the objID duplicates. We could not do this before as cpt/cps tables relate by row number 257 self.logger.infoPair("Forcing uniqueness on", "objID in Object table") 258 rowCountBefore = self.scratchDb.getRowCount("Object") 259 self.scratchDb.execute("ALTER IGNORE TABLE Object ADD UNIQUE INDEX(objID)") 260 rowCountAfter = self.scratchDb.getRowCount("Object") 261 self.logger.infoPair("Number of duplicated objIDs removed", "%d out of %d" % ((rowCountBefore - rowCountAfter), rowCountBefore)) 262 263 return True 264 -
branches/eam_branches/ipp-20120405/ippToPsps/jython/odm.py
r33559 r33948 78 78 DETAILS = doc.find("{%s}OdmBatchState/{%s}Details" % (NAMESPACE, NAMESPACE)).text 79 79 results['DETAILS'] = DETAILS 80 if re.search("processing", STATE):80 elif re.search("processing", STATE): 81 81 loadedToODM = 1 82 82 if re.search("MergeWorthy", MESSAGE): -
branches/eam_branches/ipp-20120405/ippToPsps/jython/plot.py
r33685 r33948 62 62 63 63 f.flush() 64 f.close() 64 65 #os.remove(tempFilename) 65 66 -
branches/eam_branches/ipp-20120405/ippToPsps/jython/plotter.py
r33679 r33948 39 39 Start of program 40 40 ''' 41 plotter = Plotter(sys.argv) 42 plotter.exitProgram("finished") 41 try: 42 plotter = Plotter(sys.argv) 43 plotter.exitProgram("completed") 44 except: pass -
branches/eam_branches/ipp-20120405/ippToPsps/jython/pollOdm.py
r33709 r33948 42 42 else: self.stages = [self.STAGE] 43 43 44 if self.BATCHTYPE == "all": self.batchTypes = [' P2', 'ST', 'OB']44 if self.BATCHTYPE == "all": self.batchTypes = ['IN', 'P2', 'ST', 'OB'] 45 45 else: self.batchTypes = [self.BATCHTYPE] 46 46 … … 126 126 ''' 127 127 def printUsage(self): 128 super(PollOdm, self).printUsage("< P2|ST|OB|all> <unloaded|unmergeworthy|unmerged|all> [hours]")128 super(PollOdm, self).printUsage("<IN|P2|ST|OB|all> <unloaded|unmergeworthy|unmerged|all> [hours]") 129 129 130 130 … … 132 132 Program starts here 133 133 ''' 134 pollodm = PollOdm(sys.argv) 135 pollodm.run() 136 pollodm.exitProgram("finished") 134 try: 135 pollodm = PollOdm(sys.argv) 136 pollodm.run() 137 pollodm.exitProgram("completed") 138 except: pass -
branches/eam_branches/ipp-20120405/ippToPsps/jython/queue.py
r33674 r33948 27 27 super(Queue, self).__init__(argv) 28 28 29 30 29 # create various objects 31 30 self.gpc1Db = Gpc1Db(self.logger, self.config) 32 31 self.datastore = Datastore(self.logger, self.config, self.ippToPspsDb) 33 self.dvoObjects = DvoObjects(self.logger, self.config) 32 try: 33 self.dvoObjects = DvoObjects(self.logger, self.config) 34 except: 35 self.exitProgram("Unable to create instance of DvoObject") 36 raise 34 37 35 38 self.config.printAll() … … 115 118 while dec <= self.config.maxDec: 116 119 117 self.checkClientStatus()118 120 box_id = self.ippToPspsDb.insertBox(ra, dec) 119 121 … … 134 136 self.logger.info("+-------------+-------------+-------------+-------------+") 135 137 138 self.checkClientStatus() 136 139 if not self.waitForPollTime(): break 137 140 … … 158 161 ''' 159 162 def printUsage(self): 160 super( Cleanup, self).printUsage("[<repeat time in hours>]")163 super(Queue, self).printUsage("[<repeat time in hours>]") 161 164 162 165 … … 164 167 Start of program. 165 168 ''' 166 queue = Queue(sys.argv) 167 queue.run() 168 queue.exitProgram("finished") 169 try: 170 queue = Queue(sys.argv) 171 queue.run() 172 queue.exitProgram("completed") 173 except: pass 174 -
branches/eam_branches/ipp-20120405/ippToPsps/jython/run.sh
r33717 r33948 1 ~ /jre1.7.0/bin/java -Xbootclasspath/a:../jars/stilts.jar:../jars/commons-math-2.2.jar:../jars/mysql-connector-java-5.1.14-bin.jar -jar ~/jython2.5.3b1/jython.jar $1 $2 $3 $4 $5 $6 $7 $8 $91 ~ipp/jre1.7.0_03/bin/java -Xbootclasspath/a:../jars/stilts.jar:../jars/commons-math-2.2.jar:../jars/mysql-connector-java-5.1.14-bin.jar -jar ~/jython2.5.3b1/jython.jar $1 $2 $3 $4 $5 $6 $7 $8 $9 -
branches/eam_branches/ipp-20120405/ippToPsps/jython/scratchdb.py
r33689 r33948 278 278 rs.close() 279 279 except: 280 self.logger.errorPai ("Can't query for ingested regions", sql)280 self.logger.errorPair("Can't query for ingested regions", sql) 281 281 282 282 return regions … … 408 408 self.logger.errorPair("Unable to delete " + fileType + " file from", self.dvoDoneTable) 409 409 410 sql = "DROP TABLE " + self.getDbFriendlyTableName(region + "." + fileType) 411 self.execute(sql) 410 tableName = self.getDbFriendlyTableName(region + "." + fileType) 411 sql = "DROP TABLE " + tableName 412 try: self.execute(sql) 413 except: 414 self.logger.errorPair("Unable to drop table", tableName) 415 pass 412 416 413 417 deletedDetectionCount = detectionCount - self.getRowCount(self.dvoDetectionTable) … … 540 544 541 545 ''' 542 Gets the 'code' for the provided filter 543 ''' 544 def getCodeForThisFilter(self, filter): 545 546 code = -1 547 sql = "SELECT CODE FROM " + self.dvoPhotcodesTable + " WHERE NAME = '" + filter + "'" 548 try: 549 rs = self.executeQuery(sql) 550 rs.first() 551 code = rs.getInt(1) 546 Gets a list of filters ordered as thy are in the DVO Photcodes table, as this reflects the order they apper in the cps file 547 ''' 548 def getOrderedListOfFiltersFromPhotcodesTable(self, interestedFilters): 549 550 sql = "SELECT NAME FROM " + self.dvoPhotcodesTable + " WHERE " 551 552 count = 0 553 for filter in interestedFilters: 554 if count != 0: sql = sql + " OR " 555 sql = sql + " name = '" + filter + "'" 556 count += 1 557 558 sql = sql + " ORDER BY CODE" 559 560 orderedFilters = [] 561 try: 562 rs = self.executeQuery(sql) 563 row = 1 564 while (rs.next()): 565 orderedFilters.append([row,rs.getString(1)]) 566 row += 1 552 567 rs.close() 553 568 except: 554 self.logger.errorPair("Could not get filter code using", sql )555 556 return code557 569 self.logger.errorPair("Could not get ordered filter list", sql ) 570 571 return orderedFilters 572 -
branches/eam_branches/ipp-20120405/ippToPsps/jython/setupScratchDb.py
r33589 r33948 25 25 self.exitProgram("incorrect args") 26 26 27 self.scratchDb = ScratchDb(self.logger, self.config, argv[2]) 27 try: 28 self.scratchDb = ScratchDb(self.logger, self.config, argv[2]) 29 except: 30 self.exitProgram("Could not connect to a scratch Db") 31 raise 28 32 29 33 … … 52 56 Program starts here 53 57 ''' 54 setupScratchDb = SetupScratchDb(sys.argv) 55 setupScratchDb.run() 56 setupScratchDb.exitProgram("finished") 58 try: 59 setupScratchDb = SetupScratchDb(sys.argv) 60 setupScratchDb.run() 61 setupScratchDb.exitProgram("completed") 62 except: pass 57 63 58 64 -
branches/eam_branches/ipp-20120405/ippToPsps/jython/stackbatch.py
r33530 r33948 50 50 useFullTables) 51 51 52 if not self.everythingOK: return53 54 52 self.stackType = "DEEP_STACK" # TODO 55 53 … … 57 55 meta = self.gpc1Db.getStackStageMeta(self.id) 58 56 if not meta: 59 self. everythingOK = False60 r eturn57 self.logger.errorPair("Could not get stack", "metadata") 58 raise 61 59 62 60 self.filter = meta[0]; … … 366 364 ,X_PSF_SIG \ 367 365 ,Y_PSF_SIG \ 368 ,POW(10.0, (-0.4*PSF_INST_MAG)) / " +str(self.expTime)+" \369 ,ABS((PSF_INST_MAG_SIG*(POW(10.0, (-0.4*PSF_INST_MAG)) / " +str(self.expTime)+")) / 1.085736) \370 ,POW(10.0, (-0.4*PEAK_FLUX_AS_MAG)) / " +str(self.expTime)+" \366 ,POW(10.0, (-0.4*PSF_INST_MAG)) / " + str(self.expTime) + " \ 367 ,ABS((PSF_INST_MAG_SIG*(POW(10.0, (-0.4*PSF_INST_MAG)) / " + str(self.expTime) + ")) / 1.085736) \ 368 ,POW(10.0, (-0.4*PEAK_FLUX_AS_MAG)) / " + str(self.expTime) + " \ 371 369 ,SKY \ 372 370 ,SKY_SIGMA \ … … 389 387 ,AP_MAG \ 390 388 , NULL \ 391 ,KRON_FLUX \392 ,KRON_FLUX_ERR \389 ,KRON_FLUX / " + str(self.expTime) + " \ 390 ,KRON_FLUX_ERR / " + str(self.expTime) + " \ 393 391 , NULL \ 394 392 , NULL \ -
branches/eam_branches/ipp-20120405/ippToPsps/perl/pspsSchema2xml.pl
r31759 r33948 4 4 # 5 5 # Script that searches a dir containing PSPS schema files, finds those that comtain the 6 # tables on interest then parses them into an XML format. Also generates C-header files7 # containing enums that detail table column names and numbers.6 # tables on interest then parses them into the VOTable format. Also generates trac-wiki 7 # formatted tables. 8 8 # 9 9 ####################################################################################### … … 51 51 52 52 my $enumsHeader = ucfirst($type)."BatchEnums"; 53 open(OUT, ">".$enumsHeader.".h") or die("Error");54 55 print OUT "#ifndef ".uc($enumsHeader)."_H\n";56 print OUT "#define ".uc($enumsHeader)."_H\n\n";57 58 # tables file59 my $tablesOutput = new IO::File(">tables.xml");60 my $tablesWriter = new XML::Writer(OUTPUT => $tablesOutput, DATA_MODE => 1, DATA_INDENT=>2);61 $tablesWriter->xmlDecl('UTF-8');62 $tablesWriter->startTag('tableDescriptions', "type" => "$type");63 64 # map file65 my $mapOutput = new IO::File(">map.xml");66 my $mapWriter = new XML::Writer(OUTPUT => $mapOutput, DATA_MODE => 1, DATA_INDENT=>2);67 $mapWriter->xmlDecl('UTF-8');68 $mapWriter->startTag('tabledata', "type" => "$type");69 53 70 54 # VOTable file … … 82 66 83 67 # finish up XML 84 $tablesWriter->endTag();85 $tablesWriter->end();86 87 # finish up XML88 $mapWriter->endTag();89 $mapWriter->end();90 91 # finish up XML92 68 $votWriter->endTag(); # end RESOURCE tag 93 69 $votWriter->endTag(); # end of TABLE tag 94 70 $votWriter->end(); 95 71 96 print OUT "\n#endif";97 close OUT;98 72 close WIKI; 99 73 … … 208 182 209 183 parseTable("Object"); 184 #parseTable("ObjectCalColor"); 210 185 } 211 186 … … 230 205 print WIKI "|| '''!".$tableNameOut."''' ||||||||||||||\n"; 231 206 print WIKI "|| '''ODM attribute''' || '''units''' || '''Data type''' || '''Default''' || '''Description''' || '''IPP source''' || '''IPP variable/notes''' ||\n"; 232 print OUT "\ntypedef enum {\n";233 $tablesWriter->startTag('table', "name" => $tableNameOut);234 $mapWriter->startTag('table',235 "name" => $tableNameOut,236 "ippfitsextension" => "");237 207 $votWriter->startTag('TABLE', 238 208 "name" => "$tableNameOut"); … … 287 257 288 258 if (!$found) {print "Could not find table '$tableName'\n";} 289 $tablesWriter->endTag();290 $mapWriter->endTag();291 259 292 260 $votWriter->startTag('DATA'); … … 295 263 $votWriter->endTag(); # end DATA tag 296 264 $votWriter->endTag(); # end TABLE tag 297 print OUT "} ".$tableNameOut.";\n";298 265 299 266 close SCHEMA; … … 384 351 $colNum++; 385 352 386 print OUT " ".uc($tableName)."_".uc($name)." = ".$colNum.",\n";387 353 print WIKI "|| ".$name."||".$unit."||".$mstype."||".$default."||".$comment."|| || ||\n"; 388 389 $tablesWriter->startTag('column',390 "name" => $name,391 "type" => $type,392 "default" => $default,393 "comment" => $fullComment);394 $tablesWriter->endTag();395 354 396 355 # get VOTable type … … 413 372 $votWriter->endTag(); 414 373 415 $mapWriter->comment(" **MISSING** <map pspsName=\"$name\" ippType=\"$type\" ippName=\"\" comment=\"$fullComment\"/>");416 417 # $mapWriter->endTag();418 419 374 return $colNum; 420 375 } -
branches/eam_branches/ipp-20120405/ippToPsps/src/Dvo.c
r33595 r33948 188 188 this->dvoConfig = dvoConfigRead(&argc, argv); 189 189 190 for (int i=0; i<argc; i++) free(argv[i]);191 free(argv);190 //for (int i=0; i<argc; i++) free(argv[i]); 191 //free(argv); 192 192 193 193 // method pointers -
branches/eam_branches/ipp-20120405/ippconfig
- Property svn:mergeinfo changed
/trunk/ippconfig (added) merged: 33761,33783,33789,33836-33837,33843-33844,33848,33850-33851,33856,33889,33916,33918,33929-33930,33932,33934,33937
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20120405/ippconfig/Makefile.am
r33208 r33948 3 3 isp \ 4 4 gpc1 \ 5 gpc1-tdi \ 5 6 cfh12k \ 6 7 megacam \ -
branches/eam_branches/ipp-20120405/ippconfig/cfh12k/camera.config
r26265 r33948 122 122 CMF.XSRC STR {CHIP.NAME}.xsrc # use .PSF and .EXT? 123 123 CMF.XFIT STR {CHIP.NAME}.xfit # use .PSF and .EXT? 124 CMF.XRAD STR {CHIP.NAME}.xrad # use .PSF and .EXT? 124 125 CMF.DETEFF STR {CHIP.NAME}.deteff 125 126 -
branches/eam_branches/ipp-20120405/ippconfig/configure.ac
r33211 r33948 14 14 isp/Makefile 15 15 gpc1/Makefile 16 gpc1-tdi/Makefile 16 17 cfh12k/Makefile 17 18 megacam/Makefile -
branches/eam_branches/ipp-20120405/ippconfig/esowfi/camera.config
r26265 r33948 89 89 CMF.XSRC STR {CHIP.NAME}.xsrc # use .PSF and .EXT? 90 90 CMF.XFIT STR {CHIP.NAME}.xfit # use .PSF and .EXT? 91 CMF.XRAD STR {CHIP.NAME}.xrad # use .PSF and .EXT? 91 92 CMF.DETEFF STR {CHIP.NAME}.deteff 92 93 -
branches/eam_branches/ipp-20120405/ippconfig/gpc1/ghost.model.mdc
r23814 r33948 1 # Original center models 2 # GHOST.CENTER.X METADATA 3 # NORDER_X S32 3 4 # NORDER_Y S32 3 5 # VAL_X00_Y00 F64 -4.421024e+01 6 # VAL_X01_Y00 F64 1.216270e-02 7 # VAL_X02_Y00 F64 -9.721643e-08 8 # VAL_X03_Y00 F64 9.976554e-11 9 # VAL_X00_Y01 F64 -1.762476e-03 10 # VAL_X01_Y01 F64 1.247212e-07 11 # VAL_X02_Y01 F64 3.629557e-11 12 # VAL_X00_Y02 F64 -1.040174e-07 13 # VAL_X01_Y02 F64 1.074674e-10 14 # VAL_X00_Y03 F64 1.564112e-11 15 # NELEMENTS S32 10 16 # END 17 18 # GHOST.CENTER.Y METADATA 19 # NORDER_X S32 3 20 # NORDER_Y S32 3 21 # VAL_X00_Y00 F64 -2.189470e+00 22 # VAL_X01_Y00 F64 -4.186514e-03 23 # VAL_X02_Y00 F64 1.131554e-07 24 # VAL_X03_Y00 F64 1.415192e-11 25 # VAL_X00_Y01 F64 1.569104e-02 26 # VAL_X01_Y01 F64 -1.782801e-07 27 # VAL_X02_Y01 F64 8.179602e-11 28 # VAL_X00_Y02 F64 2.577055e-07 29 # VAL_X01_Y02 F64 8.879423e-11 30 # VAL_X00_Y03 F64 5.767429e-11 31 # NELEMENTS S32 10 32 # END 33 34 # Updated models of 2012-05-07 35 # Corrected(?) parity 36 # GHOST.CENTER.X METADATA 37 # NORDER_X S32 3 38 # NORDER_Y S32 3 39 # VAL_X00_Y00 F64 3.314569e+01 40 # VAL_X01_Y00 F64 1.110664e-02 41 # VAL_X02_Y00 F64 -1.904158e-07 42 # VAL_X03_Y00 F64 8.470224e-11 43 # VAL_X00_Y01 F64 -1.616877e-03 44 # VAL_X01_Y01 F64 1.646508e-07 45 # VAL_X02_Y01 F64 5.623381e-11 46 # VAL_X00_Y02 F64 -2.342888e-07 47 # VAL_X01_Y02 F64 1.023761e-10 48 # VAL_X00_Y03 F64 2.836980e-11 49 # NELEMENTS S32 10 50 # END 51 52 # GHOST.CENTER.Y METADATA 53 # NORDER_X S32 3 54 # NORDER_Y S32 3 55 # VAL_X00_Y00 F64 -2.860068e+01 56 # VAL_X01_Y00 F64 -8.790076e-03 57 # VAL_X02_Y00 F64 2.456534e-07 58 # VAL_X03_Y00 F64 2.947749e-11 59 # VAL_X00_Y01 F64 1.948855e-02 60 # VAL_X01_Y01 F64 -2.639927e-07 61 # VAL_X02_Y01 F64 4.951474e-11 62 # VAL_X00_Y02 F64 4.341716e-07 63 # VAL_X01_Y02 F64 1.643046e-10 64 # VAL_X00_Y03 F64 -1.737983e-12 65 # NELEMENTS S32 10 66 # END 67 68 # Switched order 1 69 GHOST.CENTER.X METADATA 2 70 NORDER_X S32 3 3 71 NORDER_Y S32 3 4 VAL_X00_Y00 F64 - 4.421024e+015 VAL_X01_Y00 F64 1.216270e-026 VAL_X02_Y00 F64 - 9.721643e-087 VAL_X03_Y00 F64 9.976554e-118 VAL_X00_Y01 F64 -1. 762476e-039 VAL_X01_Y01 F64 1.247212e-0710 VAL_X02_Y01 F64 3.629557e-1111 VAL_X00_Y02 F64 -1.040174e-0712 VAL_X01_Y02 F64 1.074674e-1013 VAL_X00_Y03 F64 1.564112e-1172 VAL_X00_Y00 F64 -1.215661e+02 73 VAL_X01_Y00 F64 1.321875e-02 74 VAL_X02_Y00 F64 -4.017026e-09 75 VAL_X03_Y00 F64 1.148288e-10 76 VAL_X00_Y01 F64 -1.908074e-03 77 VAL_X01_Y01 F64 8.479150e-08 78 VAL_X02_Y01 F64 1.635732e-11 79 VAL_X00_Y02 F64 2.625405e-08 80 VAL_X01_Y02 F64 1.125586e-10 81 VAL_X00_Y03 F64 2.912432e-12 14 82 NELEMENTS S32 10 15 83 END … … 18 86 NORDER_X S32 3 19 87 NORDER_Y S32 3 20 VAL_X00_Y00 F64 -2.189470e+0021 VAL_X01_Y00 F64 -4.186514e-0322 VAL_X02_Y00 F64 1.131554e-0723 VAL_X03_Y00 F64 1.415192e-1124 VAL_X00_Y01 F64 1.569104e-0225 VAL_X01_Y01 F64 - 1.782801e-0726 VAL_X02_Y01 F64 8.179602e-1127 VAL_X00_Y02 F64 2.577055e-0728 VAL_X01_Y02 F64 8.879423e-1129 VAL_X00_Y03 F64 5.767429e-1188 VAL_X00_Y00 F64 2.422174e+01 89 VAL_X01_Y00 F64 4.170486e-04 90 VAL_X02_Y00 F64 -1.934260e-08 91 VAL_X03_Y00 F64 -1.173657e-12 92 VAL_X00_Y01 F64 1.189352e-02 93 VAL_X01_Y01 F64 -9.256748e-08 94 VAL_X02_Y01 F64 1.140772e-10 95 VAL_X00_Y02 F64 8.123932e-08 96 VAL_X01_Y02 F64 1.328378e-11 97 VAL_X00_Y03 F64 1.170865e-10 30 98 NELEMENTS S32 10 31 99 END 32 100 101 102 103 # These are semi-major/minor axes 104 # These are my (CZW) quadratic solutions 105 # GHOST.INNER.MAJOR METADATA 106 # NORDER_X S32 2 107 # VAL_X00 F64 2.2622e+01 108 # VAL_X01 F64 1.3822e-02 109 # VAL_X02 F64 -3.7005e-07 110 # NELEMENTS S32 3 111 # END 112 113 # GHOST.INNER.MINOR METADATA 114 # NORDER_X S32 2 115 # VAL_X00 F64 4.9626e+01 116 # VAL_X01 F64 -2.4257e-04 117 # VAL_X02 F64 -1.2007e-07 118 # NELEMENTS S32 3 119 # END 120 121 # GHOST.OUTER.MAJOR METADATA 122 # NORDER_X S32 2 123 # VAL_X00 F64 9.6490e+01 124 # VAL_X01 F64 9.4250e-03 125 # VAL_X02 F64 6.5680e-07 126 # NELEMENTS S32 3 127 # END 128 129 # GHOST.OUTER.MINOR METADATA 130 # NORDER_X S32 2 131 # VAL_X00 F64 9.5450e+01 132 # VAL_X01 F64 2.8775e-03 133 # VAL_X02 F64 -3.1409e-07 134 # NELEMENTS S32 3 135 # END 136 137 # These are the original linear solutions 33 138 GHOST.INNER.MAJOR METADATA 34 139 NORDER_X S32 1 -
branches/eam_branches/ipp-20120405/ippconfig/gpc1/ppImage.config
r33642 r33948 25 25 NOISEMAP BOOL FALSE # Apply read noise map 26 26 27 27 # Final detrending options 28 HAS.VIDEO BOOL FALSE # Treat this OTA as if it has video data 29 USE.VIDEO.DARK BOOL FALSE # Use a video dark if we have video data? 30 USE.VIDEO.MASK BOOL TRUE # Use a video mask if we have video data? 28 31 29 32 -
branches/eam_branches/ipp-20120405/ippconfig/gpc1/psastro.config
r33668 r33948 113 113 114 114 # *** make sure the choice of CATDIR (dvo database) contains the photcodes desired below 115 PSASTRO.CATDIR STR SYNTH.GRIZY 115 # PSASTRO.CATDIR STR SYNTH.GRIZY 116 PSASTRO.CATDIR STR PS1.REF.20120503 117 116 118 DVO.GETSTAR.PHOTCODE STR i 117 119 DVO.GETSTAR.MAX.RHO F32 3000.0 … … 130 132 ZEROPT F32 24.563 131 133 PHOTCODE STR g 132 GHOST_MAX_MAG F32 - 20.0134 GHOST_MAX_MAG F32 -16.5 133 135 END 134 136 PHOTCODE.DATA METADATA … … 346 348 PSASTRO.MATCH.FIT.NITER S32 5 347 349 348 PSASTRO.CATDIR STR STS.PP5.REFCAT 350 # CATDIR with PS1 astrometry from PP5 pointing. Only works for that field 351 # PSASTRO.CATDIR STR STS.PP5.REFCAT 349 352 END 350 353 351 354 DEFAULT_RECIPE METADATA 352 PSASTRO.CATDIR STR PS1.REF.20120 325355 PSASTRO.CATDIR STR PS1.REF.20120503 353 356 ZERO.POINT.USE.MEAN BOOL TRUE 354 357 END … … 356 359 LAP_ASTRO METADATA 357 360 # PSASTRO.CATDIR STR 3PI.20110505.REFCAT 358 PSASTRO.CATDIR STR SYNTH.GRIZY 359 END 361 # PSASTRO.CATDIR STR SYNTH.GRIZY 362 PSASTRO.CATDIR STR PS1.REF.20120503 363 ZERO.POINT.USE.MEAN BOOL TRUE 364 END 365 366 SYNTH_CAT METADATA 367 PSASTRO.CATDIR STR SYNTH.GRIZY 368 END 369 370 TEST_REFCAT METADATA 371 PSASTRO.CATDIR STR /data/ipp064.0/ipp/ippRefs/catdir.refcat.20120524.v0 372 END -
branches/eam_branches/ipp-20120405/ippconfig/isp/camera.config
r30120 r33948 62 62 CMF.XSRC STR {CHIP.NAME}.xsrc # use .PSF and .EXT? 63 63 CMF.XFIT STR {CHIP.NAME}.xfit # use .PSF and .EXT? 64 CMF.XRAD STR {CHIP.NAME}.xrad # use .PSF and .EXT? 64 65 CMF.DETEFF STR {CHIP.NAME}.deteff 65 66 -
branches/eam_branches/ipp-20120405/ippconfig/lulin/camera.config
r26265 r33948 63 63 CMF.XSRC STR {CHIP.NAME}.xsrc # use .PSF and .EXT? 64 64 CMF.XFIT STR {CHIP.NAME}.xfit # use .PSF and .EXT? 65 CMF.XRAD STR {CHIP.NAME}.xrad # use .PSF and .EXT? 65 66 CMF.DETEFF STR {CHIP.NAME}.deteff 66 67 -
branches/eam_branches/ipp-20120405/ippconfig/megacam/camera.config
r33713 r33948 137 137 CMF.XSRC STR {CHIP.NAME}.xsrc # use .PSF and .EXT? 138 138 CMF.XFIT STR {CHIP.NAME}.xfit # use .PSF and .EXT? 139 CMF.XRAD STR {CHIP.NAME}.xrad # use .PSF and .EXT? 139 140 CMF.DETEFF STR {CHIP.NAME}.deteff 140 141 -
branches/eam_branches/ipp-20120405/ippconfig/mosaic2/camera.config
r25756 r33948 90 90 CMF.XSRC STR {CHIP.NAME}.xsrc # use .PSF and .EXT? 91 91 CMF.XFIT STR {CHIP.NAME}.xfit # use .PSF and .EXT? 92 CMF.XRAD STR {CHIP.NAME}.xrad # use .PSF and .EXT? 92 93 CMF.DETEFF STR {CHIP.NAME}.deteff 93 94 -
branches/eam_branches/ipp-20120405/ippconfig/recipes/filerules-mef.mdc
r33636 r33948 59 59 PPIMAGE.INPUT.SRC INPUT @FILES CHIP CMF 60 60 PPIMAGE.MASK INPUT @DETDB CHIP MASK 61 PPIMAGE.VIDEOMASK INPUT @DETDB CHIP MASK 61 62 PPIMAGE.BIAS INPUT @DETDB CHIP IMAGE 62 63 PPIMAGE.DARK INPUT @DETDB CHIP DARK 64 PPIMAGE.VIDEODARK INPUT @DETDB CHIP DARK 63 65 PPIMAGE.FLAT INPUT @DETDB CHIP IMAGE 64 66 PPIMAGE.FRINGE INPUT @DETDB CHIP FRINGE -
branches/eam_branches/ipp-20120405/ippconfig/recipes/filerules-simple.mdc
r33636 r33948 23 23 PPIMAGE.INPUT.SRC INPUT @FILES READOUT CMF 24 24 PPIMAGE.MASK INPUT @DETDB CHIP MASK 25 PPIMAGE.VIDEOMASK INPUT @DETDB CHIP MASK 25 26 PPIMAGE.BIAS INPUT @DETDB CHIP IMAGE 26 27 PPIMAGE.DARK INPUT @DETDB CHIP DARK 28 PPIMAGE.VIDEODARK INPUT @DETDB CHIP DARK 27 29 PPIMAGE.FLAT INPUT @DETDB CHIP IMAGE 28 30 PPIMAGE.FRINGE INPUT @DETDB CHIP FRINGE -
branches/eam_branches/ipp-20120405/ippconfig/recipes/filerules-split.mdc
r33690 r33948 36 36 PPIMAGE.INPUT INPUT @FILES CHIP IMAGE 37 37 PPIMAGE.INPUT.MASK INPUT @FILES CHIP MASK 38 PPIMAGE.VIDEOMASK INPUT @DETDB CHIP MASK 38 39 PPIMAGE.INPUT.VARIANCE INPUT @FILES CHIP VARIANCE 39 40 PPIMAGE.INPUT.PSF INPUT @FILES CHIP PSF … … 43 44 PPIMAGE.NOISEMAP INPUT @DETDB CHIP IMAGE 44 45 PPIMAGE.DARK INPUT @DETDB CHIP DARK 46 PPIMAGE.VIDEODARK INPUT @DETDB CHIP DARK 45 47 PPIMAGE.FLAT INPUT @DETDB CHIP IMAGE 46 48 PPIMAGE.FRINGE INPUT @DETDB CHIP FRINGE -
branches/eam_branches/ipp-20120405/ippconfig/recipes/ppImage.config
r33642 r33948 153 153 154 154 GAIN.OVERRIDE BOOL FALSE # Override a non-finite gain? 155 156 # Final detrending options 157 HAS.VIDEO BOOL FALSE # Treat this OTA as if it has video data 158 USE.VIDEO.DARK BOOL FALSE # Use a video dark if we have video data? 159 USE.VIDEO.MASK BOOL FALSE # Use a video mask if we have video data? 155 160 156 161 DETREND.CONSTRAINTS METADATA -
branches/eam_branches/ipp-20120405/ippconfig/recipes/psastro.config
r32950 r33948 254 254 END 255 255 256 LAP_ASTRO METADATA 257 256 LAP_ASTRO METADATA 257 END 258 259 SYNTH_CAT METADATA 260 END 261 262 TEST_REFCAT METADATA 258 263 END 259 264 -
branches/eam_branches/ipp-20120405/ippconfig/recipes/psphot.config
r33642 r33948 38 38 SKY_CLIP_SIGMA F32 2.0 # statistic used to measure background 39 39 SKY_SIG F32 1.0 # optional sky error for 40 SKY_SLOPE_MIN F32 3.0 # exit radial profile loop when abs(slope) is less than this 40 41 41 42 # allowed values for SKY_STAT: … … 57 58 PEAKS_POS2_NSIGMA_LIMIT F32 25.0 # peak signficance threshold for POS2 sources. (ppSub) 58 59 # input pixels contribute less than this fraction of the flux 60 PEAKS_NMAX_TOTAL S32 0 # maximum allowed number of peaks 0 == unlimited 61 59 62 # parameters which adjust the footprint analysis 60 63 USE_FOOTPRINTS BOOL TRUE # use new pmFootprint peak packaging … … 65 68 FOOTPRINT_CULL_NSIGMA_MIN F32 1 # Minimum height of colls in units of skyStdev 66 69 FOOTPRINT_CULL_NSIGMA_PAD F32 0.01 # Fractional Padding for stdev 70 FOOTPRINT_USE_UNSUBTRACTED BOOL TRUE # find footprints without sources subtracted 67 71 68 72 # parameter for the simple deblending … … 186 190 187 191 KRON_ITERATIONS S32 2 192 KRON_APPLY_WEIGHT BOOL FALSE 193 KRON_APPLY_WINDOW BOOL FALSE 194 KRON_SMOOTH BOOL FALSE 195 KRON_SMOOTH_SIGMA F32 1.7 196 KRON_SMOOTH_NSIGMA S32 2 188 197 189 198 # Extended source fit parameters … … 368 377 PSF_MODEL STR PS_MODEL_GAUSS 369 378 EXT_MODEL STR PS_MODEL_QGAUSS 379 PEAKS_NMAX_TOTAL S32 50000 # maximum allowed number of peaks - To avoid memory explosion 370 380 END 371 381 -
branches/eam_branches/ipp-20120405/ippconfig/recipes/reductionClasses.mdc
- Property svn:mergeinfo changed
/trunk/ippconfig/recipes/reductionClasses.mdc (added) merged: 33916,33930,33932,33937
r33642 r33948 225 225 BACKGROUND_PSWARP STR BACKGROUND 226 226 END 227 228 DEFAULT_SYNTHCAT METADATA 229 CHIP_PPIMAGE STR CHIP 230 CHIP_PSPHOT STR CHIP 231 WARP_PSWARP STR WARP 232 STACK_PPSTACK STR STACK 233 STACK_PPSUB STR STACK 234 STACK_PSPHOT STR STACK 235 DIFF_PPSUB STR DIFF 236 DIFF_PSPHOT STR DIFF 237 JPEG_BIN1 STR PPIMAGE_J1 238 JPEG_BIN2 STR PPIMAGE_J2 239 FAKEPHOT STR FAKEPHOT 240 ADDSTAR STR ADDSTAR 241 PSASTRO STR SYNTH_CAT 242 STACKPHOT_PSPHOT STR STACKPHOT 243 STACKPHOT_PPSUB STR STACKPHOT 244 STACKPHOT_PPSTACK STR STACKPHOT 245 STACKPHOT_SINGLE_PSPHOT STR STACKPHOT_SINGLE 246 BACKGROUND_PPBACKGROUND STR BACKGROUND 247 BACKGROUND_PSWARP STR BACKGROUND 248 PSVIDEOPHOT STR PSVIDEOPHOT 249 STATICSKY_CALIBRATION STR STATICSKY_CAL 250 END 251 227 252 228 253 # Sweetspot reduction class … … 933 958 END 934 959 960 CNP_DATASET METADATA 961 CHIP_PPIMAGE STR CHIP 962 CHIP_PSPHOT STR CHIP 963 WARP_PSWARP STR WARP 964 STACK_PPSTACK STR STACK 965 STACK_PPSUB STR STACK 966 STACK_PSPHOT STR STACK 967 DIFF_PPSUB STR DIFF 968 DIFF_PSPHOT STR DIFF 969 JPEG_BIN1 STR PPIMAGE_J1 970 JPEG_BIN2 STR PPIMAGE_J2 971 FAKEPHOT STR FAKEPHOT 972 ADDSTAR STR ADDSTAR 973 PSASTRO STR CNP_DATASET 974 STACKPHOT_PSPHOT STR STACKPHOT 975 STACKPHOT_PPSUB STR STACKPHOT 976 STACKPHOT_PPSTACK STR STACKPHOT 977 STACKPHOT_SINGLE_PSPHOT STR STACKPHOT_SINGLE 978 BACKGROUND_PPBACKGROUND STR BACKGROUND 979 BACKGROUND_PSWARP STR BACKGROUND 980 PSVIDEOPHOT STR PSVIDEOPHOT 981 STATICSKY_CALIBRATION STR STATICSKY_CAL 982 END 983 935 984 # random user tests (may not be stable or consistent) 936 985 TEST1 METADATA … … 952 1001 END 953 1002 1003 TEST_REFCAT METADATA 1004 CHIP_PPIMAGE STR CHIP 1005 CHIP_PSPHOT STR CHIP 1006 WARP_PSWARP STR WARP 1007 STACK_PPSTACK STR STACK 1008 STACK_PPSUB STR STACK 1009 STACK_PSPHOT STR STACK 1010 DIFF_PPSUB STR DIFF 1011 DIFF_PSPHOT STR DIFF 1012 JPEG_BIN1 STR PPIMAGE_J1 1013 JPEG_BIN2 STR PPIMAGE_J2 1014 FAKEPHOT STR FAKEPHOT 1015 ADDSTAR STR ADDSTAR 1016 PSASTRO STR TEST_REFCAT 1017 STACKPHOT_PSPHOT STR STACKPHOT 1018 STACKPHOT_PPSUB STR STACKPHOT 1019 STACKPHOT_PPSTACK STR STACKPHOT 1020 STACKPHOT_SINGLE_PSPHOT STR STACKPHOT_SINGLE 1021 BACKGROUND_PPBACKGROUND STR BACKGROUND 1022 BACKGROUND_PSWARP STR BACKGROUND 1023 PSVIDEOPHOT STR PSVIDEOPHOT 1024 STATICSKY_CALIBRATION STR STATICSKY_CAL 1025 END 1026 - Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20120405/ippconfig/sdssmosaic/camera.config
r26265 r33948 93 93 CMF.XSRC STR cmf.xsrc 94 94 CMF.XFIT STR cmf.xfit 95 CMF.XRAD STR cmf.xrad # use .PSF and .EXT? 95 96 CMF.DETEFF STR cmf.deteff 96 97 -
branches/eam_branches/ipp-20120405/ippconfig/simmosaic/camera.config
r26265 r33948 72 72 CMF.XSRC STR {CHIP.NAME}.xsrc # use .PSF and .EXT? 73 73 CMF.XFIT STR {CHIP.NAME}.xfit # use .PSF and .EXT? 74 CMF.XRAD STR {CHIP.NAME}.xrad # use .PSF and .EXT? 74 75 CMF.DETEFF STR {CHIP.NAME}.deteff 75 76 -
branches/eam_branches/ipp-20120405/ippconfig/simple/camera.config
r26265 r33948 58 58 CMF.DATA STR psf 59 59 CMF.XSRC STR xsrc 60 CMF.XRAD STR xrad 60 61 CMF.XFIT STR xfit 61 62 CMF.DETEFF STR deteff -
branches/eam_branches/ipp-20120405/ippconfig/ssp/camera.config
r33208 r33948 59 59 CMF.XSRC STR xsrc 60 60 CMF.XFIT STR xfit 61 CMF.XRAD STR xrad 61 62 CMF.DETEFF STR deteff 62 63 -
branches/eam_branches/ipp-20120405/ippconfig/ssp/format.config
r33208 r33948 5 5 SIMPLE BOOL TRUE 6 6 ### NAXIS S32 2 7 DETECTOR STR rspiusb0 7 8 END 8 9 -
branches/eam_branches/ipp-20120405/ippconfig/system.config
r33208 r33948 10 10 SDSS STR sdss/camera.config # Sloan Digital Sky Survey 11 11 GPC1 STR gpc1/camera.config # Pan-STARRS GPC1 12 GPC1-TDI STR gpc1-tdi/camera.config # Pan-STARRS GPC1 with TDI guiding 12 13 ESOWFI STR esowfi/camera.config # ESO Wide-Field Imager 13 14 LBCRED STR lbc_red/camera.config # Large Binocular Camera Red -
branches/eam_branches/ipp-20120405/ippconfig/tek/camera.config
r26265 r33948 60 60 CMF.XSRC STR {CHIP.NAME}.xsrc # use .PSF and .EXT? 61 61 CMF.XFIT STR {CHIP.NAME}.xfit # use .PSF and .EXT? 62 CMF.XRAD STR {CHIP.NAME}.xrad # use .PSF and .EXT? 62 63 CMF.DETEFF STR {CHIP.NAME}.deteff 63 64 -
branches/eam_branches/ipp-20120405/ippconfig/uh8k/camera.config
r26265 r33948 70 70 CMF.XSRC STR {CHIP.NAME}.xsrc # use .PSF and .EXT? 71 71 CMF.XFIT STR {CHIP.NAME}.xfit # use .PSF and .EXT? 72 CMF.XRAD STR {CHIP.NAME}.xrad # use .PSF and .EXT? 72 73 CMF.DETEFF STR {CHIP.NAME}.deteff 73 74 -
branches/eam_branches/ipp-20120405/ippconfig/vysos20/camera.config
r26265 r33948 63 63 CMF.XSRC STR {CHIP.NAME}.xsrc # use .PSF and .EXT? 64 64 CMF.XFIT STR {CHIP.NAME}.xfit # use .PSF and .EXT? 65 CMF.XRAD STR {CHIP.NAME}.xrad # use .PSF and .EXT? 65 66 CMF.DETEFF STR {CHIP.NAME}.deteff 66 67 -
branches/eam_branches/ipp-20120405/ippconfig/vysos5/camera.config
r26265 r33948 63 63 CMF.XSRC STR {CHIP.NAME}.xsrc # use .PSF and .EXT? 64 64 CMF.XFIT STR {CHIP.NAME}.xfit # use .PSF and .EXT? 65 CMF.XRAD STR {CHIP.NAME}.xrad # use .PSF and .EXT? 65 66 CMF.DETEFF STR {CHIP.NAME}.deteff 66 67 -
branches/eam_branches/ipp-20120405/pstamp/scripts
- Property svn:mergeinfo changed
/trunk/pstamp/scripts (added) merged: 33927
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20120405/pstamp/scripts/pstamp_cleanup.pl
r32785 r33948 42 42 'name=s' => \$name, 43 43 'outdir=s' => \$outdir, 44 'reqType=s' => \$reqType,44 'reqType=s' => \$reqType, 45 45 'product=s' => \$product, 46 46 'uri=s' => \$uri, 47 'outdir=s' => \$outdir,48 47 'redirect-output' => \$redirect_output, 49 48 'verbose' => \$verbose, … … 82 81 83 82 my_die("Cleanup not yet supported for reqType: $reqType", $req_id, $PS_EXIT_UNKNOWN_ERROR) 84 if ($reqType ne "pstamp") and ($reqType ne "NULL") ;83 if ($reqType ne "pstamp") and ($reqType ne "NULL") and ($reqType ne "dquery"); 85 84 86 85 my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files -
branches/eam_branches/ipp-20120405/psvideophot
- Property svn:mergeinfo changed (with no actual effect on merging)
Note:
See TracChangeset
for help on using the changeset viewer.
