IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 19, 2010, 5:46:14 PM (16 years ago)
Author:
watersc1
Message:

First pass on exposure level jpegs for warp/stack/diff

Location:
branches/czw_branch/20100519
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20100519/ippTasks/diff.pro

    r27920 r28045  
    4444    active false
    4545  end
     46  task diff.summary.load
     47    active true
     48  end
     49  task diff.summary.run
     50    active true
     51  end
    4652end
    4753
    … …  
    5864  end
    5965  task diff.revert
     66    active false
     67  end
     68  task diff.summary.load
     69    active false
     70  end
     71  task diff.summary.run
    6072    active false
    6173  end
    … …  
    193205    # host anyhost
    194206    # $WORKDIR = $WORKDIR_TEMPLATE
    195 
    196207    if (($DIFF_MODE == 1)||("$DIFF_MODE" == "NULL"))
    197208        $DIFF_TAG = ""
    … …  
    477488  end
    478489end
     490
     491### Load tasks for doing the diffs
     492### Tasks are loaded into diffPendingSkyCell.
     493task           diff.summary.load
     494  host         local
     495
     496  periods      -poll $LOADPOLL
     497  periods      -exec $LOADEXEC
     498  periods      -timeout 1200
     499  npending     1
     500
     501  stdout NULL
     502  stderr $LOGDIR/diff.summary.log
     503
     504  task.exec
     505    if ($LABEL:n == 0) break
     506    $run = difftool -tosummary
     507    if ($DB:n == 0)
     508      option DEFAULT
     509    else
     510      # save the DB name for the exit tasks
     511      option $DB:$diffSummary_DB
     512      $run = $run -dbname $DB:$diffSummary_DB
     513      $diffSummary_DB ++
     514      if ($diffSummary_DB >= $DB:n) set diffSummary_DB = 0
     515    end
     516    add_poll_args run
     517    add_poll_labels run
     518    command $run
     519  end
     520
     521  # success
     522  task.exit    0
     523    # convert 'stdout' to book format
     524    # XXX change tess_id to tess_dir when db is updated
     525    ipptool2book stdout diffPendingSummary -key diff_id -uniq -setword dbname $options:0 -setword pantaskState INIT
     526    if ($VERBOSE > 2)
     527      book listbook diffPendingSummary
     528    end
     529
     530    # delete existing entries in the appropriate pantaskStates
     531    process_cleanup diffPendingSummary
     532  end
     533
     534  # locked list
     535  task.exit    default
     536    showcommand failure
     537  end
     538
     539  task.exit    crash
     540    showcommand crash
     541  end
     542
     543  # operation times out?
     544  task.exit    timeout
     545    showcommand timeout
     546  end
     547end
     548
     549### Run tasks for calculating the diff overlaps
     550### Tasks are taken from diffPendingSkyCell.
     551task           diff.summary.run
     552  periods      -poll $RUNPOLL
     553  periods      -exec $RUNEXEC
     554  periods      -timeout 60
     555
     556  task.exec
     557    # if we are unable to run the 'exec', use a long retry time
     558    periods -exec $RUNEXEC
     559
     560    book npages diffPendingSummary -var N
     561    if ($N == 0) break
     562    if ($NETWORK == 0) break
     563   
     564    # look for new images in diffPendingSkyCell (pantaskState == INIT)
     565    book getpage diffPendingSummary 0 -var pageName -key pantaskState INIT
     566    if ("$pageName" == "NULL") break
     567
     568    book setword diffPendingSummary $pageName pantaskState RUN
     569    book getword diffPendingSummary $pageName diff_id -var DIFF_ID
     570    book getword diffPendingSummary $pageName camera -var CAMERA
     571    book getword diffPendingSummary $pageName workdir -var WORKDIR_TEMPLATE
     572    book getword diffPendingSummary $pageName dbname -var DBNAME
     573    book getword warpPendingSummary $pageName tess_id -var TESS_DIR
     574    book getword diffPendingSummary $pageName diff_mode -var DIFF_MODE
     575    book getword diffPendingSummary $pageName exp_tag -var EXP_TAG
     576    book getword diffPendingSummary $pageName state -var RUN_STATE
     577
     578    # set the host and workdir based on the skycell hash
     579    host anyhost
     580    strsub $WORKDIR_TEMPLATE @HOST@.0 $default_host -var WORKDIR
     581#    set.workdir.by.skycell $SKYCELL_ID $WORKDIR_TEMPLATE $default_host WORKDIR
     582
     583#    if ("$PATH_BASE" == "NULL")
     584
     585    if (($DIFF_MODE == 1)||("$DIFF_MODE" == "NULL"))
     586        $DIFF_TAG = ""
     587    end
     588    if ($DIFF_MODE == 2)
     589        $DIFF_TAG = "WS."
     590    end
     591    if ($DIFF_MODE == 3)
     592        $DIFF_TAG = "SW."
     593    end
     594    if ($DIFF_MODE == 4)
     595        $DIFF_TAG = "SS."
     596    end
     597
     598    basename $TESS_DIR -var TESS_ID
     599
     600    sprintf outroot "%s/%s/%s/%s.%s.%sdif.%s.%s" $WORKDIR $TESS_ID $SKYCELL_ID $TESS_ID $SKYCELL_ID $DIFF_TAG $DIFF_ID
     601        ## generate outroot specific to this exposure
     602
     603
     604    stdout $LOGDIR/diff.summary.log
     605    stderr $LOGDIR/diff.summary.log
     606
     607    $run = skycell_jpeg.pl --stage diff --stage_id $DIFF_ID --camera $CAMERA --outroot $outroot
     608    add_standard_args run
     609
     610    # save the pageName for future reference below
     611    options $pageName
     612
     613    # create the command line
     614    if ($VERBOSE > 1)
     615      echo command $run
     616    end
     617    periods -exec 0.05
     618    command $run
     619  end
     620
     621  # default exit status
     622  task.exit    default
     623    process_exit diffPendingSummary $options:0 $JOB_STATUS
     624  end
     625
     626  # locked list
     627  task.exit    crash
     628    showcommand crash
     629    echo "hostname: $JOB_HOSTNAME"
     630    book setword diffPendingSummary $options:0 pantaskState CRASH
     631  end
     632
     633  # operation timed out?
     634  task.exit    timeout
     635    showcommand timeout
     636    book setword diffPendingSummary $options:0 pantaskState TIMEOUT
     637  end
     638end
  • branches/czw_branch/20100519/ippTasks/warp.pro

    r27926 r28045  
    5555    active true
    5656  end
     57  task warp.summary.load
     58    active true
     59  end
     60  task warp.summary.run
     61    active true
     62  end
    5763end
    5864
    … …  
    7884  end
    7985  task warp.revert.warped
     86    active false
     87  end
     88  task warp.summary.load
     89    active false
     90  end
     91  task warp.summary.run
    8092    active false
    8193  end
    … …  
    525537  end
    526538end
     539
     540### Load tasks for doing the warps
     541### Tasks are loaded into warpPendingSkyCell.
     542task           warp.summary.load
     543  host         local
     544
     545  periods      -poll $LOADPOLL
     546  periods      -exec $LOADEXEC
     547  periods      -timeout 1200
     548  npending     1
     549
     550  stdout NULL
     551  stderr $LOGDIR/warp.summary.log
     552
     553  task.exec
     554    if ($LABEL:n == 0) break
     555    $run = warptool -tosummary
     556    if ($DB:n == 0)
     557      option DEFAULT
     558    else
     559      # save the DB name for the exit tasks
     560      option $DB:$warpSummary_DB
     561      $run = $run -dbname $DB:$warpSummary_DB
     562      $warpSummary_DB ++
     563      if ($warpSummary_DB >= $DB:n) set warpSummary_DB = 0
     564    end
     565    add_poll_args run
     566    add_poll_labels run
     567    command $run
     568  end
     569
     570  # success
     571  task.exit    0
     572    # convert 'stdout' to book format
     573    # XXX change tess_id to tess_dir when db is updated
     574    ipptool2book stdout warpPendingSummary -key warp_id -uniq -setword dbname $options:0 -setword pantaskState INIT
     575    if ($VERBOSE > 2)
     576      book listbook warpPendingSummary
     577    end
     578
     579    # delete existing entries in the appropriate pantaskStates
     580    process_cleanup warpPendingSummary
     581  end
     582
     583  # locked list
     584  task.exit    default
     585    showcommand failure
     586  end
     587
     588  task.exit    crash
     589    showcommand crash
     590  end
     591
     592  # operation times out?
     593  task.exit    timeout
     594    showcommand timeout
     595  end
     596end
     597
     598### Run tasks for calculating the warp overlaps
     599### Tasks are taken from warpPendingSkyCell.
     600task           warp.summary.run
     601  periods      -poll $RUNPOLL
     602  periods      -exec $RUNEXEC
     603  periods      -timeout 60
     604
     605  task.exec
     606    # if we are unable to run the 'exec', use a long retry time
     607    periods -exec $RUNEXEC
     608
     609    book npages warpPendingSummary -var N
     610    if ($N == 0) break
     611    if ($NETWORK == 0) break
     612   
     613    # look for new images in warpPendingSkyCell (pantaskState == INIT)
     614    book getpage warpPendingSummary 0 -var pageName -key pantaskState INIT
     615    if ("$pageName" == "NULL") break
     616
     617    book setword warpPendingSummary $pageName pantaskState RUN
     618    book getword warpPendingSummary $pageName warp_id -var WARP_ID
     619    book getword warpPendingSummary $pageName camera -var CAMERA
     620    book getword warpPendingSummary $pageName workdir -var WORKDIR_TEMPLATE
     621    book getword warpPendingSummary $pageName dbname -var DBNAME
     622    book getword warpPendingSummary $pageName tess_id -var TESS_DIR
     623    book getword warpPendingSummary $pageName exp_tag -var EXP_TAG
     624    book getword warpPendingSummary $pageName state -var RUN_STATE
     625
     626    # set the host and workdir based on the skycell hash
     627    host anyhost
     628    strsub $WORKDIR_TEMPLATE @HOST@.0 $default_host -var WORKDIR
     629#    set.workdir.by.skycell $SKYCELL_ID $WORKDIR_TEMPLATE $default_host WORKDIR
     630
     631#    if ("$PATH_BASE" == "NULL")
     632        ## generate outroot specific to this exposure
     633    basename $TESS_DIR -var TESS_ID
     634
     635    sprintf outroot "%s/%s/%s.wrp.%s.%s" $WORKDIR $EXP_TAG $EXP_TAG $WARP_ID $TESS_ID
     636
     637
     638    stdout $LOGDIR/warp.summary.log
     639    stderr $LOGDIR/warp.summary.log
     640
     641    $run = skycell_jpeg.pl --stage warp --stage_id $WARP_ID --camera $CAMERA --outroot $outroot
     642    add_standard_args run
     643
     644    # save the pageName for future reference below
     645    options $pageName
     646
     647    # create the command line
     648    if ($VERBOSE > 1)
     649      echo command $run
     650    end
     651    periods -exec 0.05
     652    command $run
     653  end
     654
     655  # default exit status
     656  task.exit    default
     657    process_exit warpPendingSummary $options:0 $JOB_STATUS
     658  end
     659
     660  # locked list
     661  task.exit    crash
     662    showcommand crash
     663    echo "hostname: $JOB_HOSTNAME"
     664    book setword warpPendingSummary $options:0 pantaskState CRASH
     665  end
     666
     667  # operation timed out?
     668  task.exit    timeout
     669    showcommand timeout
     670    book setword warpPendingSummary $options:0 pantaskState TIMEOUT
     671  end
     672end
  • branches/czw_branch/20100519/ppSkycell/src/ppSkycellLoop.c

    r24005 r28045  
    301301        pmFPAfile *file1 = pmFPAfileSelectSingle(data->config->files, "PPSKYCELL.JPEG1", 0);
    302302        file1->save = true;
    303         file1->index = i;
     303        file1->fileIndex = i;
    304304        pmFPAfile *file2 = pmFPAfileSelectSingle(data->config->files, "PPSKYCELL.JPEG2", 0);
    305305        file2->save = true;
    306         file2->index = i;
     306        file2->fileIndex = i;
    307307#if 0
    308308        {
  • branches/czw_branch/20100519/psconfig/tagsets/ipp-2.9.dist

    r27873 r28045  
    7373  YYYYY  ppTranslate            ipp-2-9          -0
    7474  YYYYY  ppViz                  ipp-2-9          -0
     75  YYYYY  ppSkycell              ipp-2-9          -0
    7576
    7677  YYYYY  extsrc/gpcsw           ipp-2-9          -0
Note: See TracChangeset for help on using the changeset viewer.