Index: /trunk/ippScripts/scripts/stack_skycell.pl
===================================================================
--- /trunk/ippScripts/scripts/stack_skycell.pl	(revision 31421)
+++ /trunk/ippScripts/scripts/stack_skycell.pl	(revision 31422)
@@ -181,6 +181,7 @@
 my $recipe_psphot  = $ipprc->reduction($reduction, 'STACK_PSPHOT'); # Recipe to use for psphot
 my $recipe_ppstats = 'STACKSTATS';
-if ($run_state eq 'update') {
-    $recipe_ppstats = 'WARPSTATS';
+if ($
+run_state eq 'update') {
+     $recipe_ppstats = 'WARPSTATS';
 }
 unless ($recipe_ppStack and $recipe_ppSub and $recipe_psphot) {
@@ -208,4 +209,6 @@
     &my_die("Unable to not compress and logflux compress simultaneously. Check config.",$stack_id, $PS_EXIT_CONFIG_ERROR);
 }
+my $stack_type = metadataLookupStr($recipe, 'STACK.TYPE');
+&my_die("STACK.TYPE not found in recipe. Check config.",$stack_id, $PS_EXIT_CONFIG_ERROR) unless $stack_type;
 
 # Generate MDC file with the inputs
@@ -281,4 +284,5 @@
     $command .= " -recipe PSPHOT $recipe_psphot";
     $command .= " -recipe PPSTATS $recipe_ppstats" if $do_stats;;
+    $command .= " -stack-type $stack_type";
     $command .= " -F PSPHOT.PSF.SAVE PSPHOT.PSF.SKY.SAVE";
     $command .= " -F PSPHOT.OUTPUT PSPHOT.OUT.CMF.MEF";
Index: /trunk/ippconfig/recipes/ppStack.config
===================================================================
--- /trunk/ippconfig/recipes/ppStack.config	(revision 31421)
+++ /trunk/ippconfig/recipes/ppStack.config	(revision 31422)
@@ -97,4 +97,6 @@
 OUTPUT.REPLICATE BOOL   TRUE
 
+STACK.TYPE      STR     DEEP_STACK
+
 # Recipe overrides for STACK
 STACK	METADATA
@@ -136,4 +138,5 @@
 
 STACK_NIGHTLY  METADATA
+    STACK.TYPE      STR     NIGHTLY_STACK
 END
 
Index: /trunk/ppStack/src/ppStackArguments.c
===================================================================
--- /trunk/ppStack/src/ppStackArguments.c	(revision 31421)
+++ /trunk/ppStack/src/ppStackArguments.c	(revision 31422)
@@ -204,5 +204,5 @@
 	}
         psArgumentRemove (argNum, &argc, argv);
-	if (strcasecmp(argv[argNum], "NIGHTLY") && strcasecmp(argv[argNum], "DEEP") && strcasecmp(argv[argNum], "BEST_IQ")) {
+	if (strcasecmp(argv[argNum], "NIGHTLY_STACK") && strcasecmp(argv[argNum], "DEEP_STACK") && strcasecmp(argv[argNum], "IQ_STACK")) {
 	    psErrorStackPrint(stderr, "Invalid option for -stack-type %s (must be one of NIGHTLY_STACK, DEEP_STACK, IQ_STACK)", argv[argNum]);
 	    exit(PS_EXIT_CONFIG_ERROR);
