IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 41543 for trunk


Ignore:
Timestamp:
Apr 9, 2021, 4:03:31 PM (5 years ago)
Author:
eugene
Message:

added comments to utility macros; added various utility macros previously spread among pantasks input files; moved ops specific macros out of pantasks.pro and into the corresponding input files (tasks.revert.off, tasks.revert.on)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/pantasks.pro

    r37835 r41543  
    4141
    4242# user functions to manage databases
    43 macro add.database
     43macro add.database -c "add a database to this pantasks"
    4444  if ($0 != 2)
    4545    echo "USAGE: add.database (db)"
     
    6666end
    6767
    68 macro del.database
     68macro del.database -c "remove a database from this pantasks"
    6969  if ($0 != 2)
    7070    echo "USAGE: del.database (db)"
     
    7878end
    7979
    80 macro show.databases
     80macro show.databases -c "list the databases for this pantasks"
    8181  if ($0 != 1)
    8282    echo "USAGE: show.databases"
     
    9797
    9898# user functions to manipulate labels
    99 macro add.label
     99macro add.label -c "add a label to this pantasks"
    100100  if ($0 != 2)
    101101    echo "USAGE: add.label (label)"
     
    122122end
    123123
    124 macro del.label
     124macro del.label -c "remove a label from this pantasks"
    125125  if ($0 != 2)
    126126    echo "USAGE: del.label (label)"
     
    134134end
    135135
    136 macro show.labels
     136macro show.labels -c "list labels for this pantasks"
    137137  if ($0 != 1)
    138138    echo "USAGE: show.labels"
     
    152152end
    153153
    154 macro save.labels
     154macro save.labels -c "save the currently defined labels in the file labels.list"
    155155  if ($0 != 1)
    156156    echo "USAGE: save.labels"
     
    171171end
    172172
    173 macro load.labels
     173macro load.labels -c "read a list of labels from the file labels.list"
    174174  if ($0 != 1)
    175175    echo "USAGE: load.labels"
     
    190190end
    191191
     192## XXX these are very Pan-STARRS specific
    192193macro init.isp
    193194  list DB -add isp
     
    224225# need the ability to activate or deactivate specific tasks...
    225226
     227# XXX move this to the detrend pantasks:
    226228macro detrend.on
    227229  detproc.on
     
    264266end
    265267
     268# XXX move this to the stdscience pantasks, remove detrend & flatcorr
    266269macro all.on
    267270  detrend.on
     
    288291end
    289292
     293# move to specific pantasks inputs
    290294macro module.tasks
    291295  module register.pro
     
    315319end
    316320
    317 macro showcommand
     321macro showcommand -c "print out the current command (used within tasks)"
    318322  local n
    319323
     
    338342
    339343# Add standard arguments to the poll functions
    340 macro add_poll_args
     344macro add_poll_args -c "add standard poll options to commands (used within tasks)"
    341345    if ($0 != 2)
    342346        echo "Must pass in the command of interest, and this function will supplement"
     
    350354end
    351355
    352 macro add_poll_labels
     356macro add_poll_labels -c "add standard labels to poll functions (used within tasks)"
    353357    if ($0 != 2)
    354358        echo "Must pass in the command of interest, and this function will supplement"
     
    368372end
    369373
    370 macro add_standard_args
     374macro add_standard_args -c "add standard options (dbname, no-op, no-update) to commands (used within tasks)"
    371375  if ($0 != 2)
    372376    echo "Must pass in the command of interest, and this function will supplement"
     
    394398
    395399
    396 macro process_exit
     400macro process_exit -c "common handler for task exit"
    397401  if ($0 != 4)
    398402    echo "USAGE: process_exit (bookName) (pageName) (exitCode)"
     
    475479
    476480## XXX for the moment, remove all errors
    477 macro process_cleanup
     481macro process_cleanup -c "standard handler to cleanup the books"
    478482  if ($0 != 2)
    479483    echo "USAGE: process_cleanup (bookname)"
     
    495499end
    496500
    497 macro set.poll
     501macro set.poll -c "set the POLL_LIMIT value"
    498502  if ($0 != 2)
    499503    echo "USAGE:set.poll (value)"
     
    504508end
    505509
    506 macro get.poll
     510macro get.poll -c "get the POLL_LIMIT value"
    507511  echo "poll limit: $POLL_LIMIT"
    508512end
     
    521525end
    522526
    523 
    524 
     527macro change_polllimit -c "set the POLL_LIMIT value (same as set.poll)"
     528    $POLL_LIMIT = $1
     529end
     530
     531macro change_runexec
     532    $RUNEXEC = $1
     533end
     534
     535macro change_runpoll
     536    $RUNPOLL = $1
     537end
     538
     539macro print_polllimit
     540    echo $POLL_LIMIT
     541end
     542
     543macro print_runexec
     544    echo $RUNEXEC
     545end
     546
     547macro print_runpoll
     548    echo $RUNPOLL
     549end
     550
     551macro change_loadexec
     552    $LOADEXEC = $1
     553end
     554
     555macro change_loadpoll
     556    $LOADPOLL = $1
     557end
     558
     559macro print_loadexec
     560    echo $LOADEXEC
     561end
     562
     563macro print_loadpoll
     564    echo $LOADPOLL
     565end
    525566
    526567macro set.verbosity
     
    752793end
    753794
     795macro show.books
     796  book list
     797end
     798
    754799macro del.page.from.book
    755800  if ($0 != 3)
     
    761806end
    762807
    763 macro tasks.revert.off
    764     chip.revert.off
    765     camera.revert.off
    766     fake.revert.off
    767     warp.revert.off
    768     diff.revert.off
    769     stack.revert.off
    770 end
    771 macro tasks.revert.on
    772     chip.revert.on
    773     camera.revert.on
    774     fake.revert.on
    775     warp.revert.on
    776     diff.revert.on
    777     stack.revert.on
    778 end
    779 
     808macro set.opihi.verbose
     809  if ($0 != 2)
     810    echo "USAGE: set.opihi.verbose (on/off)"
     811    break
     812  end
     813
     814  opihi verbose $1
     815end
     816
     817# identical to 'set.opihi.verbose'
     818macro opihi.verbosity
     819  opihi verbose $1
     820end
     821
     822macro set.server.verbose
     823  if ($0 != 2)
     824    echo "USAGE: set.server.verbose (on/off)"
     825    break
     826  end
     827
     828  verbose $1
     829end
     830
     831macro set.output
     832  if ($0 != 2)
     833   echo "USAGE: set.output (destination)"
     834   break
     835  end
     836  output $1 
     837end
     838
     839macro show.output
     840  output -current currentOutput
     841  echo $currentOutput
     842end
     843
     844
Note: See TracChangeset for help on using the changeset viewer.