Index: branches/jhoblitt/ippdb/src/ippdb.c
===================================================================
--- branches/jhoblitt/ippdb/src/ippdb.c	(revision 8054)
+++ branches/jhoblitt/ippdb/src/ippdb.c	(revision 8079)
@@ -5130,5 +5130,5 @@
 static void newExpRowFree(newExpRow *object);
 
-newExpRow *newExpRowAlloc(const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles)
+newExpRow *newExpRowAlloc(const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *class)
 {
     newExpRow       *object;
@@ -5142,4 +5142,5 @@
     object->exp_type = psStringCopy(exp_type);
     object->imfiles = imfiles;
+    object->class = psStringCopy(class);
 
     return object;
@@ -5152,4 +5153,5 @@
     psFree(object->telescope);
     psFree(object->exp_type);
+    psFree(object->class);
 }
 
@@ -5190,4 +5192,9 @@
         return false;
     }
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return false;
+    }
 
     status = psDBCreateTable(dbh, NEWEXP_TABLE_NAME, md);
@@ -5203,5 +5210,5 @@
 }
 
-bool newExpInsert(psDB * dbh, const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles)
+bool newExpInsert(psDB * dbh, const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *class)
 {
     psMetadata      *md;
@@ -5234,4 +5241,9 @@
         return false;
     }
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, class)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return false;
+    }
 
     status = psDBInsertOneRow(dbh, NEWEXP_TABLE_NAME, md);
@@ -5241,5 +5253,5 @@
 }
 
-bool newExpPop(psDB *dbh, char **exp_id, char **camera, char **telescope, char **exp_type, psS32 *imfiles)
+bool newExpPop(psDB *dbh, char **exp_id, char **camera, char **telescope, char **exp_type, psS32 *imfiles, char **class)
 {
     psArray         *rowSet;
@@ -5315,4 +5327,10 @@
         return false;
     }
+    *class = psMetadataLookupPtr(&status, row, "class");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item class");
+        psFree(row);
+        return false;
+    }
 
     psFree(row);
@@ -5323,5 +5341,5 @@
 bool newExpInsertObject(psDB *dbh, newExpRow *object)
 {
-    return newExpInsert(dbh, object->exp_id, object->camera, object->telescope, object->exp_type, object->imfiles);
+    return newExpInsert(dbh, object->exp_id, object->camera, object->telescope, object->exp_type, object->imfiles, object->class);
 }
 
@@ -5333,11 +5351,12 @@
     char            exp_type[256];
     psS32           imfiles;
-
-    if (!newExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles)) {
+    char            class[256];
+
+    if (!newExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&class)) {
         psError(PS_ERR_UNKNOWN, false, "failed to pop a database row");
         return NULL;
     }
 
-    return newExpRowAlloc(exp_id, camera, telescope, exp_type, imfiles);
+    return newExpRowAlloc(exp_id, camera, telescope, exp_type, imfiles, class);
 }
 
@@ -5463,4 +5482,9 @@
         return NULL;
     }
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, object->class)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return NULL;
+    }
 
     return md;
@@ -5475,4 +5499,5 @@
     char            *exp_type;
     psS32           imfiles;
+    char            *class;
 
     exp_id = psMetadataLookupPtr(&status, md, "exp_id");
@@ -5501,6 +5526,11 @@
         return false;
     }
-
-    return newExpRowAlloc(exp_id, camera, telescope, exp_type, imfiles);
+    class = psMetadataLookupPtr(&status, md, "class");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item class");
+        return false;
+    }
+
+    return newExpRowAlloc(exp_id, camera, telescope, exp_type, imfiles, class);
 }
 psArray *newExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -5961,5 +5991,5 @@
 static void rawDetrendExpRowFree(rawDetrendExpRow *object);
 
-rawDetrendExpRow *rawDetrendExpRowAlloc(const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, const char *stats)
+rawDetrendExpRow *rawDetrendExpRowAlloc(const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, const char *class, psF32 airmass, psF32 ra, psF32 dec, psF32 exp_time)
 {
     rawDetrendExpRow *object;
@@ -5974,5 +6004,9 @@
     object->imfiles = imfiles;
     object->filter = psStringCopy(filter);
-    object->stats = psStringCopy(stats);
+    object->class = psStringCopy(class);
+    object->airmass = airmass;
+    object->ra = ra;
+    object->dec = dec;
+    object->exp_time = exp_time;
 
     return object;
@@ -5986,5 +6020,5 @@
     psFree(object->exp_type);
     psFree(object->filter);
-    psFree(object->stats);
+    psFree(object->class);
 }
 
@@ -6030,6 +6064,26 @@
         return false;
     }
-    if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "255")) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item stats");
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, "255")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "ra", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ra");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "dec", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dec");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_time");
         psFree(md);
         return false;
@@ -6048,5 +6102,5 @@
 }
 
-bool rawDetrendExpInsert(psDB * dbh, const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, const char *stats)
+bool rawDetrendExpInsert(psDB * dbh, const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, const char *class, psF32 airmass, psF32 ra, psF32 dec, psF32 exp_time)
 {
     psMetadata      *md;
@@ -6084,6 +6138,26 @@
         return false;
     }
-    if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, stats)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item stats");
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, class)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, airmass)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "ra", 0, NULL, ra)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ra");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "dec", 0, NULL, dec)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dec");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time", 0, NULL, exp_time)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_time");
         psFree(md);
         return false;
@@ -6096,5 +6170,5 @@
 }
 
-bool rawDetrendExpPop(psDB *dbh, char **exp_id, char **camera, char **telescope, char **exp_type, psS32 *imfiles, char **filter, char **stats)
+bool rawDetrendExpPop(psDB *dbh, char **exp_id, char **camera, char **telescope, char **exp_type, psS32 *imfiles, char **filter, char **class, psF32 *airmass, psF32 *ra, psF32 *dec, psF32 *exp_time)
 {
     psArray         *rowSet;
@@ -6176,7 +6250,31 @@
         return false;
     }
