Index: /trunk/ippTasks/calibration.pro
===================================================================
--- /trunk/ippTasks/calibration.pro	(revision 16297)
+++ /trunk/ippTasks/calibration.pro	(revision 16298)
@@ -1,19 +1,8 @@
+## calibration.pro : globals and support macros : -*- sh -*-
 ## this file contains the tasks for running the calibration stage
 ## these tasks use the book 'calBook'
 
-if ($?network == 0)
-  $network = 1
-end
-if ($?parallel == 0)
-  $parallel = 0
-end
-if ($?VERBOSE == 0)
-  echo "VERBOSE not defined: load pantasks.pro first"
-  break
-end
-if ($?LOGDIR == 0)
-  echo "LOGDIR not defined: load pantasks.pro first"
-  break
-end
+# test for required global variables
+check.globals
 
 $LOGSUBDIR = $LOGDIR/calibration
@@ -113,6 +102,6 @@
   host         local
 
-  periods      -poll $loadpoll
-  periods      -exec $loadexec
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
   periods      -timeout 60
   # trange     Hourly@00:00 Hourly@00:10
@@ -127,5 +116,5 @@
     book npages calBook -var N
     if ($N == 0) break
-    if ($network == 0) break
+    if ($NETWORK == 0) break
     
     # look for new images in calBook
@@ -152,5 +141,5 @@
     # specify choice of remote host
     # set a specific DVO host here 
-    if ($parallel)
+    if ($PARALLEL)
       host anyhost
     else
Index: /trunk/ippTasks/camera.pro
===================================================================
--- /trunk/ippTasks/camera.pro	(revision 16297)
+++ /trunk/ippTasks/camera.pro	(revision 16298)
@@ -1,19 +1,8 @@
-## this file contains the tasks for running the phase 3 stage
+## camera.pro : globals and support macros : -*- sh -*-
+## this file contains the tasks for running the camera analysis stage
 ## these tasks use the book camPendingExp
 
-if ($?network == 0)
-  $network = 1
-end
-if ($?parallel == 0)
-  $parallel = 0
-end
-if ($?VERBOSE == 0)
-  echo "VERBOSE not defined: load pantasks.pro first"
-  break
-end
-if ($?LOGDIR == 0)
-  echo "LOGDIR not defined: load pantasks.pro first"
-  break
-end
+# test for required global variables
+check.globals
 
 $LOGSUBDIR = $LOGDIR/camera
@@ -57,6 +46,6 @@
   host         local
 
-  periods      -poll $loadpoll
-  periods      -exec $loadexec
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
   periods      -timeout 30
   npending     1
@@ -112,5 +101,5 @@
     book npages camPendingExp -var N
     if ($N == 0) break
-    if ($network == 0) break
+    if ($NETWORK == 0) break
     
     # look for new images in camPendingExp (pantaskState == INIT)
Index: /trunk/ippTasks/chip.pro
===================================================================
--- /trunk/ippTasks/chip.pro	(revision 16297)
+++ /trunk/ippTasks/chip.pro	(revision 16298)
@@ -1,19 +1,8 @@
+## chip.pro : globals and support macros : -*- sh -*-
 ## this file contains the tasks for running the phase 0 stage
 ## these tasks use the book chipPendingImfile
 
-if ($?network == 0)
-  $network = 1
-end
-if ($?parallel == 0)
-  $parallel = 0
-end
-if ($?VERBOSE == 0)
-  echo "VERBOSE not defined: load pantasks.pro first"
-  break
-end
-if ($?LOGDIR == 0)
-  echo "LOGDIR not defined: load pantasks.pro first"
-  break
-end
+# test for required global variables
+check.globals
 
 $LOGSUBDIR = $LOGDIR/chip
@@ -57,6 +46,6 @@
   host         local
 
-  periods      -poll $loadpoll
-  periods      -exec $loadexec
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
   periods      -timeout 30
   npending     1
@@ -110,5 +99,5 @@
     book npages chipPendingImfile -var N
     if ($N == 0) break
-    if ($network == 0) break
+    if ($NETWORK == 0) break
     
     # look for new images in chipPendingImfile (pantaskState == INIT)
