Index: branches/eam_branches/ipp-pv3-20140717-merge/ippScripts/scripts/addstar_run.pl
===================================================================
--- branches/eam_branches/ipp-pv3-20140717-merge/ippScripts/scripts/addstar_run.pl	(revision 37819)
+++ branches/eam_branches/ipp-pv3-20140717-merge/ippScripts/scripts/addstar_run.pl	(revision 37830)
@@ -94,7 +94,16 @@
 # Recipes to use based on reduction class
 $reduction = 'DEFAULT' unless defined $reduction;
-if ($stage =~/skycal/) {
-    $reduction = 'DEFAULT';
-}
+#if ($stage =~/diff/) {
+#    $reduction = 'ADDSTAR';
+#} 
+#if ($stage =~/fullforce/) {
+#    $reduction = 'ADDSTAR';
+#} 
+
+if ($stage =~/fullforce/) {
+    $reduction='DEFAULT';
+    #hardwired because why not
+}
+
 my $recipe_addstar = $ipprc->reduction($reduction, 'ADDSTAR');
 # XXX This is now not used: do we still need it?
@@ -132,4 +141,11 @@
     print "using $fpaObjects for $stage\n";
 }
+if ($stage =~/diff/) {
+    print "using $fpaObjects for $stage\n";
+}
+if ($stage =~/fullforce/)  {
+    print "using $fpaObjects for $stage\n";
+} 
+
 
 
@@ -177,5 +193,5 @@
 }
 