-    *stats = psMetadataLookupPtr(&status, row, "stats");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");
+    *class = psMetadataLookupPtr(&status, row, "class");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item class");
+        psFree(row);
+        return false;
+    }
+    *airmass = psMetadataLookupF32(&status, row, "airmass");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item airmass");
+        psFree(row);
+        return false;
+    }
+    *ra = psMetadataLookupF32(&status, row, "ra");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item ra");
+        psFree(row);
+        return false;
+    }
+    *dec = psMetadataLookupF32(&status, row, "dec");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dec");
+        psFree(row);
+        return false;
+    }
+    *exp_time = psMetadataLookupF32(&status, row, "exp_time");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item exp_time");
         psFree(row);
         return false;
@@ -6190,5 +6288,5 @@
 bool rawDetrendExpInsertObject(psDB *dbh, rawDetrendExpRow *object)
 {
-    return rawDetrendExpInsert(dbh, object->exp_id, object->camera, object->telescope, object->exp_type, object->imfiles, object->filter, object->stats);
+    return rawDetrendExpInsert(dbh, object->exp_id, object->camera, object->telescope, object->exp_type, object->imfiles, object->filter, object->class, object->airmass, object->ra, object->dec, object->exp_time);
 }
 
@@ -6201,12 +6299,16 @@
     psS32           imfiles;
     char            filter[256];
-    char            stats[256];
-
-    if (!rawDetrendExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&stats)) {
+    char            class[256];
+    psF32           airmass;
+    psF32           ra;
+    psF32           dec;
+    psF32           exp_time;
+
+    if (!rawDetrendExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&class, &airmass, &ra, &dec, &exp_time)) {
         psError(PS_ERR_UNKNOWN, false, "failed to pop a database row");
         return NULL;
     }
 
-    return rawDetrendExpRowAlloc(exp_id, camera, telescope, exp_type, imfiles, filter, stats);
+    return rawDetrendExpRowAlloc(exp_id, camera, telescope, exp_type, imfiles, filter, class, airmass, ra, dec, exp_time);
 }
 
@@ -6337,6 +6439,26 @@
         return NULL;
     }
-    if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, object->stats)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item stats");
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, object->class)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, object->airmass)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "ra", 0, NULL, object->ra)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ra");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "dec", 0, NULL, object->dec)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dec");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time", 0, NULL, object->exp_time)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_time");
         psFree(md);
         return NULL;
@@ -6355,5 +6477,9 @@
     psS32           imfiles;
     char            *filter;
-    char            *stats;
+    char            *class;
+    psF32           airmass;
+    psF32           ra;
+    psF32           dec;
+    psF32           exp_time;
 
     exp_id = psMetadataLookupPtr(&status, md, "exp_id");
@@ -6387,11 +6513,31 @@
         return false;
     }
-    stats = psMetadataLookupPtr(&status, md, "stats");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");
-        return false;
-    }
-
-    return rawDetrendExpRowAlloc(exp_id, camera, telescope, exp_type, imfiles, filter, stats);
+    class = psMetadataLookupPtr(&status, md, "class");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item class");
+        return false;
+    }
+    airmass = psMetadataLookupF32(&status, md, "airmass");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item airmass");
+        return false;
+    }
+    ra = psMetadataLookupF32(&status, md, "ra");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item ra");
+        return false;
+    }
+    dec = psMetadataLookupF32(&status, md, "dec");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dec");
+        return false;
+    }
+    exp_time = psMetadataLookupF32(&status, md, "exp_time");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item exp_time");
+        return false;
+    }
+
+    return rawDetrendExpRowAlloc(exp_id, camera, telescope, exp_type, imfiles, filter, class, airmass, ra, dec, exp_time);
 }
 psArray *rawDetrendExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -6451,5 +6597,5 @@
 static void rawScienceExpRowFree(rawScienceExpRow *object);
 
-rawScienceExpRow *rawScienceExpRowAlloc(const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, const char *stats)
+rawScienceExpRow *rawScienceExpRowAlloc(const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, const char *class, psF32 airmass, psF32 ra, psF32 dec, psF32 exp_time)
 {
     rawScienceExpRow *object;
@@ -6464,5 +6610,9 @@
     object->imfiles = imfiles;
     object->filter = psStringCopy(filter);
-    object->stats = psStringCopy(stats);
+    object->class = psStringCopy(class);
+    object->airmass = airmass;
+    object->ra = ra;
+    object->dec = dec;
+    object->exp_time = exp_time;
 
     return object;
@@ -6476,5 +6626,5 @@
     psFree(object->exp_type);
     psFree(object->filter);
-    psFree(object->stats);
+    psFree(object->class);
 }
 
@@ -6520,6 +6670,26 @@
         return false;
     }
-    if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "255")) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item stats");
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, "255")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "ra", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ra");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "dec", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dec");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_time");
         psFree(md);
         return false;
@@ -6538,5 +6708,5 @@
 }
 
-bool rawScienceExpInsert(psDB * dbh, const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, const char *stats)
+bool rawScienceExpInsert(psDB * dbh, const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, const char *class, psF32 airmass, psF32 ra, psF32 dec, psF32 exp_time)
 {
     psMetadata      *md;
@@ -6574,6 +6744,26 @@
         return false;
     }
-    if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, stats)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item stats");
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, class)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, airmass)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "ra", 0, NULL, ra)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ra");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "dec", 0, NULL, dec)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dec");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time", 0, NULL, exp_time)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_time");
         psFree(md);
         return false;
@@ -6586,5 +6776,5 @@
 }
 
-bool rawScienceExpPop(psDB *dbh, char **exp_id, char **camera, char **telescope, char **exp_type, psS32 *imfiles, char **filter, char **stats)
+bool rawScienceExpPop(psDB *dbh, char **exp_id, char **camera, char **telescope, char **exp_type, psS32 *imfiles, char **filter, char **class, psF32 *airmass, psF32 *ra, psF32 *dec, psF32 *exp_time)
 {
     psArray         *rowSet;
@@ -6666,7 +6856,31 @@
         return false;
     }
-    *stats = psMetadataLookupPtr(&status, row, "stats");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");
+    *class = psMetadataLookupPtr(&status, row, "class");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item class");
+        psFree(row);
+        return false;
+    }
+    *airmass = psMetadataLookupF32(&status, row, "airmass");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item airmass");
+        psFree(row);
+        return false;
+    }
+    *ra = psMetadataLookupF32(&status, row, "ra");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item ra");
+        psFree(row);
+        return false;
+    }
+    *dec = psMetadataLookupF32(&status, row, "dec");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dec");
+        psFree(row);
+        return false;
+    }
+    *exp_time = psMetadataLookupF32(&status, row, "exp_time");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item exp_time");
         psFree(row);
         return false;
