Index: /trunk/Ohana/src/opihi/dvo/imlist.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/imlist.c	(revision 17247)
+++ /trunk/Ohana/src/opihi/dvo/imlist.c	(revision 17248)
@@ -11,4 +11,6 @@
   PhotCode *PhotcodeValue;
   SkyRegionSelection *selection;
+
+  if (!InitPhotcodes ()) return (FALSE);
 
   // parse skyregion options
@@ -47,4 +49,14 @@
     remove_argument (N, &argc, argv);
     PhotcodeValue = GetPhotcodebyName (argv[N]);
+    if (PhotcodeValue == NULL) {
+      gprint (GP_ERR, "photcode not found in photcode table\n");
+      return (FALSE);
+    }
+    remove_argument (N, &argc, argv);
+  }
+  if ((N = get_argument (argc, argv, "-Nphotcode"))) {
+    PhotcodeSelect = TRUE;
+    remove_argument (N, &argc, argv);
+    PhotcodeValue = GetPhotcodebyCode (atoi(argv[N]));
     if (PhotcodeValue == NULL) {
       gprint (GP_ERR, "photcode not found in photcode table\n");
