Changeset 32493 for trunk/ippToPsps/jython/gpc1db.py
- Timestamp:
- Oct 5, 2011, 4:19:56 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/gpc1db.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/gpc1db.py
r32180 r32493 60 60 61 61 ''' 62 Gets a list of ids in this DVO database for this stage, could be cam or staticsky (so far)63 ''' 64 def getIDsInThisDVODbForThisStage(self, dvoDb, batchType ):62 Gets a list of ids in this DVO database for this stage, could be cam or staticsky, and a box can be defined with equatorial coordinates 63 ''' 64 def getIDsInThisDVODbForThisStage(self, dvoDb, batchType, minRA=-999, maxRA=999, minDec=-999, maxDec=999): 65 65 66 66 if batchType == "P2": # TODO define these someplace … … 71 71 JOIN minidvodbRun USING(minidvodb_name) \ 72 72 JOIN minidvodbProcessed USING(minidvodb_id) \ 73 JOIN camRun ON (stage_id = cam_id) \ 74 JOIN chipRun USING (chip_id) \ 75 JOIN rawExp USING (exp_id) \ 73 76 WHERE minidvodbRun.minidvodb_group = '" + dvoDb + "' \ 74 77 AND minidvodbRun.state = 'merged' \ 75 78 AND minidvodbProcessed.fault = 0 \ 76 79 AND addRun.stage = '" + stage + "' \ 77 AND addRun.state = 'full'" 80 AND addRun.state = 'full' \ 81 AND decl BETWEEN RADIANS(" + str(minDec) + ") AND RADIANS(" + str(maxDec) + ") \ 82 AND ra BETWEEN RADIANS(" + str(minRA) + ") AND RADIANS(" + str(maxRA) + ")" 78 83 79 84 elif batchType == "ST": 80 85 81 86 stage = "staticsky" 82 sql = "SELECT DISTINCT stack_id \ 83 FROM staticskyInput \ 87 sql = "SELECT DISTINCT stack_id FROM staticskyInput \ 84 88 JOIN addRun ON(staticskyInput.sky_id = addRun.stage_id) \ 85 89 JOIN minidvodbRun USING(minidvodb_name) \ … … 90 94 AND addRun.stage = '" + stage + "' \ 91 95 AND addRun.state = 'full'" 92 96 93 97 try: 94 98 rs = self.executeQuery(sql)
Note:
See TracChangeset
for help on using the changeset viewer.
