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/queue.py

    r35097 r35203  
    116116   
    117117                    # starting positions
    118                     ra = self.skychunk.minRa + self.skychunk.halfBox
    119                     dec = self.skychunk.minDec + self.skychunk.halfBox
    120    
    121                     while ra <= self.skychunk.maxRa:
    122                        while dec <= self.skychunk.maxDec:
     118
     119                    dD = 0.5*skychunk.boxSize
     120                    dec = self.skychunk.minDec + dD
     121
     122                    # a given box centered at RA,DEC with (linear) size of SIDE has the following bounds
     123                    dR = 0.5*skychunk.boxSize / math.cos(math.radians(dec))
     124                    ra = self.skychunk.minRa + dR
     125                   
     126                    while dec <= self.skychunk.maxDec:
     127                       
     128                        # XXX EAM : need to do something special at the poles...
     129                        if (dec > 85): raise
     130
     131                        while ra <= self.skychunk.maxRa:
    123132           
     133                           # a given box centered at RA,DEC with (linear) size of SIDE has the following bounds
     134                           minRA  = ra  - dR
     135                           maxRA  = ra  + dR
     136                           minDEC = dec - dD
     137                           maxDEC = dec + dD
     138
     139                           XXX EAM:
    124140                           box_id = self.ippToPspsDb.insertBox(ra, dec)
    125141           
     142                           XXX EAM:
    126143                           ids = self.ippToPspsDb.getItemsInThisThisBox(ra, dec)
    127144   
     
    133150               
    134151                           if len(ids) > 0: self.ippToPspsDb.insertPending(box_id, batchType, ids)
     152                           ra = ra + 2*dR
    135153
    136                            dec = dec + self.skychunk.boxSize
    137                        dec = self.skychunk.minDec + self.skychunk.halfBox
    138                        ra = ra + self.skychunk.boxSize
    139            
     154                         dec = dec + 2*dD
     155
     156                         dR = 0.5*skychunk.boxSize / math.cos(math.radians(dec))
     157                         ra = self.skychunk.minRa + dR
     158
    140159                self.logger.info("+-------------+-------------+-------------+-------------+")
    141160
Note: See TracChangeset for help on using the changeset viewer.