Index: /trunk/psastro/src/psastroLoadRefstars.c
===================================================================
--- /trunk/psastro/src/psastroLoadRefstars.c	(revision 17998)
+++ /trunk/psastro/src/psastroLoadRefstars.c	(revision 17999)
@@ -72,5 +72,11 @@
 
     // supply the max magnitude, the output format, and the photcode
-    psStringAppend (&getstarCommand, " -maglim %f -format %s -photcode %s", MAGmax, outformat, photcode);
+    if (strcasecmp (photcode, "NONE")) {
+	psStringAppend (&getstarCommand, " -maglim %f", MAGmax);
+    }
+    if (strcasecmp (photcode, "NONE")) {
+	psStringAppend (&getstarCommand, " -photcode %s", photcode);
+    }
+    psStringAppend (&getstarCommand, " -format %s", outformat);
 
     // add region and output filename