@@ -6680,5 +6894,5 @@
 bool rawScienceExpInsertObject(psDB *dbh, rawScienceExpRow *object)
 {
-    return rawScienceExpInsert(dbh, object->exp_id, object->camera, object->telescope, object->exp_type, object->imfiles, object->filter, object->stats);
+    return rawScienceExpInsert(dbh, object->exp_id, object->camera, object->telescope, object->exp_type, object->imfiles, object->filter, object->class, object->airmass, object->ra, object->dec, object->exp_time);
 }
 
@@ -6691,12 +6905,16 @@
     psS32           imfiles;
     char            filter[256];
-    char            stats[256];
-
-    if (!rawScienceExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&stats)) {
+    char            class[256];
+    psF32           airmass;
+    psF32           ra;
+    psF32           dec;
+    psF32           exp_time;
+
+    if (!rawScienceExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&class, &airmass, &ra, &dec, &exp_time)) {
         psError(PS_ERR_UNKNOWN, false, "failed to pop a database row");
         return NULL;
     }
 
-    return rawScienceExpRowAlloc(exp_id, camera, telescope, exp_type, imfiles, filter, stats);
+    return rawScienceExpRowAlloc(exp_id, camera, telescope, exp_type, imfiles, filter, class, airmass, ra, dec, exp_time);
 }
 
@@ -6827,6 +7045,26 @@
         return NULL;
     }
-    if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, object->stats)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item stats");
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, object->class)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, object->airmass)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "ra", 0, NULL, object->ra)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ra");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "dec", 0, NULL, object->dec)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dec");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time", 0, NULL, object->exp_time)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_time");
         psFree(md);
         return NULL;
@@ -6845,5 +7083,9 @@
     psS32           imfiles;
     char            *filter;
-    char            *stats;
+    char            *class;
+    psF32           airmass;
+    psF32           ra;
+    psF32           dec;
+    psF32           exp_time;
 
     exp_id = psMetadataLookupPtr(&status, md, "exp_id");
@@ -6877,11 +7119,31 @@
         return false;
     }
-    stats = psMetadataLookupPtr(&status, md, "stats");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");
-        return false;
-    }
-
-    return rawScienceExpRowAlloc(exp_id, camera, telescope, exp_type, imfiles, filter, stats);
+    class = psMetadataLookupPtr(&status, md, "class");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item class");
+        return false;
+    }
+    airmass = psMetadataLookupF32(&status, md, "airmass");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item airmass");
+        return false;
+    }
+    ra = psMetadataLookupF32(&status, md, "ra");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item ra");
+        return false;
+    }
+    dec = psMetadataLookupF32(&status, md, "dec");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dec");
+        return false;
+    }
+    exp_time = psMetadataLookupF32(&status, md, "exp_time");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item exp_time");
+        return false;
+    }
+
+    return rawScienceExpRowAlloc(exp_id, camera, telescope, exp_type, imfiles, filter, class, airmass, ra, dec, exp_time);
 }
 psArray *rawScienceExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -7372,5 +7634,5 @@
 static void p1PendingExpRowFree(p1PendingExpRow *object);
 
-p1PendingExpRow *p1PendingExpRowAlloc(const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, const char *stats, const char *recipe, psS32 p1_version)
+p1PendingExpRow *p1PendingExpRowAlloc(const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, const char *class, psF32 airmass, psF32 ra, psF32 dec, psF32 exp_time, const char *recipe, psS32 p1_version)
 {
     p1PendingExpRow *object;
@@ -7385,5 +7647,9 @@
     object->imfiles = imfiles;
     object->filter = psStringCopy(filter);
-    object->stats = psStringCopy(stats);
+    object->class = psStringCopy(class);
+    object->airmass = airmass;
+    object->ra = ra;
+    object->dec = dec;
+    object->exp_time = exp_time;
     object->recipe = psStringCopy(recipe);
     object->p1_version = p1_version;
@@ -7399,5 +7665,5 @@
     psFree(object->exp_type);
     psFree(object->filter);
-    psFree(object->stats);
+    psFree(object->class);
     psFree(object->recipe);
 }
@@ -7444,6 +7710,26 @@
         return false;
     }
-    if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "255")) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item stats");
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, "255")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "ra", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ra");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "dec", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dec");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_time");
         psFree(md);
         return false;
@@ -7472,5 +7758,5 @@
 }
 
-bool p1PendingExpInsert(psDB * dbh, const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, const char *stats, const char *recipe, psS32 p1_version)
+bool p1PendingExpInsert(psDB * dbh, const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, const char *class, psF32 airmass, psF32 ra, psF32 dec, psF32 exp_time, const char *recipe, psS32 p1_version)
 {
     psMetadata      *md;
@@ -7508,6 +7794,26 @@
         return false;
     }
-    if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, stats)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item stats");
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, class)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, airmass)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "ra", 0, NULL, ra)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ra");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "dec", 0, NULL, dec)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dec");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time", 0, NULL, exp_time)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_time");
         psFree(md);
         return false;
@@ -7530,5 +7836,5 @@
 }
 
-bool p1PendingExpPop(psDB *dbh, char **exp_id, char **camera, char **telescope, char **exp_type, psS32 *imfiles, char **filter, char **stats, char **recipe, psS32 *p1_version)
+bool p1PendingExpPop(psDB *dbh, char **exp_id, char **camera, char **telescope, char **exp_type, psS32 *imfiles, char **filter, char **class, psF32 *airmass, psF32 *ra, psF32 *dec, psF32 *exp_time, char **recipe, psS32 *p1_version)
 {
     psArray         *rowSet;
@@ -7610,7 +7916,31 @@
         return false;
     }
