Index: /branches/eam_branches/ipp-pstamp-20260421/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm	(revision 43113)
+++ /branches/eam_branches/ipp-pstamp-20260421/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm	(revision 43114)
@@ -476,7 +476,12 @@
         # With the mdc file it has all of the information that it needs.
         $image_name   = "PPIMAGE.CHIP";
-        # $mask_name    = "PPIMAGE.CHIP.MASK";
-        # XXX: really need to handle this properly!
-        $mask_name    = "PSASTRO.OUTPUT.MASK";
+
+        # XXX: really need to handle this properly!  warp_skycell.pl has an example of how to examine the
+	# config system and/or the mdc file to make this choice.
+	if ($imagedb eq "simtest") {
+	    $mask_name    = "PPIMAGE.CHIP.MASK";
+	} else {
+	    $mask_name    = "PSASTRO.OUTPUT.MASK";
+	}
         $weight_name  = "PPIMAGE.CHIP.VARIANCE";
         $cmf_name     = "PSPHOT.OUTPUT";
