Index: /trunk/dbconfig/config.md
===================================================================
--- /trunk/dbconfig/config.md	(revision 9043)
+++ /trunk/dbconfig/config.md	(revision 9044)
@@ -2,4 +2,4 @@
     pkg_name        STR     ippdb
     pkg_namespace   STR     ippdb
-    pkg_version     STR     0.0.34
+    pkg_version     STR     0.0.37
 END
Index: /trunk/dbconfig/tasks.md
===================================================================
--- /trunk/dbconfig/tasks.md	(revision 9043)
+++ /trunk/dbconfig/tasks.md	(revision 9044)
@@ -1,3 +1,3 @@
-# $Id: tasks.md,v 1.70 2006-08-29 04:43:35 jhoblitt Exp $
+# $Id: tasks.md,v 1.71 2006-09-29 02:31:14 jhoblitt Exp $
 
 # this table records all exposure ID ever seen from the summit
@@ -204,4 +204,6 @@
     bg_stdev    F64         0.0
     bg_mean_stdev   F64         0.0
+    b1_uri      STR         64
+    b2_uri      STR         64
 END
 
Index: /trunk/ippdb/configure.ac
===================================================================
--- /trunk/ippdb/configure.ac	(revision 9043)
+++ /trunk/ippdb/configure.ac	(revision 9044)
@@ -7,5 +7,5 @@
 AC_PREREQ(2.59)
 
-AC_INIT([ippdb], [0.0.36], [pan-starrs.ifa.hawaii.edu])
+AC_INIT([ippdb], [0.0.37], [pan-starrs.ifa.hawaii.edu])
 AC_CONFIG_SRCDIR([ippdb.pc.in])
 
Index: /trunk/ippdb/src/ippdb.c
===================================================================
--- /trunk/ippdb/src/ippdb.c	(revision 9043)
+++ /trunk/ippdb/src/ippdb.c	(revision 9044)
@@ -13562,5 +13562,5 @@
 static void detProcessedImfileRowFree(detProcessedImfileRow *object);
 
-detProcessedImfileRow *detProcessedImfileRowAlloc(psS32 det_id, const char *exp_id, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev)
+detProcessedImfileRow *detProcessedImfileRowAlloc(psS32 det_id, const char *exp_id, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri)
 {
     detProcessedImfileRow *object;
@@ -13577,4 +13577,6 @@
     object->bg_stdev = bg_stdev;
     object->bg_mean_stdev = bg_mean_stdev;
+    object->b1_uri = psStringCopy(b1_uri);
+    object->b2_uri = psStringCopy(b2_uri);
 
     return object;
@@ -13587,4 +13589,6 @@
     psFree(object->uri);
     psFree(object->recipe);
+    psFree(object->b1_uri);
+    psFree(object->b2_uri);
 }
 
@@ -13640,4 +13644,14 @@
         return false;
     }
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "b1_uri", 0, NULL, "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "b2_uri", 0, NULL, "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri");
+        psFree(md);
+        return false;
+    }
 
     status = psDBCreateTable(dbh, DETPROCESSEDIMFILE_TABLE_NAME, md);
@@ -13653,5 +13667,5 @@
 }
 
-bool detProcessedImfileInsert(psDB * dbh, psS32 det_id, const char *exp_id, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev)
+bool detProcessedImfileInsert(psDB * dbh, psS32 det_id, const char *exp_id, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri)
 {
     psMetadata      *md;
@@ -13696,4 +13710,14 @@
     if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_mean_stdev", 0, NULL, bg_mean_stdev)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item bg_mean_stdev");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "b1_uri", 0, NULL, b1_uri)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "b2_uri", 0, NULL, b2_uri)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri");
         psFree(md);
         return false;
@@ -13720,5 +13744,5 @@
     return deleted;
 }
