IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 19, 2013, 9:09:36 AM (13 years ago)
Author:
eugene
Message:

set box border based on cos(DEC); add ipp008-010 to loader list

File:
1 edited

Legend:

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

    r35177 r35179  
    88import sys
    99import os
     10import math
    1011import traceback
    1112import logging.config
     
    158159                    self.logger.infoPair("Box dimensions", "%.1f / %.1f / %.1f" % (boxDim['RA'], boxDim['DEC'], boxDim['SIDE']))
    159160                    self.logger.infoPair(batchType + " items found in this box", "%d" % len(ids))
    160                     boxSizeWithBorder = boxDim['SIDE'] + (self.skychunk.BORDER * 2)
     161                    boxSizeWithBorder = boxDim['SIDE'] + (self.skychunk.BORDER * 2 / math.cos(math.radians(boxDim['DEC'])))
    161162                    boxSizeSansBorder = boxDim['SIDE']
    162                     self.logger.infoPair("got here", "ok")
     163                    boxSize = boxSizeWithBorder
     164                    self.logger.infoPair("using box of size", str(boxSize))
    163165                    useFullTables = 0
    164166                    if batchType != "OB":
     
    167169                            # look in DVO for this box (with extra border)
    168170                            self.logger.infoPair("Querying DVO for this sky area", "")
    169                             self.dvoDetections.setSkyAreaAsBox(boxDim['RA'], boxDim['DEC'], boxSizeWithBorder)
     171                            self.dvoDetections.setSkyAreaAsBox(boxDim['RA'], boxDim['DEC'], boxSize)
    170172                            #self.dvoDetections.setSkyArea()
    171173                            sizeToBeIngested = self.dvoDetections.getDiskSizeOfRegionsToBeIngested()
     
    194196                            # impact of mysql insertion
    195197                            if not self.ippToPspsDb.isBoxIngested(boxId):
    196                                 self.dvoDetections.nativeIngestDetections(boxId, boxDim['RA'], boxDim['DEC'], boxSizeWithBorder)
     198                                self.dvoDetections.nativeIngestDetections(boxId, boxDim['RA'], boxDim['DEC'], boxSize)
    197199
    198200                            useFullTables = 1
Note: See TracChangeset for help on using the changeset viewer.