-if (($stage =~/stack/ || $stage =~ /skycal/)) {
+if (($stage =~/stack/ || $stage =~ /skycal/ || $stage =~/diff/ || $stage=~/fullforce/)) {
     $fpaObjects =~ s/smf$/cmf/;
     $fpaObjectsAlt =~ s/smf$/cmf/;
@@ -305,4 +321,10 @@
 		$command .= " -quick-airmass";
 	    }  #careful here - this matches staticsky and staticsky_multi
+	    if ($stage =~ /diff/) {
+		$command .= " -accept-astrom";
+	    }
+	    if ($stage =~ /fullforce/) {
+		$command .= " -accept-astrom -xrad"; 
+	    }
 
 	    my $mjd_addstar_start = DateTime->now->mjd;   # MJD of starting script
Index: branches/eam_branches/ipp-pv3-20140717-merge/ippScripts/scripts/ipp_cleanup.pl
===================================================================
--- branches/eam_branches/ipp-pv3-20140717-merge/ippScripts/scripts/ipp_cleanup.pl	(revision 37819)
+++ branches/eam_branches/ipp-pv3-20140717-merge/ippScripts/scripts/ipp_cleanup.pl	(revision 37830)
@@ -588,4 +588,5 @@
                 addFilename(\@files, "PSWARP.OUTPUT.SOURCES", $path_base, $skycell_id);
                 addFilename(\@files, "SKYCELL.TEMPLATE", $path_base, $skycell_id );
+		addFilename(\@files, "PSPHOT.RESID",$path_base,"fpa");
                 if ($mode eq "goto_purged") {
                     # additional files to remove for 'purge' mode
Index: branches/eam_branches/ipp-pv3-20140717-merge/ippScripts/scripts/publish_file.pl
===================================================================
--- branches/eam_branches/ipp-pv3-20140717-merge/ippScripts/scripts/publish_file.pl	(revision 37819)
+++ branches/eam_branches/ipp-pv3-20140717-merge/ippScripts/scripts/publish_file.pl	(revision 37830)
@@ -252,4 +252,5 @@
                      warp_id => $comp->{warp1},
                      diff_id => $comp->{diff_id},
+                     camera => $comp->{camera},
                      output_format => $comp->{output_format},
                      direction => 1,
@@ -291,4 +292,6 @@
                          warp_id => $comp->{warp2},
                          diff_id => $comp->{diff_id},
+			 camera => $comp->{camera},
+			 # missing output_format?
                          direction => 0,
                          comment => $reg_comp->{comment},
@@ -359,20 +362,22 @@
     my $name = shift;           # Name of component
 
-    $data->{zp} = $comp->{zp} unless defined $data->{zp};
-    $data->{zp_err} = $comp->{zp_err} unless defined $data->{zp_err};
-    $data->{astrom} = $comp->{astrom} unless defined $data->{astrom};
-    $data->{exp_name} = $comp->{exp_name} unless defined $data->{exp_name};
-    $data->{exp_id} = $comp->{exp_id} unless defined $data->{exp_id};
-    $data->{chip_id} = $comp->{chip_id} unless defined $data->{chip_id};
-    $data->{cam_id} = $comp->{cam_id} unless defined $data->{cam_id};
-    $data->{fake_id} = $comp->{fake_id} unless defined $data->{fake_id};
-    $data->{warp_id} = $comp->{warp_id} unless defined $data->{warp_id};
-    $data->{diff_id} = $comp->{diff_id} unless defined $data->{diff_id};
+    $data->{zp}        = $comp->{zp}        unless defined $data->{zp};
+    $data->{zp_err}    = $comp->{zp_err}    unless defined $data->{zp_err};
+    $data->{astrom}    = $comp->{astrom}    unless defined $data->{astrom};
+    $data->{exp_name}  = $comp->{exp_name}  unless defined $data->{exp_name};
+    $data->{exp_id}    = $comp->{exp_id}    unless defined $data->{exp_id};
+    $data->{chip_id}   = $comp->{chip_id}   unless defined $data->{chip_id};
+    $data->{cam_id}    = $comp->{cam_id}    unless defined $data->{cam_id};
+    $data->{fake_id}   = $comp->{fake_id}   unless defined $data->{fake_id};
+    $data->{warp_id}   = $comp->{warp_id}   unless defined $data->{warp_id};
+    $data->{diff_id}   = $comp->{diff_id}   unless defined $data->{diff_id};
+    $data->{camera}    = $comp->{camera}    unless defined $data->{camera};
+    # missing output_format?
     $data->{direction} = $comp->{direction} unless defined $data->{direction};
-    $data->{comment} = $comp->{comment} unless defined $data->{comment};
-    $data->{obsmode} = $comp->{obsmode} unless defined $data->{obsmode};
-    $data->{difftype} = $comp->{difftype} unless defined $data->{difftype};
-    $data->{sky} = $comp->{sky} unless defined $data->{sky};
-    $data->{shutoutc} = $comp->{shutoutc} unless defined $data->{shutoutc};
+    $data->{comment}   = $comp->{comment}   unless defined $data->{comment};
+    $data->{obsmode}   = $comp->{obsmode}   unless defined $data->{obsmode};
+    $data->{difftype}  = $comp->{difftype}  unless defined $data->{difftype};
+    $data->{sky}       = $comp->{sky}       unless defined $data->{sky};
+    $data->{shutoutc}  = $comp->{shutoutc}  unless defined $data->{shutoutc};
 
     &my_die("zp value for $name doesn't match", $pub_id, $PS_EXIT_SYS_ERROR) if defined $data->{zp} and $comp->{zp} != $data->{zp};
@@ -386,4 +391,5 @@
     &my_die("warp_id value for $name doesn't match", $pub_id, $PS_EXIT_SYS_ERROR) if defined $data->{warp_id} and $comp->{warp_id} != $data->{warp_id};
     &my_die("diff_id value for $name doesn't match", $pub_id, $PS_EXIT_SYS_ERROR) if defined $data->{diff_id} and $comp->{diff_id} != $data->{diff_id};
+    &my_die("camera value for $name doesn't match", $pub_id, $PS_EXIT_SYS_ERROR) if defined $data->{camera} and $comp->{camera} ne $data->{camera};
     &my_die("direction value for $name doesn't match", $pub_id, $PS_EXIT_SYS_ERROR) if defined $data->{direction} and $comp->{direction} != $data->{direction};
     &my_die("comment value for $name doesn't match", $pub_id, $PS_EXIT_SYS_ERROR) if defined $data->{comment} and $comp->{comment} ne $data->{comment};
@@ -414,4 +420,5 @@
     $command .= " -warp_id " . $data->{warp_id} if defined $data->{warp_id};
     $command .= " -diff_id " . $data->{diff_id} if defined $data->{diff_id};
+    $command .= " -camera " . $data->{camera} if defined $data->{camera};
     $command .= " -inverse" if defined $data->{direction} and $data->{direction} == 0;
     $command .= " -zp " . $data->{zp} if defined $data->{zp};
@@ -420,5 +427,5 @@
     $command .= " -version " . $data->{output_format} if defined $data->{output_format};
     $command .= " -comment \"" . $data->{comment} . "\"" if defined $data->{comment};
-    $command .= " -obsmode " . $data->{obsmode} if defined $data->{obsmode};
+    $command .= " -obsmode \"" . $data->{obsmode} . "\"" if defined $data->{obsmode};
     $command .= " -difftype " . $data->{difftype} if defined $data->{difftype};
     $command .= " -sky " . $data->{sky} if defined $data->{sky};
Index: branches/eam_branches/ipp-pv3-20140717-merge/ippScripts/scripts/rawcheck.pl
===================================================================
--- branches/eam_branches/ipp-pv3-20140717-merge/ippScripts/scripts/rawcheck.pl	(revision 37819)
+++ branches/eam_branches/ipp-pv3-20140717-merge/ippScripts/scripts/rawcheck.pl	(revision 37830)
@@ -62,8 +62,11 @@
 my %backup_hosts = ('ippb00' => 1, 'ippb01' => 1,
 		    'ippb02' => 1, 'ippb03' => 1,
-		    'ippb04' => 1, 'ippb05' => 1
+		    'ippb04' => 1, 'ippb05' => 1,
+		    'ippb06' => 1
     );
-my %backup_destinations = ('ippb04' => 1,
-			   'ippb05' => 1);
+my %backup_destinations = (# 'ippb04' => 1,  # full
+			   # 'ippb05' => 1,  # full
+			   'ippb06' => 1
+    );
 my $backup_Nvols = 3;
 
Index: branches/eam_branches/ipp-pv3-20140717-merge/ippScripts/scripts/stack_bkg_mk_mdc.pl
===================================================================
--- branches/eam_branches/ipp-pv3-20140717-merge/ippScripts/scripts/stack_bkg_mk_mdc.pl	(revision 37819)
+++ branches/eam_branches/ipp-pv3-20140717-merge/ippScripts/scripts/stack_bkg_mk_mdc.pl	(revision 37830)
@@ -13,4 +13,8 @@
 
 my ($dbname,$stack_id,$label,$camera,$filter);
+
+my $ipprc =  PS::IPP::Config->new(); # IPP Configuration
+my $siteConfig = $ipprc->{_siteConfig};
+
 #$dbname = 'gpc1';
 #$camera = 'GPC1';
@@ -29,7 +33,10 @@
 
 use constant DB_SOCKET => '/var/run/mysqld/mysqld.sock';
-my $dbserver = 'ippdb01';
-my $dbuser = 'ippuser';
-my $dbpass = 'ippuser';
+my $dbserver = metadataLookupStr($siteConfig, 'DBSERVER');
+my $dbuser = metadataLookupStr($ipprc->{_siteConfig}, "RO_DBUSER");
+my $dbpass = metadataLookupStr($ipprc->{_siteConfig}, "RO_DBPASSWORD");
+die "database configuration not set up" unless defined($dbserver);
+die "database configuration not set up" unless defined($dbuser);
+die "database configuration not set up" unless defined($dbpass);
 my $db = DBI->connect("DBI:mysql:database=${dbname};host=${dbserver};" .
                    "mysql_socket=" . DB_SOCKET(),
@@ -38,5 +45,5 @@
     ) or die "Unable to connect to database $DBI::errstr\n";
 
-my $ipprc = PS::IPP::Config->new( $camera );
+$ipprc = PS::IPP::Config->new( $camera );
 my $mdcParser = PS::IPP::Metadata::Config->new;
 
