Index: branches/eam_branches/ipp-20140904/ippTasks/survey.pro
===================================================================
--- branches/eam_branches/ipp-20140904/ippTasks/survey.pro	(revision 37363)
+++ branches/eam_branches/ipp-20140904/ippTasks/survey.pro	(revision 37804)
@@ -178,13 +178,14 @@
 # user functions to manipulate warp/stack diff labels
 macro survey.add.WSdiff
-  if ($0 != 6)
-    echo "USAGE: survey.add.WSdiff (warp label) (stack label) (dist_group) (workdir base) (target label)"
+  if ($0 != 7)
+    echo "USAGE: survey.add.WSdiff (key) (warp label) (stack label) (dist_group) (workdir base) (target label)"
     break
   end
   book newpage SURVEY_DIFF_WARPSTACK $1
-  book setword SURVEY_DIFF_WARPSTACK $1 STACK_LABEL $2
-  book setword SURVEY_DIFF_WARPSTACK $1 DIST_GROUP $3
-  book setword SURVEY_DIFF_WARPSTACK $1 WORKDIR $4
-  book setword SURVEY_DIFF_WARPSTACK $1 TARGET_LABEL $5
+  book setword SURVEY_DIFF_WARPSTACK $1 WARP_LABEL $2
+  book setword SURVEY_DIFF_WARPSTACK $1 STACK_LABEL $3
+  book setword SURVEY_DIFF_WARPSTACK $1 DIST_GROUP $4
+  book setword SURVEY_DIFF_WARPSTACK $1 WORKDIR $5
+  book setword SURVEY_DIFF_WARPSTACK $1 TARGET_LABEL $6
   book setword SURVEY_DIFF_WARPSTACK $1 STATE PENDING
 end
@@ -697,4 +698,7 @@
   periods      -exec $SURVEY_EXEC
   periods      -timeout $SURVEY_TIMEOUT
+  ## time in UT -- want to start ~0900 HST and run until next night starts. 24h boundary so two trange needed?
+  trange        19:00:00 23:59:00
+  trange        00:00:00 05:00:00
   npending     1
 
@@ -710,13 +714,13 @@
     endif
 
-    book getpage SURVEY_DIFF_WARPSTACK 0 -var label -key STATE NEW
-    if ("$label" == "NULL")
+    book getpage SURVEY_DIFF_WARPSTACK 0 -var wsKey -key STATE NEW
+    if ("$wsKey" == "NULL")
       # All labels have been done --- reset
 #      echo "Resetting labels"
       for i 0 $N
-        book getpage SURVEY_DIFF_WARPSTACK $i -var label
-	book setword SURVEY_DIFF_WARPSTACK $label STATE NEW
+        book getpage SURVEY_DIFF_WARPSTACK $i -var wsKey
+	book setword SURVEY_DIFF_WARPSTACK $wsKey STATE NEW
       end
-      book getpage SURVEY_DIFF_WARPSTACK 0 -var label -key STATE NEW
+      book getpage SURVEY_DIFF_WARPSTACK 0 -var wsKey -key STATE NEW
 
       # Select different database
@@ -725,9 +729,10 @@
     end
 
-    book setword SURVEY_DIFF_WARPSTACK $label STATE DONE
-    book getword SURVEY_DIFF_WARPSTACK $label STACK_LABEL -var stack_label
-    book getword SURVEY_DIFF_WARPSTACK $label WORKDIR -var workdir
-    book getword SURVEY_DIFF_WARPSTACK $label DIST_GROUP -var dist_group
-    book getword SURVEY_DIFF_WARPSTACK $label TARGET_LABEL -var target_label
+    book setword SURVEY_DIFF_WARPSTACK $wsKey STATE DONE
+    book getword SURVEY_DIFF_WARPSTACK $wsKey WARP_LABEL -var warp_label
+    book getword SURVEY_DIFF_WARPSTACK $wsKey STACK_LABEL -var stack_label
+    book getword SURVEY_DIFF_WARPSTACK $wsKey WORKDIR -var workdir
+    book getword SURVEY_DIFF_WARPSTACK $wsKey DIST_GROUP -var dist_group
+    book getword SURVEY_DIFF_WARPSTACK $wsKey TARGET_LABEL -var target_label
 
     $year = `date +%Y`
@@ -737,5 +742,5 @@
 # Do we need anything else here? 
     $run = difftool -definewarpstack -good_frac 0.2
-    $run = $run -warp_label $label
+    $run = $run -warp_label $warp_label
     $run = $run -stack_label $stack_label
     $run = $run -set_dist_group $dist_group
@@ -1012,5 +1017,10 @@
 	$run = $run -uncensored
     end
-
+    if ("$stage" == "fullforce")
+        $run = $run -uncensored
+    end
+    if ("$stage" == "diff")
+        $run = $run -uncensored)
+    end	
     # we need to handle isp/gpc1: gpc1 wants destreaked, isp wants uncensored.  Perhaps the best way is by default do destreaked (the most paranoid), and if db = isp (is this the best way?) then do uncensored
     