-bool detProcessedImfilePop(psDB *dbh, psS32 *det_id, char **exp_id, char **class_id, char **uri, char **recipe, psF64 *bg, psF64 *bg_stdev, psF64 *bg_mean_stdev)
+bool detProcessedImfilePop(psDB *dbh, psS32 *det_id, char **exp_id, char **class_id, char **uri, char **recipe, psF64 *bg, psF64 *bg_stdev, psF64 *bg_mean_stdev, char **b1_uri, char **b2_uri)
 {
     psArray         *rowSet;
@@ -13812,4 +13836,16 @@
         return false;
     }
+    *b1_uri = psMetadataLookupPtr(&status, row, "b1_uri");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item b1_uri");
+        psFree(row);
+        return false;
+    }
+    *b2_uri = psMetadataLookupPtr(&status, row, "b2_uri");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item b2_uri");
+        psFree(row);
+        return false;
+    }
 
     psFree(row);
@@ -13820,5 +13856,5 @@
 bool detProcessedImfileInsertObject(psDB *dbh, detProcessedImfileRow *object)
 {
-    return detProcessedImfileInsert(dbh, object->det_id, object->exp_id, object->class_id, object->uri, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev);
+    return detProcessedImfileInsert(dbh, object->det_id, object->exp_id, object->class_id, object->uri, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->b1_uri, object->b2_uri);
 }
 
@@ -13844,11 +13880,13 @@
     psF64           bg_stdev;
     psF64           bg_mean_stdev;
-
-    if (!detProcessedImfilePop(dbh, &det_id, (char **)&exp_id, (char **)&class_id, (char **)&uri, (char **)&recipe, &bg, &bg_stdev, &bg_mean_stdev)) {
+    char            b1_uri[256];
+    char            b2_uri[256];
+
+    if (!detProcessedImfilePop(dbh, &det_id, (char **)&exp_id, (char **)&class_id, (char **)&uri, (char **)&recipe, &bg, &bg_stdev, &bg_mean_stdev, (char **)&b1_uri, (char **)&b2_uri)) {
         psError(PS_ERR_UNKNOWN, false, "failed to pop a database row");
         return NULL;
     }
 
-    return detProcessedImfileRowAlloc(det_id, exp_id, class_id, uri, recipe, bg, bg_stdev, bg_mean_stdev);
+    return detProcessedImfileRowAlloc(det_id, exp_id, class_id, uri, recipe, bg, bg_stdev, bg_mean_stdev, b1_uri, b2_uri);
 }
 
@@ -13986,4 +14024,14 @@
     if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_mean_stdev", 0, NULL, object->bg_mean_stdev)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item bg_mean_stdev");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "b1_uri", 0, NULL, object->b1_uri)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "b2_uri", 0, NULL, object->b2_uri)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri");
         psFree(md);
         return NULL;
@@ -14004,4 +14052,6 @@
     psF64           bg_stdev;
     psF64           bg_mean_stdev;
+    char            *b1_uri;
+    char            *b2_uri;
 
     det_id = psMetadataLookupS32(&status, md, "det_id");
@@ -14045,6 +14095,16 @@
         return false;
     }
-
-    return detProcessedImfileRowAlloc(det_id, exp_id, class_id, uri, recipe, bg, bg_stdev, bg_mean_stdev);
+    b1_uri = psMetadataLookupPtr(&status, md, "b1_uri");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item b1_uri");
+        return false;
+    }
+    b2_uri = psMetadataLookupPtr(&status, md, "b2_uri");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item b2_uri");
+        return false;
+    }
+
+    return detProcessedImfileRowAlloc(det_id, exp_id, class_id, uri, recipe, bg, bg_stdev, bg_mean_stdev, b1_uri, b2_uri);
 }
 psArray *detProcessedImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
Index: /trunk/ippdb/src/ippdb.h
===================================================================
--- /trunk/ippdb/src/ippdb.h	(revision 9043)
+++ /trunk/ippdb/src/ippdb.h	(revision 9044)
@@ -5835,4 +5835,6 @@
     psF64           bg_stdev;
     psF64           bg_mean_stdev;
+    char            *b1_uri;
+    char            *b2_uri;
 } detProcessedImfileRow;
 
