Index: trunk/ippTasks/detrend.stack.pro
===================================================================
--- trunk/ippTasks/detrend.stack.pro	(revision 16208)
+++ 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