Index: /trunk/ippTasks/detrend.correct.pro
===================================================================
--- /trunk/ippTasks/detrend.correct.pro	(revision 16297)
+++ /trunk/ippTasks/detrend.correct.pro	(revision 16298)
@@ -1,19 +1,8 @@
+## detrend.correct.pro : globals and support macros : -*- sh -*-
 ## this file contains the tasks for running the detrend correction stage
 ## these tasks use the books detPendingCorrectedImfile and detPendingCorrectedExp
 
-if ($?network == 0)
-  $network = 1
-end
-if ($?parallel == 0)
-  $parallel = 0
-end
-if ($?VERBOSE == 0)
-  echo "VERBOSE not defined: load pantasks.pro first"
-  break
-end
-if ($?LOGDIR == 0)
-  echo "LOGDIR not defined: load pantasks.pro first"
-  break
-end
+# test for required global variables
+check.globals
 
 $LOGSUBDIR = $LOGDIR/detrend
@@ -76,6 +65,6 @@
   host         local
 
-  periods      -poll $loadpoll
-  periods      -exec $loadexec
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
   periods      -timeout 30
   npending     1
@@ -129,5 +118,5 @@
     book npages detPendingCorrectedImfile -var N
     if ($N == 0) break
-    if ($network == 0) break
+    if ($NETWORK == 0) break
     
     # look for new images in detPendingCorrectedImfile
@@ -205,6 +194,6 @@
   host         local
 
-  periods      -poll $loadpoll
-  periods      -exec $loadexec
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
   periods      -timeout 30
   npending     1
@@ -258,5 +247,5 @@
     book npages detPendingCorrectedExp -var N
     if ($N == 0) break
-    if ($network == 0) break
+    if ($NETWORK == 0) break
     
     # look for new exposures in detPendingCorrectedExp
Index: /trunk/ippTasks/detrend.mkruns.pro
===================================================================
--- /trunk/ippTasks/detrend.mkruns.pro	(revision 16297)
+++ /trunk/ippTasks/detrend.mkruns.pro	(revision 16298)
@@ -1,2 +1,4 @@
+## detrend.mkruns.pro : globals and support macros : -*- sh -*-
+
 ## XXX this script needs to be updated to use books, not queues
 ## XXX this script needs to be reconsidered...
Index: /trunk/ippTasks/detrend.norm.pro
===================================================================
--- /trunk/ippTasks/detrend.norm.pro	(revision 16297)
+++ /trunk/ippTasks/detrend.norm.pro	(revision 16298)
@@ -1,19 +1,8 @@
+## detrend.norm.pro : globals and support macros : -*- sh -*-
 ## this file contains the tasks for running the detrend normalization stages
 ## these tasks use the books detPendingNormStatImfile detPendingNormImfile detPendingNormExp
 
-if ($?network == 0)
-  $network = 1
-end
-if ($?parallel == 0)
-  $parallel = 0
-end
-if ($?VERBOSE == 0)
-  echo "VERBOSE not defined: load pantasks.pro first"
-  break
-end
-if ($?LOGDIR == 0)
-  echo "LOGDIR not defined: load pantasks.pro first"
-  break
-end
+# test for required global variables
+check.globals
 
 $LOGSUBDIR = $LOGDIR/detrend
@@ -89,6 +78,6 @@
   host         local
 
-  periods      -poll $loadpoll
-  periods      -exec $loadexec
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
   periods      -timeout 30
   npending     1
@@ -142,5 +131,5 @@
     book npages detPendingNormStatImfile -var N
     if ($N == 0) break
-    if ($network == 0) break
+    if ($NETWORK == 0) break
     
     # look for new images in detPendingNormStatImfile
@@ -205,6 +194,6 @@
   host         local
 
-  periods      -poll $loadpoll
-  periods      -exec $loadexec
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
   periods      -timeout 30
   npending     1
@@ -258,5 +247,5 @@
     book npages detPendingNormImfile -var N
     if ($N == 0) break
-    if ($network == 0) break
+    if ($NETWORK == 0) break
     
     # look for new images in detPendingNormImfile
@@ -324,6 +313,6 @@
   host         local
 
