Index: /trunk/Ohana/src/gastro2/src/plots.c
===================================================================
--- /trunk/Ohana/src/gastro2/src/plots.c	(revision 8248)
+++ /trunk/Ohana/src/gastro2/src/plots.c	(revision 8249)
@@ -373,4 +373,27 @@
   }
 
+  fprintf (stderr, "residuals using RD_to_XY\n");
+  plot_resid_plot (0, xvect0, yvect0, Npair);
+  plot_resid_plot (1, xvect1, yvect1, Npair);
+  plot_fullfield_pairs (xvect2, yvect2, 2*Npair);
+
+  for (i = 0; i < Npair; i++) {
+    fit_apply (&x, &y, st[idx1[i]].X, st[idx1[i]].Y);
+    
+    dx = x - sr[idx2[i]].L;
+    dy = y - sr[idx2[i]].M;
+    
+    xvect0[i] = st[idx1[i]].X;
+    xvect1[i] = st[idx1[i]].Y;
+    yvect0[i] = dx;
+    yvect1[i] = dy;
+
+    xvect2[2*i+0] = sr[idx2[i]].L;
+    yvect2[2*i+0] = sr[idx2[i]].M;
+    xvect2[2*i+1] = x;
+    yvect2[2*i+1] = y;
+  }
+
+  fprintf (stderr, "residuals using RD_to_XY\n");
   plot_resid_plot (0, xvect0, yvect0, Npair);
   plot_resid_plot (1, xvect1, yvect1, Npair);