-    *stats = psMetadataLookupPtr(&status, row, "stats");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");
+    *class = psMetadataLookupPtr(&status, row, "class");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item class");
+        psFree(row);
+        return false;
+    }
+    *airmass = psMetadataLookupF32(&status, row, "airmass");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item airmass");
+        psFree(row);
+        return false;
+    }
+    *ra = psMetadataLookupF32(&status, row, "ra");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item ra");
+        psFree(row);
+        return false;
+    }
+    *dec = psMetadataLookupF32(&status, row, "dec");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dec");
+        psFree(row);
+        return false;
+    }
+    *exp_time = psMetadataLookupF32(&status, row, "exp_time");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item exp_time");
         psFree(row);
         return false;
@@ -7636,5 +7966,5 @@
 bool p1PendingExpInsertObject(psDB *dbh, p1PendingExpRow *object)
 {
-    return p1PendingExpInsert(dbh, object->exp_id, object->camera, object->telescope, object->exp_type, object->imfiles, object->filter, object->stats, object->recipe, object->p1_version);
+    return p1PendingExpInsert(dbh, object->exp_id, object->camera, object->telescope, object->exp_type, object->imfiles, object->filter, object->class, object->airmass, object->ra, object->dec, object->exp_time, object->recipe, object->p1_version);
 }
 
@@ -7647,14 +7977,18 @@
     psS32           imfiles;
     char            filter[256];
-    char            stats[256];
+    char            class[256];
+    psF32           airmass;
+    psF32           ra;
+    psF32           dec;
+    psF32           exp_time;
     char            recipe[256];
     psS32           p1_version;
 
-    if (!p1PendingExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&stats, (char **)&recipe, &p1_version)) {
+    if (!p1PendingExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&class, &airmass, &ra, &dec, &exp_time, (char **)&recipe, &p1_version)) {
         psError(PS_ERR_UNKNOWN, false, "failed to pop a database row");
         return NULL;
     }
 
-    return p1PendingExpRowAlloc(exp_id, camera, telescope, exp_type, imfiles, filter, stats, recipe, p1_version);
+    return p1PendingExpRowAlloc(exp_id, camera, telescope, exp_type, imfiles, filter, class, airmass, ra, dec, exp_time, recipe, p1_version);
 }
 
@@ -7785,6 +8119,26 @@
         return NULL;
     }
-    if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, object->stats)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item stats");
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, object->class)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, object->airmass)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "ra", 0, NULL, object->ra)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ra");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "dec", 0, NULL, object->dec)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dec");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time", 0, NULL, object->exp_time)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_time");
         psFree(md);
         return NULL;
@@ -7813,5 +8167,9 @@
     psS32           imfiles;
     char            *filter;
-    char            *stats;
+    char            *class;
+    psF32           airmass;
+    psF32           ra;
+    psF32           dec;
+    psF32           exp_time;
     char            *recipe;
     psS32           p1_version;
@@ -7847,7 +8205,27 @@
         return false;
     }
-    stats = psMetadataLookupPtr(&status, md, "stats");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");
+    class = psMetadataLookupPtr(&status, md, "class");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item class");
+        return false;
+    }
+    airmass = psMetadataLookupF32(&status, md, "airmass");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item airmass");
+        return false;
+    }
+    ra = psMetadataLookupF32(&status, md, "ra");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item ra");
+        return false;
+    }
+    dec = psMetadataLookupF32(&status, md, "dec");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dec");
+        return false;
+    }
+    exp_time = psMetadataLookupF32(&status, md, "exp_time");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item exp_time");
         return false;
     }
@@ -7863,5 +8241,5 @@
     }
 
-    return p1PendingExpRowAlloc(exp_id, camera, telescope, exp_type, imfiles, filter, stats, recipe, p1_version);
+    return p1PendingExpRowAlloc(exp_id, camera, telescope, exp_type, imfiles, filter, class, airmass, ra, dec, exp_time, recipe, p1_version);
 }
 psArray *p1PendingExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -7921,5 +8299,5 @@
 static void p2PendingExpRowFree(p2PendingExpRow *object);
 
-p2PendingExpRow *p2PendingExpRowAlloc(const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, const char *stats, const char *recipe, psS32 p1_version, psS32 p2_version)
+p2PendingExpRow *p2PendingExpRowAlloc(const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, const char *class, psF32 airmass, psF32 ra, psF32 dec, psF32 exp_time, const char *recipe, psS32 p1_version, psS32 p2_version)
 {
     p2PendingExpRow *object;
@@ -7934,5 +8312,9 @@
     object->imfiles = imfiles;
     object->filter = psStringCopy(filter);
-    object->stats = psStringCopy(stats);
+    object->class = psStringCopy(class);
+    object->airmass = airmass;
+    object->ra = ra;
+    object->dec = dec;
+    object->exp_time = exp_time;
     object->recipe = psStringCopy(recipe);
     object->p1_version = p1_version;
@@ -7949,5 +8331,5 @@
     psFree(object->exp_type);
     psFree(object->filter);
-    psFree(object->stats);
+    psFree(object->class);
     psFree(object->recipe);
 }
@@ -7994,6 +8376,26 @@
         return false;
     }
-    if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "255")) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item stats");
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, "255")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "ra", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ra");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "dec", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dec");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_time");
         psFree(md);
         return false;
@@ -8027,5 +8429,5 @@
 }
 
-bool p2PendingExpInsert(psDB * dbh, const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, const char *stats, const char *recipe, psS32 p1_version, psS32 p2_version)
+bool p2PendingExpInsert(psDB * dbh, const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, const char *class, psF32 airmass, psF32 ra, psF32 dec, psF32 exp_time, const char *recipe, psS32 p1_version, psS32 p2_version)
 {
     psMetadata      *md;
@@ -8063,6 +8465,26 @@
         return false;
     }
-    if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, stats)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item stats");
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, class)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, airmass)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "ra", 0, NULL, ra)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ra");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "dec", 0, NULL, dec)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dec");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time", 0, NULL, exp_time)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_time");
         psFree(md);
         return false;
@@ -8090,5 +8512,5 @@
 }
 
-bool p2PendingExpPop(psDB *dbh, char **exp_id, char **camera, char **telescope, char **exp_type, psS32 *imfiles, char **filter, char **stats, char **recipe, psS32 *p1_version, psS32 *p2_version)
+bool p2PendingExpPop(psDB *dbh, char **exp_id, char **camera, char **telescope, char **exp_type, psS32 *imfiles, char **filter, char **class, psF32 *airmass, psF32 *ra, psF32 *dec, psF32 *exp_time, char **recipe, psS32 *p1_version, psS32 *p2_version)
 {
     psArray         *rowSet;
@@ -8170,7 +8592,31 @@
         return false;
     }
