IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 8, 2009, 5:09:53 PM (17 years ago)
Author:
eugene
Message:

updates to the addstar stage; modify flatcorr to interact correctly with the addstar stage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/flatcorr.pro

    r25785 r25816  
    22## this file contains the tasks for running the flatcorr stage
    33## these tasks use the book 'flatcorrBook'
    4 
    5 # test for required global variables
    6 check.globals
    7 
    8 book init flatcorrBook
    9 
    10 macro flatcorr.reset
    11   book init flatcorrBook
    12 end
    13 
    14 macro flatcorr.status
    15   book listbook flatcorrBook
    16 end
    17 
    18 macro flatcorr.on
    19   task flatcorr.advancecamera
    20     active true
    21   end
    22   task flatcorr.load
    23     active true
    24   end
    25   task flatcorr.run
    26     active true
    27   end
    28 end
    29 
    30 macro flatcorr.off
    31   task flatcorr.advancecamera
    32     active false
    33   end
    34   task flatcorr.load
    35     active false
    36   end
    37   task flatcorr.run
    38     active false
    39   end
    40 end
    41 
    42 # these variables will cycle through the known ippdb database names
    43 $flatcorr_advancecamera_DB = 0
    44 $flatcorr_pendingprocess_DB = 0
    454
    465# a flat-field correction run is initiated (manually) with a command like:
     
    5716# flatcorr -advancecamera
    5817
    59 # we wait for the completed chip and camera analysis and search for
     18# as the camera analysis progresses, we need to occasionally migrate the
     19# completed exposures to the addstar stage by calling:
     20# flatcorr -advanceaddstar
     21
     22# we wait for the completed addstar jobs and search for
    6023# completed processing analysis with:
    6124# flatcorr -pendingprocess
     
    6629# and failures with:
    6730# flatcorr -addprocess -fault N
     31
     32# test for required global variables
     33check.globals
     34
     35book init flatcorrBook
     36
     37macro flatcorr.reset
     38  book init flatcorrBook
     39end
     40
     41macro flatcorr.status
     42  book listbook flatcorrBook
     43end
     44
     45macro flatcorr.on
     46  task flatcorr.advancecamera
     47    active true
     48  end
     49  task flatcorr.advanceaddstar
     50    active true
     51  end
     52  task flatcorr.load
     53    active true
     54  end
     55  task flatcorr.run
     56    active true
     57  end
     58end
     59
     60macro flatcorr.off
     61  task flatcorr.advancecamera
     62    active false
     63  end
     64  task flatcorr.advanceaddstar
     65    active false
     66  end
     67  task flatcorr.load
     68    active false
     69  end
     70  task flatcorr.run
     71    active false
     72  end
     73end
     74
     75# these variables will cycle through the known ippdb database names
     76$flatcorr_advancecamera_DB = 0
     77$flatcorr_advanceaddstar_DB = 0
     78$flatcorr_pendingprocess_DB = 0
    6879
    6980# migrate complete flatcorr chips to the camera stage analysis
     
    114125end
    115126
     127# migrate complete flatcorr exposures to the addstar process
     128task           flatcorr.advanceaddstar
     129  host         local
     130
     131  # check the list of pending flatcorr runs
     132  periods      -poll 5
     133  periods      -exec 30
     134  periods      -timeout 60
     135  npending 1
     136
     137  task.exec
     138    # define the command (does not depend on previous queries)
     139    if ($DB:n == 0)
     140      command flatcorr -advanceaddstar
     141    else
     142      # save the DB name for the exit tasks
     143      # note that this DB name refers to the ippdb, not the dvodb
     144      option $DB:$flatcorr_advanceaddstar_DB
     145      command flatcorr -advanceaddstar -dbname $DB:$flatcorr_advanceaddstar_DB
     146      $flatcorr_advanceaddstar_DB ++
     147      if ($flatcorr_advanceaddstar_DB >= $DB:n) set flatcorr_advanceaddstar_DB = 0
     148    end
     149  end
     150
     151  # silently drop stdout
     152  stdout NULL
     153  stderr $LOGDIR/flatcorr.log
     154
     155  # success (no action required)
     156  task.exit $EXIT_SUCCESS
     157  end
     158
     159  # locked list
     160  task.exit    default
     161    showcommand failure
     162  end
     163
     164  task.exit    crash
     165    showcommand crash
     166  end
     167
     168  # operation times out?
     169  task.exit    timeout
     170    showcommand timeout
     171  end
     172end
     173
    116174# create new flatcorr entries for the currently known DVO databases
    117175# run this multiple times once an hour - on pass for each db
     
    123181  periods      -exec $LOADEXEC
    124182  periods      -timeout 60
    125   active false
    126183  npending 1
    127184
     
    180237  periods      -exec $LOADEXEC
    181238  periods      -timeout 60
    182   active false
    183239
    184240  # silently drop stdout
Note: See TracChangeset for help on using the changeset viewer.