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

    r8193 r8691  
     1## this file contains the tasks for running the detrend processing stage
    12
    2 ## this file contains the tasks for running the detrend processing stage
     3# query for pending imfiles to process:
     4# dettool -raw -simple
     5# 1 bias 850131b fpa mc 850131b.fits BIAS r.MP9601 1.656000 5.496118 0.349071 0.000000 1155.934692 107.037283 46.214947 37.160000 105.480000 -133.067001 0.000000
     6# this returns many columns for manual operations. we strip all but the first few:
     7
     8# process a single imfile
     9# detrend_process.pl 1 850131b mc bias 850131b.fits 850131b
    310
    411## these tasks use the queue DetrendImfilesToProcess
    512## the DetrendImfilesToProcess queue contains:
    6 ## STATE .....
     13## STATE DET_ID TYPE EXP_KEY CLASS CLASS_ID URI
    714
    815# select images ready for copy
     
    1017# compare the new list with the ones already selected
    1118task           dettool.raw.load
    12   command      dettool -raw
     19  command      dettool -raw -simple
    1320  host         local
    1421
     
    2936    for i 0 $Nqueue
    3037      queuepop stdout -var line
    31       queuepush DetrendImfilesToProcess -uniq -key 1:2:4 "NEW $line"
     38      list word -split $line
     39      $DET_ID   = $word:0
     40      $TYPE     = $word:1
     41      $EXP_KEY  = $word:2
     42      $CLASS    = $word:3
     43      $CLASS_ID = $word:4
     44      $URI      = $word:5
     45      queuepush DetrendImfilesToProcess -uniq -key 1:3:5 "NEW $DET_ID $TYPE $EXP_KEY $CLASS $CLASS_ID $URI"
    3246    end
    3347
     
    7084
    7185    strpop line state
    72     queuepush DetrendImfilesToProcess -replace -key 0 "RUN $line"
     86    queuepush DetrendImfilesToProcess -replace -key 1:3:5 "RUN $line"
     87
     88    ## the DetrendImfilesToProcess queue contains:
     89    # STATE DET_ID TYPE EXP_KEY CLASS CLASS_ID URI
     90    ## NOTE: the queue has the STATE prepended
     91    list word -split $line
     92    $DET_ID   = $word:1
     93    $TYPE     = $word:2
     94    $EXP_KEY  = $word:3
     95    $CLASS    = $word:4
     96    $CLASS_ID = $word:5
     97    $URI      = $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     command ppImage -file $uri $uri_out -recipe PPIMAGE $recipe
     104    # ~/ipp/helpers/detrend_process.pl 1 850131b mc bias 850131b.fits 850131b
     105    command detrend_process.pl $DET_ID $EXP_KEY $CLASS_ID $TYPE $URI $EXP_KEY
    89106  end
    90107
    91108  # success
    92109  task.exit 0
    93     # XXX need to parse the options to identify the values below (if not part of cmdline?)
    94     exec dettool -addprocessed -det_id $det_id -exp_id $exp_id -class_id $class_id -uri $output_uri -procrecipe $recipe
    95     queuepush DetrendImfilesToProcess -replace -key 1:2:4 "DONE $options:0"
     110    queuepush DetrendImfilesToProcess -replace -key 1:3:5 "DONE $options:0"
    96111  end
    97112
    98113  # default exit status
    99114  task.exit    default
    100     queuepush DetrendImfilesToProcess -replace -key 0 "FAIL $options:0"
     115    queuepush DetrendImfilesToProcess -replace -key 1:3:5 "FAIL $options:0"
    101116  end
    102117
    103118  # operation times out?
    104119  task.exit    timeout
    105     queuepush DetrendImfilesToProcess -replace -key 0 "FAIL $options:0"
     120    queuepush DetrendImfilesToProcess -replace -key 1:3:5 "FAIL $options:0"
    106121  end
    107122end
Note: See TracChangeset for help on using the changeset viewer.