IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34828 for trunk/ippTasks


Ignore:
Timestamp:
Dec 16, 2012, 6:50:45 AM (14 years ago)
Author:
bills
Message:

add survey.skycal

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/survey.pro

    r34350 r34828  
    1717 book create SURVEY_PUBLISH
    1818 book create SURVEY_STATICSKYSINGLE
     19 book create SURVEY_SKYCAL
    1920 $haveSurveyBooks = TRUE
    2021end
    … …  
    3132$SURVEY_WARP_BG_DB = 0
    3233$SURVEY_PUBLISH_DB = 0
     34$SURVEY_SKYCAL_DB = 0
    3335$SURVEY_STATICSKYSINGLE_DB = 0
    3436$SURVEY_EXEC = 120
    … …  
    7375    active true
    7476  end 
     77  task survey.skycal
     78    active true
     79  end
    7580end
    7681
    … …  
    110115  end
    111116  task survey.staticskysingle
     117    active false
     118  end
     119  task survey.skycal
    112120    active false
    113121  end
    … …  
    464472  book delpage SURVEY_STATICSKYSINGLE $1
    465473end
     474
     475macro survey.add.skycal
     476  if ($0 != 3)
     477    echo "USAGE: survey.add.skycal (label) (dist_group)"
     478    break
     479  end
     480  book newpage SURVEY_SKYCAL $1
     481  book setword SURVEY_SKYCAL $1 LABEL $1
     482  book setword SURVEY_SKYCAL $1 DIST_GROUP $2
     483  book setword SURVEY_SKYCAL $1 STATE PENDING
     484end
     485
     486macro survey.del.skycal
     487  if ($0 != 2)
     488    echo "USAGE: survey.del.skycal (label)"
     489    break
     490  end
     491  book delpage SURVEY_SKYCAL $1
     492end
     493
     494macro survey.show.skycal
     495  if ($0 != 1)
     496    echo "USAGE: survey.show.skyacl"
     497    break
     498  end
     499  book listbook SURVEY_SKYCAL
     500end
     501
    466502
    467503task survey.diff
    … …  
    14531489end
    14541490
     1491# Survey task for Skycal stage
     1492
     1493task survey.skycal
     1494  host local
     1495 
     1496  periods      -poll $SURVEY_POLL
     1497  periods      -exec $SURVEY_EXEC
     1498  periods      -timeout $SURVEY_TIMEOUT
     1499  npending     1
     1500
     1501  stdout $LOGDIR/survey.skycal.log
     1502  stderr $LOGDIR/survey.skycal.log
     1503
     1504  task.exec
     1505    book npages SURVEY_SKYCAL -var N
     1506    if ($N == 0)
     1507#      echo "No labels for processing"
     1508      break
     1509    endif
     1510
     1511    book getpage SURVEY_SKYCAL 0 -var label -key STATE NEW
     1512    if ("$label" == "NULL")
     1513      # All labels have been done --- reset
     1514#      echo "Resetting labels"
     1515      for i 0 $N
     1516        book getpage SURVEY_SKYCAL $i -var label
     1517        book setword SURVEY_SKYCAL $label STATE NEW
     1518      end
     1519      book getpage SURVEY_SKYCAL 0 -var label -key STATE NEW
     1520
     1521      # Select different database
     1522      $SURVEY_SKYCAL_DB ++
     1523      if ($SURVEY_SKYCAL_DB >= $DB:n) set SURVEY_SKYCAL_DB = 0
     1524    end
     1525
     1526    book setword SURVEY_SKYCAL $label STATE DONE
     1527    book getword SURVEY_SKYCAL $label DIST_GROUP -var dist_group
     1528
     1529    # note: currently skycal uses the staticskyRun workdir
     1530
     1531    $run = staticskytool -defineskycalrun -select_label $label -set_dist_group $dist_group
     1532
     1533    if ($DB:n == 0)
     1534      option DEFAULT
     1535    else
     1536      $run = $run -dbname $DB:$SURVEY_SKYCAL_DB
     1537      option $DB:$SURVEY_SKYCAL_DB
     1538    end
     1539   
     1540    # echo $run
     1541    command $run
     1542  end
     1543
     1544  # success
     1545  task.exit    0
     1546#    echo "Success"
     1547  end
     1548
     1549  # locked list
     1550  task.exit    default
     1551    showcommand failure
     1552  end
     1553
     1554  task.exit    crash
     1555    showcommand crash
     1556  end
     1557
     1558  # operation times out?
     1559  task.exit    timeout
     1560    showcommand timeout
     1561  end
     1562end
Note: See TracChangeset for help on using the changeset viewer.