@@ -5850,5 +5852,7 @@
     psF64           bg,
     psF64           bg_stdev,
-    psF64           bg_mean_stdev
+    psF64           bg_mean_stdev,
+    const char      *b1_uri,
+    const char      *b2_uri
 );
 
@@ -5887,5 +5891,7 @@
     psF64           bg,
     psF64           bg_stdev,
-    psF64           bg_mean_stdev
+    psF64           bg_mean_stdev,
+    const char      *b1_uri,
+    const char      *b2_uri
 );
 
@@ -5915,5 +5921,7 @@
     psF64           *bg,
     psF64           *bg_stdev,
-    psF64           *bg_mean_stdev
+    psF64           *bg_mean_stdev,
+    char            **b1_uri,
+    char            **b2_uri
 );
 
Index: /trunk/ippdb/tests/alloc.c
===================================================================
--- /trunk/ippdb/tests/alloc.c	(revision 9043)
+++ /trunk/ippdb/tests/alloc.c	(revision 9044)
@@ -974,5 +974,5 @@
         detProcessedImfileRow *object;
 
-        object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64    );
+        object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string"    );
 
         if (!object) {
@@ -1009,4 +1009,12 @@
         }
         if (!object->bg_mean_stdev == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
Index: /trunk/ippdb/tests/insert.c
===================================================================
--- /trunk/ippdb/tests/insert.c	(revision 9043)
+++ /trunk/ippdb/tests/insert.c	(revision 9044)
@@ -373,5 +373,5 @@
         }
 
-        if (!detProcessedImfileInsert(dbh, -32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64)) {
+        if (!detProcessedImfileInsert(dbh, -32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string")) {
             exit(EXIT_FAILURE);
         }
Index: /trunk/ippdb/tests/insertobject.c
===================================================================
--- /trunk/ippdb/tests/insertobject.c	(revision 9043)
+++ /trunk/ippdb/tests/insertobject.c	(revision 9044)
@@ -542,5 +542,5 @@
         }
 
-        object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64);
+        object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string");
         if (!object) {
             exit(EXIT_FAILURE);
Index: /trunk/ippdb/tests/metadatafromobject.c
===================================================================
--- /trunk/ippdb/tests/metadatafromobject.c	(revision 9043)
+++ /trunk/ippdb/tests/metadatafromobject.c	(revision 9044)
@@ -1169,5 +1169,5 @@
         bool            status;
 
-        object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64);
+        object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -1210,4 +1210,12 @@
         }
         if (!psMetadataLookupF64(&status, md, "bg_mean_stdev") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "b1_uri"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "b2_uri"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
             exit(EXIT_FAILURE);
Index: /trunk/ippdb/tests/objectfrommetadata.c
===================================================================
--- /trunk/ippdb/tests/objectfrommetadata.c	(revision 9043)
+++ /trunk/ippdb/tests/objectfrommetadata.c	(revision 9044)
@@ -1781,4 +1781,12 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "b1_uri", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "b2_uri", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = detProcessedImfileObjectFromMetadata(md);
@@ -1819,4 +1827,12 @@
         }
         if (!object->bg_mean_stdev == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
Index: /trunk/ippdb/tests/pop.c
===================================================================
--- /trunk/ippdb/tests/pop.c	(revision 9043)
+++ /trunk/ippdb/tests/pop.c	(revision 9044)
@@ -538,11 +538,13 @@
         psF64           bg_stdev;
         psF64           bg_mean_stdev;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!detProcessedImfilePop(dbh, &det_id, (char **)&exp_id, (char **)&class_id, (char **)&uri, (char **)&recipe, &bg, &bg_stdev, &bg_mean_stdev)) { 
+        char            b1_uri[256];
+        char            b2_uri[256];
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!detProcessedImfilePop(dbh, &det_id, (char **)&exp_id, (char **)&class_id, (char **)&uri, (char **)&recipe, &bg, &bg_stdev, &bg_mean_stdev, (char **)&b1_uri, (char **)&b2_uri)) { 
             exit(EXIT_FAILURE);
         }
