IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 27, 2011, 3:09:17 PM (15 years ago)
Author:
heather
Message:

crap. I don't know why it thinks some of these are modified, but diffing them
against a fresh checkout of the trunk shows no differences.

These are the merge of addstar changes into the trunk. This adds tables,
breaking apart minidvodbRun into 2 parts (building/relphot/addstar) and
(verify/merging), which will make it easier to rebuild dvodbs in the
future. There's some debugging of various tasks here (addstar.revert, for
example), and a lot of cleanup of code.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/ippTasks/survey.pro

    r32832 r33030  
    33# test for required global variables
    44check.globals
    5 
    6 # there is a bug in 'getbook', use a different method below
    7 # book getbook SURVEY_DIFF -var isBook
    8 # if ("$isBook" != "SURVEY_DIFF")
    9 #   book create SURVEY_DIFF
    10 # end
    11 # book getbook SURVEY_MAGIC -var isBook
    12 # if ("$isBook" == "NULL")
    13 #   book create SURVEY_MAGIC
    14 # end
    15 # book getbook SURVEY_DESTREAK -var isBook
    16 # if ("$isBook" == "NULL")
    17 #   book create SURVEY_DESTREAK
    18 # end
    19 # book getbook SURVEY_DIST -var isBook
    20 # if ("$isBook" == "NULL")
    21 #   book create SURVEY_DIST
    22 # end
    235
    246if (not($?haveSurveyBooks))
     
    3012 book create SURVEY_DIST
    3113 book create SURVEY_ADDSTAR   
     14 book create SURVEY_MERGEDVODB
    3215 book create SURVEY_CHIP_BG
    3316 book create SURVEY_WARP_BG
     
    4427$SURVEY_DIST_DB = 0
    4528$SURVEY_ADDSTAR_DB = 0
     29$SURVEY_MERGEDVODB_DB = 0
    4630$SURVEY_CHIP_BG_DB = 0
    4731$SURVEY_WARP_BG_DB = 0
     
    6852    active true
    6953  end
     54  task survey.mergedvodb
     55    active true
     56  end
    7057  task survey.destreak
    7158    active true
     
    10491    active false
    10592  end
     93  task survey.mergedvodb
     94    active false
     95  end 
    10696  task survey.destreak
    10797    active false
     
    270260  book listbook SURVEY_ADDSTAR
    271261end
     262
     263macro survey.add.mergedvodb
     264  if ($0 != 4)
     265    echo "USAGE: survey.add.mergedvodb (tag) (mergedvodb) (minidvodb_group)"
     266    break
     267  end
     268  book newpage SURVEY_MERGEDVODB $1
     269  book setword SURVEY_MERGEDVODB $1 MERGEDVODB $2
     270  book setword SURVEY_MERGEDVODB $1 MINIDVODB_GROUP $3
     271end
     272
     273macro survey.del.mergedvodb
     274  if ($0 != 2)
     275    echo "USAGE: survey.del.mergedvodb (tag)"
     276    break
     277  end
     278  book delpage SURVEY_MERGEDVODB $1
     279end
     280
     281macro survey.show.mergedvodb
     282  if ($0 != 1)
     283    echo "USAGE: survey.show.mergedvodb"
     284    break
     285  end
     286  book listbook SURVEY_MERGEDVODB
     287end
     288
    272289
    273290# user functions to manipulate destreak labels
     
    826843    if ("$stage" == "cam")
    827844        #only queue destreaked cams. stacks and staticsky don't need this
    828         if ("$DB:$SURVEY_ADDSTAR_DB" == "isp")
     845    #    if ("$DB:$SURVEY_ADDSTAR_DB" == "isp")
    829846            #this is the only way I can think of how to handle this (but it is messy). If it is a database that we KNOW doesn't use magicked (ie, isp), then do not queue destreaked
     847           # now with no magic, all are uncensored
    830848           $run = $run -uncensored
    831         else
     849#       else
    832850           #if not isp, then run destreaked version only
    833            $run = $run -destreaked
    834         end
     851#          $run = $run -destreaked
     852#       end
    835853    end
    836854    if ("$stage" == "staticsky")
     
    875893  end
    876894end
     895
     896
     897task survey.mergedvodb
     898  host local
     899 
     900  periods      -poll $SURVEY_POLL
     901  periods      -exec $SURVEY_EXEC
     902  periods      -timeout $SURVEY_TIMEOUT
     903  npending     1
     904
     905  stdout $LOGDIR/survey.mergedvodb.log
     906  stderr $LOGDIR/survey.mergedvodb.log
     907
     908  task.exec
     909    book npages SURVEY_MERGEDVODB -var N
     910    if ($N == 0)
     911#      echo "No labels for processing"
     912      break
     913    endif
     914
     915    book getpage SURVEY_MERGEDVODB 0 -var tag -key STATE NEW
     916    if ("$tag" == "NULL")
     917      # All labels have been done --- reset
     918    # echo "Resetting labels"
     919      for i 0 $N
     920        book getpage SURVEY_MERGEDVODB $i -var tag
     921        book setword SURVEY_MERGEDVODB $tag STATE NEW
     922      end
     923      book getpage SURVEY_MERGEDVODB 0 -var tag -key STATE NEW
     924
     925      # Select different database
     926      $SURVEY_MERGEDVODB_DB ++
     927      if ($SURVEY_MERGEDVODB_DB >= $DB:n) set SURVEY_MERGEDVODB_DB = 0
     928    end
     929   book setword SURVEY_MERGEDVODB $tag STATE DONE
     930   book getword SURVEY_MERGEDVODB $tag MERGEDVODB -var mergedvodb
     931   book getword SURVEY_MERGEDVODB $tag MINIDVODB_GROUP -var minidvodb_group
     932     
     933 #   $run = addtool -definebyquery -destreaked -label $label -set_dvodb $dbodb
     934    #$run = mergetool
     935    $run = mergedvodb_queue.pl --outroot $mergedvodb --mergedvodb $mergedvodb --minidvodb_group $minidvodb_group
     936    if ($DB:n == 0)
     937      option DEFAULT
     938    else
     939      $run = $run --dbname $DB:$SURVEY_MERGEDVODB_DB
     940      option $DB:$SURVEY_MERGEDVODB_DB
     941    end
     942    #this run doesn't work because there's no workdir
     943    #$run = $run -definebyquery -mergedvodb $mergedvodb -minidvodb_group $minidvodb_group
     944   
     945   
     946    # echo $run
     947
     948  echo $run
     949    command $run
     950  end
     951
     952  # success
     953   
     954  task.exit    0
     955#    echo "Success"
     956  end
     957
     958  # locked list
     959  task.exit    default
     960    showcommand failure
     961  end
     962
     963  task.exit    crash
     964    showcommand crash
     965  end
     966
     967  # operation times out?
     968  task.exit    timeout
     969    showcommand timeout
     970  end
     971end
     972
    877973
    878974
Note: See TracChangeset for help on using the changeset viewer.