Index: trunk/Ohana/src/opihi/cmd.data/rd.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/rd.c	(revision 3337)
+++ trunk/Ohana/src/opihi/cmd.data/rd.c	(revision 3392)
@@ -121,6 +121,6 @@
     if (CCDKeyword == (char *) NULL) {
       fprintf (stderr, "CCDKEYWORD variable is not set; ");
-      fprintf (stderr, "using IMAGEID as default\n");
-      CCDKeyword = strcreate ("IMAGEID");
+      fprintf (stderr, "using EXTNAME as default\n");
+      CCDKeyword = strcreate ("EXTNAME");
     }
     done = FALSE;
Index: trunk/Ohana/src/opihi/dvo/pmeasure.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/pmeasure.c	(revision 3337)
+++ trunk/Ohana/src/opihi/dvo/pmeasure.c	(revision 3392)
@@ -11,4 +11,5 @@
   unsigned IDclip, IDchoice, LimExclude;
   unsigned FlagChoice, FlagClip, flags;
+  int PhotcodeClip;
 
   Catalog catalog;
@@ -29,4 +30,10 @@
   Rmax = graphmode.coords.crval1 + 182.0;
 
+  PhotcodeClip = -1;
+  if (N = get_argument (argc, argv, "-p")) {
+    remove_argument (N, &argc, argv);
+    PhotcodeClip = GetPhotcodeCodebyName (argv[N]);
+    remove_argument (N, &argc, argv);
+  }
   IDclip = FALSE;
   if (N = get_argument (argc, argv, "-ID")) {
@@ -120,4 +127,5 @@
 	  if (!(flags & FlagChoice)) continue;
 	}
+	if ((PhotcodeClip != -1) && (catalog.measure[m+k].source != PhotcodeClip)) continue;
 	mag = PhotCat (&catalog.measure[m+k]);
 	Zvec.elements[N] = MIN (1.0, MAX (0.01, (mag - Mz) / Mr));
Index: trunk/Ohana/src/opihi/pantasks/LocalJob.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/LocalJob.c	(revision 3392)
+++ trunk/Ohana/src/opihi/pantasks/LocalJob.c	(revision 3392)
@@ -0,0 +1,17 @@
+
+/* local jobs are forked in the background */
+
+SubmitLocalJob (Job *job) {
+
+  /* 
+     construct the command line
+     fork the command, get back the PID
+     increment local job counter 
+  */
+
+}
+
+CheckLocalJob (Job *job) {
+
+  /* 
+     
Index: trunk/Ohana/src/opihi/pclient/notes.txt
===================================================================
--- trunk/Ohana/src/opihi/pclient/notes.txt	(revision 3392)
+++ trunk/Ohana/src/opihi/pclient/notes.txt	(revision 3392)
@@ -0,0 +1,17 @@
+
+pclient special commands:
+
+ job 
+
+ reset
+
+ check
+
+ status
+
+ stdout
+
+ stderr
+
+- communication with pclient should search for the pclient prompt:
+  pclient:
Index: trunk/Ohana/src/opihi/pclient/outline.txt
===================================================================
--- trunk/Ohana/src/opihi/pclient/outline.txt	(revision 3392)
+++ trunk/Ohana/src/opihi/pclient/outline.txt	(revision 3392)
@@ -0,0 +1,12 @@
+
+init stage:
+
+  - set child 
+
+readline loop:
+
+  - wait for commands
+
+
+
+  
Index: trunk/Ohana/src/opihi/scripts/run.pclient
===================================================================
--- trunk/Ohana/src/opihi/scripts/run.pclient	(revision 3392)
+++ trunk/Ohana/src/opihi/scripts/run.pclient	(revision 3392)
@@ -0,0 +1,4 @@
+#!/bin/csh -f
+
+# pclient
+mana
Index: trunk/Ohana/src/opihi/scripts/testscript
===================================================================
--- trunk/Ohana/src/opihi/scripts/testscript	(revision 3392)
+++ trunk/Ohana/src/opihi/scripts/testscript	(revision 3392)
@@ -0,0 +1,16 @@
+#!/bin/csh -f
+
+date
+
+ls -d *
+# sleep 3
+ls foo
+
+foreach f (*)
+  echo $f
+  ls $f/*
+#  sleep 1
+end
+
+date
+#exit 3
