Index: trunk/ippdb/tests/alloc.c
===================================================================
--- trunk/ippdb/tests/alloc.c	(revision 9107)
+++ trunk/ippdb/tests/alloc.c	(revision 9149)
@@ -2,4 +2,5 @@
 #include <ippdb.h>
 #include <stdlib.h>
+#include <string.h>
 
 #define MAX_STRING_LENGTH 1024
@@ -1185,4 +1186,49 @@
 
     {
+        detNormalizedExpRow *object;
+
+        object = detNormalizedExpRowAlloc(-32, -32, "a string", 64.64, 64.64, 64.64, "a string", "a string"    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->det_id == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iteration == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->bg == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->bg_stdev == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        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);
+        }
+
+        psFree(object);
+    }
+
+    {
         detMasterFrameRow *object;
 
Index: trunk/ippdb/tests/createtable.c
===================================================================
--- trunk/ippdb/tests/createtable.c	(revision 9107)
+++ trunk/ippdb/tests/createtable.c	(revision 9149)
@@ -448,4 +448,19 @@
         }
 
+        if(!detNormalizedExpCreateTable(dbh)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
         if(!detMasterFrameCreateTable(dbh)) {
             exit(EXIT_FAILURE);
Index: trunk/ippdb/tests/dbcleanup.c
===================================================================
--- trunk/ippdb/tests/dbcleanup.c	(revision 9107)
+++ trunk/ippdb/tests/dbcleanup.c	(revision 9149)
@@ -40,4 +40,5 @@
     p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS detNormalizedStatImfile");
     p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS detNormalizedImfile");
+    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS detNormalizedExp");
     p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS detMasterFrame");
     p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS detMasterImfile");
Index: trunk/ippdb/tests/dbsetup.c
===================================================================
--- trunk/ippdb/tests/dbsetup.c	(revision 9107)
+++ trunk/ippdb/tests/dbsetup.c	(revision 9149)
@@ -100,4 +100,7 @@
     detNormalizedImfileCreateTable(dbh);
 
+    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS detNormalizedExp");
+    detNormalizedExpCreateTable(dbh);
+
     p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS detMasterFrame");
     detMasterFrameCreateTable(dbh);
Index: trunk/ippdb/tests/droptable.c
===================================================================
--- trunk/ippdb/tests/droptable.c	(revision 9107)
+++ trunk/ippdb/tests/droptable.c	(revision 9149)
@@ -448,4 +448,19 @@
         }
 
+        if (!detNormalizedExpDropTable(dbh)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
         if (!detMasterFrameDropTable(dbh)) {
             exit(EXIT_FAILURE);
Index: trunk/ippdb/tests/insert.c
===================================================================
--- trunk/ippdb/tests/insert.c	(revision 9107)
+++ trunk/ippdb/tests/insert.c	(revision 9149)
@@ -448,4 +448,19 @@
         }
 
+        if (!detNormalizedExpInsert(dbh, -32, -32, "a string", 64.64, 64.64, 64.64, "a string", "a string")) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
         if (!detMasterFrameInsert(dbh, -32, -32, "a string")) {
             exit(EXIT_FAILURE);
Index: trunk/ippdb/tests/insertfits.c
===================================================================
--- trunk/ippdb/tests/insertfits.c	(revision 9107)
+++ trunk/ippdb/tests/insertfits.c	(revision 9149)
@@ -778,4 +778,30 @@
         }
 
+        if (!detNormalizedExpInsertFits(dbh, fits)) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!psFitsClose(fits)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+        psFits          *fits;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        // open a temp
+        fits = psFitsOpen(TMP_FILENAME, "r");
+        if (!fits) {
+            exit(EXIT_FAILURE);
+        }
+
         if (!detMasterFrameInsertFits(dbh, fits)) {
             exit(EXIT_FAILURE);
Index: trunk/ippdb/tests/insertobject.c
===================================================================
--- trunk/ippdb/tests/insertobject.c	(revision 9107)
+++ trunk/ippdb/tests/insertobject.c	(revision 9149)
@@ -645,4 +645,26 @@
     {
         psDB            *dbh;
+        detNormalizedExpRow *object;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        object = detNormalizedExpRowAlloc(-32, -32, "a string", 64.64, 64.64, 64.64, "a string", "a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!detNormalizedExpInsertObject(dbh, object)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
         detMasterFrameRow *object;
 
Index: trunk/ippdb/tests/metadatafromobject.c
===================================================================
--- trunk/ippdb/tests/metadatafromobject.c	(revision 9107)
+++ trunk/ippdb/tests/metadatafromobject.c	(revision 9149)
@@ -1419,4 +1419,57 @@
     {
         psMetadata      *md;
+        detNormalizedExpRow *object;
+        bool            status;
+
+        object = detNormalizedExpRowAlloc(-32, -32, "a string", 64.64, 64.64, 64.64, "a string", "a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = detNormalizedExpMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+        if (!psMetadataLookupS32(&status, md, "det_id") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "bg") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "bg_stdev") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        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);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
         detMasterFrameRow *object;
         bool            status;
Index: trunk/ippdb/tests/objectfrommetadata.c
===================================================================
--- trunk/ippdb/tests/objectfrommetadata.c	(revision 9107)
+++ trunk/ippdb/tests/objectfrommetadata.c	(revision 9149)
@@ -2132,4 +2132,86 @@
     {
         psMetadata      *md;
+        detNormalizedExpRow *object;
+
+        md = psMetadataAlloc();
+        if (!psMetadataAddS32(md, PS_LIST_TAIL, "det_id", 0, NULL, -32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddS32(md, PS_LIST_TAIL, "iteration", 0, NULL, -32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg", 0, NULL, 64.64)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_stdev", 0, NULL, 64.64)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg_mean_stdev", 0, NULL, 64.64)) {
+            psFree(md);
+            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 = detNormalizedExpObjectFromMetadata(md);
+        if (!object) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+
+        if (!object->det_id == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iteration == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->bg == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->bg_stdev == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        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);
+        }
+
+        psFree(object);
+    }
+
+    {
+        psMetadata      *md;
         detMasterFrameRow *object;
 
Index: trunk/ippdb/tests/pop.c
===================================================================
--- trunk/ippdb/tests/pop.c	(revision 9107)
+++ trunk/ippdb/tests/pop.c	(revision 9149)
@@ -644,4 +644,27 @@
         psS32           det_id;
         psS32           iteration;
+        char            recipe[256];
+        psF64           bg;
+        psF64           bg_stdev;
+        psF64           bg_mean_stdev;
+        char            b1_uri[256];
+        char            b2_uri[256];
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!detNormalizedExpPop(dbh, &det_id, &iteration, (char **)&recipe, &bg, &bg_stdev, &bg_mean_stdev, (char **)&b1_uri, (char **)&b2_uri)) { 
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+        psS32           det_id;
+        psS32           iteration;
         char            comment[256];
 
Index: trunk/ippdb/tests/popfits.c
===================================================================
--- trunk/ippdb/tests/popfits.c	(revision 9107)
+++ trunk/ippdb/tests/popfits.c	(revision 9149)
@@ -778,4 +778,30 @@
         }
 
+        if (!detNormalizedExpPopFits(dbh, fits, 1)) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!psFitsClose(fits)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+        psFits          *fits;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        // allocate a temp
+        fits = psFitsOpen(TMP_FILENAME, "w");
+        if (!fits) {
+            exit(EXIT_FAILURE);
+        }
+
         if (!detMasterFramePopFits(dbh, fits, 1)) {
             exit(EXIT_FAILURE);
Index: trunk/ippdb/tests/popobject.c
===================================================================
--- trunk/ippdb/tests/popobject.c	(revision 9107)
+++ trunk/ippdb/tests/popobject.c	(revision 9149)
@@ -529,4 +529,22 @@
     {
         psDB            *dbh;
+        detNormalizedExpRow *object;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        object = detNormalizedExpPopObject(dbh);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
         detMasterFrameRow *object;
 
Index: trunk/ippdb/tests/selectrowsfits.c
===================================================================
--- trunk/ippdb/tests/selectrowsfits.c	(revision 9107)
+++ trunk/ippdb/tests/selectrowsfits.c	(revision 9149)
@@ -659,4 +659,26 @@
         }
 
+        if (!detNormalizedExpSelectRowsFits(dbh, fits, NULL, 1)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(fits);
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+        psFits          *fits;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        fits = psFitsOpen(TMP_FILENAME, "w");
+        if (!fits) {
+            exit(EXIT_FAILURE);
+        }
+
         if (!detMasterFrameSelectRowsFits(dbh, fits, NULL, 1)) {
             exit(EXIT_FAILURE);
