Index: /trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm
===================================================================
--- /trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm	(revision 34211)
+++ /trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm	(revision 34212)
@@ -48,4 +48,6 @@
 my ($regtool, $chiptool, $camtool, $warptool, $stacktool, $difftool);
 my ($pstamptool, $dvoImagesAtCoords, $whichimage, $ppConfigDump);
+
+my $default_data_groups = "";
 
 sub locate_images {
@@ -76,4 +78,5 @@
            ($req_type ne "byskycell");
 
+    $default_data_groups = load_data_groups($verbose);
 
     my $dateobs_begin;
@@ -342,4 +345,5 @@
         die "tess_id and component are required for byskycell" if !$tess_id or ! $skycell_id;
         $command .= " -tess_id $tess_id -skycell_id $skycell_id";
+        $filter_runs = 1;
     } else {
         # this should be caught by caller
@@ -357,5 +361,10 @@
 
     $command .= " -filter $filter" if !isnull($filter);
-    $command .= " -data_group $data_group" if !isnull($data_group);
+
+    if (!isnull($data_group)) {
+        $command .= " -data_group $data_group";
+    } elsif ($req_type eq 'byskycell') {
+        $command .= $default_data_groups;
+    }
 
     my $images = runToolAndParse($command, $verbose);
@@ -727,5 +736,9 @@
            # always the case. If this turns out to be a problem we can defer
            # the data_group test to when we look up the chipProcessedImfiles
-           $command .= " -data_group $data_group" if $data_group;
+           if ($data_group) {
+               $command .= " -data_group $data_group";
+           } else {
+               $command .= $default_data_groups;
+           }
            $command .= " -destreaked" if $need_magic;
 
@@ -1409,4 +1422,29 @@
 }
 
+sub load_data_groups {
+    my $verbose = shift;
+    my $command = "$ppConfigDump -dump-recipe PSTAMP -";
+
+    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+        run(command => $command, verbose => $verbose);
+    unless ($success) {
+        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+        die("Unable to perform ppConfigDump: $error_code");
+    }
+    my $mdcParser = PS::IPP::Metadata::Config->new;
+    my $metadata = $mdcParser->parse(join "", @$stdout_buf) or
+        die ("Unable to parse metadata config doc");
+
+    my $data_group_string = "";
+    foreach my $item (@$metadata) {
+        my $tag = $item->{name};
+        next if $tag ne "DATA_GROUP";
+        my $dg = $item->{value};
+#        print "adding $dg to list of default data groups\n";
+        $data_group_string .= " -data_group $dg";
+    }
+    return $data_group_string;
+}
+
 sub my_die
 {
Index: /trunk/ippconfig/recipes/Makefile.am
===================================================================
--- /trunk/ippconfig/recipes/Makefile.am	(revision 34211)
+++ /trunk/ippconfig/recipes/Makefile.am	(revision 34212)
@@ -32,5 +32,6 @@
 	ppVizPSF.mdc \
 	nightly_science.config \
-	ppBackground.mdc
+	ppBackground.mdc \
+	pstamp.config
 
 install_DATA = $(install_files)
Index: /trunk/ippconfig/recipes/pstamp.config
===================================================================
--- /trunk/ippconfig/recipes/pstamp.config	(revision 34212)
+++ /trunk/ippconfig/recipes/pstamp.config	(revision 34212)
@@ -0,0 +1,15 @@
+DATA_GROUP  MULTI
+
+DATA_GROUP  STR	 LAP.ThreePi.20%
+DATA_GROUP  STR	 ThreePi.20%         # ThreePi nightly science)
+DATA_GROUP  STR	 SAS_v8
+DATA_GROUP  STR	 MD01.refstack.20110820
+DATA_GROUP  STR	 MD02.refstack.20110907
+DATA_GROUP  STR	 MD03.refstack.20111010
+DATA_GROUP  STR	 MD04.refstack.20111012
+DATA_GROUP  STR	 MD05.refstack.20111014
+DATA_GROUP  STR	 MD06.refstack.20111122
+DATA_GROUP  STR	 MD07.refstack.20111106
+DATA_GROUP  STR	 MD08.refstack.20120422
+DATA_GROUP  STR	 MD09.refstack.20120603
+DATA_GROUP  STR	 MD10.refstack.20110722 
Index: /trunk/ippconfig/system.config
===================================================================
--- /trunk/ippconfig/system.config	(revision 34211)
+++ /trunk/ippconfig/system.config	(revision 34212)
@@ -63,3 +63,4 @@
 	PPBACKGROUND	STR		recipes/ppBackground.mdc       # Background restoration
         PSVIDEOPHOT	STR		recipes/psvideophot.config # video cell photometry
+        PSTAMP          STR             recipes/pstamp.config       # postage stamp server
 END
