Index: /trunk/psastro/src/psastroLoadRefstars.c
===================================================================
--- /trunk/psastro/src/psastroLoadRefstars.c	(revision 12793)
+++ /trunk/psastro/src/psastroLoadRefstars.c	(revision 12794)
@@ -6,8 +6,4 @@
     int fd;
     bool status;
-    char *catformat = NULL;
-    char *getstarLine = NULL;
-
-    // select the DVO database?
 
     // select the current recipe
@@ -24,11 +20,11 @@
     // XXX which is then selected from the top-level ipprc.config
     char *CATDIR = psMetadataLookupStr(NULL, recipe, "DVO.CATDIR");
-    if (CATDIR == NULL) {
-        psLogMsg ("psastro", 2, "warning: missing DVO.CATDIR, using ~/.ptolemyrc definition\n");
-    }
+    PS_ASSERT (CATDIR, NULL);
+
+    char *getstarCommand = psMetadataLookupStr(NULL, recipe, "DVO.GETSTAR");
+    PS_ASSERT (getstarCommand, NULL);
 
     // issue the following command:
     // getstar -region RAmin RAmax DECmin DECmax
-
     char tempFile[64];
     sprintf (tempFile, "/tmp/psastro.XXXXXX");
@@ -43,28 +39,26 @@
     // use fork to add timeout capability
     if (ELIXIR_MODE) {
-        psStringAppend (&catformat, "-D CATFORMAT elixir ");
+        psStringAppend (&getstarCommand, " -D CATFORMAT elixir");
     } else {
-        psStringAppend (&catformat, "-D CATFORMAT panstarrs ");
+        psStringAppend (&getstarCommand, " -D CATFORMAT panstarrs");
     }
 
+    // XXX check for a default name (use .ptolemyrc)?
     if (CATDIR) {
-        psStringAppend (&catformat, "-D CATDIR %s ", CATDIR);
+        psStringAppend (&getstarCommand, " -D CATDIR %s", CATDIR);
     }
 
-    // XXX set getstar in config?
+    // psStringAppend (&getstarCommand, " -D CATMODE mef -maglim %f -region %f %f %f %f -o %s", MAGmax, RAmin, DECmin, RAmax, DECmax, tempFile);
     // XXX TEST : no magnitude limit
-    // psStringAppend (&getstarLine, "/home/kiawe/eugene/psconfig/dev.lin64/bin/getstar %s -D CATMODE mef -maglim %f -region %f %f %f %f -o %s", catformat, MAGmax, RAmin, DECmin, RAmax, DECmax, tempFile);
-    // psStringAppend (&getstarLine, "/home/kiawe/eugene/psconfig/dev.lin64/bin/getstar %s -D CATMODE mef -maglim %f -region %f %f %f %f -o %s", catformat, MAGmax, RAmin, DECmin, RAmax, DECmax, tempFile);
-    psStringAppend (&getstarLine, "/home/kiawe/eugene/psconfig/dev.lin64/bin/getstar %s -D CATMODE mef -region %f %f %f %f -o %s", catformat, RAmin, DECmin, RAmax, DECmax, tempFile);
-    psTrace ("psastro", 3, "%s\n", getstarLine);
+    psStringAppend (&getstarCommand, " -D CATMODE mef -region %f %f %f %f -o %s", RAmin, DECmin, RAmax, DECmax, tempFile);
+    psTrace ("psastro", 3, "%s\n", getstarCommand);
 
     // XXX use psPipe: catch stderr, stdout, allow for Nsec timeout...
-    status = system (getstarLine);
+    status = system (getstarCommand);
     if (status) {
         psError(PSASTRO_ERR_REFSTARS, true, "error loading reference data\n");
         return NULL;
     }
-    psFree (getstarLine);
-    psFree (catformat);
+    psFree (getstarCommand);
 
     psLogMsg ("psastro", 3, "ran getstar : %f sec\n", psTimerMark ("psastro"));