-    *stats = psMetadataLookupPtr(&status, row, "stats");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");
+    *class = psMetadataLookupPtr(&status, row, "class");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item class");
+        psFree(row);
+        return false;
+    }
+    *airmass = psMetadataLookupF32(&status, row, "airmass");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item airmass");
+        psFree(row);
+        return false;
+    }
+    *ra = psMetadataLookupF32(&status, row, "ra");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item ra");
+        psFree(row);
+        return false;
+    }
+    *dec = psMetadataLookupF32(&status, row, "dec");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dec");
+        psFree(row);
+        return false;
+    }
+    *exp_time = psMetadataLookupF32(&status, row, "exp_time");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item exp_time");
         psFree(row);
         return false;
@@ -8202,5 +8648,5 @@
 bool p2PendingExpInsertObject(psDB *dbh, p2PendingExpRow *object)
 {
-    return p2PendingExpInsert(dbh, object->exp_id, object->camera, object->telescope, object->exp_type, object->imfiles, object->filter, object->stats, object->recipe, object->p1_version, object->p2_version);
+    return p2PendingExpInsert(dbh, object->exp_id, object->camera, object->telescope, object->exp_type, object->imfiles, object->filter, object->class, object->airmass, object->ra, object->dec, object->exp_time, object->recipe, object->p1_version, object->p2_version);
 }
 
@@ -8213,15 +8659,19 @@
     psS32           imfiles;
     char            filter[256];
-    char            stats[256];
+    char            class[256];
+    psF32           airmass;
+    psF32           ra;
+    psF32           dec;
+    psF32           exp_time;
     char            recipe[256];
     psS32           p1_version;
     psS32           p2_version;
 
-    if (!p2PendingExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&stats, (char **)&recipe, &p1_version, &p2_version)) {
+    if (!p2PendingExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&class, &airmass, &ra, &dec, &exp_time, (char **)&recipe, &p1_version, &p2_version)) {
         psError(PS_ERR_UNKNOWN, false, "failed to pop a database row");
         return NULL;
     }
 
-    return p2PendingExpRowAlloc(exp_id, camera, telescope, exp_type, imfiles, filter, stats, recipe, p1_version, p2_version);
+    return p2PendingExpRowAlloc(exp_id, camera, telescope, exp_type, imfiles, filter, class, airmass, ra, dec, exp_time, recipe, p1_version, p2_version);
 }
 
@@ -8352,6 +8802,26 @@
         return NULL;
     }
-    if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, object->stats)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item stats");
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, object->class)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, object->airmass)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "ra", 0, NULL, object->ra)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ra");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "dec", 0, NULL, object->dec)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dec");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time", 0, NULL, object->exp_time)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_time");
         psFree(md);
         return NULL;
@@ -8385,5 +8855,9 @@
     psS32           imfiles;
     char            *filter;
-    char            *stats;
+    char            *class;
+    psF32           airmass;
+    psF32           ra;
+    psF32           dec;
+    psF32           exp_time;
     char            *recipe;
     psS32           p1_version;
@@ -8420,7 +8894,27 @@
         return false;
     }
-    stats = psMetadataLookupPtr(&status, md, "stats");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");
+    class = psMetadataLookupPtr(&status, md, "class");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item class");
+        return false;
+    }
+    airmass = psMetadataLookupF32(&status, md, "airmass");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item airmass");
+        return false;
+    }
+    ra = psMetadataLookupF32(&status, md, "ra");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item ra");
+        return false;
+    }
+    dec = psMetadataLookupF32(&status, md, "dec");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dec");
+        return false;
+    }
+    exp_time = psMetadataLookupF32(&status, md, "exp_time");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item exp_time");
         return false;
     }
@@ -8441,5 +8935,5 @@
     }
 
-    return p2PendingExpRowAlloc(exp_id, camera, telescope, exp_type, imfiles, filter, stats, recipe, p1_version, p2_version);
+    return p2PendingExpRowAlloc(exp_id, camera, telescope, exp_type, imfiles, filter, class, airmass, ra, dec, exp_time, recipe, p1_version, p2_version);
 }
 psArray *p2PendingExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -8988,5 +9482,5 @@
 static void p2DoneExpRowFree(p2DoneExpRow *object);
 
-p2DoneExpRow *p2DoneExpRowAlloc(const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, const char *stats, const char *recipe, psS32 p1_version, psS32 p2_version)
+p2DoneExpRow *p2DoneExpRowAlloc(const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, const char *class, psF32 airmass, psF32 ra, psF32 dec, psF32 exp_time, const char *recipe, psS32 p1_version, psS32 p2_version)
 {
     p2DoneExpRow    *object;
@@ -9001,5 +9495,9 @@
     object->imfiles = imfiles;
     object->filter = psStringCopy(filter);
-    object->stats = psStringCopy(stats);
+    object->class = psStringCopy(class);
+    object->airmass = airmass;
+    object->ra = ra;
+    object->dec = dec;
+    object->exp_time = exp_time;
     object->recipe = psStringCopy(recipe);
     object->p1_version = p1_version;
@@ -9016,5 +9514,5 @@
     psFree(object->exp_type);
     psFree(object->filter);
-    psFree(object->stats);
+    psFree(object->class);
     psFree(object->recipe);
 }
@@ -9061,6 +9559,26 @@
         return false;
     }
-    if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "255")) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item stats");
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, "255")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "ra", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ra");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "dec", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dec");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_time");
         psFree(md);
         return false;
@@ -9094,5 +9612,5 @@
 }
 
-bool p2DoneExpInsert(psDB * dbh, const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, const char *stats, const char *recipe, psS32 p1_version, psS32 p2_version)
+bool p2DoneExpInsert(psDB * dbh, const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, const char *class, psF32 airmass, psF32 ra, psF32 dec, psF32 exp_time, const char *recipe, psS32 p1_version, psS32 p2_version)
 {
     psMetadata      *md;
@@ -9130,6 +9648,26 @@
         return false;
     }
