Index: trunk/psastro/src/psastroLoadRefstars.c
===================================================================
--- trunk/psastro/src/psastroLoadRefstars.c	(revision 10438)
+++ trunk/psastro/src/psastroLoadRefstars.c	(revision 10864)
@@ -1,4 +1,3 @@
 # include "psastro.h"
-// int mkstemp(char *template);
 # define ELIXIR_MODE 1
 
@@ -84,5 +83,5 @@
     // convert the Average table to the pmAstromObj entries
     psTimerStart ("psastro");
-    psArray *refs = psArrayAllocEmpty (table->n);
+    psArray *refstars = psArrayAllocEmpty (table->n);
     for (int i = 0; i < table->n; i++) {
         pmAstromObj *ref = pmAstromObjAlloc ();
@@ -101,5 +100,5 @@
         }
 
-        psArrayAdd (refs, 100, ref);
+        psArrayAdd (refstars, 100, ref);
         psFree (ref);
     }
@@ -109,6 +108,15 @@
 
     psTrace ("psastro", 3, "loaded %ld reference stars from (%10.6f,%10.6f) - (%10.6f,%10.6f)\n",
-             refs->n, RAmin, DECmin, RAmax, DECmax);
+             refstars->n, RAmin, DECmin, RAmax, DECmax);
 
-    return refs;
+    // dump or plot the available refstars
+    if (psTraceGetLevel("psastro.dump") > 0) {
+	psastroDumpRefstars (refstars);
+    }
+
+    if (psTraceGetLevel("psastro.plot") > 0) {
+	psastroPlotRefstars (refstars);
+    }
+
+    return refstars;
 }
