IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 2, 2006, 12:36:59 PM (20 years ago)
Author:
eugene
Message:

updates to match new refactoring of tables

File:
1 edited

Legend:

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

    r9081 r9104  
    1515
    1616queueinit DetrendResidImfiles
    17 queueinit DetrendResidExp
     17queueinit DetrendResidExposures
    1818if ($?network == 0)
    1919  $network = 1
     
    6565
    6666  # locked list
    67   task.exit    1
    68     echo       "new.images: exec failure"
    69   end
    70 
    71   # default exit status
    72   task.exit    default
    73     echo       "new.images: unknown exit status: $EXIT"
    74   end
    75 
    76   # operation times out?
    77   task.exit    timeout
    78     echo       "new.images: timeout"
     67  # default exit status
     68  task.exit    default
     69    echo       "detrend.resid: failure"
     70  end
     71
     72  # operation times out?
     73  task.exit    timeout
     74    echo       "detrend.resid: timeout"
    7975  end
    8076end
    8177
    8278# copy new images, sending job to desired host
    83 task           dettool.resid.process
     79task           dettool.resid.run
    8480  periods      -poll 0.5
    8581  periods      -exec 5.0
     
    110106    $CLASS_ID = $word:4
    111107    $URI_IN   = $word:5
     108    $CAMERA   = $word:6
    112109
    113110    stdout $EXP_KEY.detresid.$DET_ID.$ITER.$CLASS_ID.log
     
    124121    options "$line"
    125122    # detrend_create_resid.pl DET_ID ITER EXP_KEY CLASS_ID TYPE (URI-DET) (URL-IN) (EXP_KEY ???)
    126     $URL_DET = isp.$DET_TYPE.$DET_ID.$ITER.$CLASS_ID.fits
    127     # $URL_DET = $CAMERA.$DET_TYPE.$DET_ID.$ITER.$CLASS_ID.fits
     123    # $URL_DET = isp.$DET_TYPE.$DET_ID.$ITER.$CLASS_ID.fits
     124    $URL_DET = $CAMERA.$DET_TYPE.$DET_ID.$ITER.$CLASS_ID.fits
    128125    echo command detrend_create_resid.pl --det_id $DET_ID --iteration $ITER --exp_id $EXP_KEY --class_id $CLASS_ID --det_type $DET_TYPE --detrend $URL_DET --input_uri $URI_IN
    129126    command detrend_create_resid.pl --det_id $DET_ID --iteration $ITER --exp_id $EXP_KEY --class_id $CLASS_ID --det_type $DET_TYPE --detrend $URL_DET --input_uri $URI_IN
     
    147144
    148145# select images ready for copy
    149 # new entries are added to queue DetrendResidExp
     146# new entries are added to queue DetrendResidExposures
    150147# compare the new list with the ones already selected
    151148task           dettool.residexp.load
     
    177174      $EXP_KEY  = $word:3
    178175      $INCLUDE  = $word:4
    179       queuepush DetrendResidExp -uniq -key 1:2:4 "NEW $DET_ID $ITER $DET_TYPE $EXP_KEY $INCLUDE"
     176      queuepush DetrendResidExposures -uniq -key 1:2:4 "NEW $DET_ID $ITER $DET_TYPE $EXP_KEY $INCLUDE"
    180177    end
    181178
    182179    # delete existing entries which are DONE
    183     queuedrop DetrendResidExp -key 0 DONE
     180    queuedrop DetrendResidExposures -key 0 DONE
    184181  end
    185182
    186183  # locked list
    187   task.exit    1
    188     echo       "new.images: exec failure"
    189   end
    190 
    191   # default exit status
    192   task.exit    default
    193     echo       "new.images: unknown exit status: $EXIT"
    194   end
    195 
    196   # operation times out?
    197   task.exit    timeout
    198     echo       "new.images: timeout"
     184  # default exit status
     185  task.exit    default
     186    echo       "detrend.residexp: failure"
     187  end
     188
     189  # operation times out?
     190  task.exit    timeout
     191    echo       "detrend.residexp: timeout"
    199192  end
    200193end
    201194
    202195# copy new images, sending job to desired host
    203 task           dettool.residexp.process
     196task           dettool.residexp.run
    204197  periods      -poll 0.5
    205198  periods      -exec 5.0
     
    207200
    208201  task.exec
    209     queuesize DetrendResidExp -var N
     202    queuesize DetrendResidExposures -var N
    210203    if ($N == 0) break
    211204    if ($network == 0) break
    212205   
    213     # look for new images on the internal DetrendResidExp queue
     206    # look for new images on the internal DetrendResidExposures queue
    214207    # caution with these 'if' statements: syntax errors
    215208    # will make the task fail without given a good status
    216     queuepop DetrendResidExp -var line -key 0 NEW
     209    queuepop DetrendResidExposures -var line -key 0 NEW
    217210    if ("$line" == "NULL") break
    218211
    219212    strpop line state
    220     queuepush DetrendResidExp -replace -key 1:2:4 "RUN $line"
    221 
    222     ## the DetrendResidExp queue contains:
     213    queuepush DetrendResidExposures -replace -key 1:2:4 "RUN $line"
     214
     215    ## the DetrendResidExposures queue contains:
    223216    ## STATE ITER TYPE DET_ID EXP_KEY CLASS_ID URI_IN
    224217    ## NOTE: the queue has the STATE prepended
     
    248241  # success
    249242  task.exit 0
    250     queuepush DetrendResidExp -replace -key 1:2:4 "DONE $options:0"
    251   end
    252 
    253   # default exit status
    254   task.exit    default
    255     queuepush DetrendResidExp -replace -key 1:2:4 "FAIL $options:0"
    256   end
    257 
    258   # operation times out?
    259   task.exit    timeout
    260     queuepush DetrendResidExp -replace -key 1:2:4 "TIMEOUT $options:0"
    261   end
    262 end
     243    queuepush DetrendResidExposures -replace -key 1:2:4 "DONE $options:0"
     244  end
     245
     246  # default exit status
     247  task.exit    default
     248    queuepush DetrendResidExposures -replace -key 1:2:4 "FAIL $options:0"
     249  end
     250
     251  # operation times out?
     252  task.exit    timeout
     253    queuepush DetrendResidExposures -replace -key 1:2:4 "TIMEOUT $options:0"
     254  end
     255end
Note: See TracChangeset for help on using the changeset viewer.