Index: /branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/ImageOps.c
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/ImageOps.c	(revision 37630)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/ImageOps.c	(revision 37631)
@@ -814,5 +814,5 @@
     ref[i].D = catalog[c].average[n].D;
 
-    // XXX subtract off dR,dD GAL here
+    // if we are correcting for the Galaxy Motion Model, we assume the mean R,D is at the J2000 epoch position
     if (USE_GALAXY_MODEL) {
       myAssert (!isnan(measure[0].RoffGAL), "oops");
Index: /branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/UpdateChips.c
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/UpdateChips.c	(revision 37630)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/UpdateChips.c	(revision 37631)
@@ -141,4 +141,7 @@
     // apply the modified R,D back to the measures
     setImageRaw (catalog, Ncatalog, i, raw, Nraw, MODE_MOSAIC);
+    if (USE_GALAXY_MODEL) {
+      image[i].flags |= ID_IMAGE_ASTROM_GMM;
+    }
 
     saveCenter (image, &Ro[i], &Do[i], i);
Index: /branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/UpdateObjectOffsets.c
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/UpdateObjectOffsets.c	(revision 37630)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/UpdateObjectOffsets.c	(revision 37631)
@@ -59,5 +59,6 @@
 
     // uses MeasureTiny values, but will also update Measure values when populated
-    UpdateObjects (&catalog, 1, 0);
+    // if Galaxy Motion Model correction is active, do not apply at this last stage 
+    UpdateObjects (&catalog, 1, FALSE);
 
     free_tiny_values(&catalog);
Index: /branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/UpdateObjects.c
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/UpdateObjects.c	(revision 37630)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/UpdateObjects.c	(revision 37631)
@@ -209,5 +209,8 @@
     double Di = getMeanD (&measure[k], average, secfilt);
 
-    if (USE_GALAXY_MODEL && (Nloop > 0)) {
+    // if we are correcting for the Galaxy Motion Model, only should apply it here 
+    // (a) when we are working to correct the images (mean R,D assumed to be at J2000) and
+    // (b) if we think the measure R,D is already at the image epoch position
+    if (USE_GALAXY_MODEL && applyGalaxyOffset) {
       Ri -= measure[k].RoffGAL / 3600.0;
       Di -= measure[k].DoffGAL / 3600.0;
Index: /branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/relastro_images.c
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/relastro_images.c	(revision 37630)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/relastro_images.c	(revision 37631)
@@ -73,5 +73,5 @@
       for (i = 0; i < NLOOP; i++) {
 	// XXX is is really possible that I do not update the measure.R,D on each loop?? 
-	UpdateObjects (catalog, Ncatalog, i); // calculate <R>,<D>
+	UpdateObjects (catalog, Ncatalog, (i > 0)); // calculate <R>,<D>; if (i > 0), apply Galaxy Motion Model (if desired)
 	FrameCorrection (catalog, Ncatalog);
 	// if (i > 2) FrameCorrection (catalog, Ncatalog);
