Changeset 35203 for trunk/ippToPsps/jython/dvo.py
- Timestamp:
- Feb 26, 2013, 6:47:49 AM (13 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/dvo.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/dvo.py
r35190 r35203 211 211 def setSkyAreaAsStripe(self, ra=0., width=4.): 212 212 213 print "this function should not reached now, error" 214 raise 215 213 216 self.setSkyArea(ra, ra+width, -91., 91.) 214 217 … … 217 220 ''' 218 221 def setSkyAreaAsBox(self, ra=180., dec=0., side=181.0): 222 223 print "this function should not reached now, error" 224 raise 219 225 220 226 halfSide = side/2.0 … … 223 229 ''' 224 230 Determines what DVO files need to be ingested to the defines region 231 XXX EAM : this function has been substantially reduced / stripped down to work with the parallel dvo 232 XXX EAM : some additional review of the goals would be useful 225 233 ''' 226 234 def setSkyArea(self, minRa=-1., maxRa=361., minDec=-91., maxDec=91): … … 584 592 includes purging detections outside sky area 585 593 ''' 586 def nativeIngestDetections(self, boxId, raCenter, decCenter, boxSize):594 def nativeIngestDetections(self, boxId, boxDim): 587 595 588 596 # XXX put the chunk below in a separate method … … 628 636 self.loadImages() 629 637 630 # dvopsps -D catdir CATDIR -region .... -dbhost xx -dbname xx -dbuser xx -dbpass xx 631 halfSize = boxSize / 2.0 632 # -region raCenter-halfSize raCenter+halfSize decCenter-halfSize decCenter+halfSize 638 # the box dimensions are the area used to select the items of 639 # interest from the gpc1 database (camera smfs / skycal cmfs). 640 # for dvopsps, we need to include a border region large enough 641 # to grab all detections / objects which are contributed by an 642 # item with the center in the given box 643 dR_border = self.skychunk.BORDER / math.cos(math.radians(boxDim['DEC'])) 644 dD_border = self.skychunk.BORDER 645 646 minRA = boxDim['minRA'] - dR_border 647 maxRA = boxDim['maxRA'] + dR_border 648 minDEC = boxDim['minDEC'] - dD_border 649 maxDEC = boxDim['maxDEC'] + dD_border 633 650 634 651 # TODO path to DVO prog hardcoded temporarily … … 640 657 cmd += " -D CATDIR " + self.skychunk.dvoLocation 641 658 cmd += " -region " 642 cmd += " " + str( raCenter-halfSize)643 cmd += " " + str( raCenter+halfSize)644 cmd += " " + str( decCenter-halfSize)645 cmd += " " + str( decCenter+halfSize)659 cmd += " " + str(minRA) 660 cmd += " " + str(maxRA) 661 cmd += " " + str(minDEC) 662 cmd += " " + str(maxDEC) 646 663 647 664 if self.skychunk.parallel:
Note:
See TracChangeset
for help on using the changeset viewer.