-  periods      -poll $loadpoll
-  periods      -exec $loadexec
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
   periods      -timeout 30
   npending     1
@@ -377,5 +366,5 @@
     book npages detPendingNormExp -var N
     if ($N == 0) break
-    if ($network == 0) break
+    if ($NETWORK == 0) break
     
     # look for new images in detPendingNormExp
Index: /trunk/ippTasks/detrend.process.pro
===================================================================
--- /trunk/ippTasks/detrend.process.pro	(revision 16297)
+++ /trunk/ippTasks/detrend.process.pro	(revision 16298)
@@ -1,19 +1,8 @@
+## detrend.process.pro : globals and support macros : -*- sh -*-
 ## this file contains the tasks for running the detrend processing stage
 ## these tasks use the books detPendingProcessedImfile and detPendingProcessedExp
 
-if ($?network == 0)
-  $network = 1
-end
-if ($?parallel == 0)
-  $parallel = 0
-end
-if ($?VERBOSE == 0)
-  echo "VERBOSE not defined: load pantasks.pro first"
-  break
-end
-if ($?LOGDIR == 0)
-  echo "LOGDIR not defined: load pantasks.pro first"
-  break
-end
+# test for required global variables
+check.globals
 
 $LOGSUBDIR = $LOGDIR/detrend
@@ -76,6 +65,6 @@
   host         local
 
-  periods      -poll $loadpoll
-  periods      -exec $loadexec
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
   periods      -timeout 30
   npending     1
@@ -129,5 +118,5 @@
     book npages detPendingProcessedImfile -var N
     if ($N == 0) break
-    if ($network == 0) break
+    if ($NETWORK == 0) break
     
     # look for new images in detPendingProcessedImfile
@@ -202,6 +191,6 @@
   host         local
 
-  periods      -poll $loadpoll
-  periods      -exec $loadexec
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
   periods      -timeout 30
   npending     1
@@ -255,5 +244,5 @@
     book npages detPendingProcessedExp -var N
     if ($N == 0) break
-    if ($network == 0) break
+    if ($NETWORK == 0) break
     
     # look for new exposures in detPendingProcessedExp
Index: /trunk/ippTasks/detrend.reject.pro
===================================================================
--- /trunk/ippTasks/detrend.reject.pro	(revision 16297)
+++ /trunk/ippTasks/detrend.reject.pro	(revision 16298)
@@ -1,19 +1,8 @@
+## detrend.reject.pro : globals and support macros : -*- sh -*-
 ## this file contains the tasks for running the detrend processing stage
 ## these tasks use the book detRejectExp
 
-if ($?network == 0)
-  $network = 1
-end
-if ($?parallel == 0)
-  $parallel = 0
-end
-if ($?VERBOSE == 0)
-  echo "VERBOSE not defined: load pantasks.pro first"
-  break
-end
-if ($?LOGDIR == 0)
-  echo "LOGDIR not defined: load pantasks.pro first"
-  break
-end
+# test for required global variables
+check.globals
 
 $LOGSUBDIR = $LOGDIR/detrend
@@ -57,6 +46,6 @@
   host         local
 
-  periods      -poll $loadpoll
-  periods      -exec $loadexec
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
   periods      -timeout 30
   npending     1
@@ -110,5 +99,5 @@
     book npages detRejectExp -var N
     if ($N == 0) break
-    if ($network == 0) break
+    if ($NETWORK == 0) break
     
     # look for new images in detRejectExp
Index: /trunk/ippTasks/detrend.resid.pro
===================================================================
--- /trunk/ippTasks/detrend.resid.pro	(revision 16297)
+++ /trunk/ippTasks/detrend.resid.pro	(revision 16298)
@@ -1,19 +1,8 @@
+## detrend.resid.pro : globals and support macros : -*- sh -*-
 ## this file contains the tasks for running the detrend processing stage
 ## these tasks use the books detPendingResidImfile and detPendingResidExp
 
