Index: trunk/ippdb/tests/metadatafromobject.c
===================================================================
--- trunk/ippdb/tests/metadatafromobject.c	(revision 8266)
+++ trunk/ippdb/tests/metadatafromobject.c	(revision 8283)
@@ -590,5 +590,5 @@
         bool            status;
 
-        object = rawDetrendExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64);
+        object = rawDetrendExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -642,5 +642,29 @@
             exit(EXIT_FAILURE);
         }
-        if (!psMetadataLookupF64(&status, md, "background") == 64.64) {
+        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 (!psMetadataLookupF64(&status, md, "alt") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "az") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "ccd_temp") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "posang") == 64.64) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -655,5 +679,5 @@
         bool            status;
 
-        object = rawScienceExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64);
+        object = rawScienceExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -707,5 +731,29 @@
             exit(EXIT_FAILURE);
         }
-        if (!psMetadataLookupF64(&status, md, "background") == 64.64) {
+        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 (!psMetadataLookupF64(&status, md, "alt") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "az") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "ccd_temp") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "posang") == 64.64) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -805,5 +853,5 @@
         bool            status;
 
-        object = p1PendingExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, "a string", -32);
+        object = p1PendingExpRowAlloc("a string", "a string", -32);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -821,44 +869,4 @@
             exit(EXIT_FAILURE);
         }
-        if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "airmass") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "ra") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "decl") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "exp_time") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "background") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
         if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
@@ -878,5 +886,5 @@
         bool            status;
 
-        object = p2PendingExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 32.32, 64.64, 64.64, 64.64, "a string", -32, -32);
+        object = p2PendingExpRowAlloc("a string", "a string", -32, -32);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -894,44 +902,4 @@
             exit(EXIT_FAILURE);
         }
-        if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "airmass") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "ra") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "decl") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "exp_time") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "background") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
         if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
@@ -1000,5 +968,5 @@
         bool            status;
 
-        object = p2DoneExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, "a string", -32, -32);
+        object = p2DoneExpRowAlloc("a string", "a string", -32, -32);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -1016,44 +984,4 @@
             exit(EXIT_FAILURE);
         }
-        if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "airmass") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "ra") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "decl") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "exp_time") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "background") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
         if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
@@ -1122,5 +1050,5 @@
         bool            status;
 
-        object = p3PendingExpRowAlloc("a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, "a string", -32, -32);
+        object = p3PendingExpRowAlloc("a string", "a string", -32, -32);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -1138,40 +1066,4 @@
             exit(EXIT_FAILURE);
         }
-        if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "airmass") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "ra") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "decl") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "exp_time") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "background") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
         if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
@@ -1224,5 +1116,5 @@
         bool            status;
 
-        object = detInputExpRowAlloc(-32, -32, "a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64);
+        object = detInputExpRowAlloc(-32, -32, "a string", true, true);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -1248,41 +1140,9 @@
             exit(EXIT_FAILURE);
         }
-        if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "imfiles") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "airmass") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "ra") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "decl") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "exp_time") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "background") == 64.64) {
+        if (!psMetadataLookupBool(&status, md, "include") == true) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupBool(&status, md, "accept") == true) {
             psFree(md);
             exit(EXIT_FAILURE);
