Index: /branches/eam_branch_20071023/psastro/src/psastro.h
===================================================================
--- /branches/eam_branch_20071023/psastro/src/psastro.h	(revision 15518)
+++ /branches/eam_branch_20071023/psastro/src/psastro.h	(revision 15519)
@@ -75,4 +75,5 @@
 bool 		  psastroDumpStars (psArray *stars, char *filename);
 bool              psastroDumpMatchedStars (char *filename, psArray *rawstars, psArray *refstars, psArray *match);
+bool              psastroDumpGradients (psArray *gradients, char *filename);
 
 bool		  psastroMosaicSetAstrom_tmp (pmFPA *fpa);
Index: /branches/eam_branch_20071023/psastro/src/psastroDemoDump.c
===================================================================
--- /branches/eam_branch_20071023/psastro/src/psastroDemoDump.c	(revision 15518)
+++ /branches/eam_branch_20071023/psastro/src/psastroDemoDump.c	(revision 15519)
@@ -173,2 +173,22 @@
     return true;
 }
+
+// this function is used for test purposes (-trace psastro.dump 1)
+bool psastroDumpGradients (psArray *gradients, char *filename) {
+
+    FILE *f = fopen (filename, "w");
+
+    for (int i = 0; i < gradients->n; i++) {
+	pmAstromGradient *gradient = gradients->data[i];
+
+	// write out the refstar data
+	fprintf (f, "%d  %f %f   %f %f  %f %f\n", i,
+		 gradient->FP.x, gradient->FP.y, 
+		 gradient->dTPdL.x, gradient->dTPdL.y, 
+		 gradient->dTPdM.x, gradient->dTPdM.y);
+    }
+
+    fclose (f);
+    return true;
+}
+
