IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18794


Ignore:
Timestamp:
Jul 30, 2008, 2:35:42 PM (18 years ago)
Author:
Paul Price
Message:

I don't think there really is supposed to be an exposure-level fake script.

Location:
trunk
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/Build.PL

    r18789 r18794  
    4848        scripts/camera_exp.pl
    4949        scripts/fake_imfile.pl
    50         scripts/fake_exp.pl
    5150        scripts/warp_overlap.pl
    5251        scripts/warp_skycell.pl
  • trunk/ippTasks/fake.pro

    r18787 r18794  
    77
    88book init fakePendingImfile
    9 book init fakePendingExp
    109
    1110macro fake.status
    1211  book listbook fakePendingImfile
    13   book listbook fakePendingExp
    1412end
    1513
    1614macro fake.reset
    1715  book init fakePendingImfile
    18   book init fakePendingExp
    1916end
    2017
    … …  
    2421  end
    2522  task fake.imfile.run
    26     active true
    27   end
    28   task fake.exp.load
    29     active true
    30   end
    31   task fake.exp.run
    3223    active true
    3324  end
    … …  
    4132    active false
    4233  end
    43   task fake.exp.load
    44     active false
    45   end
    46   task fake.exp.run
    47     active false
    48   end
    4934end
    5035
    5136# this variable will cycle through the known database names
    5237$fakeImfile_DB = 0
    53 $fakeExp_DB = 0
    5438
    5539# select images ready for fake analysis
    … …  
    171155
    172156
    173 
    174 
    175 # select exposures ready for fake analysis
    176 # new entries are added to fakePendingExp
    177 # skip already-present entries
    178 task           fake.exp.load
    179   host         local
    180 
    181   periods      -poll $LOADPOLL
    182   periods      -exec $LOADEXEC
    183   periods      -timeout 30
    184   npending     1
    185 
    186   stdout NULL
    187   stderr $LOGDIR/fake.exp.log
    188 
    189   task.exec
    190     if ($DB:n == 0)
    191       option DEFAULT
    192       command faketool -pendingexp -limit 20
    193     else
    194       # save the DB name for the exit tasks
    195       option $DB:$fakeExp_DB
    196       command faketool -pendingexp -limit 20 -dbname $DB:$fakeExp_DB
    197       $fakeExp_DB ++
    198       if ($fakeExp_DB >= $DB:n) set fakeExp_DB = 0
    199     end
    200   end
    201 
    202   # success
    203   task.exit    0
    204     # convert 'stdout' to book format
    205     ipptool2book stdout fakePendingExp -key fake_id -uniq -setword dbname $options:0 -setword pantaskState INIT
    206     if ($VERBOSE > 2)
    207       book listbook fakePendingExp
    208     end
    209 
    210     # delete existing entries in the appropriate pantaskStates
    211     process_cleanup fakePendingExp
    212   end
    213 
    214   # locked list
    215   task.exit    default
    216     showcommand failure
    217   end
    218 
    219   # operation times out?
    220   task.exit    timeout
    221     showcommand timeout
    222   end
    223 end
    224 
    225 # run the fake_exp.pl script on pending images
    226 task           fake.exp.run
    227   periods      -poll $RUNPOLL
    228   periods      -exec $RUNEXEC
    229   periods      -timeout 60
    230 
    231   task.exec
    232     book npages fakePendingExp -var N
    233     if ($N == 0) break
    234     if ($NETWORK == 0) break
    235    
    236     # look for new exposures in fakePendingExp (pantaskState == INIT)
    237     book getpage fakePendingExp 0 -var pageName -key pantaskState INIT
    238     if ("$pageName" == "NULL") break
    239 
    240     book setword fakePendingExp $pageName pantaskState RUN
    241     book getword fakePendingExp $pageName camera -var CAMERA
    242     book getword fakePendingExp $pageName exp_id -var EXP_ID
    243     book getword fakePendingExp $pageName exp_tag -var EXP_TAG
    244     book getword fakePendingExp $pageName fake_id -var FAKE_ID
    245     book getword fakePendingExp $pageName workdir -var WORKDIR_TEMPLATE
    246     book getword fakePendingExp $pageName dbname -var DBNAME
    247     book getword fakePendingExp $pageName reduction -var REDUCTION
    248 
    249     # specify choice of local or remote host based on camera and fake
    250     set.host.for.camera $CAMERA FPA
    251 
    252     # set the WORKDIR variable
    253     set.workdir.by.camera $CAMERA FPA $WORKDIR_TEMPLATE $default_host WORKDIR
    254 
    255     ## generate outroot specific to this exposure (& chip)
    256     sprintf outroot "%s/%s/%s.fk.%s" $WORKDIR $EXP_TAG $EXP_TAG $FAKE_ID
    257 
    258     stderr $LOGDIR/fake.exp.log
    259     stderr $LOGDIR/fake.exp.log
    260 
    261     $run = fake_exp.pl --exp_id $EXP_ID --fake_id $FAKE_ID --camera $CAMERA --outroot $outroot
    262     if ("$REDUCTION" != "NULL")
    263       $run = $run --reduction $REDUCTION
    264     end
    265     add_standard_args run
    266 
    267     # save the pageName for future reference below
    268     options $pageName
    269 
    270     # create the command line
    271     if ($VERBOSE > 1)
    272       echo command $run
    273     end
    274     command $run
    275   end
    276 
    277   # default exit status
    278   task.exit    default
    279     process_exit fakePendingExp $options:0 $JOB_STATUS
    280   end
    281 
    282   # operation timed out?
    283   task.exit    timeout
    284     showcommand timeout
    285     book setword fakePendingExp $options:0 pantaskState TIMEOUT
    286   end
    287 end
Note: See TracChangeset for help on using the changeset viewer.