Index: trunk/ippScripts/scripts/ipp_mops_translate.pl
===================================================================
--- trunk/ippScripts/scripts/ipp_mops_translate.pl	(revision 24190)
+++ trunk/ippScripts/scripts/ipp_mops_translate.pl	(revision 24191)
@@ -78,8 +78,4 @@
 check_fitsio($status);
 
-# Plate scales
-my $cdelt1 = $$inHeader{'CDELT1'} or die("Can't find CDELT1");
-my $cdelt2 = $$inHeader{'CDELT2'} or die("Can't find CDELT2");
-
 # Read table data
 $inFits->movnam_hdu(BINARY_TBL, $extname, 0, $status) and check_fitsio($status);
@@ -109,4 +105,10 @@
 }
 
+# Plate scales
+#my $cdelt1 = $$inHeader{'CDELT1'} or die("Can't find CDELT1");
+#my $cdelt2 = $$inHeader{'CDELT2'} or die("Can't find CDELT2");
+### XXX WCS wasn't being set in inverse diffs, but it's available elsewhere
+my $cdelt1 = $$scale[0] / 3600;
+my $cdelt2 = $$scale[1] / 3600;
 
 # Parse the list of columns
Index: trunk/ippScripts/scripts/ipp_serial_mops.pl
===================================================================
--- trunk/ippScripts/scripts/ipp_serial_mops.pl	(revision 24190)
+++ trunk/ippScripts/scripts/ipp_serial_mops.pl	(revision 24191)
@@ -89,4 +89,5 @@
     JOIN diffInputSkyfile USING(diff_id)
     WHERE diffInputSkyfile.warp1 IS NOT NULL
+        AND diffRun.state = 'full'
         AND diffRun.exposure = 1
         $where_label
@@ -100,4 +101,5 @@
     JOIN diffInputSkyfile USING(diff_id)
     WHERE diffInputSkyfile.warp2 IS NOT NULL
+        AND diffRun.state = 'full'
         AND diffRun.exposure = 1
         AND diffRun.bothways = 1
@@ -108,6 +110,6 @@
 JOIN camRun USING(cam_id)
 JOIN chipRun USING(chip_id)
-WHERE diffRun.state = 'full'
-    AND rawExp.camera = '$camera'
+JOIN rawExp USING(exp_id)
+WHERE rawExp.camera = '$camera'
 GROUP BY exp_id;";
 
@@ -129,6 +131,6 @@
 
     foreach my $skycell ( @$skycells ) {
-        my $skycell_id = $diff->{skycell_id};
-        my $path_base = $diff->{path_base};
+        my $skycell_id = $skycell->{skycell_id};
+        my $path_base = $skycell->{path_base};
 
         my $sources = $inverse ? "PPSUB.INVERSE.SOURCES" : "PPSUB.OUTPUT.SOURCES";
