IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 22, 2013, 9:43:22 AM (13 years ago)
Author:
eugene
Message:

add dvopsps-based method to ingest detections; do not use foreign key constraint if using dvopsps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20121219/ippToPsps/jython/loader.py

    r35011 r35016  
    160160                    useFullTables = 0
    161161                    if batchType != "OB":
    162                         # look in DVO for this box (with extra border)
    163                         self.logger.infoPair("Querying DVO for this sky area", "")
    164                         self.dvoDetections.setSkyAreaAsBox(boxDim['RA'], boxDim['DEC'], boxSizeWithBorder)
    165                         #self.dvoDetections.setSkyArea()
    166                         sizeToBeIngested = self.dvoDetections.getDiskSizeOfRegionsToBeIngested()
    167                         if sizeToBeIngested == 0.0: smfsPerGB = 999999999
    168                         else: smfsPerGB = len(ids)/sizeToBeIngested
    169                         self.logger.infoPair("DVO to be ingested", "%7.1e GB" % sizeToBeIngested)
    170                         self.logger.infoPair("smfs-per-GB", "%.1f" % smfsPerGB)
    171 
    172                         # should do we pre-ingest stuff from DVO?
    173                         # NOTE EAM : this chunk loads the dvo detections into the mysql db
    174                         # XXXX EAM : this should happen for both P2 and Stack detection
    175                         # XXXX EAM : in parallel model, this should happen for all P2 & Stack batches
    176                         #
    177                         if (batchType == 'P2' or batchType == 'ST') and smfsPerGB > 30:
    178                             if not self.dvoDetections.sync():
    179                                 self.logger.errorPair("Could not sync DVO with MySQL", "skipping")
    180                                 continue
    181      
     162
     163                        if (self.dvoDetections.useStilts):
     164                            # look in DVO for this box (with extra border)
     165                            self.logger.infoPair("Querying DVO for this sky area", "")
     166                            self.dvoDetections.setSkyAreaAsBox(boxDim['RA'], boxDim['DEC'], boxSizeWithBorder)
     167                            #self.dvoDetections.setSkyArea()
     168                            sizeToBeIngested = self.dvoDetections.getDiskSizeOfRegionsToBeIngested()
     169                            if sizeToBeIngested == 0.0: smfsPerGB = 999999999
     170                            else: smfsPerGB = len(ids)/sizeToBeIngested
     171                            self.logger.infoPair("DVO to be ingested", "%7.1e GB" % sizeToBeIngested)
     172                            self.logger.infoPair("smfs-per-GB", "%.1f" % smfsPerGB)
     173
     174                            # should do we pre-ingest stuff from DVO?
     175                            # NOTE EAM : this chunk loads the dvo detections into the mysql db
     176                            # XXXX EAM : this should happen for both P2 and Stack detection
     177                            # XXXX EAM : in parallel model, this should happen for all P2 & Stack batches
     178                            #
     179                            if (batchType == 'P2' or batchType == 'ST') and smfsPerGB > 30:
     180                                if not self.dvoDetections.sync():
     181                                    self.logger.errorPair("Could not sync DVO with MySQL", "skipping")
     182                                    continue
     183                               
     184                                useFullTables = 1
     185                        else:
     186                            # if we are using the native loader, always use it
     187                            self.dvoDetections.nativeIngestDetections(boxDim['RA'], boxDim['DEC'], boxSizeWithBorder)
    182188                            useFullTables = 1
    183189               
Note: See TracChangeset for help on using the changeset viewer.