-    if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, stats)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item stats");
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, class)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, airmass)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "ra", 0, NULL, ra)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ra");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "dec", 0, NULL, dec)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dec");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time", 0, NULL, exp_time)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_time");
         psFree(md);
         return false;
@@ -9157,5 +9695,5 @@
 }
 
-bool p2DoneExpPop(psDB *dbh, char **exp_id, char **camera, char **telescope, char **exp_type, psS32 *imfiles, char **filter, char **stats, char **recipe, psS32 *p1_version, psS32 *p2_version)
+bool p2DoneExpPop(psDB *dbh, char **exp_id, char **camera, char **telescope, char **exp_type, psS32 *imfiles, char **filter, char **class, psF32 *airmass, psF32 *ra, psF32 *dec, psF32 *exp_time, char **recipe, psS32 *p1_version, psS32 *p2_version)
 {
     psArray         *rowSet;
@@ -9237,7 +9775,31 @@
         return false;
     }
-    *stats = psMetadataLookupPtr(&status, row, "stats");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");
+    *class = psMetadataLookupPtr(&status, row, "class");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item class");
+        psFree(row);
+        return false;
+    }
+    *airmass = psMetadataLookupF32(&status, row, "airmass");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item airmass");
+        psFree(row);
+        return false;
+    }
+    *ra = psMetadataLookupF32(&status, row, "ra");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item ra");
+        psFree(row);
+        return false;
+    }
+    *dec = psMetadataLookupF32(&status, row, "dec");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dec");
+        psFree(row);
+        return false;
+    }
+    *exp_time = psMetadataLookupF32(&status, row, "exp_time");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item exp_time");
         psFree(row);
         return false;
@@ -9269,5 +9831,5 @@
 bool p2DoneExpInsertObject(psDB *dbh, p2DoneExpRow *object)
 {
-    return p2DoneExpInsert(dbh, object->exp_id, object->camera, object->telescope, object->exp_type, object->imfiles, object->filter, object->stats, object->recipe, object->p1_version, object->p2_version);
+    return p2DoneExpInsert(dbh, object->exp_id, object->camera, object->telescope, object->exp_type, object->imfiles, object->filter, object->class, object->airmass, object->ra, object->dec, object->exp_time, object->recipe, object->p1_version, object->p2_version);
 }
 
@@ -9280,15 +9842,19 @@
     psS32           imfiles;
     char            filter[256];
-    char            stats[256];
+    char            class[256];
+    psF32           airmass;
+    psF32           ra;
+    psF32           dec;
+    psF32           exp_time;
     char            recipe[256];
     psS32           p1_version;
     psS32           p2_version;
 
-    if (!p2DoneExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&stats, (char **)&recipe, &p1_version, &p2_version)) {
+    if (!p2DoneExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&class, &airmass, &ra, &dec, &exp_time, (char **)&recipe, &p1_version, &p2_version)) {
         psError(PS_ERR_UNKNOWN, false, "failed to pop a database row");
         return NULL;
     }
 
-    return p2DoneExpRowAlloc(exp_id, camera, telescope, exp_type, imfiles, filter, stats, recipe, p1_version, p2_version);
+    return p2DoneExpRowAlloc(exp_id, camera, telescope, exp_type, imfiles, filter, class, airmass, ra, dec, exp_time, recipe, p1_version, p2_version);
 }
 
@@ -9419,6 +9985,26 @@
         return NULL;
     }
-    if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, object->stats)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item stats");
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, object->class)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, object->airmass)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "ra", 0, NULL, object->ra)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ra");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "dec", 0, NULL, object->dec)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dec");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time", 0, NULL, object->exp_time)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_time");
         psFree(md);
         return NULL;
@@ -9452,5 +10038,9 @@
     psS32           imfiles;
     char            *filter;
-    char            *stats;
+    char            *class;
+    psF32           airmass;
+    psF32           ra;
+    psF32           dec;
+    psF32           exp_time;
     char            *recipe;
     psS32           p1_version;
@@ -9487,7 +10077,27 @@
         return false;
     }
-    stats = psMetadataLookupPtr(&status, md, "stats");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");
+    class = psMetadataLookupPtr(&status, md, "class");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item class");
+        return false;
+    }
+    airmass = psMetadataLookupF32(&status, md, "airmass");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item airmass");
+        return false;
+    }
+    ra = psMetadataLookupF32(&status, md, "ra");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item ra");
+        return false;
+    }
+    dec = psMetadataLookupF32(&status, md, "dec");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dec");
+        return false;
+    }
+    exp_time = psMetadataLookupF32(&status, md, "exp_time");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item exp_time");
         return false;
     }
@@ -9508,5 +10118,5 @@
     }
 
-    return p2DoneExpRowAlloc(exp_id, camera, telescope, exp_type, imfiles, filter, stats, recipe, p1_version, p2_version);
+    return p2DoneExpRowAlloc(exp_id, camera, telescope, exp_type, imfiles, filter, class, airmass, ra, dec, exp_time, recipe, p1_version, p2_version);
 }
 psArray *p2DoneExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -10055,5 +10665,5 @@
 static void p3PendingExpRowFree(p3PendingExpRow *object);
 
-p3PendingExpRow *p3PendingExpRowAlloc(const char *exp_id, const char *camera, const char *exp_type, psS32 imfiles, const char *filter, const char *stats, const char *recipe, psS32 p2_version, psS32 p3_version)
+p3PendingExpRow *p3PendingExpRowAlloc(const char *exp_id, const char *camera, const char *exp_type, psS32 imfiles, const char *filter, const char *class, psF32 airmass, psF32 ra, psF32 dec, psF32 exp_time, const char *recipe, psS32 p2_version, psS32 p3_version)
 {
     p3PendingExpRow *object;
@@ -10067,5 +10677,9 @@
     object->imfiles = imfiles;
     object->filter = psStringCopy(filter);
-    object->stats = psStringCopy(stats);
+    object->class = psStringCopy(class);
+    object->airmass = airmass;
+    object->ra = ra;
+    object->dec = dec;
+    object->exp_time = exp_time;
     object->recipe = psStringCopy(recipe);
     object->p2_version = p2_version;
@@ -10081,5 +10695,5 @@
     psFree(object->exp_type);
     psFree(object->filter);
-    psFree(object->stats);
+    psFree(object->class);
     psFree(object->recipe);
 }
