Index: /branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/GetAstromError.c
===================================================================
--- /branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/GetAstromError.c	(revision 38700)
+++ /branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/GetAstromError.c	(revision 38701)
@@ -69,27 +69,28 @@
   // to match the 2MASS / Tycho / ICRS reference frame.  As Nloop gets higher, the weight
   // needs to drop to allow the ps1 measurements to drive the solution
-  int is2MASS = (measure[0].photcode >= 2011) && (measure[0].photcode <= 2013);
-  int isTycho = (measure[0].photcode >= 2020) && (measure[0].photcode <= 2021);
+  int is2MASS  = USE_GALAXY_MODEL && !isImage && (measure[0].photcode >= 2011) && (measure[0].photcode <= 2013);
+  int isTycho  = USE_GALAXY_MODEL && !isImage && (measure[0].photcode >= 2020) && (measure[0].photcode <= 2021);
+  int has2MASS = USE_GALAXY_MODEL &&  isImage && (measure[0].dbFlags & ID_MEAS_OBJECT_HAS_2MASS);
 
   // serious hack: if the object has 2MASS, we set this internal bit and adjust the
   // weight to ensure the image is tied down to the 2mass frame
 
-  // we only adjust the weight if we are applying the galaxy model
-  int modifyWeight = isImage && (measure[0].dbFlags & ID_MEAS_POOR_PHOTOM);
-  modifyWeight |= is2MASS;
-  modifyWeight |= isTycho;
-  modifyWeight &= USE_GALAXY_MODEL;
-
-  if (modifyWeight && is2MASS) {
+  if (has2MASS) {
     switch (Nloop) {
       case 0:
+	dPtotal = dPtotal / 1000.0;
+	break;
       case 1:
+	dPtotal = dPtotal / 300.0;
+	break;
+      case 2:
 	dPtotal = dPtotal / 100.0;
 	break;
-      case 2:
       case 3:
 	dPtotal = dPtotal / 30.0;
 	break;
       case 4:
+	dPtotal = dPtotal / 10.0;
+	break;
       case 5:
 	dPtotal = dPtotal / 10.0;
@@ -99,5 +100,29 @@
     }
   }
-  if (modifyWeight && isTycho) {
+  if (is2MASS) {
+    switch (Nloop) {
+      case 0:
+	dPtotal = dPtotal / 1000.0;
+	break;
+      case 1:
+	dPtotal = dPtotal / 300.0;
+	break;
+      case 2:
+	dPtotal = dPtotal / 100.0;
+	break;
+      case 3:
+	dPtotal = dPtotal / 30.0;
+	break;
+      case 4:
+	dPtotal = dPtotal / 10.0;
+	break;
+      case 5:
+	dPtotal = dPtotal / 10.0;
+	break;
+      default:
+	break;
+    }
+  }
+  if (isTycho) {
     switch (Nloop) {
       case 0:
