Changeset 35203 for trunk/ippToPsps/jython/ipptopspsdb.py
- Timestamp:
- Feb 26, 2013, 6:47:49 AM (13 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/ipptopspsdb.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/ipptopspsdb.py
r35185 r35203 4 4 import sys 5 5 import os 6 import math 6 7 import logging 7 8 … … 997 998 998 999 self.skychunk.boxSize = rs.getDouble(10) 999 self.skychunk.halfBox = self.skychunk.boxSize/2.01000 self.skychunk.boxSizeWithBorder = self.skychunk.boxSize + (self.skychunk.BORDER * 2)1000 # self.skychunk.halfBox = self.skychunk.boxSize/2.0 1001 # self.skychunk.boxSizeWithBorder = self.skychunk.boxSize + (self.skychunk.BORDER * 2) 1001 1002 1002 1003 self.skychunk.basePath = rs.getString(11) … … 1031 1032 ''' 1032 1033 Gets id of box with these coords 1034 XXX EAM : this code implies we can have multiple boxes at the same location for the same 1035 XXX EAM : skychunk distinguished by having different sizes. that seems quite bad 1033 1036 ''' 1034 1037 def getBoxId(self, ra, dec): … … 1037 1040 WHERE skychunk = '" + self.skychunk.name + "' \ 1038 1041 AND ra_center = " + str(ra) + " \ 1039 AND dec_center = " + str(dec) + " \ 1040 AND box_side = " + str(self.skychunk.boxSize) 1042 AND dec_center = " + str(dec) 1043 1044 # AND box_side = " + str(self.skychunk.boxSize) 1041 1045 1042 1046 id = -1 … … 1325 1329 boxDim['SIDE'] = rs.getFloat(3) 1326 1330 1331 # SIDE is the linear full-width of the box 1332 1333 # XXX EAM : need to do something special at the poles... 1334 if (boxDim['DEC'] > 85): raise 1335 1336 # a given box centered at RA,DEC with (linear) size of SIDE has the following bounds 1337 dR = 0.5*boxDim['SIDE'] / math.cos(math.radians(boxDim['DEC'])) 1338 dD = 0.5*boxDim['SIDE'] 1339 1340 boxDim['minRA'] = boxDim['RA'] - dR 1341 boxDim['maxRA'] = boxDim['RA'] + dR 1342 boxDim['minDEC'] = boxDim['DEC'] - dD 1343 boxDim['maxDEC'] = boxDim['DEC'] + dD 1344 1327 1345 return boxDim 1328 1346
Note:
See TracChangeset
for help on using the changeset viewer.