@@ -10121,6 +10735,26 @@
         return false;
     }
-    if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "255")) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item stats");
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, "255")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "ra", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ra");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "dec", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dec");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_time");
         psFree(md);
         return false;
@@ -10154,5 +10788,5 @@
 }
 
-bool p3PendingExpInsert(psDB * dbh, const char *exp_id, const char *camera, const char *exp_type, psS32 imfiles, const char *filter, const char *stats, const char *recipe, psS32 p2_version, psS32 p3_version)
+bool p3PendingExpInsert(psDB * dbh, const char *exp_id, const char *camera, const char *exp_type, psS32 imfiles, const char *filter, const char *class, psF32 airmass, psF32 ra, psF32 dec, psF32 exp_time, const char *recipe, psS32 p2_version, psS32 p3_version)
 {
     psMetadata      *md;
@@ -10185,6 +10819,26 @@
         return false;
     }
-    if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, stats)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item stats");
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, class)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, airmass)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "ra", 0, NULL, ra)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ra");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "dec", 0, NULL, dec)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dec");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time", 0, NULL, exp_time)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_time");
         psFree(md);
         return false;
@@ -10212,5 +10866,5 @@
 }
 
-bool p3PendingExpPop(psDB *dbh, char **exp_id, char **camera, char **exp_type, psS32 *imfiles, char **filter, char **stats, char **recipe, psS32 *p2_version, psS32 *p3_version)
+bool p3PendingExpPop(psDB *dbh, char **exp_id, char **camera, char **exp_type, psS32 *imfiles, char **filter, char **class, psF32 *airmass, psF32 *ra, psF32 *dec, psF32 *exp_time, char **recipe, psS32 *p2_version, psS32 *p3_version)
 {
     psArray         *rowSet;
@@ -10286,7 +10940,31 @@
         return false;
     }
-    *stats = psMetadataLookupPtr(&status, row, "stats");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");
+    *class = psMetadataLookupPtr(&status, row, "class");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item class");
+        psFree(row);
+        return false;
+    }
+    *airmass = psMetadataLookupF32(&status, row, "airmass");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item airmass");
+        psFree(row);
+        return false;
+    }
+    *ra = psMetadataLookupF32(&status, row, "ra");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item ra");
+        psFree(row);
+        return false;
+    }
+    *dec = psMetadataLookupF32(&status, row, "dec");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dec");
+        psFree(row);
+        return false;
+    }
+    *exp_time = psMetadataLookupF32(&status, row, "exp_time");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item exp_time");
         psFree(row);
         return false;
@@ -10318,5 +10996,5 @@
 bool p3PendingExpInsertObject(psDB *dbh, p3PendingExpRow *object)
 {
-    return p3PendingExpInsert(dbh, object->exp_id, object->camera, object->exp_type, object->imfiles, object->filter, object->stats, object->recipe, object->p2_version, object->p3_version);
+    return p3PendingExpInsert(dbh, object->exp_id, object->camera, object->exp_type, object->imfiles, object->filter, object->class, object->airmass, object->ra, object->dec, object->exp_time, object->recipe, object->p2_version, object->p3_version);
 }
 
@@ -10328,15 +11006,19 @@
     psS32           imfiles;
     char            filter[256];
-    char            stats[256];
+    char            class[256];
+    psF32           airmass;
+    psF32           ra;
+    psF32           dec;
+    psF32           exp_time;
     char            recipe[256];
     psS32           p2_version;
     psS32           p3_version;
 
-    if (!p3PendingExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&stats, (char **)&recipe, &p2_version, &p3_version)) {
+    if (!p3PendingExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&class, &airmass, &ra, &dec, &exp_time, (char **)&recipe, &p2_version, &p3_version)) {
         psError(PS_ERR_UNKNOWN, false, "failed to pop a database row");
         return NULL;
     }
 
-    return p3PendingExpRowAlloc(exp_id, camera, exp_type, imfiles, filter, stats, recipe, p2_version, p3_version);
+    return p3PendingExpRowAlloc(exp_id, camera, exp_type, imfiles, filter, class, airmass, ra, dec, exp_time, recipe, p2_version, p3_version);
 }
 
@@ -10462,6 +11144,26 @@
         return NULL;
     }
-    if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, object->stats)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item stats");
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, object->class)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, object->airmass)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "ra", 0, NULL, object->ra)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ra");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "dec", 0, NULL, object->dec)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dec");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time", 0, NULL, object->exp_time)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_time");
         psFree(md);
         return NULL;
@@ -10494,5 +11196,9 @@
     psS32           imfiles;
     char            *filter;
-    char            *stats;
+    char            *class;
+    psF32           airmass;
+    psF32           ra;
+    psF32           dec;
+    psF32           exp_time;
     char            *recipe;
     psS32           p2_version;
@@ -10524,7 +11230,27 @@
         return false;
     }
-    stats = psMetadataLookupPtr(&status, md, "stats");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");
+    class = psMetadataLookupPtr(&status, md, "class");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item class");
+        return false;
+    }
+    airmass = psMetadataLookupF32(&status, md, "airmass");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item airmass");
+        return false;
+    }
+    ra = psMetadataLookupF32(&status, md, "ra");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item ra");
+        return false;
+    }
+    dec = psMetadataLookupF32(&status, md, "dec");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dec");
+        return false;
+    }
+    exp_time = psMetadataLookupF32(&status, md, "exp_time");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item exp_time");
         return false;
     }
@@ -10545,5 +11271,5 @@
     }
 
-    return p3PendingExpRowAlloc(exp_id, camera, exp_type, imfiles, filter, stats, recipe, p2_version, p3_version);
+    return p3PendingExpRowAlloc(exp_id, camera, exp_type, imfiles, filter, class, airmass, ra, dec, exp_time, recipe, p2_version, p3_version);
 }
 psArray *p3PendingExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -10943,5 +11669,5 @@
 static void detInputExpRowFree(detInputExpRow *object);
 
