Changeset 36192 for branches/eam_branches/ipp-20130904/ippToPsps
- Timestamp:
- Oct 9, 2013, 4:06:09 PM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130904/ippToPsps
- Files:
-
- 4 edited
-
. (modified) (1 prop)
-
jython/dxlayer.py (modified) (2 diffs)
-
jython/ipptopspsdb.py (modified) (5 diffs)
-
jython/stackbatch.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130904/ippToPsps
- Property svn:mergeinfo changed
/trunk/ippToPsps (added) merged: 36098-36099,36147
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20130904/ippToPsps/jython/dxlayer.py
r35217 r36192 25 25 ''' 26 26 def deleteBatch(self, batchID): 27 #HAF This is really lazy to do this way, but for the time, will check both dx layers and try the first, if no go try the second. 27 28 28 29 batch = Batch.getNameFromID(batchID) … … 46 47 p.stdout.close() 47 48 48 if ret: self.logger.infoPair("Deleted batch from DXLayer", batch) 49 else: self.logger.errorPair("Unable to delete batch from DXLayer", batch) 49 if ret: self.logger.infoPair("Deleted batch from DXLayer 1", batch) 50 else: self.logger.errorPair("Unable to delete batch from DXLayer 1" , batch) 51 52 53 54 55 tempFile = tempfile.NamedTemporaryFile(mode='w+b') 56 57 p = Popen("deleteFromDXLayer2.pl -b " + batch + " -f " + tempFile.name, 58 shell=True, 59 stdout=PIPE) 60 p.wait() 61 62 if p.returncode != 0: 63 self.logger.debugPair("DXLayer webservice", "failed") 64 return 0 65 else: 66 self.logger.debugPair("DXLayer webservice", "successful") 67 68 ret = self.decodeDXLayerResponse(tempFile.name) 69 70 tempFile.close() 71 p.stdout.close() 72 73 if ret: self.logger.infoPair("Deleted batch from DXLayer 2", batch) 74 else: self.logger.errorPair("Unable to delete batch from DXLayer 2" , batch) 75 76 77 50 78 51 79 return ret 80 52 81 53 82 ''' -
branches/eam_branches/ipp-20130904/ippToPsps/jython/ipptopspsdb.py
r35994 r36192 39 39 AND batch_type = '" + batchType + "' \ 40 40 AND dvo_db = '" + self.skychunk.dvoLabel + "' \ 41 AND comment = '" + self.skychunk.name + "' \ 42 AND datastore_product = '" + self.skychunk.datastoreProduct + "' \ 41 43 AND merged = 1 \ 42 44 AND deleted_local = 0 \ … … 65 67 AND batch_type = '" + batchType + "' \ 66 68 AND dvo_db = '" + self.skychunk.dvoLabel + "' \ 69 AND comment = '" + self.skychunk.name + "' \ 70 AND datastore_product = '" + self.skychunk.datastoreProduct + "' \ 67 71 AND purged = 1 \ 68 72 AND deleted_local = 0 \ … … 92 96 AND batch_type = '" + batchType + "' \ 93 97 AND dvo_db = '" + self.skychunk.dvoLabel + "' \ 98 AND comment = '" + self.skychunk.name + "' \ 99 AND datastore_product = '" + self.skychunk.datastoreProduct + "' \ 94 100 AND purged = 1 \ 95 101 AND deleted_datastore = 0 \ … … 119 125 AND batch_type = '" + batchType + "' \ 120 126 AND dvo_db = '" + self.skychunk.dvoLabel + "' \ 121 AND (loaded_to_ODM = -1 OR merge_worthy = 1) \ 127 AND comment = '" + self.skychunk.name + "' \ 128 AND datastore_product = '" + self.skychunk.datastoreProduct + "' \ 129 AND (merge_worthy = 1) \ 122 130 AND deleted_datastore = 0 AND block_delete_datastore = 0" 123 131 … … 144 152 AND batch_type = '" + batchType + "' \ 145 153 AND dvo_db = '" + self.skychunk.dvoLabel + "' \ 146 AND ( loaded_to_ODM = -1 ORmerge_worthy = 1) \154 AND (merge_worthy = 1) \ 147 155 AND deleted_dxlayer = 0 and block_delete_dxlayer = 0" 148 156 -
branches/eam_branches/ipp-20130904/ippToPsps/jython/stackbatch.py
r35780 r36192 645 645 ,petRadiusErr=b.PETRO_RADIUS_ERR \ 646 646 ,petFlux=POW(10.0, -0.4 * b.PETRO_MAG) /" + str(self.expTime) + " \ 647 ,petFluxErr= ABS(b.PETRO_MAG_ERR) * POW(10.0, (-0.4*b.PETRO_MAG)) / " + str(self.expTime) + " / 1.085736\647 ,petFluxErr=-999 \ 648 648 ,petR50=b.PETRO_RADIUS_50 \ 649 649 ,petR50Err=b.PETRO_RADIUS_50_ERR \ … … 653 653 WHERE a.ippDetectID=b.IPP_IDET" 654 654 self.scratchDb.execute(sql) 655 656 self.logger.infoPair("Adding", "petFluxErr for non nulls") 657 sql = "UPDATE StackApFlx as a, SkyChip_xsrc AS b SET \ 658 petFluxErr=ABS(b.PETRO_MAG_ERR) * POW(10.0, (-0.4*b.PETRO_MAG)) / " + str(self.expTime) + " / 1.085736 \ 659 WHERE a.ippDetectID=b.IPP_IDET \ 660 AND (b.PETRO_MAG_ERR is not NULL AND b.PETRO_MAG is not NULL AND PETRO_MAG_ERR < 1000.0)" 661 # added this because when the petromagerr is crazy large (10^29 it out of ranges the flux err calc) 662 self.logger.infoPair("sql", sql) 663 self.scratchDb.execute(sql) 664 665 655 666 656 667 self.logger.infoPair("adding"," PrimaryF to stackApFlx")
Note:
See TracChangeset
for help on using the changeset viewer.
