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