-detInputExpRow *detInputExpRowAlloc(psS32 det_id, psS32 iteration, const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, const char *stats)
+detInputExpRow *detInputExpRowAlloc(psS32 det_id, psS32 iteration, const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, const char *class, psF32 airmass, psF32 ra, psF32 dec, psF32 exp_time)
 {
     detInputExpRow  *object;
@@ -10958,5 +11684,9 @@
     object->imfiles = imfiles;
     object->filter = psStringCopy(filter);
-    object->stats = psStringCopy(stats);
+    object->class = psStringCopy(class);
+    object->airmass = airmass;
+    object->ra = ra;
+    object->dec = dec;
+    object->exp_time = exp_time;
 
     return object;
@@ -10970,5 +11700,5 @@
     psFree(object->exp_type);
     psFree(object->filter);
-    psFree(object->stats);
+    psFree(object->class);
 }
 
@@ -11024,6 +11754,26 @@
         return false;
     }
-    if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "255")) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item stats");
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, "255")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "ra", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ra");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "dec", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dec");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time", 0, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_time");
         psFree(md);
         return false;
@@ -11042,5 +11792,5 @@
 }
 
-bool detInputExpInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, const char *stats)
+bool detInputExpInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *exp_id, const char *camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, const char *class, psF32 airmass, psF32 ra, psF32 dec, psF32 exp_time)
 {
     psMetadata      *md;
@@ -11088,6 +11838,26 @@
         return false;
     }
-    if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, stats)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item stats");
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, class)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, airmass)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "ra", 0, NULL, ra)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ra");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "dec", 0, NULL, dec)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dec");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time", 0, NULL, exp_time)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_time");
         psFree(md);
         return false;
@@ -11100,5 +11870,5 @@
 }
 
-bool detInputExpPop(psDB *dbh, psS32 *det_id, psS32 *iteration, char **exp_id, char **camera, char **telescope, char **exp_type, psS32 *imfiles, char **filter, char **stats)
+bool detInputExpPop(psDB *dbh, psS32 *det_id, psS32 *iteration, char **exp_id, char **camera, char **telescope, char **exp_type, psS32 *imfiles, char **filter, char **class, psF32 *airmass, psF32 *ra, psF32 *dec, psF32 *exp_time)
 {
     psArray         *rowSet;
@@ -11192,7 +11962,31 @@
         return false;
     }
-    *stats = psMetadataLookupPtr(&status, row, "stats");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");
+    *class = psMetadataLookupPtr(&status, row, "class");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item class");
+        psFree(row);
+        return false;
+    }
+    *airmass = psMetadataLookupF32(&status, row, "airmass");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item airmass");
+        psFree(row);
+        return false;
+    }
+    *ra = psMetadataLookupF32(&status, row, "ra");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item ra");
+        psFree(row);
+        return false;
+    }
+    *dec = psMetadataLookupF32(&status, row, "dec");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dec");
+        psFree(row);
+        return false;
+    }
+    *exp_time = psMetadataLookupF32(&status, row, "exp_time");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item exp_time");
         psFree(row);
         return false;
@@ -11206,5 +12000,5 @@
 bool detInputExpInsertObject(psDB *dbh, detInputExpRow *object)
 {
-    return detInputExpInsert(dbh, object->det_id, object->iteration, object->exp_id, object->camera, object->telescope, object->exp_type, object->imfiles, object->filter, object->stats);
+    return detInputExpInsert(dbh, object->det_id, object->iteration, object->exp_id, object->camera, object->telescope, object->exp_type, object->imfiles, object->filter, object->class, object->airmass, object->ra, object->dec, object->exp_time);
 }
 
@@ -11219,12 +12013,16 @@
     psS32           imfiles;
     char            filter[256];
-    char            stats[256];
-
-    if (!detInputExpPop(dbh, &det_id, &iteration, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&stats)) {
+    char            class[256];
+    psF32           airmass;
+    psF32           ra;
+    psF32           dec;
+    psF32           exp_time;
+
+    if (!detInputExpPop(dbh, &det_id, &iteration, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&class, &airmass, &ra, &dec, &exp_time)) {
         psError(PS_ERR_UNKNOWN, false, "failed to pop a database row");
         return NULL;
     }
 
-    return detInputExpRowAlloc(det_id, iteration, exp_id, camera, telescope, exp_type, imfiles, filter, stats);
+    return detInputExpRowAlloc(det_id, iteration, exp_id, camera, telescope, exp_type, imfiles, filter, class, airmass, ra, dec, exp_time);
 }
 
@@ -11365,6 +12163,26 @@
         return NULL;
     }
-    if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, object->stats)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item stats");
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "class", 0, NULL, object->class)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item class");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, object->airmass)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "ra", 0, NULL, object->ra)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ra");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "dec", 0, NULL, object->dec)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dec");
+        psFree(md);
+        return NULL;
+    }
+    if (!psMetadataAddF32(md, PS_LIST_TAIL, "exp_time", 0, NULL, object->exp_time)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_time");
         psFree(md);
         return NULL;
@@ -11385,5 +12203,9 @@
     psS32           imfiles;
     char            *filter;
-    char            *stats;
+    char            *class;
+    psF32           airmass;
+    psF32           ra;
+    psF32           dec;
+    psF32           exp_time;
 
     det_id = psMetadataLookupS32(&status, md, "det_id");
@@ -11427,11 +12249,31 @@
         return false;
     }
-    stats = psMetadataLookupPtr(&status, md, "stats");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");
-        return false;
-    }
-
-    return detInputExpRowAlloc(det_id, iteration, exp_id, camera, telescope, exp_type, imfiles, filter, stats);
+    class = psMetadataLookupPtr(&status, md, "class");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item class");
+        return false;
+    }
+    airmass = psMetadataLookupF32(&status, md, "airmass");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item airmass");
+        return false;
+    }
+    ra = psMetadataLookupF32(&status, md, "ra");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item ra");
+        return false;
+    }
+    dec = psMetadataLookupF32(&status, md, "dec");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dec");
+        return false;
+    }
+    exp_time = psMetadataLookupF32(&status, md, "exp_time");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item exp_time");
+        return false;
+    }
+
+    return detInputExpRowAlloc(det_id, iteration, exp_id, camera, telescope, exp_type, imfiles, filter, class, airmass, ra, dec, exp_time);
 }
 psArray *detInputExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