-if ($?network == 0)
-  $network = 1
-end
-if ($?parallel == 0)
-  $parallel = 0
-end
-if ($?VERBOSE == 0)
-  echo "VERBOSE not defined: load pantasks.pro first"
-  break
-end
-if ($?LOGDIR == 0)
-  echo "LOGDIR not defined: load pantasks.pro first"
-  break
-end
+# test for required global variables
+check.globals
 
 $LOGSUBDIR = $LOGDIR/detrend
@@ -73,6 +62,6 @@
   host         local
 
-  periods      -poll $loadpoll
-  periods      -exec $loadexec
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
   periods      -timeout 30
   npending     1
@@ -126,5 +115,5 @@
     book npages detPendingResidImfile -var N
     if ($N == 0) break
-    if ($network == 0) break
+    if ($NETWORK == 0) break
     
     # look for new images in detPendingResidImfile
@@ -202,6 +191,6 @@
   host         local
 
-  periods      -poll $loadpoll
-  periods      -exec $loadexec
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
   periods      -timeout 30
   npending     1
@@ -255,5 +244,5 @@
     book npages detPendingResidExp -var N
     if ($N == 0) break
-    if ($network == 0) break
+    if ($NETWORK == 0) break
     
     # look for new images in detPendingResidExp
Index: /trunk/ippTasks/detrend.stack.pro
===================================================================
--- /trunk/ippTasks/detrend.stack.pro	(revision 16297)
+++ /trunk/ippTasks/detrend.stack.pro	(revision 16298)
@@ -1,19 +1,8 @@
+## detrend.stack.pro : globals and support macros : -*- sh -*-
 ## this file contains the tasks for running the detrend stacking stage
 ## these tasks use the book detPendingStackedImfile
 
-if ($?network == 0)
-  $network = 1
-end
-if ($?parallel == 0)
-  $parallel = 0
-end
-if ($?VERBOSE == 0)
-  echo "VERBOSE not defined: load pantasks.pro first"
-  break
-end
-if ($?LOGDIR == 0)
-  echo "LOGDIR not defined: load pantasks.pro first"
-  break
-end
+# test for required global variables
+check.globals
 
 $LOGSUBDIR = $LOGDIR/detrend
@@ -58,6 +47,6 @@
   host         local
 
-  periods      -poll $loadpoll
-  periods      -exec $loadexec
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
   periods      -timeout 30
   npending     1
@@ -111,5 +100,5 @@
     book npages detPendingStackedImfile -var N
     if ($N == 0) break
-    if ($network == 0) break
+    if ($NETWORK == 0) break
     
     # look for new images in detPendingStackedImfile
Index: /trunk/ippTasks/diff.pro
===================================================================
--- /trunk/ippTasks/diff.pro	(revision 16297)
+++ /trunk/ippTasks/diff.pro	(revision 16298)
@@ -1,23 +1,10 @@
-### This file contains panTasks definitions for performing the image differencing.
+## diff.pro : image difference analysis : -*- sh -*-
 
-### After a difference (with associated diff_id) is defined, the difference is performed
-### (tasks in diffSkyfile).
+## This file contains panTasks definitions for performing the image differencing.
+## After a difference (with associated diff_id) is defined, the difference is performed
+## (tasks in diffSkyfile).
 
-
-### Setups
-if ($?network == 0)
-  $network = 1
-end
-if ($?parallel == 0)
-  $parallel = 0
-end
-if ($?VERBOSE == 0)
-  echo "VERBOSE not defined: load pantasks.pro first"
-  break
-end
-if ($?LOGDIR == 0)
-  echo "LOGDIR not defined: load pantasks.pro first"
-  break
-end
+# test for required global variables
+check.globals
 
 $LOGSUBDIR = $LOGDIR/diff
@@ -66,6 +53,6 @@
   host         local
 
-  periods      -poll $loadpoll
-  periods      -exec $loadexec
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
   periods      -timeout 30
   npending     1
@@ -120,5 +107,5 @@
     book npages diffSkyfile -var N
     if ($N == 0) break
-    if ($network == 0) break
+    if ($NETWORK == 0) break
     
     # look for new images in diffSkyfile (pantaskState == INIT)
@@ -133,5 +120,5 @@
     # specify choice of remote host
     # XXX need to choose based on diffs
-    if ($parallel)
+    if ($PARALLEL)
       host anyhost
     else
