Index: /trunk/Ohana/src/gastro2/src/gheader2.c
===================================================================
--- /trunk/Ohana/src/gastro2/src/gheader2.c	(revision 7994)
+++ /trunk/Ohana/src/gastro2/src/gheader2.c	(revision 7995)
@@ -25,46 +25,5 @@
 
   /*** use PutCoords to update header ***/
-  if (Target[0].coords.Npolyterms > 1) {
-    gfits_modify (&header, "CTYPE1",   "%s",  1, "RA---PLY");
-    gfits_modify (&header, "CTYPE2",   "%s",  1, "DEC--PLY");
-  } else {
-    gfits_modify (&header, "CTYPE1",   "%s",  1, "RA---TAN");
-    gfits_modify (&header, "CTYPE2",   "%s",  1, "DEC--TAN");
-  }    
-  gfits_modify (&header, "CDELT1",   "%le", 1, Target[0].coords.cdelt1); 
-  gfits_modify (&header, "CDELT2",   "%le", 1, Target[0].coords.cdelt2);
-  gfits_modify (&header, "CRVAL1",   "%lf", 1, Target[0].coords.crval1);
-  gfits_modify (&header, "CRVAL2",   "%lf", 1, Target[0].coords.crval2);  
-  gfits_modify (&header, "CRPIX1",   "%lf", 1, Target[0].coords.crpix1);
-  gfits_modify (&header, "CRPIX2",   "%lf", 1, Target[0].coords.crpix2);
-  gfits_modify (&header, "PC001001", "%le", 1, Target[0].coords.pc1_1);
-  gfits_modify (&header, "PC001002", "%le", 1, Target[0].coords.pc1_2);
-  gfits_modify (&header, "PC002001", "%le", 1, Target[0].coords.pc2_1);
-  gfits_modify (&header, "PC002002", "%le", 1, Target[0].coords.pc2_2);
-  gfits_modify (&header, "NPLYTERM", "%d", 1, Target[0].coords.Npolyterms);
-  if (Target[0].coords.Npolyterms > 1) {
-    /* RA Terms */
-    gfits_modify (&header, "PCA1X2Y0", "%le", 1, Target[0].coords.polyterms[0][0]);   /* polyterms[0]); */
-    gfits_modify (&header, "PCA1X1Y1", "%le", 1, Target[0].coords.polyterms[1][0]);   /* polyterms[1]); */
-    gfits_modify (&header, "PCA1X0Y2", "%le", 1, Target[0].coords.polyterms[2][0]);   /* polyterms[2]); */
-
-    if (Target[0].coords.Npolyterms > 2) {
-      gfits_modify (&header, "PCA1X3Y0", "%le", 1, Target[0].coords.polyterms[3][0]);   /* polyterms[3]); */
-      gfits_modify (&header, "PCA1X2Y1", "%le", 1, Target[0].coords.polyterms[4][0]);   /* polyterms[4]); */
-      gfits_modify (&header, "PCA1X1Y2", "%le", 1, Target[0].coords.polyterms[5][0]);   /* polyterms[5]); */
-      gfits_modify (&header, "PCA1X0Y3", "%le", 1, Target[0].coords.polyterms[6][0]);   /* polyterms[6]); */
-    }
-    /* Dec Terms */
-    gfits_modify (&header, "PCA2X2Y0", "%le", 1, Target[0].coords.polyterms[0][1]);   /* polyterms[7]); */
-    gfits_modify (&header, "PCA2X1Y1", "%le", 1, Target[0].coords.polyterms[1][1]);   /* polyterms[8]); */
-    gfits_modify (&header, "PCA2X0Y2", "%le", 1, Target[0].coords.polyterms[2][1]);   /* polyterms[9]); */
-
-    if (Target[0].coords.Npolyterms > 2) {
-      gfits_modify (&header, "PCA2X3Y0", "%le", 1, Target[0].coords.polyterms[3][1]);   /* polyterms[10]); */
-      gfits_modify (&header, "PCA2X2Y1", "%le", 1, Target[0].coords.polyterms[4][1]);   /* polyterms[11]); */
-      gfits_modify (&header, "PCA2X1Y2", "%le", 1, Target[0].coords.polyterms[5][1]);   /* polyterms[12]); */
-      gfits_modify (&header, "PCA2X0Y3", "%le", 1, Target[0].coords.polyterms[6][1]);   /* polyterms[13]); */
-    }
-  }
+  PutCoords (&Target[0].coords, &header);
 
   dR = fabs (Target[0].answer.dR*Target[0].coords.cdelt1*3600.0);
