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.resid.pro

    r8193 r8691  
    22## this file contains the tasks for running the detrend processing stage
    33
     4# dettool -toresid -simple
     5# 0    bias 1      850131b mc       o_850131b.mc.fit PPIMAGE_O 1.492870 2.848350 292.565582
     6# ITER TYPE DET_ID EXP_KEY CLASS_ID URI-IN           
     7
     8# detrend_create_resid.pl 1      0    850131b mc       bias bias_mc_1_0.fit o_850131b.mc.fit 850131b
     9# detrend_create_resid.pl DET_ID ITER EXP_KEY CLASS_ID TYPE (URI-DET)       (URL-IN)         (EXP_KEY)
     10# URL-DET: $TYPE\_$CLASS_ID\_$DET_ID\_$ITER.fit
     11
    412## these tasks use the queue DetrendResidImfiles
    513## the DetrendResidImfiles queue contains:
    6 ## STATE .....
     14## STATE ITER TYPE DET_ID EXP_KEY CLASS_ID URI_IN
    715
    816# select images ready for copy
     
    1018# compare the new list with the ones already selected
    1119task           dettool.resid.load
    12   command      dettool -resid
     20  command      dettool -toresid -simple
    1321  host         local
    1422
     
    1624  periods      -exec 5
    1725  periods      -timeout 30
    18   trange       18:00 23:59
    1926
    2027  # success
     
    2936    for i 0 $Nqueue
    3037      queuepop stdout -var line
    31       queuepush DetrendResidImfiles -uniq -key 1:2:4 "NEW $line"
     38      list word -split $line
     39      $ITER     = $word:0
     40      $TYPE     = $word:1
     41      $DET_ID   = $word:2
     42      $EXP_KEY  = $word:3
     43      $CLASS_ID = $word:4
     44      $URI_IN   = $word:5
     45      queuepush DetrendResidImfiles -uniq -key 1:3:4:5 "NEW $ITER $TYPE $DET_ID $EXP_KEY $CLASS_ID $URI_IN"
    3246    end
    3347
     
    7084
    7185    strpop line state
    72     queuepush DetrendResidImfiles -replace -key 0 "RUN $line"
     86    queuepush DetrendResidImfiles -replace -key 1:3:4:5 "RUN $line"
     87
     88    ## the DetrendResidImfiles queue contains:
     89    ## STATE ITER TYPE DET_ID EXP_KEY CLASS_ID URI_IN
     90    ## NOTE: the queue has the STATE prepended
     91    list word -split $line
     92    $ITER     = $word:1
     93    $TYPE     = $word:2
     94    $DET_ID   = $word:3
     95    $EXP_KEY  = $word:4
     96    $CLASS_ID = $word:5
     97    $URI_IN   = $word:6
    7398
    7499    # specify choice of remote host:
    75     # 'anyhost' specified random remote host
    76     # if we needed to specify a host explicitly, use a command like
    77     # one of the following.  the -required forces execution on the
    78     # named host, and blocks the task until the host is available
    79     # host kiawe
    80     # host alala -required
    81100    host anyhost
    82 
    83     # choose the default recipe appropriate to this type of file
    84     $recipe = `get.recipe $type`
    85101
    86102    # create example job options as a demonstration
    87103    options "$line"
    88 
    89     # need to choose different variations based on the type
    90     # need to supply the matched detrend images...
    91     command ppImage -file $uri $uri_out -recipe PPIMAGE $recipe -bias $master
    92     command ppImage -file $uri $uri_out -recipe PPIMAGE $recipe -flat $master
     104    # detrend_create_resid.pl DET_ID ITER EXP_KEY CLASS_ID TYPE (URI-DET) (URL-IN) (EXP_KEY ???)
     105    $URL_DET = $TYPE\_$CLASS_ID\_$DET_ID\_$ITER.fit
     106    command detrend_create_resid.pl $DET_ID $ITER $EXP_KEY $CLASS_ID $TYPE $URI_DET $URL_IN $EXP_KEY
    93107  end
    94108
    95109  # success
    96110  task.exit 0
    97     # XXX need to parse the options to identify the values below (if not part of cmdline?)
    98     exec dettool -addprocessed -det_id $det_id -exp_id $exp_id -class_id $class_id -uri $output_uri -procrecipe $recipe
    99     queuepush DetrendResidImfiles -replace -key 1:2:4 "DONE $options:0"
     111    queuepush DetrendResidImfiles -replace -key 1:3:4:5 "DONE $options:0"
    100112  end
    101113
    102114  # default exit status
    103115  task.exit    default
    104     queuepush DetrendResidImfiles -replace -key 0 "FAIL $options:0"
     116    queuepush DetrendResidImfiles -replace -key 1:3:4:5 "FAIL $options:0"
    105117  end
    106118
    107119  # operation times out?
    108120  task.exit    timeout
    109     queuepush DetrendResidImfiles -replace -key 0 "FAIL $options:0"
     121    queuepush DetrendResidImfiles -replace -key 1:3:4:5 "FAIL $options:0"
    110122  end
    111123end
Note: See TracChangeset for help on using the changeset viewer.