IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 26, 2013, 6:47:49 AM (13 years ago)
Author:
eugene
Message:

trying to fix the definition of a box (roughly constant linear width)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/jython/dvo.py

    r35190 r35203  
    211211    def setSkyAreaAsStripe(self, ra=0., width=4.):
    212212
     213        print "this function should not reached now, error"
     214        raise
     215
    213216        self.setSkyArea(ra, ra+width, -91., 91.)
    214217
     
    217220    '''
    218221    def setSkyAreaAsBox(self, ra=180., dec=0., side=181.0):
     222
     223        print "this function should not reached now, error"
     224        raise
    219225
    220226        halfSide = side/2.0
     
    223229    '''
    224230    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
    225233    '''
    226234    def setSkyArea(self, minRa=-1., maxRa=361., minDec=-91., maxDec=91):
     
    584592    includes purging detections outside sky area
    585593    '''
    586     def nativeIngestDetections(self, boxId, raCenter, decCenter, boxSize):
     594    def nativeIngestDetections(self, boxId, boxDim):
    587595
    588596        # XXX put the chunk below in a separate method
     
    628636        self.loadImages()
    629637
    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
    633650
    634651        # TODO path to DVO prog hardcoded temporarily
     
    640657        cmd += " -D CATDIR " + self.skychunk.dvoLocation
    641658        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)
    646663
    647664        if self.skychunk.parallel:
Note: See TracChangeset for help on using the changeset viewer.