IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 15, 2012, 11:45:05 AM (14 years ago)
Author:
rhenders
Message:

Now using Bill's skycells database to determine RA/Dec for stacks

File:
1 edited

Legend:

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

    r33516 r33527  
    4141    '''
    4242    Gets a list of ids, ra and dec in this DVO database for this stage, could be cam or staticsky, and a box can be defined with equatorial coordinates
     43    NB this uses Bill's potentially temporary 'skycells' database when finding RA/Dec for stacks.
    4344    '''
    4445    def getItemsInThisDVODbForThisStage(self, dvoDb, batchType, minRA=-999, maxRA=999, minDec=-999, maxDec=999):
     
    7273
    7374            stage = "staticsky_multi"
    74             # no way to get RA/Decl for stacks, so default to provided min RA/Dec
    75             sql = "SELECT DISTINCT stack_id, " + str(minRA) + ", " + str(minDec) + " FROM staticskyInput \
     75            sql = "SELECT DISTINCT stack_id, ra, decl FROM staticskyInput \
    7676                   JOIN addRun ON(staticskyInput.sky_id = addRun.stage_id) \
    7777                   JOIN minidvodbRun USING(minidvodb_name) \
    7878                   JOIN minidvodbProcessed USING(minidvodb_id) \
     79                   JOIN  stackRun USING(stack_id) JOIN skycells.skycell USING(skycell_id) \
    7980                   WHERE minidvodbRun.minidvodb_group = '" + dvoDb + "' \
    8081                   AND minidvodbRun.state = 'merged' \
    8182                   AND minidvodbProcessed.fault = 0 \
    8283                   AND addRun.stage = '" + stage + "' \
    83                    AND addRun.state = 'full'"
     84                   AND addRun.state = 'full' \
     85                   AND decl BETWEEN " + str(minDec) + " AND " + str(maxDec) + " \
     86                   AND ra BETWEEN " + str(minRA) + " AND " + str(maxRA)
    8487
    8588        try:
Note: See TracChangeset for help on using the changeset viewer.