Index: trunk/Ohana/src/addstar/src/FilterStars.c
===================================================================
--- trunk/Ohana/src/addstar/src/FilterStars.c	(revision 26288)
+++ trunk/Ohana/src/addstar/src/FilterStars.c	(revision 26338)
@@ -1,4 +1,4 @@
 # include "addstar.h"
-# define EXTERNAL_ID FALSE
+# define EXTERNAL_ID TRUE
 
 /* exclude some detections based on various filter options:
Index: trunk/Ohana/src/addstar/src/LoadData.c
===================================================================
--- trunk/Ohana/src/addstar/src/LoadData.c	(revision 26288)
+++ trunk/Ohana/src/addstar/src/LoadData.c	(revision 26338)
@@ -10,4 +10,5 @@
   char *name;
   int i, j, Nvalid, Nhead, Ndata, Nskip;
+  unsigned int parentID = UINT_MAX;
   Stars *inStars;
 
@@ -58,8 +59,14 @@
     // skip the table if there is no data segment (eg, mosaic WRP image)
     if (!strcmp(headerSets[i].extdata, "NONE")) {
+      if (!strcmp(headerSets[i].exthead, "PHU") && (Nimages > 1)) {
+        // This image is the parent of subsequent images
+        parentID = Nvalid;
+        images[0][Nvalid].parentID = UINT_MAX;
+      }
       Nvalid++;
       CHECK_REALLOCATE (images[0], Image, NVALID, Nvalid, 10);
       continue;
     }
+    images[0][Nvalid].parentID = parentID;
 
     // advance the pointer to the start of the corresponding table block
Index: trunk/Ohana/src/addstar/src/UpdateImageIDs.c
===================================================================
--- trunk/Ohana/src/addstar/src/UpdateImageIDs.c	(revision 26288)
+++ trunk/Ohana/src/addstar/src/UpdateImageIDs.c	(revision 26338)
@@ -40,4 +40,9 @@
   for (i = 0; i < Nimages; i++) {
     images[i].imageID += imageID;
+    if (images[i].parentID == UINT_MAX) {
+        images[i].parentID = 0;
+    } else {
+        images[i].parentID += imageID;
+    }
   }
 
