IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 29, 2006, 2:28:33 PM (20 years ago)
Author:
eugene
Message:

matching detrend and phase0 PanTasks scripts with current pXtools commands

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/detrend.stack.pro

    r8193 r8691  
    1 
    21## this file contains the tasks for running the detrend stacking stage
    32
     3# get a list of imfiles to stack
     4# dettool -tostack -simple
     5# 1 0 bias mc
     6# DET_ID ITER TYPE CLASS_ID
     7
     8# function to stack the imfiles:
     9# detrend_stack.pl 1 0 mc bias
     10
    411## these tasks use the queue DetrendClassIDtoStack
     12
     13## these tasks use the queue DetrendImfilesToProcess
     14## the DetrendClassIDtoStack queue contains:
     15## STATE DET_ID ITER TYPE CLASS_ID
    516
    617# select images ready for copy
     
    819# compare the new list with the ones already selected
    920task           dettool.stack.load
    10   command      dettool -chip -processed
     21  command      dettool -tostack -simple
    1122  host         local
    1223
     
    2233
    2334    # compare output with newImage queue
    24     # only add entries which don't exist in queue
     35    # only add entries which do not exist in queue
    2536    queuesize stdout -var Nqueue
    2637    for i 0 $Nqueue
    2738      queuepop stdout -var line
    28       queuepush DetrendClassIDtoStack -uniq -key 1:2:4 "NEW $line"
     39      list word -split $line
     40      $DET_ID   = $word:0
     41      $ITER     = $word:1
     42      $TYPE     = $word:2
     43      $CLASS_ID = $word:3
     44      queuepush DetrendClassIDtoStack -uniq -key 1:2:4 "NEW $DET_ID $ITER $TYPE $CLASS_ID"
    2945    end
    3046
     
    6884
    6985    strpop line state
    70     queuepush DetrendClassIDtoStack -replace -key 0 "RUN $line"
     86    queuepush DetrendClassIDtoStack -replace -key 1:2:4 "RUN $line"
     87
     88    # the DetrendClassIDtoStack queue contains:
     89    # STATE DET_ID ITER TYPE CLASS_ID
     90    ## NOTE: the queue has the STATE prepended
     91    list word -split $line
     92    $DET_ID   = $word:1
     93    $ITER     = $word:2
     94    $TYPE     = $word:3
     95    $CLASS_ID = $word:4
    7196
    7297    # specify choice of remote host:
    73     # 'anyhost' specified random remote host
    74     # if we needed to specify a host explicitly, use a command like
    75     # one of the following.  the -required forces execution on the
    76     # named host, and blocks the task until the host is available
    77     # host kiawe
    78     # host alala -required
    7998    host anyhost
    80 
    81     # choose the default recipe appropriate to this type of file
    82     $recipe = `get.recipe $type`
    8399
    84100    # create example job options as a demonstration
    85101    options "$line"
    86 
    87     # we can put the dettool and ppMerge commands here, or wrap them in a single script
    88     # $urilist = `dettool -processed -det_id $det_id -iteration $iteration -chip"
    89     # $uri_out = ???
    90     # command ppMerge $uri_out $uri $uri ... -recipe PPMERGE $recipe
    91     command ppMerge.dettool $uri_out -det_id $det_id -iteration $iteration -recipe PPMERGE $recipe
     102    # detrend_stack.pl 1 0 mc bias
     103    command detrend_stack.pl $DET_ID $ITER $CLASS_ID $TYPE
    92104  end
    93105
    94106  # success
    95107  task.exit 0
    96     # XXX need to parse the options to identify the values below (if not part of cmdline?)
    97     exec dettool -addstacked -det_id $det_id -iteration $iteration -class_id $class_id -procrecipe $recipe
    98108    queuepush DetrendClassIDtoStack -replace -key 1:2:4 "DONE $options:0"
    99109  end
     
    101111  # default exit status
    102112  task.exit    default
    103     queuepush DetrendClassIDtoStack -replace -key 0 "FAIL $options:0"
     113    queuepush DetrendClassIDtoStack -replace -key 1:2:4 "FAIL $options:0"
    104114  end
    105115
    106116  # operation times out?
    107117  task.exit    timeout
    108     queuepush DetrendClassIDtoStack -replace -key 0 "FAIL $options:0"
     118    queuepush DetrendClassIDtoStack -replace -key 1:2:4 "FAIL $options:0"
    109119  end
    110120end
Note: See TracChangeset for help on using the changeset viewer.