Index: /trunk/ippTasks/flatcorr.pro
===================================================================
--- /trunk/ippTasks/flatcorr.pro	(revision 16297)
+++ /trunk/ippTasks/flatcorr.pro	(revision 16298)
@@ -1,19 +1,8 @@
+## flatcorr.pro : tasks to run flat-field correction : -*- sh -*-
 ## this file contains the tasks for running the flatcorr stage
 ## these tasks use the book 'flatcorrBook'
 
-if ($?network == 0)
-  $network = 1
-end
-if ($?parallel == 0)
-  $parallel = 0
-end
-if ($?VERBOSE == 0)
-  echo "VERBOSE not defined: load pantasks.pro first"
-  break
-end
-if ($?LOGDIR == 0)
-  echo "LOGDIR not defined: load pantasks.pro first"
-  break
-end
+# test for required global variables
+check.globals
 
 $LOGSUBDIR = $LOGDIR/flatcorr
@@ -107,6 +96,6 @@
   host         local
 
-  periods      -poll $loadpoll
-  periods      -exec $loadexec
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
   periods      -timeout 60
   # trange     Hourly@00:00 Hourly@00:10
@@ -121,5 +110,5 @@
     book npages flatcorrBook -var N
     if ($N == 0) break
-    if ($network == 0) break
+    if ($NETWORK == 0) break
     
     # look for new images in flatcorrBook
@@ -140,5 +129,5 @@
     # specify choice of remote host
     # set a specific DVO host here 
-    if ($parallel)
+    if ($PARALLEL)
       host anyhost
     else
Index: /trunk/ippTasks/magic.pro
===================================================================
--- /trunk/ippTasks/magic.pro	(revision 16297)
+++ /trunk/ippTasks/magic.pro	(revision 16298)
@@ -1,18 +1,6 @@
-
-### Setups
-if ($?network == 0)
-  $network = 1
-end
-if ($?parallel == 0)
-  $parallel = 0
-end
-if ($?VERBOSE == 0)
-  echo "VERBOSE not defined: load pantasks.pro first"
-  break
-end
-if ($?LOGDIR == 0)
-  echo "LOGDIR not defined: load pantasks.pro first"
-  break
-end
+## magic.pro : support for the streak removal : -*- sh -*-
+
+# test for required global variables
+check.globals
 
 $LOGSUBDIR = $LOGDIR/magic
@@ -75,6 +63,6 @@
   host         local
 
-  periods      -poll $loadpoll
-  periods      -exec $loadexec
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
   periods      -timeout 30
   npending     1
@@ -128,6 +116,6 @@
   host         local
 
-  periods      -poll $loadpoll
-  periods      -exec $loadexec
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
   periods      -timeout 30
   npending     1
@@ -181,6 +169,6 @@
   host         local
 
-  periods      -poll $loadpoll
-  periods      -exec $loadexec
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
   periods      -timeout 30
   npending     1
Index: /trunk/ippTasks/mkdetrend.pro
===================================================================
--- /trunk/ippTasks/mkdetrend.pro	(revision 16297)
+++ /trunk/ippTasks/mkdetrend.pro	(revision 16298)
@@ -1,2 +1,3 @@
+## mkdetrend.pro : autorun the detrend analysis : -*- sh -*-
 
 # example output from a dettool -definebyquery
Index: /trunk/ippTasks/pantasks.pro
===================================================================
--- /trunk/ippTasks/pantasks.pro	(revision 16297)
+++ /trunk/ippTasks/pantasks.pro	(revision 16298)
@@ -1,15 +1,15 @@
-
-# XXX make these upper-case
+## pantasks.pro : globals and support macros : -*- sh -*-
+
+# globals used to control system behavior : these should be in uppercase
 $NEBULOUS = 0
-$network = 1
-$parallel = 1
+$NETWORK = 1
+$PARALLEL = 1
 $VERBOSE = 1
 $LOGDIR = `pwd`
-$scripts = .
-
-$loadpoll = 0.25
-$loadexec = 5
-$runpoll = 0.5
-$runexec = 1
+
+$LOADPOLL = 0.25
+$LOADEXEC = 5
+$RUNPOLL = 0.5
+$RUNEXEC = 1
 
 $EXIT_SUCCESS     = 0
