IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35179


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

Location:
trunk/ippToPsps
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/config/settings.xml

    r35177 r35179  
    1111  <localdatabase>
    1212    <loader mach="ipp006">
    13       <name>ipptopsps_scratch1</name>
     13      <name>ipptopsps_scratch</name>
    1414      <host>ipp006</host>
    1515      <user>dvo</user>
     
    1717    </loader>
    1818    <loader mach="ipp007">
    19       <name>ipptopsps_scratch1</name>
     19      <name>ipptopsps_scratch</name>
    2020      <host>ipp007</host>
    2121      <user>dvo</user>
    2222      <password>dvo</password>
    2323    </loader>
     24    <loader mach="ipp008">
     25      <name>ipptopsps_scratch</name>
     26      <host>ipp008</host>
     27      <user>dvo</user>
     28      <password>dvo</password>
     29    </loader>
     30    <loader mach="ipp009">
     31      <name>ipptopsps_scratch</name>
     32      <host>ipp009</host>
     33      <user>dvo</user>
     34      <password>dvo</password>
     35    </loader>
     36    <loader mach="ipp010">
     37      <name>ipptopsps_scratch</name>
     38      <host>ipp010</host>
     39      <user>dvo</user>
     40      <password>dvo</password>
     41    </loader>
    2442    <loader mach="generic">
    25       <name>ipptopsps_scratch1</name>
     43      <name>ipptopsps_scratch</name>
    2644      <host>localhost</host>
    2745      <user>dvo</user>
  • 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
  • trunk/ippToPsps/jython/skychunk.py

    r35097 r35179  
    3838
    3939        # XXX this is a poor place to put this information -- it is completely gpc-specific. 
    40         # probably should go elsewhere
     40        # probably should go elsewhere.  This number is scaled in loader.py by cos(dec)
    4141        self.BORDER = 1.65
    4242        self.isLoaded = False
  • trunk/ippToPsps/test/fulltest.sh

    r35097 r35179  
    2525# mkgpc1.sh user localhost eam eam
    2626
    27 set mkgpc1       = 0
     27set mkgpc1       = 1
    2828set initdb       = 1
    2929set mkdummy      = 1
     
    5454endif
    5555
    56 ## XXX no longer needed : setupScratchDb does not need a fake 'config' (or 'chunk')
    57 ## # create a dummy config so setupScratchDb.py does not fail
    58 ## if ($mkdummy) then
    59 ##   ippjython queue.py -test edit <<EOF
    60 ## dummy
    61 ## none
    62 ## IPP_PSPS
    63 ## 0
    64 ## none
    65 ## none
    66 ## 0
    67 ## 0
    68 ## 0
    69 ## 0
    70 ## 1
    71 ## none
    72 ## 0
    73 ## 0
    74 ## 1
    75 ## 1
    76 ## 2001-01-01 00:00:00.0
    77 ## NONE
    78 ## NONE
    79 ## 1
    80 ## 0
    81 ## 0
    82 ## 1
    83 ## 0
    84 ## EOF
    85 ## endif
    86 
    8756# re-create the ipptopsps database
    8857if ($initscratch) then
    8958
    9059  # create the database (ignore failure if it already exists)
    91   mysql -h localhost -u dvo -pdvo -e "drop database ipptopsps_test_scratch1"
    92   # mysql -h localhost -u dvo -pdvo -e "drop database ipptopsps_scratch2"
    93   # mysql -h localhost -u dvo -pdvo -e "drop database ipptopsps_scratch3"
    94 
    95   mysql -h localhost -u dvo -pdvo -e "create database ipptopsps_test_scratch1"
    96   # mysql -h localhost -u dvo -pdvo -e "create database ipptopsps_scratch2"
    97   # mysql -h localhost -u dvo -pdvo -e "create database ipptopsps_scratch3"
    98 
    99   # setupScratchDb.py now takes the scratch name version, which is appended to the
    100   # name in the settings.xml table
    101   ippjython setupScratchDb.py -test 1
    102   # ippjython setupScratchDb.py -test 2
    103   # ippjython setupScratchDb.py -test 3
     60  mysql -h localhost -u dvo -pdvo -e "drop database ipptopsps_test_scratch"
     61  mysql -h localhost -u dvo -pdvo -e "create database ipptopsps_test_scratch"
     62  ippjython setupScratchDb.py -test
    10463endif
    10564
  • trunk/ippToPsps/test/sastest.sh

    r35097 r35179  
    1919# mkgpc1.sh user localhost eam eam
    2020
    21 set mkgpc1      = 0
    22 set initdb      = 0
    23 set mkdummy     = 0
    24 set initscratch = 0
     21set mkgpc1      = 1
     22set initdb      = 1
     23set mkdummy     = 1
     24set initscratch = 1
    2525set initbatch   = 1
    2626set camqueue    = 1
    2727set cambatch    = 1
    28 set stackqueue  = 1
    29 set stackbatch  = 1
     28set stackqueue  = 0
     29set stackbatch  = 0
    3030
    3131set OUTDIR = "sas12"
     
    4646endif
    4747
    48 # create a dummy config so setupScratchDb.py does not fail
    49 if ($mkdummy) then
    50   ippjython queue.py -test edit <<EOF
    51 dummy
    52 none
    53 IPP_PSPS
    54 0
    55 none
    56 none
    57 0
    58 0
    59 0
    60 0
    61 1
    62 none
    63 0
    64 0
    65 1
    66 1
    67 2001-01-01 00:00:00.0
    68 NONE
    69 NONE
    70 1
    71 0
    72 0
    73 1
    74 0
    75 1
    76 EOF
    77 endif
    78 
    7948# re-create the ipptopsps database
    8049if ($initscratch) then
    8150
    8251  # create the database (ignore failure if it already exists)
    83   mysql -h localhost -u dvo -pdvo -e "drop database ipptopsps_scratch1"
    84   # mysql -h localhost -u dvo -pdvo -e "drop database ipptopsps_scratch2"
    85   # mysql -h localhost -u dvo -pdvo -e "drop database ipptopsps_scratch3"
    86 
    87   mysql -h localhost -u dvo -pdvo -e "create database ipptopsps_scratch1"
    88   # mysql -h localhost -u dvo -pdvo -e "create database ipptopsps_scratch2"
    89   # mysql -h localhost -u dvo -pdvo -e "create database ipptopsps_scratch3"
    90 
    91   ippjython setupScratchDb.py -test dummy ipptopsps_scratch1
    92   # ippjython setupScratchDb.py -test dummy ipptopsps_scratch2
    93   # ippjython setupScratchDb.py -test dummy ipptopsps_scratch3
     52  mysql -h localhost -u dvo -pdvo -e "drop database ipptopsps_scratch"
     53  mysql -h localhost -u dvo -pdvo -e "create database ipptopsps_scratch"
     54  ippjython setupScratchDb.py -test
    9455endif
    9556
     
    117783PI
    118791
    119 0
    120 0
     801
     811
    121821
    122830
Note: See TracChangeset for help on using the changeset viewer.