- Timestamp:
- Jul 18, 2015, 9:55:43 PM (11 years ago)
- Location:
- trunk/ippToPsps
- Files:
-
- 17 edited
-
config/tables.DF.vot (modified) (1 diff)
-
config/tables.FW.vot (modified) (1 diff)
-
config/tables.P2.vot (modified) (1 diff)
-
config/tables.ST.vot (modified) (5 diffs)
-
jython/batch.py (modified) (2 diffs)
-
jython/detectionbatch.py (modified) (4 diffs)
-
jython/diffbatch.py (modified) (5 diffs)
-
jython/forcedwarpbatch.py (modified) (1 diff)
-
jython/stackbatch.py (modified) (1 diff)
-
pspsschema/SchemaNew21.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/Detection (modified) (1 diff)
-
pspsschema/SchemaNew21.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/Detection.txt (modified) (1 diff)
-
pspsschema/SchemaNew21.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/DiffDetection (modified) (1 diff)
-
pspsschema/SchemaNew21.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/DiffDetection.txt (modified) (1 diff)
-
pspsschema/SchemaNew21.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/ForcedWarpMeasurement (modified) (1 diff)
-
pspsschema/SchemaNew21.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/ForcedWarpMeasurement.txt (modified) (1 diff)
-
pspsschema/SchemaNew21.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/StackObjectThin (modified) (1 diff)
-
pspsschema/SchemaNew21.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/StackObjectThin.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/config/tables.DF.vot
r38397 r38602 283 283 <DESCRIPTION>flag indicating provenance information</DESCRIPTION> 284 284 </FIELD> 285 <FIELD name="infoFlag3" arraysize="1" datatype="long" unit="dimensionless" default="-999"> 286 <DESCRIPTION>flag indicating provenance information</DESCRIPTION> 287 </FIELD> 285 288 <FIELD name="dataRelease" arraysize="1" datatype="unsignedByte" unit="dimensionless" default="NA"> 286 289 <DESCRIPTION>Data release when this detection was originally taken. Recalibrations do not affect this value.</DESCRIPTION> -
trunk/ippToPsps/config/tables.FW.vot
r38397 r38602 251 251 <DESCRIPTION>combination of cmf and dvo flags</DESCRIPTION> 252 252 </FIELD> 253 <FIELD name="infoFlag3" arraysize="1" datatype="long" unit="dimensionless" default="-999"> 254 <DESCRIPTION>combination of cmf and dvo flags</DESCRIPTION> 255 </FIELD> 253 256 <FIELD name="dataRelease" arraysize="1" datatype="unsignedByte" unit="dimensionless" default="NA"> 254 257 <DESCRIPTION>Data release when this detection was originally taken. Recalibrations do not affect this value.</DESCRIPTION> -
trunk/ippToPsps/config/tables.P2.vot
r38397 r38602 548 548 <DESCRIPTION>flag indicating provenance information</DESCRIPTION> 549 549 </FIELD> 550 <FIELD name="infoFlag3" arraysize="1" datatype="int" unit="dimensionless" default="-999"> 551 <DESCRIPTION>flag indicating provenance information</DESCRIPTION> 552 </FIELD> 550 553 <FIELD name="dataRelease" arraysize="1" datatype="unsignedByte" unit="dimensionless" default="NA"> 551 554 <DESCRIPTION>Data release when this detection was originally taken. Recalibrations do not affect this value.</DESCRIPTION> -
trunk/ippToPsps/config/tables.ST.vot
r38397 r38602 213 213 <DESCRIPTION>informational bits</DESCRIPTION> 214 214 </FIELD> 215 <FIELD name="ginfoFlag3" arraysize="1" datatype="int" unit="dimensionless" default="0"> 216 <DESCRIPTION>informational bits</DESCRIPTION> 217 </FIELD> 215 218 <FIELD name="gnFrames" arraysize="1" datatype="int" unit="dimensionless" default="-999"> 216 219 <DESCRIPTION>number of frames contributing to source</DESCRIPTION> … … 263 266 <DESCRIPTION>informational bits</DESCRIPTION> 264 267 </FIELD> 268 <FIELD name="rinfoFlag3" arraysize="1" datatype="int" unit="dimensionless" default="0"> 269 <DESCRIPTION>informational bits</DESCRIPTION> 270 </FIELD> 265 271 <FIELD name="rnFrames" arraysize="1" datatype="int" unit="dimensionless" default="-999"> 266 272 <DESCRIPTION>number of frames contributing to source</DESCRIPTION> … … 313 319 <DESCRIPTION>informational bits</DESCRIPTION> 314 320 </FIELD> 321 <FIELD name="iinfoFlag3" arraysize="1" datatype="int" unit="dimensionless" default="0"> 322 <DESCRIPTION>informational bits</DESCRIPTION> 323 </FIELD> 315 324 <FIELD name="inFrames" arraysize="1" datatype="int" unit="dimensionless" default="-999"> 316 325 <DESCRIPTION>number of frames contributing to source</DESCRIPTION> … … 363 372 <DESCRIPTION>informational bits</DESCRIPTION> 364 373 </FIELD> 374 <FIELD name="zinfoFlag3" arraysize="1" datatype="int" unit="dimensionless" default="0"> 375 <DESCRIPTION>informational bits</DESCRIPTION> 376 </FIELD> 365 377 <FIELD name="znFrames" arraysize="1" datatype="int" unit="dimensionless" default="-999"> 366 378 <DESCRIPTION>number of frames contributing to source</DESCRIPTION> … … 411 423 </FIELD> 412 424 <FIELD name="yinfoFlag2" arraysize="1" datatype="int" unit="dimensionless" default="0"> 425 <DESCRIPTION>informational bits</DESCRIPTION> 426 </FIELD> 427 <FIELD name="yinfoFlag3" arraysize="1" datatype="int" unit="dimensionless" default="0"> 413 428 <DESCRIPTION>informational bits</DESCRIPTION> 414 429 </FIELD> -
trunk/ippToPsps/jython/batch.py
r37754 r38602 414 414 ''' 415 415 def createEmptyPspsTables(self): 416 416 print "THIS SUCKS" 417 417 self.pspsTables = stilts.treads(self.pspsVoTableFilePath) 418 418 for table in self.pspsTables: 419 419 self.logger.debug("Creating PSPS table: " + table.name) 420 self.logger.infoPair("creating psps table ",table.name) 420 421 table.write(self.scratchDb.url + '#' + table.name) 421 422 self.tablesToExport.append(table.name) … … 592 593 593 594 # creates the empty PSPS tables 595 self.logger.infoPair("creating","empty psps tables") 594 596 if not self.createEmptyPspsTables(): 595 597 self.logger.errorPair("Aborting this batch", "could not create empty PSPS tables") -
trunk/ippToPsps/jython/detectionbatch.py
r38397 r38602 413 413 sqlLine.group("ippDetectID", "IPP_IDET") 414 414 # sqlLine.group("randomDetID", "FLOOR(RAND("+str(self.batchID)+")*9223372036854775807)") 415 sqlLine.group("randomDetID", " (RAND("+str(self.batchID)+")")415 sqlLine.group("randomDetID", "RAND("+str(self.batchID)+")") 416 416 sqlLine.group("filterID", str(self.filterID)) 417 417 sqlLine.group("surveyID", str(self.surveyID)) … … 672 672 ''' 673 673 def updateDvoIDs(self, table, externID): 674 674 self.logger.info("getting imge id") 675 675 imageID = self.scratchDb.getImageIDFromExternID(externID) 676 self.logger. debug("Updating table '" + table + "' with DVO IDs using imageID = %d" % imageID)676 self.logger.info("Updating table '" + table + "' with DVO IDs using imageID = %d" % imageID) 677 677 678 678 sql = "UPDATE IGNORE " + table + " AS a, " + self.scratchDb.dvoDetectionTable + " AS b SET \ … … 686 686 a.telluricExt = b.telluricExt, \ 687 687 a.airmass = b.airmass, \ 688 a. expTime = b.expTime, \689 a. infoFlag2 = (b.flags << 13) | a.infoFlag2\688 a.infoFlag3 = b.flags, \ 689 a.expTime = b.expTime \ 690 690 WHERE a.ippDetectID = b.ippDetectID \ 691 691 AND b.imageID = " + str(imageID) 692 692 693 try: self.scratchDb.execute(sql) 694 except: 695 self.logger.InfoPair("failed sql",sql) 693 print sql 694 try: self.scratchDb.execute(sql) 695 except: 696 self.logger.infoPair("failed sql",sql) 696 697 raise 697 698 ''' … … 740 741 #detection has a primary index, so don't add, use this one 741 742 self.scratchDb.addRowCountColumnNoKey("Detection_"+chipname, "row") 743 self.logger.info("added row") 742 744 self.updateDvoIDs("Detection_" + chipname, self.imageIDs[chipname]) 743 #self.logger.info("updated dvoids")745 self.logger.info("updated dvoids") 744 746 results['NULLOBJID'] = self.scratchDb.reportAndDeleteRowsWithNULLS("Detection_" + chipname, "objID") 745 #self.logger.info("deleted nulls")747 self.logger.info("deleted nulls") 746 748 747 749 ota = x*10+y -
trunk/ippToPsps/jython/diffbatch.py
r38397 r38602 163 163 164 164 # make some generic tables 165 sql = "CREATE TABLE DiffMeta_"+str(num)+" like DiffMeta"166 try: self.scratchDb.execute(sql)167 except: raise168 sql = "CREATE TABLE DiffToImage_"+str(num)+" like DiffToImage"169 try: self.scratchDb.execute(sql)170 except: raise171 sql = "CREATE TABLE DiffDetection_"+str(num)+" like DiffDetection"172 try: self.scratchDb.execute(sql)173 except: raise165 #sql = "CREATE TABLE DiffMeta_"+str(num)+" like DiffMeta" 166 #try: self.scratchDb.execute(sql) 167 #except: raise 168 #sql = "CREATE TABLE DiffToImage_"+str(num)+" like DiffToImage" 169 #try: self.scratchDb.execute(sql) 170 #except: raise 171 #sql = "CREATE TABLE DiffDetection_"+str(num)+" like DiffDetection" 172 #try: self.scratchDb.execute(sql) 173 #except: raise 174 174 175 175 … … 199 199 diffSkyFileID = self.number[num] 200 200 self.logger.infoPair("Proccesing table", "DiffMeta_"+str(num)) 201 202 sql = "CREATE TABLE DiffMeta_"+str(num)+" like DiffMeta" 203 try: self.scratchDb.execute(sql) 204 except: raise 201 205 202 206 sqlLine = sqlUtility("INSERT INTO DiffMeta_"+str(num)+" (") … … 246 250 ippTableName = "SkyChip_psf_"+str(num) 247 251 diffSkyFileID = self.number[num] 252 sql = "CREATE TABLE DiffDetection_"+str(num)+" like DiffDetection" 253 try: self.scratchDb.execute(sql) 254 except: raise 248 255 #results['ORIGINALTOTAL'] = self.scratchDb.getRowCount(ippTableName) 249 256 … … 405 412 self.logger.infoPair("Procesing table", "DiffToImage") 406 413 414 sql = "CREATE TABLE DiffToImage_"+str(num)+" like DiffToImage" 415 try: self.scratchDb.execute(sql) 416 except: raise 417 #sql = "CREATE TABLE DiffDetection_"+str(num)+" like DiffDetection" 418 #try: self.scratchDb.execute(sql) 419 #except: raise 407 420 imageIDs = self.gpc1Db.getImageIDsForThisDiffID(int(diffSkyFileID)) 408 421 … … 481 494 a.airmass = b.airmass, \ 482 495 a.expTime = b.expTime, \ 483 a.infoFlag 2 = (b.flags << 13) | a.infoFlag2\496 a.infoFlag3 = b.flags \ 484 497 WHERE a.ippDetectID = b.ippDetectID \ 485 498 AND b.imageID = " + str(imageID) -
trunk/ippToPsps/jython/forcedwarpbatch.py
r38397 r38602 408 408 sqlLine.group("a.telluricExt","b.telluricExt") 409 409 sqlLine.group("a.airmass","b.airmass") 410 sqlLine.group("a.infoFlag3","b.flags") 410 411 sql = sqlLine.makeEquals("WHERE a.ippDetectID = b.ippDetectID AND b.imageID = " +str( imageID)) 411 412 try: self.scratchDb.execute(sql) -
trunk/ippToPsps/jython/stackbatch.py
r38397 r38602 344 344 # sqlLine.group("a."+filter+"telluricExt", "b.telluricExt") 345 345 346 sqlLine.group("a."+filter+"infoFlag 2", "(b.flags << 13)")346 sqlLine.group("a."+filter+"infoFlag3", "b.flags") 347 347 sql = sqlLine.makeEquals("WHERE a.objID = b.objID AND b.imageID = " + str(imageID) + " and a." + filter + "ippDetectID=b.ippDetectID") 348 348 -
trunk/ippToPsps/pspsschema/SchemaNew21.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/Detection
r38397 r38602 57 57 infoFlag dimensionless INT 4 -999 flag indicating provenance information 58 58 infoFlag2 dimensionless INT 4 -999 flag indicating provenance information 59 infoFlag3 dimensionless INT 4 -999 flag indicating provenance information 59 60 dataRelease dimensionless TINYINT 1 NA Data release when this detection was originally taken. Recalibrations do not affect this value. 60 61 -- -
trunk/ippToPsps/pspsschema/SchemaNew21.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/Detection.txt
r38397 r38602 56 56 skyErr + smf:SKY_SIGMA / exptime 57 57 infoFlag + smf:FLAGS 58 infoFlag2 + smf:FLAGS2 | (dvo.measure.flags << 13) 58 infoFlag2 + smf:FLAGS2 59 infoFlag3 + dvo.measure.flags 59 60 dataRelease + ippToPsps : user input (skychunk.dataRelease) -
trunk/ippToPsps/pspsschema/SchemaNew21.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/DiffDetection
r38397 r38602 68 68 infoFlag dimensionless INT 4 -999 flag indicating provenance information 69 69 infoFlag2 dimensionless INT 4 -999 flag indicating provenance information 70 infoFlag3 dimensionless INT 4 -999 flag indicating provenance information 70 71 dataRelease dimensionless TINYINT 1 NA Data release when this detection was originally taken. Recalibrations do not affect this value. -
trunk/ippToPsps/pspsschema/SchemaNew21.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/DiffDetection.txt
r38397 r38602 68 68 infoFlag = smf 69 69 infoFlag2 = smf 70 infoFlag3 = dvo.measure db_flags 70 71 dataRelease = ipptopsps 71 72 -
trunk/ippToPsps/pspsschema/SchemaNew21.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/ForcedWarpMeasurement
r38397 r38602 49 49 skyErr adu/sec/pixel REAL 4 -999 estimated error in sky 50 50 infoFlag dimensionless BIGINT 8 -999 flag indicating provenance information 51 infoFlag2 dimensionless BIGINT 8 -999 FLAG2 | flags << 13 51 infoFlag2 dimensionless BIGINT 8 -999 FLAG2 52 infoFlag3 dimensionless BIGINT 8 -999 dvo measure flags 52 53 dataRelease dimensionless TINYINT 1 NA Data release when this detection was originally taken. Recalibrations do not affect this value. 53 54 -
trunk/ippToPsps/pspsschema/SchemaNew21.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/ForcedWarpMeasurement.txt
r38397 r38602 49 49 skyErr = smf:SKY_SIGMA / exptime 50 50 infoFlag = smf:FLAGS 51 infoFlag2 = smf:FLAGS2 | (dvo.measure.flags << 13) 51 infoFlag2 = smf:FLAGS2 52 infoFlag3 = dvo.measure.flags 52 53 dataRelease = ipptopsps -
trunk/ippToPsps/pspsschema/SchemaNew21.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/StackObjectThin
r38397 r38602 34 34 ginfoFlag dimensionless INT 4 0 informational bits 35 35 ginfoFlag2 dimensionless INT 4 0 informational bits 36 ginfoFlag3 dimensionless INT 4 0 informational bits 36 37 gnFrames dimensionless INT 4 -999 Number of frames contributing to source 37 38 -
trunk/ippToPsps/pspsschema/SchemaNew21.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/StackObjectThin.txt
r38397 r38602 35 35 gKronMagErr + dvo = measure.dMkron 36 36 ginfoFlag + smf : FLAGS 37 ginfoFlag2 - smf + dvo : FLAGS2 | measure.flags << 13 *** we only include measure.dbflags, not secfilt.flags 37 ginfoFlag2 - smf : FLAGS2 38 ginfoFlag3 - dvo.measure.db_flags 38 39 gnFrames + smf : N_FRAMES
Note:
See TracChangeset
for help on using the changeset viewer.