@@ -426,2 +426,21 @@
   end
 end
+
+macro check.globals
+  if ($?NETWORK == 0)
+    echo "NETWORK not defined: load pantasks.pro first"
+    break
+  end
+  if ($?PARALLEL == 0)
+    echo "PARALLEL not defined: load pantasks.pro first"
+    break
+  end
+  if ($?VERBOSE == 0)
+    echo "VERBOSE not defined: load pantasks.pro first"
+    break
+  end
+  if ($?LOGDIR == 0)
+    echo "LOGDIR not defined: load pantasks.pro first"
+    break
+  end
+end
Index: /trunk/ippTasks/register.pro
===================================================================
--- /trunk/ippTasks/register.pro	(revision 16297)
+++ /trunk/ippTasks/register.pro	(revision 16298)
@@ -1,19 +1,8 @@
+## register.pro : tasks for image registration (insert into database) : -*- sh -*-
 ## this file contains the tasks for running the registration stage
 ## these tasks use the books regPendingImfile and regPendingExp
 
-if ($?network == 0)
-  $network = 1
-end
-if ($?parallel == 0)
-  $parallel = 0
-end
-if ($?VERBOSE == 0)
-  echo "VERBOSE not defined: load pantasks.pro first"
-  break
-end
-if ($?LOGDIR == 0)
-  echo "LOGDIR not defined: load pantasks.pro first"
-  break
-end
+# test for required global variables
+check.globals
 
 $LOGSUBDIR = $LOGDIR/register
@@ -73,6 +62,6 @@
   host         local
 
-  periods      -poll $loadpoll
-  periods      -exec $loadexec
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
   periods      -timeout 30
   npending     1
@@ -129,5 +118,5 @@
     book npages regPendingImfile -var N
     if ($N == 0) break
-    if ($network == 0) break
+    if ($NETWORK == 0) break
     
     # look for new images in regPendingImfile
@@ -200,6 +189,6 @@
   host         local
 
-  periods      -poll $loadpoll
-  periods      -exec $loadexec
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
   periods      -timeout 30
   npending     1
@@ -253,5 +242,5 @@
     book npages regPendingExp -var N
     if ($N == 0) break
-    if ($network == 0) break
+    if ($NETWORK == 0) break
     
     # look for new images in regPendingExp (pantaskState == INIT)
Index: /trunk/ippTasks/stack.pro
===================================================================
--- /trunk/ippTasks/stack.pro	(revision 16297)
+++ /trunk/ippTasks/stack.pro	(revision 16298)
@@ -1,23 +1,10 @@
-### This file contains panTasks definitions for performing the image stacking.
+## stack.pro : tasks for image stacking : -*- sh -*-
 
-### After a stack (with associated stack_id) is defined, the stack is performed
-### (tasks in stackSumSkyfile).
+## This file contains panTasks definitions for performing the image stacking.
+## After a stack (with associated stack_id) is defined, the stack is performed
+## (tasks in stackSumSkyfile).
 
-
-### Setups
-if ($?network == 0)
-  $network = 1
-end
-if ($?parallel == 0)
-  $parallel = 0
-end
-if ($?VERBOSE == 0)
-  echo "VERBOSE not defined: load pantasks.pro first"
-  break
-end
-if ($?LOGDIR == 0)
-  echo "LOGDIR not defined: load pantasks.pro first"
-  break
-end
+# test for required global variables
+check.globals
 
 $LOGSUBDIR = $LOGDIR/stack
@@ -66,6 +53,6 @@
   host         local
 
-  periods      -poll $loadpoll
-  periods      -exec $loadexec
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
   periods      -timeout 30
   npending     1
@@ -120,5 +107,5 @@
     book npages stackSumSkyfile -var N
     if ($N == 0) break
-    if ($network == 0) break
+    if ($NETWORK == 0) break
     
     # look for new images in stackSumSkyfile (pantaskState == INIT)
@@ -133,5 +120,5 @@
     # specify choice of remote host
     # XXX need to choose based on stacks
-    if ($parallel)
+    if ($PARALLEL)
       host anyhost
     else
Index: /trunk/ippTasks/summit.copy.pro
===================================================================
--- /trunk/ippTasks/summit.copy.pro	(revision 16297)
+++ /trunk/ippTasks/summit.copy.pro	(revision 16298)
@@ -1,5 +1,4 @@
+## summit.copy.pro : tasks for the summit to IPP download : -*- sh -*-
 ## PanTasks scripts for Summit Copy
-
-module pantasks.pro
 
 # pztool -adddatastore -inst isp -telescope ps1 -uri http://otis1.ifa.hawaii.edu/ds/skyprobe/index.txt
@@ -16,4 +15,7 @@
 # @HOST@ may be substituted in later scripts.
 
+# test for required global variables
+check.globals
+
 # the templates are used if we have a class_id/host relationship; if none is found, the default values are used
 # XXX not sure how to handle the .N value if we need to use more than one
@@ -21,19 +23,8 @@
 if ($NEBULOUS)
  $default_host     = ipp004
- $workdir_template = neb:///@HOST@-v0
- $default_volume   = ipp004-v0
- $volume_template  = 
+ $workdir_template = neb:///@HOST@.0
 else
  $default_host     = ipp004
  $workdir_template = /data/@HOST@.0/
-end
-
-$VERBOSE = 1
-
-if ($?network == 0)
-  $network = 1
-end
-if ($?parallel == 0)
-  $parallel = 0
 end
 
@@ -162,5 +153,5 @@
 
     task.exec
-        if ($network == 0) break
+        if ($NETWORK == 0) break
 
         # if we are waiting on data, make the interval long
@@ -254,5 +245,5 @@
 
     task.exec
-        if ($network == 0) break
+        if ($NETWORK == 0) break
 
         # if we are waiting on data, make the interval long
Index: /trunk/ippTasks/warp.pro
===================================================================
--- /trunk/ippTasks/warp.pro	(revision 16297)
+++ /trunk/ippTasks/warp.pro	(revision 16298)
@@ -1,3 +1,4 @@
-### This file contains panTasks definitions for performing the image warping.
+## warp.pro : image warping tasks : -*- sh -*-
+## This file contains panTasks definitions for performing the image warping.
 
 ### This is done in two (main) steps.  After a warp (with associated warp_id) is defined,
@@ -5,20 +6,6 @@
 ### Then for each skycell, the warp is made (tasks in warpPendingSkycell).
 
-
 ### Setups
-if ($?network == 0)
-  $network = 1
-end
-if ($?parallel == 0)
-  $parallel = 0
-end
-if ($?VERBOSE == 0)
-  echo "VERBOSE not defined: load pantasks.pro first"
-  break
-end
-if ($?LOGDIR == 0)
-  echo "LOGDIR not defined: load pantasks.pro first"
-  break
-end
+check.globals
 
 $LOGSUBDIR = $LOGDIR/warp
@@ -82,6 +69,6 @@
   host         local
 
-  periods      -poll $loadpoll
-  periods      -exec $loadexec
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
   periods      -timeout 30
   npending     1
@@ -136,5 +123,5 @@
     book npages warpInputExp -var N
     if ($N == 0) break
-    if ($network == 0) break
+    if ($NETWORK == 0) break
     
     # look for new images in warpInputExp (pantaskState == INIT)
@@ -150,5 +137,5 @@
     # specify choice of remote host
     # XXX need to choose based on warps
-    if ($parallel)
+    if ($PARALLEL)
       host anyhost
     else
@@ -202,6 +189,6 @@
   host         local
 
-  periods      -poll $loadpoll
-  periods      -exec $loadexec
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
   periods      -timeout 30
   npending     1
@@ -256,5 +243,5 @@
     book npages warpPendingSkyCell -var N
     if ($N == 0) break
-    if ($network == 0) break
+    if ($NETWORK == 0) break
     
     # look for new images in warpPendingSkyCell (pantaskState == INIT)
@@ -272,5 +259,5 @@
     # specify choice of remote host
     # XXX need to choose based on warps
-    if ($parallel)
+    if ($PARALLEL)
       host anyhost
     else
