Index: /trunk/ippdb/Makefile.am
===================================================================
--- /trunk/ippdb/Makefile.am	(revision 20204)
+++ /trunk/ippdb/Makefile.am	(revision 20205)
@@ -61,11 +61,13 @@
     $(top_builddir)/docs/man/man3/calRunRow.3 \
     $(top_builddir)/docs/man/man3/flatcorrRunRow.3 \
-    $(top_builddir)/docs/man/man3/flatcorrExpRow.3 \
+    $(top_builddir)/docs/man/man3/flatcorrChipLinkRow.3 \
+    $(top_builddir)/docs/man/man3/flatcorrCamLinkRow.3 \
     $(top_builddir)/docs/man/man3/pstampDataStoreRow.3 \
+    $(top_builddir)/docs/man/man3/pstampProjectRow.3 \
     $(top_builddir)/docs/man/man3/pstampRequestRow.3 \
     $(top_builddir)/docs/man/man3/pstampJobRow.3 
 
 
-docs/man/man3/ippdb.3 docs/man/man3/pzDataStoreRow.3 docs/man/man3/summitExpRow.3 docs/man/man3/summitImfileRow.3 docs/man/man3/pzDownloadExpRow.3 docs/man/man3/pzDownloadImfileRow.3 docs/man/man3/newExpRow.3 docs/man/man3/newImfileRow.3 docs/man/man3/rawExpRow.3 docs/man/man3/rawImfileRow.3 docs/man/man3/guidePendingExpRow.3 docs/man/man3/chipRunRow.3 docs/man/man3/chipProcessedImfileRow.3 docs/man/man3/chipMaskRow.3 docs/man/man3/camRunRow.3 docs/man/man3/camProcessedExpRow.3 docs/man/man3/camMaskRow.3 docs/man/man3/fakeRunRow.3 docs/man/man3/fakeProcessedImfileRow.3 docs/man/man3/fakeMaskRow.3 docs/man/man3/warpRunRow.3 docs/man/man3/warpSkyCellMapRow.3 docs/man/man3/warpSkyfileRow.3 docs/man/man3/warpMaskRow.3 docs/man/man3/diffRunRow.3 docs/man/man3/diffInputSkyfileRow.3 docs/man/man3/diffSkyfileRow.3 docs/man/man3/stackRunRow.3 docs/man/man3/stackInputSkyfileRow.3 docs/man/man3/stackSumSkyfileRow.3 docs/man/man3/detRunRow.3 docs/man/man3/detInputExpRow.3 docs/man/man3/detProcessedImfileRow.3 docs/man/man3/detProcessedExpRow.3 docs/man/man3/detStackedImfileRow.3 docs/man/man3/detNormalizedStatImfileRow.3 docs/man/man3/detNormalizedImfileRow.3 docs/man/man3/detNormalizedExpRow.3 docs/man/man3/detResidImfileRow.3 docs/man/man3/detResidExpRow.3 docs/man/man3/detRunSummaryRow.3 docs/man/man3/detRegisteredImfileRow.3 docs/man/man3/detCorrectedExpRow.3 docs/man/man3/detCorrectedImfileRow.3 docs/man/man3/magicRunRow.3 docs/man/man3/magicInputSkyfileRow.3 docs/man/man3/magicTreeRow.3 docs/man/man3/magicNodeResultRow.3 docs/man/man3/magicMaskRow.3 docs/man/man3/calDBRow.3 docs/man/man3/calRunRow.3 docs/man/man3/flatcorrRunRow.3 docs/man/man3/flatcorrExpRow.3 docs/man/man3/pstampDataStoreRow.3 docs/man/man3/pstampRequestRow.3 docs/man/man3/pstampJobRow.3:
+docs/man/man3/ippdb.3 docs/man/man3/pzDataStoreRow.3 docs/man/man3/summitExpRow.3 docs/man/man3/summitImfileRow.3 docs/man/man3/pzDownloadExpRow.3 docs/man/man3/pzDownloadImfileRow.3 docs/man/man3/newExpRow.3 docs/man/man3/newImfileRow.3 docs/man/man3/rawExpRow.3 docs/man/man3/rawImfileRow.3 docs/man/man3/guidePendingExpRow.3 docs/man/man3/chipRunRow.3 docs/man/man3/chipProcessedImfileRow.3 docs/man/man3/chipMaskRow.3 docs/man/man3/camRunRow.3 docs/man/man3/camProcessedExpRow.3 docs/man/man3/camMaskRow.3 docs/man/man3/fakeRunRow.3 docs/man/man3/fakeProcessedImfileRow.3 docs/man/man3/fakeMaskRow.3 docs/man/man3/warpRunRow.3 docs/man/man3/warpSkyCellMapRow.3 docs/man/man3/warpSkyfileRow.3 docs/man/man3/warpMaskRow.3 docs/man/man3/diffRunRow.3 docs/man/man3/diffInputSkyfileRow.3 docs/man/man3/diffSkyfileRow.3 docs/man/man3/stackRunRow.3 docs/man/man3/stackInputSkyfileRow.3 docs/man/man3/stackSumSkyfileRow.3 docs/man/man3/detRunRow.3 docs/man/man3/detInputExpRow.3 docs/man/man3/detProcessedImfileRow.3 docs/man/man3/detProcessedExpRow.3 docs/man/man3/detStackedImfileRow.3 docs/man/man3/detNormalizedStatImfileRow.3 docs/man/man3/detNormalizedImfileRow.3 docs/man/man3/detNormalizedExpRow.3 docs/man/man3/detResidImfileRow.3 docs/man/man3/detResidExpRow.3 docs/man/man3/detRunSummaryRow.3 docs/man/man3/detRegisteredImfileRow.3 docs/man/man3/detCorrectedExpRow.3 docs/man/man3/detCorrectedImfileRow.3 docs/man/man3/magicRunRow.3 docs/man/man3/magicInputSkyfileRow.3 docs/man/man3/magicTreeRow.3 docs/man/man3/magicNodeResultRow.3 docs/man/man3/magicMaskRow.3 docs/man/man3/calDBRow.3 docs/man/man3/calRunRow.3 docs/man/man3/flatcorrRunRow.3 docs/man/man3/flatcorrChipLinkRow.3 docs/man/man3/flatcorrCamLinkRow.3 docs/man/man3/pstampDataStoreRow.3 docs/man/man3/pstampProjectRow.3 docs/man/man3/pstampRequestRow.3 docs/man/man3/pstampJobRow.3:
 	$(DOXYGEN)
 
Index: /trunk/ippdb/autogen.sh
===================================================================
--- /trunk/ippdb/autogen.sh	(revision 20204)
+++ /trunk/ippdb/autogen.sh	(revision 20205)
@@ -23,5 +23,5 @@
 ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
         echo
-        echo "You must have $LIBTOOLIZE installed to compile $PROJECT."
+        echo "You must have $LIBTOOlIZE installed to compile $PROJECT."
         echo "Download the appropriate package for your distribution,"
         echo "or get the source tarball at http://ftp.gnu.org/gnu/libtool/"
@@ -75,5 +75,5 @@
 fi
 
-$LIBTOOLIZE --copy --force || echo "$LIBTOOLIZE failed"
+$LIBTOOLIZE --copy --force || echo "$LIBTOOlIZE failed"
 $ACLOCAL || echo "$ACLOCAL failed"
 $AUTOHEADER || echo "$AUTOHEADER failed"
Index: /trunk/ippdb/configure.ac
===================================================================
--- /trunk/ippdb/configure.ac	(revision 20204)
+++ /trunk/ippdb/configure.ac	(revision 20205)
@@ -7,5 +7,5 @@
 AC_PREREQ(2.61)
 
-AC_INIT([ippdb], [1.1.39], [pan-starrs.ifa.hawaii.edu])
+AC_INIT([ippdb], [1.1.44], [pan-starrs.ifa.hawaii.edu])
 AC_CONFIG_SRCDIR([ippdb.pc.in])
 
Index: /trunk/ippdb/src/ippdb.c
===================================================================
--- /trunk/ippdb/src/ippdb.c	(revision 20204)
+++ /trunk/ippdb/src/ippdb.c	(revision 20205)
@@ -82,6 +82,8 @@
 #define CALRUN_TABLE_NAME "calRun"
 #define FLATCORRRUN_TABLE_NAME "flatcorrRun"
-#define FLATCORREXP_TABLE_NAME "flatcorrExp"
+#define FLATCORRCHIPLINK_TABLE_NAME "flatcorrChipLink"
+#define FLATCORRCAMLINK_TABLE_NAME "flatcorrCamLink"
 #define PSTAMPDATASTORE_TABLE_NAME "pstampDataStore"
+#define PSTAMPPROJECT_TABLE_NAME "pstampProject"
 #define PSTAMPREQUEST_TABLE_NAME "pstampRequest"
 #define PSTAMPJOB_TABLE_NAME "pstampJob"
@@ -3230,5 +3232,5 @@
 static void rawExpRowFree(rawExpRow *object);
 
-rawExpRow *rawExpRowAlloc(psS64 exp_id, const char *exp_name, const char *camera, const char *telescope, psTime* dateobs, const char *exp_tag, const char *exp_type, const char *filelevel, const char *workdir, const char *reduction, const char *dvodb, const char *tess_id, const char *end_stage, const char *filter, const char *comment, psF32 airmass, psF64 ra, psF64 decl, psF32 exp_time, psF32 sat_pixel_frac, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 alt, psF64 az, psF32 ccd_temp, psF64 posang, psF32 m1_x, psF32 m1_y, psF32 m1_z, psF32 m1_tip, psF32 m1_tilt, psF32 m2_x, psF32 m2_y, psF32 m2_z, psF32 m2_tip, psF32 m2_tilt, psF32 env_temperature, psF32 env_humidity, psF32 env_wind_speed, psF32 env_wind_dir, psF32 teltemp_m1, psF32 teltemp_m1cell, psF32 teltemp_m2, psF32 teltemp_spider, psF32 teltemp_truss, psF32 teltemp_extra, psF32 pon_time, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *object, psF32 solang, const char *hostname, psS16 fault, psTime* epoch)
+rawExpRow *rawExpRowAlloc(psS64 exp_id, const char *exp_name, const char *camera, const char *telescope, psTime* dateobs, const char *exp_tag, const char *exp_type, const char *filelevel, const char *workdir, const char *reduction, const char *dvodb, const char *tess_id, const char *end_stage, const char *filter, const char *comment, const char *obs_mode, const char *obs_group, psF32 airmass, psF64 ra, psF64 decl, psF32 exp_time, psF32 sat_pixel_frac, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 alt, psF64 az, psF32 ccd_temp, psF64 posang, psF32 m1_x, psF32 m1_y, psF32 m1_z, psF32 m1_tip, psF32 m1_tilt, psF32 m2_x, psF32 m2_y, psF32 m2_z, psF32 m2_tip, psF32 m2_tilt, psF32 env_temperature, psF32 env_humidity, psF32 env_wind_speed, psF32 env_wind_dir, psF32 teltemp_m1, psF32 teltemp_m1cell, psF32 teltemp_m2, psF32 teltemp_spider, psF32 teltemp_truss, psF32 teltemp_extra, psF32 pon_time, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *object, psF32 sun_angle, psF32 sun_alt, psF32 moon_angle, psF32 moon_alt, psF32 moon_phase, const char *hostname, psS16 fault, psTime* epoch)
 {
     rawExpRow       *_object;
@@ -3252,4 +3254,6 @@
     _object->filter = psStringCopy(filter);
     _object->comment = psStringCopy(comment);
+    _object->obs_mode = psStringCopy(obs_mode);
+    _object->obs_group = psStringCopy(obs_group);
     _object->airmass = airmass;
     _object->ra = ra;
@@ -3291,5 +3295,9 @@
     _object->user_5 = user_5;
     _object->object = psStringCopy(object);
-    _object->solang = solang;
+    _object->sun_angle = sun_angle;
+    _object->sun_alt = sun_alt;
+    _object->moon_angle = moon_angle;
+    _object->moon_alt = moon_alt;
+    _object->moon_phase = moon_phase;
     _object->hostname = psStringCopy(hostname);
     _object->fault = fault;
@@ -3315,4 +3323,6 @@
     psFree(object->filter);
     psFree(object->comment);
+    psFree(object->obs_mode);
+    psFree(object->obs_group);
     psFree(object->object);
     psFree(object->hostname);
@@ -3398,4 +3408,14 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "obs_mode", PS_DATA_STRING, "data usage goal (eg, survey name, engineering, etc)", "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item obs_mode");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "obs_group", PS_DATA_STRING, "identifier for data block (eg, observation sequence)", "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item obs_group");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "airmass", PS_DATA_F32, NULL, 0.0)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
@@ -3593,6 +3613,26 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "solang", PS_DATA_F32, NULL, 0.0)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item solang");
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "sun_angle", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item sun_angle");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "sun_alt", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item sun_alt");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "moon_angle", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item moon_angle");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "moon_alt", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item moon_alt");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "moon_phase", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item moon_phase");
         psFree(md);
         return false;
@@ -3626,5 +3666,5 @@
 }
 
-bool rawExpInsert(psDB * dbh, psS64 exp_id, const char *exp_name, const char *camera, const char *telescope, psTime* dateobs, const char *exp_tag, const char *exp_type, const char *filelevel, const char *workdir, const char *reduction, const char *dvodb, const char *tess_id, const char *end_stage, const char *filter, const char *comment, psF32 airmass, psF64 ra, psF64 decl, psF32 exp_time, psF32 sat_pixel_frac, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 alt, psF64 az, psF32 ccd_temp, psF64 posang, psF32 m1_x, psF32 m1_y, psF32 m1_z, psF32 m1_tip, psF32 m1_tilt, psF32 m2_x, psF32 m2_y, psF32 m2_z, psF32 m2_tip, psF32 m2_tilt, psF32 env_temperature, psF32 env_humidity, psF32 env_wind_speed, psF32 env_wind_dir, psF32 teltemp_m1, psF32 teltemp_m1cell, psF32 teltemp_m2, psF32 teltemp_spider, psF32 teltemp_truss, psF32 teltemp_extra, psF32 pon_time, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *object, psF32 solang, const char *hostname, psS16 fault, psTime* epoch)
+bool rawExpInsert(psDB * dbh, psS64 exp_id, const char *exp_name, const char *camera, const char *telescope, psTime* dateobs, const char *exp_tag, const char *exp_type, const char *filelevel, const char *workdir, const char *reduction, const char *dvodb, const char *tess_id, const char *end_stage, const char *filter, const char *comment, const char *obs_mode, const char *obs_group, psF32 airmass, psF64 ra, psF64 decl, psF32 exp_time, psF32 sat_pixel_frac, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 alt, psF64 az, psF32 ccd_temp, psF64 posang, psF32 m1_x, psF32 m1_y, psF32 m1_z, psF32 m1_tip, psF32 m1_tilt, psF32 m2_x, psF32 m2_y, psF32 m2_z, psF32 m2_tip, psF32 m2_tilt, psF32 env_temperature, psF32 env_humidity, psF32 env_wind_speed, psF32 env_wind_dir, psF32 teltemp_m1, psF32 teltemp_m1cell, psF32 teltemp_m2, psF32 teltemp_spider, psF32 teltemp_truss, psF32 teltemp_extra, psF32 pon_time, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *object, psF32 sun_angle, psF32 sun_alt, psF32 moon_angle, psF32 moon_alt, psF32 moon_phase, const char *hostname, psS16 fault, psTime* epoch)
 {
     psMetadata *md = psMetadataAlloc();
@@ -3704,4 +3744,14 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "obs_mode", PS_DATA_STRING, NULL, obs_mode)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item obs_mode");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "obs_group", PS_DATA_STRING, NULL, obs_group)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item obs_group");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "airmass", PS_DATA_F32, NULL, airmass)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
@@ -3899,6 +3949,26 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "solang", PS_DATA_F32, NULL, solang)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item solang");
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "sun_angle", PS_DATA_F32, NULL, sun_angle)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item sun_angle");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "sun_alt", PS_DATA_F32, NULL, sun_alt)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item sun_alt");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "moon_angle", PS_DATA_F32, NULL, moon_angle)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item moon_angle");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "moon_alt", PS_DATA_F32, NULL, moon_alt)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item moon_alt");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "moon_phase", PS_DATA_F32, NULL, moon_phase)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item moon_phase");
         psFree(md);
         return false;
@@ -3942,5 +4012,5 @@
 bool rawExpInsertObject(psDB *dbh, rawExpRow *object)
 {
-    return rawExpInsert(dbh, object->exp_id, object->exp_name, object->camera, object->telescope, object->dateobs, object->exp_tag, object->exp_type, object->filelevel, object->workdir, object->reduction, object->dvodb, object->tess_id, object->end_stage, object->filter, object->comment, object->airmass, object->ra, object->decl, object->exp_time, object->sat_pixel_frac, object->bg, object->bg_stdev, object->bg_mean_stdev, object->alt, object->az, object->ccd_temp, object->posang, object->m1_x, object->m1_y, object->m1_z, object->m1_tip, object->m1_tilt, object->m2_x, object->m2_y, object->m2_z, object->m2_tip, object->m2_tilt, object->env_temperature, object->env_humidity, object->env_wind_speed, object->env_wind_dir, object->teltemp_m1, object->teltemp_m1cell, object->teltemp_m2, object->teltemp_spider, object->teltemp_truss, object->teltemp_extra, object->pon_time, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->object, object->solang, object->hostname, object->fault, object->epoch);
+    return rawExpInsert(dbh, object->exp_id, object->exp_name, object->camera, object->telescope, object->dateobs, object->exp_tag, object->exp_type, object->filelevel, object->workdir, object->reduction, object->dvodb, object->tess_id, object->end_stage, object->filter, object->comment, object->obs_mode, object->obs_group, object->airmass, object->ra, object->decl, object->exp_time, object->sat_pixel_frac, object->bg, object->bg_stdev, object->bg_mean_stdev, object->alt, object->az, object->ccd_temp, object->posang, object->m1_x, object->m1_y, object->m1_z, object->m1_tip, object->m1_tilt, object->m2_x, object->m2_y, object->m2_z, object->m2_tip, object->m2_tilt, object->env_temperature, object->env_humidity, object->env_wind_speed, object->env_wind_dir, object->teltemp_m1, object->teltemp_m1cell, object->teltemp_m2, object->teltemp_spider, object->teltemp_truss, object->teltemp_extra, object->pon_time, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->object, object->sun_angle, object->sun_alt, object->moon_angle, object->moon_alt, object->moon_phase, object->hostname, object->fault, object->epoch);
 }
 
@@ -4090,4 +4160,14 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "obs_mode", PS_DATA_STRING, NULL, object->obs_mode)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item obs_mode");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "obs_group", PS_DATA_STRING, NULL, object->obs_group)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item obs_group");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "airmass", PS_DATA_F32, NULL, object->airmass)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
@@ -4285,6 +4365,26 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "solang", PS_DATA_F32, NULL, object->solang)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item solang");
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "sun_angle", PS_DATA_F32, NULL, object->sun_angle)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item sun_angle");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "sun_alt", PS_DATA_F32, NULL, object->sun_alt)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item sun_alt");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "moon_angle", PS_DATA_F32, NULL, object->moon_angle)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item moon_angle");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "moon_alt", PS_DATA_F32, NULL, object->moon_alt)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item moon_alt");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "moon_phase", PS_DATA_F32, NULL, object->moon_phase)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item moon_phase");
         psFree(md);
         return false;
@@ -4389,4 +4489,14 @@
         return false;
     }
+    char* obs_mode = psMetadataLookupPtr(&status, md, "obs_mode");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item obs_mode");
+        return false;
+    }
+    char* obs_group = psMetadataLookupPtr(&status, md, "obs_group");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item obs_group");
+        return false;
+    }
     psF32 airmass = psMetadataLookupF32(&status, md, "airmass");
     if (!status) {
@@ -4584,7 +4694,27 @@
         return false;
     }
-    psF32 solang = psMetadataLookupF32(&status, md, "solang");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item solang");
+    psF32 sun_angle = psMetadataLookupF32(&status, md, "sun_angle");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item sun_angle");
+        return false;
+    }
+    psF32 sun_alt = psMetadataLookupF32(&status, md, "sun_alt");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item sun_alt");
+        return false;
+    }
+    psF32 moon_angle = psMetadataLookupF32(&status, md, "moon_angle");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item moon_angle");
+        return false;
+    }
+    psF32 moon_alt = psMetadataLookupF32(&status, md, "moon_alt");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item moon_alt");
+        return false;
+    }
+    psF32 moon_phase = psMetadataLookupF32(&status, md, "moon_phase");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item moon_phase");
         return false;
     }
@@ -4605,5 +4735,5 @@
     }
 
-    return rawExpRowAlloc(exp_id, exp_name, camera, telescope, dateobs, exp_tag, exp_type, filelevel, workdir, reduction, dvodb, tess_id, end_stage, filter, comment, airmass, ra, decl, exp_time, sat_pixel_frac, bg, bg_stdev, bg_mean_stdev, alt, az, ccd_temp, posang, m1_x, m1_y, m1_z, m1_tip, m1_tilt, m2_x, m2_y, m2_z, m2_tip, m2_tilt, env_temperature, env_humidity, env_wind_speed, env_wind_dir, teltemp_m1, teltemp_m1cell, teltemp_m2, teltemp_spider, teltemp_truss, teltemp_extra, pon_time, user_1, user_2, user_3, user_4, user_5, object, solang, hostname, fault, epoch);
+    return rawExpRowAlloc(exp_id, exp_name, camera, telescope, dateobs, exp_tag, exp_type, filelevel, workdir, reduction, dvodb, tess_id, end_stage, filter, comment, obs_mode, obs_group, airmass, ra, decl, exp_time, sat_pixel_frac, bg, bg_stdev, bg_mean_stdev, alt, az, ccd_temp, posang, m1_x, m1_y, m1_z, m1_tip, m1_tilt, m2_x, m2_y, m2_z, m2_tip, m2_tilt, env_temperature, env_humidity, env_wind_speed, env_wind_dir, teltemp_m1, teltemp_m1cell, teltemp_m2, teltemp_spider, teltemp_truss, teltemp_extra, pon_time, user_1, user_2, user_3, user_4, user_5, object, sun_angle, sun_alt, moon_angle, moon_alt, moon_phase, hostname, fault, epoch);
 }
 psArray *rawExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -4723,5 +4853,5 @@
 static void rawImfileRowFree(rawImfileRow *object);
 
-rawImfileRow *rawImfileRowAlloc(psS64 exp_id, const char *exp_name, const char *camera, const char *telescope, psTime* dateobs, const char *tmp_class_id, const char *class_id, const char *uri, const char *exp_type, const char *filelevel, const char *filter, const char *comment, psF32 airmass, psF64 ra, psF64 decl, psF32 exp_time, psF32 sat_pixel_frac, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 alt, psF64 az, psF32 ccd_temp, psF64 posang, psF32 m1_x, psF32 m1_y, psF32 m1_z, psF32 m1_tip, psF32 m1_tilt, psF32 m2_x, psF32 m2_y, psF32 m2_z, psF32 m2_tip, psF32 m2_tilt, psF32 env_temperature, psF32 env_humidity, psF32 env_wind_speed, psF32 env_wind_dir, psF32 teltemp_m1, psF32 teltemp_m1cell, psF32 teltemp_m2, psF32 teltemp_spider, psF32 teltemp_truss, psF32 teltemp_extra, psF32 pon_time, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *object, const char *hostname, psS16 fault, psTime* epoch)
+rawImfileRow *rawImfileRowAlloc(psS64 exp_id, const char *exp_name, const char *camera, const char *telescope, psTime* dateobs, const char *tmp_class_id, const char *class_id, const char *uri, const char *exp_type, const char *filelevel, const char *filter, const char *comment, const char *obs_mode, const char *obs_group, psF32 airmass, psF64 ra, psF64 decl, psF32 exp_time, psF32 sat_pixel_frac, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 alt, psF64 az, psF32 ccd_temp, psF64 posang, psF32 m1_x, psF32 m1_y, psF32 m1_z, psF32 m1_tip, psF32 m1_tilt, psF32 m2_x, psF32 m2_y, psF32 m2_z, psF32 m2_tip, psF32 m2_tilt, psF32 env_temperature, psF32 env_humidity, psF32 env_wind_speed, psF32 env_wind_dir, psF32 teltemp_m1, psF32 teltemp_m1cell, psF32 teltemp_m2, psF32 teltemp_spider, psF32 teltemp_truss, psF32 teltemp_extra, psF32 pon_time, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *object, psF32 sun_angle, psF32 sun_alt, psF32 moon_angle, psF32 moon_alt, psF32 moon_phase, const char *hostname, psS16 fault, psTime* epoch)
 {
     rawImfileRow    *_object;
@@ -4742,4 +4872,6 @@
     _object->filter = psStringCopy(filter);
     _object->comment = psStringCopy(comment);
+    _object->obs_mode = psStringCopy(obs_mode);
+    _object->obs_group = psStringCopy(obs_group);
     _object->airmass = airmass;
     _object->ra = ra;
@@ -4781,4 +4913,9 @@
     _object->user_5 = user_5;
     _object->object = psStringCopy(object);
+    _object->sun_angle = sun_angle;
+    _object->sun_alt = sun_alt;
+    _object->moon_angle = moon_angle;
+    _object->moon_alt = moon_alt;
+    _object->moon_phase = moon_phase;
     _object->hostname = psStringCopy(hostname);
     _object->fault = fault;
@@ -4801,4 +4938,6 @@
     psFree(object->filter);
     psFree(object->comment);
+    psFree(object->obs_mode);
+    psFree(object->obs_group);
     psFree(object->object);
     psFree(object->hostname);
@@ -4869,4 +5008,14 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "obs_mode", PS_DATA_STRING, "data usage goal (eg, survey name, engineering, etc)", "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item obs_mode");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "obs_group", PS_DATA_STRING, "identifier for data block (eg, observation sequence)", "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item obs_group");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "airmass", PS_DATA_F32, NULL, 0.0)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
@@ -5064,4 +5213,29 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "sun_angle", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item sun_angle");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "sun_alt", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item sun_alt");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "moon_angle", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item moon_angle");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "moon_alt", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item moon_alt");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "moon_phase", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item moon_phase");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "hostname", PS_DATA_STRING, NULL, "64")) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item hostname");
@@ -5092,5 +5266,5 @@
 }
 
-bool rawImfileInsert(psDB * dbh, psS64 exp_id, const char *exp_name, const char *camera, const char *telescope, psTime* dateobs, const char *tmp_class_id, const char *class_id, const char *uri, const char *exp_type, const char *filelevel, const char *filter, const char *comment, psF32 airmass, psF64 ra, psF64 decl, psF32 exp_time, psF32 sat_pixel_frac, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 alt, psF64 az, psF32 ccd_temp, psF64 posang, psF32 m1_x, psF32 m1_y, psF32 m1_z, psF32 m1_tip, psF32 m1_tilt, psF32 m2_x, psF32 m2_y, psF32 m2_z, psF32 m2_tip, psF32 m2_tilt, psF32 env_temperature, psF32 env_humidity, psF32 env_wind_speed, psF32 env_wind_dir, psF32 teltemp_m1, psF32 teltemp_m1cell, psF32 teltemp_m2, psF32 teltemp_spider, psF32 teltemp_truss, psF32 teltemp_extra, psF32 pon_time, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *object, const char *hostname, psS16 fault, psTime* epoch)
+bool rawImfileInsert(psDB * dbh, psS64 exp_id, const char *exp_name, const char *camera, const char *telescope, psTime* dateobs, const char *tmp_class_id, const char *class_id, const char *uri, const char *exp_type, const char *filelevel, const char *filter, const char *comment, const char *obs_mode, const char *obs_group, psF32 airmass, psF64 ra, psF64 decl, psF32 exp_time, psF32 sat_pixel_frac, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 alt, psF64 az, psF32 ccd_temp, psF64 posang, psF32 m1_x, psF32 m1_y, psF32 m1_z, psF32 m1_tip, psF32 m1_tilt, psF32 m2_x, psF32 m2_y, psF32 m2_z, psF32 m2_tip, psF32 m2_tilt, psF32 env_temperature, psF32 env_humidity, psF32 env_wind_speed, psF32 env_wind_dir, psF32 teltemp_m1, psF32 teltemp_m1cell, psF32 teltemp_m2, psF32 teltemp_spider, psF32 teltemp_truss, psF32 teltemp_extra, psF32 pon_time, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *object, psF32 sun_angle, psF32 sun_alt, psF32 moon_angle, psF32 moon_alt, psF32 moon_phase, const char *hostname, psS16 fault, psTime* epoch)
 {
     psMetadata *md = psMetadataAlloc();
@@ -5155,4 +5329,14 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "obs_mode", PS_DATA_STRING, NULL, obs_mode)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item obs_mode");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "obs_group", PS_DATA_STRING, NULL, obs_group)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item obs_group");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "airmass", PS_DATA_F32, NULL, airmass)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
@@ -5347,4 +5531,29 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "object", PS_DATA_STRING, NULL, object)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item object");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "sun_angle", PS_DATA_F32, NULL, sun_angle)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item sun_angle");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "sun_alt", PS_DATA_F32, NULL, sun_alt)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item sun_alt");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "moon_angle", PS_DATA_F32, NULL, moon_angle)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item moon_angle");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "moon_alt", PS_DATA_F32, NULL, moon_alt)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item moon_alt");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "moon_phase", PS_DATA_F32, NULL, moon_phase)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item moon_phase");
         psFree(md);
         return false;
@@ -5388,5 +5597,5 @@
 bool rawImfileInsertObject(psDB *dbh, rawImfileRow *object)
 {
-    return rawImfileInsert(dbh, object->exp_id, object->exp_name, object->camera, object->telescope, object->dateobs, object->tmp_class_id, object->class_id, object->uri, object->exp_type, object->filelevel, object->filter, object->comment, object->airmass, object->ra, object->decl, object->exp_time, object->sat_pixel_frac, object->bg, object->bg_stdev, object->bg_mean_stdev, object->alt, object->az, object->ccd_temp, object->posang, object->m1_x, object->m1_y, object->m1_z, object->m1_tip, object->m1_tilt, object->m2_x, object->m2_y, object->m2_z, object->m2_tip, object->m2_tilt, object->env_temperature, object->env_humidity, object->env_wind_speed, object->env_wind_dir, object->teltemp_m1, object->teltemp_m1cell, object->teltemp_m2, object->teltemp_spider, object->teltemp_truss, object->teltemp_extra, object->pon_time, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->object, object->hostname, object->fault, object->epoch);
+    return rawImfileInsert(dbh, object->exp_id, object->exp_name, object->camera, object->telescope, object->dateobs, object->tmp_class_id, object->class_id, object->uri, object->exp_type, object->filelevel, object->filter, object->comment, object->obs_mode, object->obs_group, object->airmass, object->ra, object->decl, object->exp_time, object->sat_pixel_frac, object->bg, object->bg_stdev, object->bg_mean_stdev, object->alt, object->az, object->ccd_temp, object->posang, object->m1_x, object->m1_y, object->m1_z, object->m1_tip, object->m1_tilt, object->m2_x, object->m2_y, object->m2_z, object->m2_tip, object->m2_tilt, object->env_temperature, object->env_humidity, object->env_wind_speed, object->env_wind_dir, object->teltemp_m1, object->teltemp_m1cell, object->teltemp_m2, object->teltemp_spider, object->teltemp_truss, object->teltemp_extra, object->pon_time, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->object, object->sun_angle, object->sun_alt, object->moon_angle, object->moon_alt, object->moon_phase, object->hostname, object->fault, object->epoch);
 }
 
@@ -5521,4 +5730,14 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "obs_mode", PS_DATA_STRING, NULL, object->obs_mode)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item obs_mode");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "obs_group", PS_DATA_STRING, NULL, object->obs_group)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item obs_group");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "airmass", PS_DATA_F32, NULL, object->airmass)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item airmass");
@@ -5716,4 +5935,29 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "sun_angle", PS_DATA_F32, NULL, object->sun_angle)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item sun_angle");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "sun_alt", PS_DATA_F32, NULL, object->sun_alt)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item sun_alt");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "moon_angle", PS_DATA_F32, NULL, object->moon_angle)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item moon_angle");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "moon_alt", PS_DATA_F32, NULL, object->moon_alt)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item moon_alt");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "moon_phase", PS_DATA_F32, NULL, object->moon_phase)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item moon_phase");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "hostname", PS_DATA_STRING, NULL, object->hostname)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item hostname");
@@ -5800,4 +6044,14 @@
         return false;
     }
+    char* obs_mode = psMetadataLookupPtr(&status, md, "obs_mode");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item obs_mode");
+        return false;
+    }
+    char* obs_group = psMetadataLookupPtr(&status, md, "obs_group");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item obs_group");
+        return false;
+    }
     psF32 airmass = psMetadataLookupF32(&status, md, "airmass");
     if (!status) {
@@ -5995,4 +6249,29 @@
         return false;
     }
+    psF32 sun_angle = psMetadataLookupF32(&status, md, "sun_angle");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item sun_angle");
+        return false;
+    }
+    psF32 sun_alt = psMetadataLookupF32(&status, md, "sun_alt");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item sun_alt");
+        return false;
+    }
+    psF32 moon_angle = psMetadataLookupF32(&status, md, "moon_angle");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item moon_angle");
+        return false;
+    }
+    psF32 moon_alt = psMetadataLookupF32(&status, md, "moon_alt");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item moon_alt");
+        return false;
+    }
+    psF32 moon_phase = psMetadataLookupF32(&status, md, "moon_phase");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item moon_phase");
+        return false;
+    }
     char* hostname = psMetadataLookupPtr(&status, md, "hostname");
     if (!status) {
@@ -6011,5 +6290,5 @@
     }
 
-    return rawImfileRowAlloc(exp_id, exp_name, camera, telescope, dateobs, tmp_class_id, class_id, uri, exp_type, filelevel, filter, comment, airmass, ra, decl, exp_time, sat_pixel_frac, bg, bg_stdev, bg_mean_stdev, alt, az, ccd_temp, posang, m1_x, m1_y, m1_z, m1_tip, m1_tilt, m2_x, m2_y, m2_z, m2_tip, m2_tilt, env_temperature, env_humidity, env_wind_speed, env_wind_dir, teltemp_m1, teltemp_m1cell, teltemp_m2, teltemp_spider, teltemp_truss, teltemp_extra, pon_time, user_1, user_2, user_3, user_4, user_5, object, hostname, fault, epoch);
+    return rawImfileRowAlloc(exp_id, exp_name, camera, telescope, dateobs, tmp_class_id, class_id, uri, exp_type, filelevel, filter, comment, obs_mode, obs_group, airmass, ra, decl, exp_time, sat_pixel_frac, bg, bg_stdev, bg_mean_stdev, alt, az, ccd_temp, posang, m1_x, m1_y, m1_z, m1_tip, m1_tilt, m2_x, m2_y, m2_z, m2_tip, m2_tilt, env_temperature, env_humidity, env_wind_speed, env_wind_dir, teltemp_m1, teltemp_m1cell, teltemp_m2, teltemp_spider, teltemp_truss, teltemp_extra, pon_time, user_1, user_2, user_3, user_4, user_5, object, sun_angle, sun_alt, moon_angle, moon_alt, moon_phase, hostname, fault, epoch);
 }
 psArray *rawImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -6949,5 +7228,5 @@
 static void chipProcessedImfileRowFree(chipProcessedImfileRow *object);
 
-chipProcessedImfileRow *chipProcessedImfileRowAlloc(psS64 chip_id, psS64 exp_id, const char *class_id, const char *uri, psF32 bg, psF32 bg_stdev, psF32 bg_mean_stdev, psF32 bias, psF32 bias_stdev, psF32 fringe_0, psF32 fringe_1, psF32 fringe_2, psF32 sigma_ra, psF32 sigma_dec, psF32 ap_resid, psF32 ap_resid_stdev, psF32 zp_mean, psF32 zp_stdev, psF32 fwhm_major, psF32 fwhm_minor, psF32 dtime_detrend, psF32 dtime_photom, psF32 dtime_astrom, const char *hostname, psS32 n_stars, psS32 n_extended, psS32 n_cr, psS32 n_astrom, const char *path_base, psS16 fault)
+chipProcessedImfileRow *chipProcessedImfileRowAlloc(psS64 chip_id, psS64 exp_id, const char *class_id, const char *data_state, const char *uri, psF32 bg, psF32 bg_stdev, psF32 bg_mean_stdev, psF32 bias, psF32 bias_stdev, psF32 fringe_0, psF32 fringe_1, psF32 fringe_2, psF32 ap_resid, psF32 ap_resid_stdev, psF32 fwhm_major, psF32 fwhm_minor, psF32 iq_m2, psF32 iq_m2_err, psF32 iq_m2_lq, psF32 iq_m2_uq, psF32 iq_m2c, psF32 iq_m2c_err, psF32 iq_m2c_lq, psF32 iq_m2c_uq, psF32 iq_m2s, psF32 iq_m2s_err, psF32 iq_m2s_lq, psF32 iq_m2s_uq, psF32 iq_m3, psF32 iq_m3_err, psF32 iq_m3_lq, psF32 iq_m3_uq, psF32 iq_m4, psF32 iq_m4_err, psF32 iq_m4_lq, psF32 iq_m4_uq, psF32 dtime_detrend, psF32 dtime_photom, psF32 dtime_total, psF32 dtime_script, const char *hostname, psS32 n_stars, psS32 n_psfstars, psS32 n_iqstars, psS32 n_extended, psS32 n_cr, const char *path_base, psS16 fault)
 {
     chipProcessedImfileRow *_object;
@@ -6959,4 +7238,5 @@
     _object->exp_id = exp_id;
     _object->class_id = psStringCopy(class_id);
+    _object->data_state = psStringCopy(data_state);
     _object->uri = psStringCopy(uri);
     _object->bg = bg;
@@ -6968,20 +7248,38 @@
     _object->fringe_1 = fringe_1;
     _object->fringe_2 = fringe_2;
-    _object->sigma_ra = sigma_ra;
-    _object->sigma_dec = sigma_dec;
     _object->ap_resid = ap_resid;
     _object->ap_resid_stdev = ap_resid_stdev;
-    _object->zp_mean = zp_mean;
-    _object->zp_stdev = zp_stdev;
     _object->fwhm_major = fwhm_major;
     _object->fwhm_minor = fwhm_minor;
+    _object->iq_m2 = iq_m2;
+    _object->iq_m2_err = iq_m2_err;
+    _object->iq_m2_lq = iq_m2_lq;
+    _object->iq_m2_uq = iq_m2_uq;
+    _object->iq_m2c = iq_m2c;
+    _object->iq_m2c_err = iq_m2c_err;
+    _object->iq_m2c_lq = iq_m2c_lq;
+    _object->iq_m2c_uq = iq_m2c_uq;
+    _object->iq_m2s = iq_m2s;
+    _object->iq_m2s_err = iq_m2s_err;
+    _object->iq_m2s_lq = iq_m2s_lq;
+    _object->iq_m2s_uq = iq_m2s_uq;
+    _object->iq_m3 = iq_m3;
+    _object->iq_m3_err = iq_m3_err;
+    _object->iq_m3_lq = iq_m3_lq;
+    _object->iq_m3_uq = iq_m3_uq;
+    _object->iq_m4 = iq_m4;
+    _object->iq_m4_err = iq_m4_err;
+    _object->iq_m4_lq = iq_m4_lq;
+    _object->iq_m4_uq = iq_m4_uq;
     _object->dtime_detrend = dtime_detrend;
     _object->dtime_photom = dtime_photom;
-    _object->dtime_astrom = dtime_astrom;
+    _object->dtime_total = dtime_total;
+    _object->dtime_script = dtime_script;
     _object->hostname = psStringCopy(hostname);
     _object->n_stars = n_stars;
+    _object->n_psfstars = n_psfstars;
+    _object->n_iqstars = n_iqstars;
     _object->n_extended = n_extended;
     _object->n_cr = n_cr;
-    _object->n_astrom = n_astrom;
     _object->path_base = psStringCopy(path_base);
     _object->fault = fault;
@@ -6993,4 +7291,5 @@
 {
     psFree(object->class_id);
+    psFree(object->data_state);
     psFree(object->uri);
     psFree(object->hostname);
@@ -7016,4 +7315,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, "Key", "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "uri", PS_DATA_STRING, NULL, "255")) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item uri");
@@ -7061,14 +7365,4 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "sigma_ra", PS_DATA_F32, NULL, 0.0)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item sigma_ra");
-        psFree(md);
-        return false;
-    }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "sigma_dec", PS_DATA_F32, NULL, 0.0)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item sigma_dec");
-        psFree(md);
-        return false;
-    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "ap_resid", PS_DATA_F32, NULL, 0.0)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item ap_resid");
@@ -7081,14 +7375,4 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "zp_mean", PS_DATA_F32, NULL, 0.0)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item zp_mean");
-        psFree(md);
-        return false;
-    }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "zp_stdev", PS_DATA_F32, NULL, 0.0)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item zp_stdev");
-        psFree(md);
-        return false;
-    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fwhm_major", PS_DATA_F32, NULL, 0.0)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fwhm_major");
@@ -7101,4 +7385,104 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2_err", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2_lq", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2_uq", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2c", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2c");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2c_err", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2c_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2c_lq", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2c_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2c_uq", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2c_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2s", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2s");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2s_err", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2s_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2s_lq", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2s_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2s_uq", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2s_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m3", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m3");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m3_err", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m3_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m3_lq", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m3_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m3_uq", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m3_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m4", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m4");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m4_err", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m4_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m4_lq", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m4_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m4_uq", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m4_uq");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_detrend", PS_DATA_F32, NULL, 0.0)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_detrend");
@@ -7111,6 +7495,11 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_astrom", PS_DATA_F32, NULL, 0.0)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_astrom");
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_total", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_total");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_script", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_script");
         psFree(md);
         return false;
@@ -7126,4 +7515,14 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "n_psfstars", PS_DATA_S32, NULL, 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item n_psfstars");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "n_iqstars", PS_DATA_S32, NULL, 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item n_iqstars");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "n_extended", PS_DATA_S32, NULL, 0)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item n_extended");
@@ -7136,9 +7535,4 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "n_astrom", PS_DATA_S32, NULL, 0)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item n_astrom");
-        psFree(md);
-        return false;
-    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, "255")) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item path_base");
@@ -7164,5 +7558,5 @@
 }
 
-bool chipProcessedImfileInsert(psDB * dbh, psS64 chip_id, psS64 exp_id, const char *class_id, const char *uri, psF32 bg, psF32 bg_stdev, psF32 bg_mean_stdev, psF32 bias, psF32 bias_stdev, psF32 fringe_0, psF32 fringe_1, psF32 fringe_2, psF32 sigma_ra, psF32 sigma_dec, psF32 ap_resid, psF32 ap_resid_stdev, psF32 zp_mean, psF32 zp_stdev, psF32 fwhm_major, psF32 fwhm_minor, psF32 dtime_detrend, psF32 dtime_photom, psF32 dtime_astrom, const char *hostname, psS32 n_stars, psS32 n_extended, psS32 n_cr, psS32 n_astrom, const char *path_base, psS16 fault)
+bool chipProcessedImfileInsert(psDB * dbh, psS64 chip_id, psS64 exp_id, const char *class_id, const char *data_state, const char *uri, psF32 bg, psF32 bg_stdev, psF32 bg_mean_stdev, psF32 bias, psF32 bias_stdev, psF32 fringe_0, psF32 fringe_1, psF32 fringe_2, psF32 ap_resid, psF32 ap_resid_stdev, psF32 fwhm_major, psF32 fwhm_minor, psF32 iq_m2, psF32 iq_m2_err, psF32 iq_m2_lq, psF32 iq_m2_uq, psF32 iq_m2c, psF32 iq_m2c_err, psF32 iq_m2c_lq, psF32 iq_m2c_uq, psF32 iq_m2s, psF32 iq_m2s_err, psF32 iq_m2s_lq, psF32 iq_m2s_uq, psF32 iq_m3, psF32 iq_m3_err, psF32 iq_m3_lq, psF32 iq_m3_uq, psF32 iq_m4, psF32 iq_m4_err, psF32 iq_m4_lq, psF32 iq_m4_uq, psF32 dtime_detrend, psF32 dtime_photom, psF32 dtime_total, psF32 dtime_script, const char *hostname, psS32 n_stars, psS32 n_psfstars, psS32 n_iqstars, psS32 n_extended, psS32 n_cr, const char *path_base, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -7182,4 +7576,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "uri", PS_DATA_STRING, NULL, uri)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item uri");
@@ -7227,14 +7626,4 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "sigma_ra", PS_DATA_F32, NULL, sigma_ra)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item sigma_ra");
-        psFree(md);
-        return false;
-    }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "sigma_dec", PS_DATA_F32, NULL, sigma_dec)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item sigma_dec");
-        psFree(md);
-        return false;
-    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "ap_resid", PS_DATA_F32, NULL, ap_resid)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item ap_resid");
@@ -7247,14 +7636,4 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "zp_mean", PS_DATA_F32, NULL, zp_mean)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item zp_mean");
-        psFree(md);
-        return false;
-    }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "zp_stdev", PS_DATA_F32, NULL, zp_stdev)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item zp_stdev");
-        psFree(md);
-        return false;
-    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fwhm_major", PS_DATA_F32, NULL, fwhm_major)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fwhm_major");
@@ -7267,4 +7646,104 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2", PS_DATA_F32, NULL, iq_m2)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2_err", PS_DATA_F32, NULL, iq_m2_err)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2_lq", PS_DATA_F32, NULL, iq_m2_lq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2_uq", PS_DATA_F32, NULL, iq_m2_uq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2c", PS_DATA_F32, NULL, iq_m2c)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2c");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2c_err", PS_DATA_F32, NULL, iq_m2c_err)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2c_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2c_lq", PS_DATA_F32, NULL, iq_m2c_lq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2c_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2c_uq", PS_DATA_F32, NULL, iq_m2c_uq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2c_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2s", PS_DATA_F32, NULL, iq_m2s)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2s");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2s_err", PS_DATA_F32, NULL, iq_m2s_err)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2s_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2s_lq", PS_DATA_F32, NULL, iq_m2s_lq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2s_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2s_uq", PS_DATA_F32, NULL, iq_m2s_uq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2s_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m3", PS_DATA_F32, NULL, iq_m3)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m3");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m3_err", PS_DATA_F32, NULL, iq_m3_err)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m3_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m3_lq", PS_DATA_F32, NULL, iq_m3_lq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m3_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m3_uq", PS_DATA_F32, NULL, iq_m3_uq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m3_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m4", PS_DATA_F32, NULL, iq_m4)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m4");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m4_err", PS_DATA_F32, NULL, iq_m4_err)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m4_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m4_lq", PS_DATA_F32, NULL, iq_m4_lq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m4_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m4_uq", PS_DATA_F32, NULL, iq_m4_uq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m4_uq");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_detrend", PS_DATA_F32, NULL, dtime_detrend)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_detrend");
@@ -7277,6 +7756,11 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_astrom", PS_DATA_F32, NULL, dtime_astrom)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_astrom");
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_total", PS_DATA_F32, NULL, dtime_total)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_total");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_script", PS_DATA_F32, NULL, dtime_script)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_script");
         psFree(md);
         return false;
@@ -7292,4 +7776,14 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "n_psfstars", PS_DATA_S32, NULL, n_psfstars)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item n_psfstars");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "n_iqstars", PS_DATA_S32, NULL, n_iqstars)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item n_iqstars");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "n_extended", PS_DATA_S32, NULL, n_extended)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item n_extended");
@@ -7299,9 +7793,4 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "n_cr", PS_DATA_S32, NULL, n_cr)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item n_cr");
-        psFree(md);
-        return false;
-    }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "n_astrom", PS_DATA_S32, NULL, n_astrom)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item n_astrom");
         psFree(md);
         return false;
@@ -7340,5 +7829,5 @@
 bool chipProcessedImfileInsertObject(psDB *dbh, chipProcessedImfileRow *object)
 {
-    return chipProcessedImfileInsert(dbh, object->chip_id, object->exp_id, object->class_id, object->uri, object->bg, object->bg_stdev, object->bg_mean_stdev, object->bias, object->bias_stdev, object->fringe_0, object->fringe_1, object->fringe_2, object->sigma_ra, object->sigma_dec, object->ap_resid, object->ap_resid_stdev, object->zp_mean, object->zp_stdev, object->fwhm_major, object->fwhm_minor, object->dtime_detrend, object->dtime_photom, object->dtime_astrom, object->hostname, object->n_stars, object->n_extended, object->n_cr, object->n_astrom, object->path_base, object->fault);
+    return chipProcessedImfileInsert(dbh, object->chip_id, object->exp_id, object->class_id, object->data_state, object->uri, object->bg, object->bg_stdev, object->bg_mean_stdev, object->bias, object->bias_stdev, object->fringe_0, object->fringe_1, object->fringe_2, object->ap_resid, object->ap_resid_stdev, object->fwhm_major, object->fwhm_minor, object->iq_m2, object->iq_m2_err, object->iq_m2_lq, object->iq_m2_uq, object->iq_m2c, object->iq_m2c_err, object->iq_m2c_lq, object->iq_m2c_uq, object->iq_m2s, object->iq_m2s_err, object->iq_m2s_lq, object->iq_m2s_uq, object->iq_m3, object->iq_m3_err, object->iq_m3_lq, object->iq_m3_uq, object->iq_m4, object->iq_m4_err, object->iq_m4_lq, object->iq_m4_uq, object->dtime_detrend, object->dtime_photom, object->dtime_total, object->dtime_script, object->hostname, object->n_stars, object->n_psfstars, object->n_iqstars, object->n_extended, object->n_cr, object->path_base, object->fault);
 }
 
@@ -7428,4 +7917,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, object->data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "uri", PS_DATA_STRING, NULL, object->uri)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item uri");
@@ -7473,14 +7967,4 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "sigma_ra", PS_DATA_F32, NULL, object->sigma_ra)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item sigma_ra");
-        psFree(md);
-        return false;
-    }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "sigma_dec", PS_DATA_F32, NULL, object->sigma_dec)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item sigma_dec");
-        psFree(md);
-        return false;
-    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "ap_resid", PS_DATA_F32, NULL, object->ap_resid)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item ap_resid");
@@ -7493,14 +7977,4 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "zp_mean", PS_DATA_F32, NULL, object->zp_mean)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item zp_mean");
-        psFree(md);
-        return false;
-    }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "zp_stdev", PS_DATA_F32, NULL, object->zp_stdev)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item zp_stdev");
-        psFree(md);
-        return false;
-    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fwhm_major", PS_DATA_F32, NULL, object->fwhm_major)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fwhm_major");
@@ -7513,4 +7987,104 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2", PS_DATA_F32, NULL, object->iq_m2)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2_err", PS_DATA_F32, NULL, object->iq_m2_err)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2_lq", PS_DATA_F32, NULL, object->iq_m2_lq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2_uq", PS_DATA_F32, NULL, object->iq_m2_uq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2c", PS_DATA_F32, NULL, object->iq_m2c)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2c");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2c_err", PS_DATA_F32, NULL, object->iq_m2c_err)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2c_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2c_lq", PS_DATA_F32, NULL, object->iq_m2c_lq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2c_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2c_uq", PS_DATA_F32, NULL, object->iq_m2c_uq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2c_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2s", PS_DATA_F32, NULL, object->iq_m2s)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2s");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2s_err", PS_DATA_F32, NULL, object->iq_m2s_err)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2s_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2s_lq", PS_DATA_F32, NULL, object->iq_m2s_lq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2s_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2s_uq", PS_DATA_F32, NULL, object->iq_m2s_uq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2s_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m3", PS_DATA_F32, NULL, object->iq_m3)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m3");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m3_err", PS_DATA_F32, NULL, object->iq_m3_err)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m3_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m3_lq", PS_DATA_F32, NULL, object->iq_m3_lq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m3_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m3_uq", PS_DATA_F32, NULL, object->iq_m3_uq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m3_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m4", PS_DATA_F32, NULL, object->iq_m4)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m4");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m4_err", PS_DATA_F32, NULL, object->iq_m4_err)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m4_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m4_lq", PS_DATA_F32, NULL, object->iq_m4_lq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m4_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m4_uq", PS_DATA_F32, NULL, object->iq_m4_uq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m4_uq");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_detrend", PS_DATA_F32, NULL, object->dtime_detrend)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_detrend");
@@ -7523,6 +8097,11 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_astrom", PS_DATA_F32, NULL, object->dtime_astrom)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_astrom");
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_total", PS_DATA_F32, NULL, object->dtime_total)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_total");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_script", PS_DATA_F32, NULL, object->dtime_script)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_script");
         psFree(md);
         return false;
@@ -7538,4 +8117,14 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "n_psfstars", PS_DATA_S32, NULL, object->n_psfstars)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item n_psfstars");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "n_iqstars", PS_DATA_S32, NULL, object->n_iqstars)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item n_iqstars");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "n_extended", PS_DATA_S32, NULL, object->n_extended)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item n_extended");
@@ -7548,9 +8137,4 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "n_astrom", PS_DATA_S32, NULL, object->n_astrom)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item n_astrom");
-        psFree(md);
-        return false;
-    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, object->path_base)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item path_base");
@@ -7587,4 +8171,9 @@
         return false;
     }
+    char* data_state = psMetadataLookupPtr(&status, md, "data_state");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item data_state");
+        return false;
+    }
     char* uri = psMetadataLookupPtr(&status, md, "uri");
     if (!status) {
@@ -7632,14 +8221,4 @@
         return false;
     }
-    psF32 sigma_ra = psMetadataLookupF32(&status, md, "sigma_ra");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item sigma_ra");
-        return false;
-    }
-    psF32 sigma_dec = psMetadataLookupF32(&status, md, "sigma_dec");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item sigma_dec");
-        return false;
-    }
     psF32 ap_resid = psMetadataLookupF32(&status, md, "ap_resid");
     if (!status) {
@@ -7652,14 +8231,4 @@
         return false;
     }
-    psF32 zp_mean = psMetadataLookupF32(&status, md, "zp_mean");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item zp_mean");
-        return false;
-    }
-    psF32 zp_stdev = psMetadataLookupF32(&status, md, "zp_stdev");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item zp_stdev");
-        return false;
-    }
     psF32 fwhm_major = psMetadataLookupF32(&status, md, "fwhm_major");
     if (!status) {
@@ -7672,4 +8241,104 @@
         return false;
     }
+    psF32 iq_m2 = psMetadataLookupF32(&status, md, "iq_m2");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m2");
+        return false;
+    }
+    psF32 iq_m2_err = psMetadataLookupF32(&status, md, "iq_m2_err");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m2_err");
+        return false;
+    }
+    psF32 iq_m2_lq = psMetadataLookupF32(&status, md, "iq_m2_lq");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m2_lq");
+        return false;
+    }
+    psF32 iq_m2_uq = psMetadataLookupF32(&status, md, "iq_m2_uq");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m2_uq");
+        return false;
+    }
+    psF32 iq_m2c = psMetadataLookupF32(&status, md, "iq_m2c");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m2c");
+        return false;
+    }
+    psF32 iq_m2c_err = psMetadataLookupF32(&status, md, "iq_m2c_err");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m2c_err");
+        return false;
+    }
+    psF32 iq_m2c_lq = psMetadataLookupF32(&status, md, "iq_m2c_lq");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m2c_lq");
+        return false;
+    }
+    psF32 iq_m2c_uq = psMetadataLookupF32(&status, md, "iq_m2c_uq");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m2c_uq");
+        return false;
+    }
+    psF32 iq_m2s = psMetadataLookupF32(&status, md, "iq_m2s");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m2s");
+        return false;
+    }
+    psF32 iq_m2s_err = psMetadataLookupF32(&status, md, "iq_m2s_err");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m2s_err");
+        return false;
+    }
+    psF32 iq_m2s_lq = psMetadataLookupF32(&status, md, "iq_m2s_lq");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m2s_lq");
+        return false;
+    }
+    psF32 iq_m2s_uq = psMetadataLookupF32(&status, md, "iq_m2s_uq");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m2s_uq");
+        return false;
+    }
+    psF32 iq_m3 = psMetadataLookupF32(&status, md, "iq_m3");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m3");
+        return false;
+    }
+    psF32 iq_m3_err = psMetadataLookupF32(&status, md, "iq_m3_err");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m3_err");
+        return false;
+    }
+    psF32 iq_m3_lq = psMetadataLookupF32(&status, md, "iq_m3_lq");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m3_lq");
+        return false;
+    }
+    psF32 iq_m3_uq = psMetadataLookupF32(&status, md, "iq_m3_uq");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m3_uq");
+        return false;
+    }
+    psF32 iq_m4 = psMetadataLookupF32(&status, md, "iq_m4");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m4");
+        return false;
+    }
+    psF32 iq_m4_err = psMetadataLookupF32(&status, md, "iq_m4_err");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m4_err");
+        return false;
+    }
+    psF32 iq_m4_lq = psMetadataLookupF32(&status, md, "iq_m4_lq");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m4_lq");
+        return false;
+    }
+    psF32 iq_m4_uq = psMetadataLookupF32(&status, md, "iq_m4_uq");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m4_uq");
+        return false;
+    }
     psF32 dtime_detrend = psMetadataLookupF32(&status, md, "dtime_detrend");
     if (!status) {
@@ -7682,7 +8351,12 @@
         return false;
     }
-    psF32 dtime_astrom = psMetadataLookupF32(&status, md, "dtime_astrom");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dtime_astrom");
+    psF32 dtime_total = psMetadataLookupF32(&status, md, "dtime_total");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dtime_total");
+        return false;
+    }
+    psF32 dtime_script = psMetadataLookupF32(&status, md, "dtime_script");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dtime_script");
         return false;
     }
@@ -7697,4 +8371,14 @@
         return false;
     }
+    psS32 n_psfstars = psMetadataLookupS32(&status, md, "n_psfstars");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item n_psfstars");
+        return false;
+    }
+    psS32 n_iqstars = psMetadataLookupS32(&status, md, "n_iqstars");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item n_iqstars");
+        return false;
+    }
     psS32 n_extended = psMetadataLookupS32(&status, md, "n_extended");
     if (!status) {
@@ -7707,9 +8391,4 @@
         return false;
     }
-    psS32 n_astrom = psMetadataLookupS32(&status, md, "n_astrom");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item n_astrom");
-        return false;
-    }
     char* path_base = psMetadataLookupPtr(&status, md, "path_base");
     if (!status) {
@@ -7723,5 +8402,5 @@
     }
 
-    return chipProcessedImfileRowAlloc(chip_id, exp_id, class_id, uri, bg, bg_stdev, bg_mean_stdev, bias, bias_stdev, fringe_0, fringe_1, fringe_2, sigma_ra, sigma_dec, ap_resid, ap_resid_stdev, zp_mean, zp_stdev, fwhm_major, fwhm_minor, dtime_detrend, dtime_photom, dtime_astrom, hostname, n_stars, n_extended, n_cr, n_astrom, path_base, fault);
+    return chipProcessedImfileRowAlloc(chip_id, exp_id, class_id, data_state, uri, bg, bg_stdev, bg_mean_stdev, bias, bias_stdev, fringe_0, fringe_1, fringe_2, ap_resid, ap_resid_stdev, fwhm_major, fwhm_minor, iq_m2, iq_m2_err, iq_m2_lq, iq_m2_uq, iq_m2c, iq_m2c_err, iq_m2c_lq, iq_m2c_uq, iq_m2s, iq_m2s_err, iq_m2s_lq, iq_m2s_uq, iq_m3, iq_m3_err, iq_m3_lq, iq_m3_uq, iq_m4, iq_m4_err, iq_m4_lq, iq_m4_uq, dtime_detrend, dtime_photom, dtime_total, dtime_script, hostname, n_stars, n_psfstars, n_iqstars, n_extended, n_cr, path_base, fault);
 }
 psArray *chipProcessedImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -8619,5 +9298,5 @@
 static void camProcessedExpRowFree(camProcessedExpRow *object);
 
-camProcessedExpRow *camProcessedExpRowAlloc(psS64 cam_id, const char *uri, psF32 bg, psF32 bg_stdev, psF32 bg_mean_stdev, psF32 bias, psF32 bias_stdev, psF32 fringe_0, psF32 fringe_1, psF32 fringe_2, psF32 sigma_ra, psF32 sigma_dec, psF32 ap_resid, psF32 ap_resid_stdev, psF32 zp_mean, psF32 zp_stdev, psF32 fwhm_major, psF32 fwhm_minor, psF32 dtime_detrend, psF32 dtime_photom, psF32 dtime_astrom, const char *hostname, psS32 n_stars, psS32 n_extended, psS32 n_cr, psS32 n_astrom, const char *path_base, psS16 fault)
+camProcessedExpRow *camProcessedExpRowAlloc(psS64 cam_id, const char *uri, psF32 bg, psF32 bg_stdev, psF32 bg_mean_stdev, psF32 bias, psF32 bias_stdev, psF32 fringe_0, psF32 fringe_1, psF32 fringe_2, psF32 sigma_ra, psF32 sigma_dec, psF32 ap_resid, psF32 ap_resid_stdev, psF32 zp_mean, psF32 zp_stdev, psF32 fwhm_major, psF32 fwhm_minor, psF32 iq_m2, psF32 iq_m2_err, psF32 iq_m2_lq, psF32 iq_m2_uq, psF32 iq_m2c, psF32 iq_m2c_err, psF32 iq_m2c_lq, psF32 iq_m2c_uq, psF32 iq_m2s, psF32 iq_m2s_err, psF32 iq_m2s_lq, psF32 iq_m2s_uq, psF32 iq_m3, psF32 iq_m3_err, psF32 iq_m3_lq, psF32 iq_m3_uq, psF32 iq_m4, psF32 iq_m4_err, psF32 iq_m4_lq, psF32 iq_m4_uq, psF32 dtime_script, psF32 dtime_astrom, psF32 dtime_addstar, const char *hostname, psS32 n_stars, psS32 n_psfstars, psS32 n_iqstars, psS32 n_extended, psS32 n_cr, psS32 n_astrom, const char *path_base, psS16 fault)
 {
     camProcessedExpRow *_object;
@@ -8644,9 +9323,31 @@
     _object->fwhm_major = fwhm_major;
     _object->fwhm_minor = fwhm_minor;
-    _object->dtime_detrend = dtime_detrend;
-    _object->dtime_photom = dtime_photom;
+    _object->iq_m2 = iq_m2;
+    _object->iq_m2_err = iq_m2_err;
+    _object->iq_m2_lq = iq_m2_lq;
+    _object->iq_m2_uq = iq_m2_uq;
+    _object->iq_m2c = iq_m2c;
+    _object->iq_m2c_err = iq_m2c_err;
+    _object->iq_m2c_lq = iq_m2c_lq;
+    _object->iq_m2c_uq = iq_m2c_uq;
+    _object->iq_m2s = iq_m2s;
+    _object->iq_m2s_err = iq_m2s_err;
+    _object->iq_m2s_lq = iq_m2s_lq;
+    _object->iq_m2s_uq = iq_m2s_uq;
+    _object->iq_m3 = iq_m3;
+    _object->iq_m3_err = iq_m3_err;
+    _object->iq_m3_lq = iq_m3_lq;
+    _object->iq_m3_uq = iq_m3_uq;
+    _object->iq_m4 = iq_m4;
+    _object->iq_m4_err = iq_m4_err;
+    _object->iq_m4_lq = iq_m4_lq;
+    _object->iq_m4_uq = iq_m4_uq;
+    _object->dtime_script = dtime_script;
     _object->dtime_astrom = dtime_astrom;
+    _object->dtime_addstar = dtime_addstar;
     _object->hostname = psStringCopy(hostname);
     _object->n_stars = n_stars;
+    _object->n_psfstars = n_psfstars;
+    _object->n_iqstars = n_iqstars;
     _object->n_extended = n_extended;
     _object->n_cr = n_cr;
@@ -8758,11 +9459,106 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_detrend", PS_DATA_F32, NULL, 0.0)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_detrend");
-        psFree(md);
-        return false;
-    }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_photom", PS_DATA_F32, NULL, 0.0)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_photom");
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2_err", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2_lq", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2_uq", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2c", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2c");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2c_err", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2c_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2c_lq", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2c_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2c_uq", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2c_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2s", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2s");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2s_err", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2s_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2s_lq", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2s_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2s_uq", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2s_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m3", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m3");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m3_err", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m3_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m3_lq", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m3_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m3_uq", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m3_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m4", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m4");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m4_err", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m4_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m4_lq", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m4_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m4_uq", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m4_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_script", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_script");
         psFree(md);
         return false;
@@ -8773,4 +9569,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_addstar", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_addstar");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "hostname", PS_DATA_STRING, NULL, "64")) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item hostname");
@@ -8783,4 +9584,14 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "n_psfstars", PS_DATA_S32, NULL, 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item n_psfstars");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "n_iqstars", PS_DATA_S32, NULL, 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item n_iqstars");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "n_extended", PS_DATA_S32, NULL, 0)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item n_extended");
@@ -8821,5 +9632,5 @@
 }
 
-bool camProcessedExpInsert(psDB * dbh, psS64 cam_id, const char *uri, psF32 bg, psF32 bg_stdev, psF32 bg_mean_stdev, psF32 bias, psF32 bias_stdev, psF32 fringe_0, psF32 fringe_1, psF32 fringe_2, psF32 sigma_ra, psF32 sigma_dec, psF32 ap_resid, psF32 ap_resid_stdev, psF32 zp_mean, psF32 zp_stdev, psF32 fwhm_major, psF32 fwhm_minor, psF32 dtime_detrend, psF32 dtime_photom, psF32 dtime_astrom, const char *hostname, psS32 n_stars, psS32 n_extended, psS32 n_cr, psS32 n_astrom, const char *path_base, psS16 fault)
+bool camProcessedExpInsert(psDB * dbh, psS64 cam_id, const char *uri, psF32 bg, psF32 bg_stdev, psF32 bg_mean_stdev, psF32 bias, psF32 bias_stdev, psF32 fringe_0, psF32 fringe_1, psF32 fringe_2, psF32 sigma_ra, psF32 sigma_dec, psF32 ap_resid, psF32 ap_resid_stdev, psF32 zp_mean, psF32 zp_stdev, psF32 fwhm_major, psF32 fwhm_minor, psF32 iq_m2, psF32 iq_m2_err, psF32 iq_m2_lq, psF32 iq_m2_uq, psF32 iq_m2c, psF32 iq_m2c_err, psF32 iq_m2c_lq, psF32 iq_m2c_uq, psF32 iq_m2s, psF32 iq_m2s_err, psF32 iq_m2s_lq, psF32 iq_m2s_uq, psF32 iq_m3, psF32 iq_m3_err, psF32 iq_m3_lq, psF32 iq_m3_uq, psF32 iq_m4, psF32 iq_m4_err, psF32 iq_m4_lq, psF32 iq_m4_uq, psF32 dtime_script, psF32 dtime_astrom, psF32 dtime_addstar, const char *hostname, psS32 n_stars, psS32 n_psfstars, psS32 n_iqstars, psS32 n_extended, psS32 n_cr, psS32 n_astrom, const char *path_base, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -8914,11 +9725,106 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_detrend", PS_DATA_F32, NULL, dtime_detrend)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_detrend");
-        psFree(md);
-        return false;
-    }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_photom", PS_DATA_F32, NULL, dtime_photom)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_photom");
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2", PS_DATA_F32, NULL, iq_m2)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2_err", PS_DATA_F32, NULL, iq_m2_err)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2_lq", PS_DATA_F32, NULL, iq_m2_lq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2_uq", PS_DATA_F32, NULL, iq_m2_uq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2c", PS_DATA_F32, NULL, iq_m2c)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2c");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2c_err", PS_DATA_F32, NULL, iq_m2c_err)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2c_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2c_lq", PS_DATA_F32, NULL, iq_m2c_lq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2c_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2c_uq", PS_DATA_F32, NULL, iq_m2c_uq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2c_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2s", PS_DATA_F32, NULL, iq_m2s)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2s");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2s_err", PS_DATA_F32, NULL, iq_m2s_err)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2s_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2s_lq", PS_DATA_F32, NULL, iq_m2s_lq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2s_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2s_uq", PS_DATA_F32, NULL, iq_m2s_uq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2s_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m3", PS_DATA_F32, NULL, iq_m3)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m3");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m3_err", PS_DATA_F32, NULL, iq_m3_err)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m3_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m3_lq", PS_DATA_F32, NULL, iq_m3_lq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m3_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m3_uq", PS_DATA_F32, NULL, iq_m3_uq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m3_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m4", PS_DATA_F32, NULL, iq_m4)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m4");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m4_err", PS_DATA_F32, NULL, iq_m4_err)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m4_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m4_lq", PS_DATA_F32, NULL, iq_m4_lq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m4_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m4_uq", PS_DATA_F32, NULL, iq_m4_uq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m4_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_script", PS_DATA_F32, NULL, dtime_script)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_script");
         psFree(md);
         return false;
@@ -8929,4 +9835,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_addstar", PS_DATA_F32, NULL, dtime_addstar)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_addstar");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "hostname", PS_DATA_STRING, NULL, hostname)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item hostname");
@@ -8936,4 +9847,14 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "n_stars", PS_DATA_S32, NULL, n_stars)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item n_stars");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "n_psfstars", PS_DATA_S32, NULL, n_psfstars)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item n_psfstars");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "n_iqstars", PS_DATA_S32, NULL, n_iqstars)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item n_iqstars");
         psFree(md);
         return false;
@@ -8987,5 +9908,5 @@
 bool camProcessedExpInsertObject(psDB *dbh, camProcessedExpRow *object)
 {
-    return camProcessedExpInsert(dbh, object->cam_id, object->uri, object->bg, object->bg_stdev, object->bg_mean_stdev, object->bias, object->bias_stdev, object->fringe_0, object->fringe_1, object->fringe_2, object->sigma_ra, object->sigma_dec, object->ap_resid, object->ap_resid_stdev, object->zp_mean, object->zp_stdev, object->fwhm_major, object->fwhm_minor, object->dtime_detrend, object->dtime_photom, object->dtime_astrom, object->hostname, object->n_stars, object->n_extended, object->n_cr, object->n_astrom, object->path_base, object->fault);
+    return camProcessedExpInsert(dbh, object->cam_id, object->uri, object->bg, object->bg_stdev, object->bg_mean_stdev, object->bias, object->bias_stdev, object->fringe_0, object->fringe_1, object->fringe_2, object->sigma_ra, object->sigma_dec, object->ap_resid, object->ap_resid_stdev, object->zp_mean, object->zp_stdev, object->fwhm_major, object->fwhm_minor, object->iq_m2, object->iq_m2_err, object->iq_m2_lq, object->iq_m2_uq, object->iq_m2c, object->iq_m2c_err, object->iq_m2c_lq, object->iq_m2c_uq, object->iq_m2s, object->iq_m2s_err, object->iq_m2s_lq, object->iq_m2s_uq, object->iq_m3, object->iq_m3_err, object->iq_m3_lq, object->iq_m3_uq, object->iq_m4, object->iq_m4_err, object->iq_m4_lq, object->iq_m4_uq, object->dtime_script, object->dtime_astrom, object->dtime_addstar, object->hostname, object->n_stars, object->n_psfstars, object->n_iqstars, object->n_extended, object->n_cr, object->n_astrom, object->path_base, object->fault);
 }
 
@@ -9150,11 +10071,106 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_detrend", PS_DATA_F32, NULL, object->dtime_detrend)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_detrend");
-        psFree(md);
-        return false;
-    }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_photom", PS_DATA_F32, NULL, object->dtime_photom)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_photom");
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2", PS_DATA_F32, NULL, object->iq_m2)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2_err", PS_DATA_F32, NULL, object->iq_m2_err)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2_lq", PS_DATA_F32, NULL, object->iq_m2_lq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2_uq", PS_DATA_F32, NULL, object->iq_m2_uq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2c", PS_DATA_F32, NULL, object->iq_m2c)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2c");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2c_err", PS_DATA_F32, NULL, object->iq_m2c_err)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2c_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2c_lq", PS_DATA_F32, NULL, object->iq_m2c_lq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2c_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2c_uq", PS_DATA_F32, NULL, object->iq_m2c_uq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2c_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2s", PS_DATA_F32, NULL, object->iq_m2s)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2s");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2s_err", PS_DATA_F32, NULL, object->iq_m2s_err)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2s_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2s_lq", PS_DATA_F32, NULL, object->iq_m2s_lq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2s_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m2s_uq", PS_DATA_F32, NULL, object->iq_m2s_uq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m2s_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m3", PS_DATA_F32, NULL, object->iq_m3)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m3");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m3_err", PS_DATA_F32, NULL, object->iq_m3_err)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m3_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m3_lq", PS_DATA_F32, NULL, object->iq_m3_lq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m3_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m3_uq", PS_DATA_F32, NULL, object->iq_m3_uq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m3_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m4", PS_DATA_F32, NULL, object->iq_m4)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m4");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m4_err", PS_DATA_F32, NULL, object->iq_m4_err)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m4_err");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m4_lq", PS_DATA_F32, NULL, object->iq_m4_lq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m4_lq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "iq_m4_uq", PS_DATA_F32, NULL, object->iq_m4_uq)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item iq_m4_uq");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_script", PS_DATA_F32, NULL, object->dtime_script)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_script");
         psFree(md);
         return false;
@@ -9165,4 +10181,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_addstar", PS_DATA_F32, NULL, object->dtime_addstar)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_addstar");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "hostname", PS_DATA_STRING, NULL, object->hostname)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item hostname");
@@ -9175,4 +10196,14 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "n_psfstars", PS_DATA_S32, NULL, object->n_psfstars)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item n_psfstars");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "n_iqstars", PS_DATA_S32, NULL, object->n_iqstars)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item n_iqstars");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "n_extended", PS_DATA_S32, NULL, object->n_extended)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item n_extended");
@@ -9299,12 +10330,107 @@
         return false;
     }
-    psF32 dtime_detrend = psMetadataLookupF32(&status, md, "dtime_detrend");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dtime_detrend");
-        return false;
-    }
-    psF32 dtime_photom = psMetadataLookupF32(&status, md, "dtime_photom");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dtime_photom");
+    psF32 iq_m2 = psMetadataLookupF32(&status, md, "iq_m2");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m2");
+        return false;
+    }
+    psF32 iq_m2_err = psMetadataLookupF32(&status, md, "iq_m2_err");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m2_err");
+        return false;
+    }
+    psF32 iq_m2_lq = psMetadataLookupF32(&status, md, "iq_m2_lq");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m2_lq");
+        return false;
+    }
+    psF32 iq_m2_uq = psMetadataLookupF32(&status, md, "iq_m2_uq");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m2_uq");
+        return false;
+    }
+    psF32 iq_m2c = psMetadataLookupF32(&status, md, "iq_m2c");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m2c");
+        return false;
+    }
+    psF32 iq_m2c_err = psMetadataLookupF32(&status, md, "iq_m2c_err");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m2c_err");
+        return false;
+    }
+    psF32 iq_m2c_lq = psMetadataLookupF32(&status, md, "iq_m2c_lq");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m2c_lq");
+        return false;
+    }
+    psF32 iq_m2c_uq = psMetadataLookupF32(&status, md, "iq_m2c_uq");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m2c_uq");
+        return false;
+    }
+    psF32 iq_m2s = psMetadataLookupF32(&status, md, "iq_m2s");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m2s");
+        return false;
+    }
+    psF32 iq_m2s_err = psMetadataLookupF32(&status, md, "iq_m2s_err");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m2s_err");
+        return false;
+    }
+    psF32 iq_m2s_lq = psMetadataLookupF32(&status, md, "iq_m2s_lq");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m2s_lq");
+        return false;
+    }
+    psF32 iq_m2s_uq = psMetadataLookupF32(&status, md, "iq_m2s_uq");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m2s_uq");
+        return false;
+    }
+    psF32 iq_m3 = psMetadataLookupF32(&status, md, "iq_m3");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m3");
+        return false;
+    }
+    psF32 iq_m3_err = psMetadataLookupF32(&status, md, "iq_m3_err");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m3_err");
+        return false;
+    }
+    psF32 iq_m3_lq = psMetadataLookupF32(&status, md, "iq_m3_lq");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m3_lq");
+        return false;
+    }
+    psF32 iq_m3_uq = psMetadataLookupF32(&status, md, "iq_m3_uq");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m3_uq");
+        return false;
+    }
+    psF32 iq_m4 = psMetadataLookupF32(&status, md, "iq_m4");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m4");
+        return false;
+    }
+    psF32 iq_m4_err = psMetadataLookupF32(&status, md, "iq_m4_err");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m4_err");
+        return false;
+    }
+    psF32 iq_m4_lq = psMetadataLookupF32(&status, md, "iq_m4_lq");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m4_lq");
+        return false;
+    }
+    psF32 iq_m4_uq = psMetadataLookupF32(&status, md, "iq_m4_uq");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item iq_m4_uq");
+        return false;
+    }
+    psF32 dtime_script = psMetadataLookupF32(&status, md, "dtime_script");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dtime_script");
         return false;
     }
@@ -9314,4 +10440,9 @@
         return false;
     }
+    psF32 dtime_addstar = psMetadataLookupF32(&status, md, "dtime_addstar");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dtime_addstar");
+        return false;
+    }
     char* hostname = psMetadataLookupPtr(&status, md, "hostname");
     if (!status) {
@@ -9324,4 +10455,14 @@
         return false;
     }
+    psS32 n_psfstars = psMetadataLookupS32(&status, md, "n_psfstars");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item n_psfstars");
+        return false;
+    }
+    psS32 n_iqstars = psMetadataLookupS32(&status, md, "n_iqstars");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item n_iqstars");
+        return false;
+    }
     psS32 n_extended = psMetadataLookupS32(&status, md, "n_extended");
     if (!status) {
@@ -9350,5 +10491,5 @@
     }
 
-    return camProcessedExpRowAlloc(cam_id, uri, bg, bg_stdev, bg_mean_stdev, bias, bias_stdev, fringe_0, fringe_1, fringe_2, sigma_ra, sigma_dec, ap_resid, ap_resid_stdev, zp_mean, zp_stdev, fwhm_major, fwhm_minor, dtime_detrend, dtime_photom, dtime_astrom, hostname, n_stars, n_extended, n_cr, n_astrom, path_base, fault);
+    return camProcessedExpRowAlloc(cam_id, uri, bg, bg_stdev, bg_mean_stdev, bias, bias_stdev, fringe_0, fringe_1, fringe_2, sigma_ra, sigma_dec, ap_resid, ap_resid_stdev, zp_mean, zp_stdev, fwhm_major, fwhm_minor, iq_m2, iq_m2_err, iq_m2_lq, iq_m2_uq, iq_m2c, iq_m2c_err, iq_m2c_lq, iq_m2c_uq, iq_m2s, iq_m2s_err, iq_m2s_lq, iq_m2s_uq, iq_m3, iq_m3_err, iq_m3_lq, iq_m3_uq, iq_m4, iq_m4_err, iq_m4_lq, iq_m4_uq, dtime_script, dtime_astrom, dtime_addstar, hostname, n_stars, n_psfstars, n_iqstars, n_extended, n_cr, n_astrom, path_base, fault);
 }
 psArray *camProcessedExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -10246,5 +11387,5 @@
 static void fakeProcessedImfileRowFree(fakeProcessedImfileRow *object);
 
-fakeProcessedImfileRow *fakeProcessedImfileRowAlloc(psS64 fake_id, psS64 exp_id, const char *class_id, const char *uri, psF32 dtime_fake, const char *hostname, const char *path_base, psS16 fault, psTime* epoch)
+fakeProcessedImfileRow *fakeProcessedImfileRowAlloc(psS64 fake_id, psS64 exp_id, const char *class_id, const char *uri, psF32 dtime_fake, psF32 dtime_script, const char *hostname, const char *path_base, const char *data_state, psS16 fault, psTime* epoch)
 {
     fakeProcessedImfileRow *_object;
@@ -10258,6 +11399,8 @@
     _object->uri = psStringCopy(uri);
     _object->dtime_fake = dtime_fake;
+    _object->dtime_script = dtime_script;
     _object->hostname = psStringCopy(hostname);
     _object->path_base = psStringCopy(path_base);
+    _object->data_state = psStringCopy(data_state);
     _object->fault = fault;
     _object->epoch = psTimeCopy(epoch);
@@ -10272,4 +11415,5 @@
     psFree(object->hostname);
     psFree(object->path_base);
+    psFree(object->data_state);
     psFree(object->epoch);
 }
@@ -10303,4 +11447,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_script", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_script");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "hostname", PS_DATA_STRING, NULL, "64")) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item hostname");
@@ -10313,4 +11462,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, "Key", "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "Key NOT NULL", 0)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
@@ -10336,5 +11490,5 @@
 }
 
-bool fakeProcessedImfileInsert(psDB * dbh, psS64 fake_id, psS64 exp_id, const char *class_id, const char *uri, psF32 dtime_fake, const char *hostname, const char *path_base, psS16 fault, psTime* epoch)
+bool fakeProcessedImfileInsert(psDB * dbh, psS64 fake_id, psS64 exp_id, const char *class_id, const char *uri, psF32 dtime_fake, psF32 dtime_script, const char *hostname, const char *path_base, const char *data_state, psS16 fault, psTime* epoch)
 {
     psMetadata *md = psMetadataAlloc();
@@ -10364,4 +11518,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_script", PS_DATA_F32, NULL, dtime_script)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_script");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "hostname", PS_DATA_STRING, NULL, hostname)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item hostname");
@@ -10371,4 +11530,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, path_base)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item path_base");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
         psFree(md);
         return false;
@@ -10407,5 +11571,5 @@
 bool fakeProcessedImfileInsertObject(psDB *dbh, fakeProcessedImfileRow *object)
 {
-    return fakeProcessedImfileInsert(dbh, object->fake_id, object->exp_id, object->class_id, object->uri, object->dtime_fake, object->hostname, object->path_base, object->fault, object->epoch);
+    return fakeProcessedImfileInsert(dbh, object->fake_id, object->exp_id, object->class_id, object->uri, object->dtime_fake, object->dtime_script, object->hostname, object->path_base, object->data_state, object->fault, object->epoch);
 }
 
@@ -10505,4 +11669,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_script", PS_DATA_F32, NULL, object->dtime_script)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_script");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "hostname", PS_DATA_STRING, NULL, object->hostname)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item hostname");
@@ -10515,4 +11684,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, object->data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, object->fault)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
@@ -10559,4 +11733,9 @@
         return false;
     }
+    psF32 dtime_script = psMetadataLookupF32(&status, md, "dtime_script");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dtime_script");
+        return false;
+    }
     char* hostname = psMetadataLookupPtr(&status, md, "hostname");
     if (!status) {
@@ -10569,4 +11748,9 @@
         return false;
     }
+    char* data_state = psMetadataLookupPtr(&status, md, "data_state");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item data_state");
+        return false;
+    }
     psS16 fault = psMetadataLookupS16(&status, md, "fault");
     if (!status) {
@@ -10580,5 +11764,5 @@
     }
 
-    return fakeProcessedImfileRowAlloc(fake_id, exp_id, class_id, uri, dtime_fake, hostname, path_base, fault, epoch);
+    return fakeProcessedImfileRowAlloc(fake_id, exp_id, class_id, uri, dtime_fake, dtime_script, hostname, path_base, data_state, fault, epoch);
 }
 psArray *fakeProcessedImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -11863,5 +13047,5 @@
 static void warpSkyfileRowFree(warpSkyfileRow *object);
 
-warpSkyfileRow *warpSkyfileRowAlloc(psS64 warp_id, const char *skycell_id, const char *tess_id, const char *uri, const char *path_base, psF64 bg, psF64 bg_stdev, psF32 dtime_warp, const char *hostname, psF32 good_frac, psS32 xmin, psS32 xmax, psS32 ymin, psS32 ymax, bool ignored, psS16 fault)
+warpSkyfileRow *warpSkyfileRowAlloc(psS64 warp_id, const char *skycell_id, const char *tess_id, const char *uri, const char *path_base, const char *data_state, psF64 bg, psF64 bg_stdev, psF32 dtime_warp, psF32 dtime_script, const char *hostname, psF32 good_frac, psS32 xmin, psS32 xmax, psS32 ymin, psS32 ymax, bool ignored, psS16 fault)
 {
     warpSkyfileRow  *_object;
@@ -11875,7 +13059,9 @@
     _object->uri = psStringCopy(uri);
     _object->path_base = psStringCopy(path_base);
+    _object->data_state = psStringCopy(data_state);
     _object->bg = bg;
     _object->bg_stdev = bg_stdev;
     _object->dtime_warp = dtime_warp;
+    _object->dtime_script = dtime_script;
     _object->hostname = psStringCopy(hostname);
     _object->good_frac = good_frac;
@@ -11896,4 +13082,5 @@
     psFree(object->uri);
     psFree(object->path_base);
+    psFree(object->data_state);
     psFree(object->hostname);
 }
@@ -11927,4 +13114,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, "Key", "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "bg", PS_DATA_F64, NULL, 0.0)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item bg");
@@ -11942,4 +13134,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_script", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_script");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "hostname", PS_DATA_STRING, NULL, "64")) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item hostname");
@@ -11995,5 +13192,5 @@
 }
 
-bool warpSkyfileInsert(psDB * dbh, psS64 warp_id, const char *skycell_id, const char *tess_id, const char *uri, const char *path_base, psF64 bg, psF64 bg_stdev, psF32 dtime_warp, const char *hostname, psF32 good_frac, psS32 xmin, psS32 xmax, psS32 ymin, psS32 ymax, bool ignored, psS16 fault)
+bool warpSkyfileInsert(psDB * dbh, psS64 warp_id, const char *skycell_id, const char *tess_id, const char *uri, const char *path_base, const char *data_state, psF64 bg, psF64 bg_stdev, psF32 dtime_warp, psF32 dtime_script, const char *hostname, psF32 good_frac, psS32 xmin, psS32 xmax, psS32 ymin, psS32 ymax, bool ignored, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -12023,4 +13220,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "bg", PS_DATA_F64, NULL, bg)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item bg");
@@ -12035,4 +13237,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_warp", PS_DATA_F32, NULL, dtime_warp)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_warp");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_script", PS_DATA_F32, NULL, dtime_script)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_script");
         psFree(md);
         return false;
@@ -12101,5 +13308,5 @@
 bool warpSkyfileInsertObject(psDB *dbh, warpSkyfileRow *object)
 {
-    return warpSkyfileInsert(dbh, object->warp_id, object->skycell_id, object->tess_id, object->uri, object->path_base, object->bg, object->bg_stdev, object->dtime_warp, object->hostname, object->good_frac, object->xmin, object->xmax, object->ymin, object->ymax, object->ignored, object->fault);
+    return warpSkyfileInsert(dbh, object->warp_id, object->skycell_id, object->tess_id, object->uri, object->path_base, object->data_state, object->bg, object->bg_stdev, object->dtime_warp, object->dtime_script, object->hostname, object->good_frac, object->xmin, object->xmax, object->ymin, object->ymax, object->ignored, object->fault);
 }
 
@@ -12199,4 +13406,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, object->data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "bg", PS_DATA_F64, NULL, object->bg)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item bg");
@@ -12214,4 +13426,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_script", PS_DATA_F32, NULL, object->dtime_script)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_script");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "hostname", PS_DATA_STRING, NULL, object->hostname)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item hostname");
@@ -12288,4 +13505,9 @@
         return false;
     }
+    char* data_state = psMetadataLookupPtr(&status, md, "data_state");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item data_state");
+        return false;
+    }
     psF64 bg = psMetadataLookupF64(&status, md, "bg");
     if (!status) {
@@ -12303,4 +13525,9 @@
         return false;
     }
+    psF32 dtime_script = psMetadataLookupF32(&status, md, "dtime_script");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dtime_script");
+        return false;
+    }
     char* hostname = psMetadataLookupPtr(&status, md, "hostname");
     if (!status) {
@@ -12344,5 +13571,5 @@
     }
 
-    return warpSkyfileRowAlloc(warp_id, skycell_id, tess_id, uri, path_base, bg, bg_stdev, dtime_warp, hostname, good_frac, xmin, xmax, ymin, ymax, ignored, fault);
+    return warpSkyfileRowAlloc(warp_id, skycell_id, tess_id, uri, path_base, data_state, bg, bg_stdev, dtime_warp, dtime_script, hostname, good_frac, xmin, xmax, ymin, ymax, ignored, fault);
 }
 psArray *warpSkyfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -12742,5 +13969,5 @@
 static void diffRunRowFree(diffRunRow *object);
 
-diffRunRow *diffRunRowAlloc(psS64 diff_id, const char *state, const char *workdir, const char *dvodb, psTime* registered, const char *skycell_id, const char *tess_id)
+diffRunRow *diffRunRowAlloc(psS64 diff_id, const char *state, const char *label, const char *reduction, const char *workdir, const char *dvodb, psTime* registered, const char *skycell_id, const char *tess_id)
 {
     diffRunRow      *_object;
@@ -12751,4 +13978,6 @@
     _object->diff_id = diff_id;
     _object->state = psStringCopy(state);
+    _object->label = psStringCopy(label);
+    _object->reduction = psStringCopy(reduction);
     _object->workdir = psStringCopy(workdir);
     _object->dvodb = psStringCopy(dvodb);
@@ -12763,4 +13992,6 @@
 {
     psFree(object->state);
+    psFree(object->label);
+    psFree(object->reduction);
     psFree(object->workdir);
     psFree(object->dvodb);
@@ -12783,4 +14014,14 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, "Key", "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item label");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, "Reduction class", "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item reduction");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, "255")) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item workdir");
@@ -12821,5 +14062,5 @@
 }
 
-bool diffRunInsert(psDB * dbh, psS64 diff_id, const char *state, const char *workdir, const char *dvodb, psTime* registered, const char *skycell_id, const char *tess_id)
+bool diffRunInsert(psDB * dbh, psS64 diff_id, const char *state, const char *label, const char *reduction, const char *workdir, const char *dvodb, psTime* registered, const char *skycell_id, const char *tess_id)
 {
     psMetadata *md = psMetadataAlloc();
@@ -12831,4 +14072,14 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "state", PS_DATA_STRING, NULL, state)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item state");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, NULL, label)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item label");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, reduction)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item reduction");
         psFree(md);
         return false;
@@ -12882,5 +14133,5 @@
 bool diffRunInsertObject(psDB *dbh, diffRunRow *object)
 {
-    return diffRunInsert(dbh, object->diff_id, object->state, object->workdir, object->dvodb, object->registered, object->skycell_id, object->tess_id);
+    return diffRunInsert(dbh, object->diff_id, object->state, object->label, object->reduction, object->workdir, object->dvodb, object->registered, object->skycell_id, object->tess_id);
 }
 
@@ -12965,4 +14216,14 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, NULL, object->label)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item label");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, object->reduction)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item reduction");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, object->workdir)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item workdir");
@@ -13009,4 +14270,14 @@
         return false;
     }
+    char* label = psMetadataLookupPtr(&status, md, "label");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item label");
+        return false;
+    }
+    char* reduction = psMetadataLookupPtr(&status, md, "reduction");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item reduction");
+        return false;
+    }
     char* workdir = psMetadataLookupPtr(&status, md, "workdir");
     if (!status) {
@@ -13035,5 +14306,5 @@
     }
 
-    return diffRunRowAlloc(diff_id, state, workdir, dvodb, registered, skycell_id, tess_id);
+    return diffRunRowAlloc(diff_id, state, label, reduction, workdir, dvodb, registered, skycell_id, tess_id);
 }
 psArray *diffRunSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -13561,5 +14832,5 @@
 static void diffSkyfileRowFree(diffSkyfileRow *object);
 
-diffSkyfileRow *diffSkyfileRowAlloc(psS64 diff_id, const char *uri, const char *path_base, psF64 bg, psF64 bg_stdev, psS32 stamps_num, psF32 stamps_rms, psS32 sources, psF32 dtime_diff, const char *hostname, psF32 good_frac, psS16 fault)
+diffSkyfileRow *diffSkyfileRowAlloc(psS64 diff_id, const char *uri, const char *path_base, psF64 bg, psF64 bg_stdev, psS32 stamps_num, psF32 stamps_mean, psF32 stamps_rms, psF32 norm, psF32 bg_diff, psF32 kernel_x, psF32 kernel_y, psF32 kernel_xx, psF32 kernel_xy, psF32 kernel_yy, psS32 sources, psF32 dtime_diff, psF32 dtime_match, psF32 dtime_phot, psF32 dtime_script, const char *hostname, psF32 good_frac, psS16 fault)
 {
     diffSkyfileRow  *_object;
@@ -13574,7 +14845,18 @@
     _object->bg_stdev = bg_stdev;
     _object->stamps_num = stamps_num;
+    _object->stamps_mean = stamps_mean;
     _object->stamps_rms = stamps_rms;
+    _object->norm = norm;
+    _object->bg_diff = bg_diff;
+    _object->kernel_x = kernel_x;
+    _object->kernel_y = kernel_y;
+    _object->kernel_xx = kernel_xx;
+    _object->kernel_xy = kernel_xy;
+    _object->kernel_yy = kernel_yy;
     _object->sources = sources;
     _object->dtime_diff = dtime_diff;
+    _object->dtime_match = dtime_match;
+    _object->dtime_phot = dtime_phot;
+    _object->dtime_script = dtime_script;
     _object->hostname = psStringCopy(hostname);
     _object->good_frac = good_frac;
@@ -13624,4 +14906,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "stamps_mean", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item stamps_mean");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "stamps_rms", PS_DATA_F32, NULL, 0.0)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item stamps_rms");
@@ -13629,4 +14916,39 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "norm", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item norm");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "bg_diff", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item bg_diff");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "kernel_x", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item kernel_x");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "kernel_y", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item kernel_y");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "kernel_xx", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item kernel_xx");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "kernel_xy", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item kernel_xy");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "kernel_yy", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item kernel_yy");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "sources", PS_DATA_S32, NULL, 0)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item sources");
@@ -13639,4 +14961,19 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_match", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_match");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_phot", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_phot");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_script", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_script");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "hostname", PS_DATA_STRING, NULL, "64")) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item hostname");
@@ -13667,5 +15004,5 @@
 }
 
-bool diffSkyfileInsert(psDB * dbh, psS64 diff_id, const char *uri, const char *path_base, psF64 bg, psF64 bg_stdev, psS32 stamps_num, psF32 stamps_rms, psS32 sources, psF32 dtime_diff, const char *hostname, psF32 good_frac, psS16 fault)
+bool diffSkyfileInsert(psDB * dbh, psS64 diff_id, const char *uri, const char *path_base, psF64 bg, psF64 bg_stdev, psS32 stamps_num, psF32 stamps_mean, psF32 stamps_rms, psF32 norm, psF32 bg_diff, psF32 kernel_x, psF32 kernel_y, psF32 kernel_xx, psF32 kernel_xy, psF32 kernel_yy, psS32 sources, psF32 dtime_diff, psF32 dtime_match, psF32 dtime_phot, psF32 dtime_script, const char *hostname, psF32 good_frac, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -13700,4 +15037,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "stamps_mean", PS_DATA_F32, NULL, stamps_mean)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item stamps_mean");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "stamps_rms", PS_DATA_F32, NULL, stamps_rms)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item stamps_rms");
@@ -13705,4 +15047,39 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "norm", PS_DATA_F32, NULL, norm)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item norm");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "bg_diff", PS_DATA_F32, NULL, bg_diff)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item bg_diff");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "kernel_x", PS_DATA_F32, NULL, kernel_x)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item kernel_x");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "kernel_y", PS_DATA_F32, NULL, kernel_y)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item kernel_y");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "kernel_xx", PS_DATA_F32, NULL, kernel_xx)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item kernel_xx");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "kernel_xy", PS_DATA_F32, NULL, kernel_xy)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item kernel_xy");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "kernel_yy", PS_DATA_F32, NULL, kernel_yy)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item kernel_yy");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "sources", PS_DATA_S32, NULL, sources)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item sources");
@@ -13712,4 +15089,19 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_diff", PS_DATA_F32, NULL, dtime_diff)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_diff");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_match", PS_DATA_F32, NULL, dtime_match)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_match");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_phot", PS_DATA_F32, NULL, dtime_phot)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_phot");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_script", PS_DATA_F32, NULL, dtime_script)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_script");
         psFree(md);
         return false;
@@ -13753,5 +15145,5 @@
 bool diffSkyfileInsertObject(psDB *dbh, diffSkyfileRow *object)
 {
-    return diffSkyfileInsert(dbh, object->diff_id, object->uri, object->path_base, object->bg, object->bg_stdev, object->stamps_num, object->stamps_rms, object->sources, object->dtime_diff, object->hostname, object->good_frac, object->fault);
+    return diffSkyfileInsert(dbh, object->diff_id, object->uri, object->path_base, object->bg, object->bg_stdev, object->stamps_num, object->stamps_mean, object->stamps_rms, object->norm, object->bg_diff, object->kernel_x, object->kernel_y, object->kernel_xx, object->kernel_xy, object->kernel_yy, object->sources, object->dtime_diff, object->dtime_match, object->dtime_phot, object->dtime_script, object->hostname, object->good_frac, object->fault);
 }
 
@@ -13856,4 +15248,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "stamps_mean", PS_DATA_F32, NULL, object->stamps_mean)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item stamps_mean");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "stamps_rms", PS_DATA_F32, NULL, object->stamps_rms)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item stamps_rms");
@@ -13861,4 +15258,39 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "norm", PS_DATA_F32, NULL, object->norm)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item norm");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "bg_diff", PS_DATA_F32, NULL, object->bg_diff)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item bg_diff");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "kernel_x", PS_DATA_F32, NULL, object->kernel_x)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item kernel_x");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "kernel_y", PS_DATA_F32, NULL, object->kernel_y)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item kernel_y");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "kernel_xx", PS_DATA_F32, NULL, object->kernel_xx)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item kernel_xx");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "kernel_xy", PS_DATA_F32, NULL, object->kernel_xy)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item kernel_xy");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "kernel_yy", PS_DATA_F32, NULL, object->kernel_yy)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item kernel_yy");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "sources", PS_DATA_S32, NULL, object->sources)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item sources");
@@ -13871,4 +15303,19 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_match", PS_DATA_F32, NULL, object->dtime_match)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_match");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_phot", PS_DATA_F32, NULL, object->dtime_phot)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_phot");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_script", PS_DATA_F32, NULL, object->dtime_script)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_script");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "hostname", PS_DATA_STRING, NULL, object->hostname)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item hostname");
@@ -13925,4 +15372,9 @@
         return false;
     }
+    psF32 stamps_mean = psMetadataLookupF32(&status, md, "stamps_mean");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stamps_mean");
+        return false;
+    }
     psF32 stamps_rms = psMetadataLookupF32(&status, md, "stamps_rms");
     if (!status) {
@@ -13930,4 +15382,39 @@
         return false;
     }
+    psF32 norm = psMetadataLookupF32(&status, md, "norm");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item norm");
+        return false;
+    }
+    psF32 bg_diff = psMetadataLookupF32(&status, md, "bg_diff");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item bg_diff");
+        return false;
+    }
+    psF32 kernel_x = psMetadataLookupF32(&status, md, "kernel_x");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item kernel_x");
+        return false;
+    }
+    psF32 kernel_y = psMetadataLookupF32(&status, md, "kernel_y");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item kernel_y");
+        return false;
+    }
+    psF32 kernel_xx = psMetadataLookupF32(&status, md, "kernel_xx");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item kernel_xx");
+        return false;
+    }
+    psF32 kernel_xy = psMetadataLookupF32(&status, md, "kernel_xy");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item kernel_xy");
+        return false;
+    }
+    psF32 kernel_yy = psMetadataLookupF32(&status, md, "kernel_yy");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item kernel_yy");
+        return false;
+    }
     psS32 sources = psMetadataLookupS32(&status, md, "sources");
     if (!status) {
@@ -13940,4 +15427,19 @@
         return false;
     }
+    psF32 dtime_match = psMetadataLookupF32(&status, md, "dtime_match");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dtime_match");
+        return false;
+    }
+    psF32 dtime_phot = psMetadataLookupF32(&status, md, "dtime_phot");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dtime_phot");
+        return false;
+    }
+    psF32 dtime_script = psMetadataLookupF32(&status, md, "dtime_script");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dtime_script");
+        return false;
+    }
     char* hostname = psMetadataLookupPtr(&status, md, "hostname");
     if (!status) {
@@ -13956,5 +15458,5 @@
     }
 
-    return diffSkyfileRowAlloc(diff_id, uri, path_base, bg, bg_stdev, stamps_num, stamps_rms, sources, dtime_diff, hostname, good_frac, fault);
+    return diffSkyfileRowAlloc(diff_id, uri, path_base, bg, bg_stdev, stamps_num, stamps_mean, stamps_rms, norm, bg_diff, kernel_x, kernel_y, kernel_xx, kernel_xy, kernel_yy, sources, dtime_diff, dtime_match, dtime_phot, dtime_script, hostname, good_frac, fault);
 }
 psArray *diffSkyfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -14074,5 +15576,5 @@
 static void stackRunRowFree(stackRunRow *object);
 
-stackRunRow *stackRunRowAlloc(psS64 stack_id, const char *state, const char *workdir, const char *dvodb, psTime* registered, const char *skycell_id, const char *tess_id, const char *filter)
+stackRunRow *stackRunRowAlloc(psS64 stack_id, const char *state, const char *workdir, const char *label, const char *reduction, const char *dvodb, psTime* registered, const char *skycell_id, const char *tess_id, const char *filter)
 {
     stackRunRow     *_object;
@@ -14084,4 +15586,6 @@
     _object->state = psStringCopy(state);
     _object->workdir = psStringCopy(workdir);
+    _object->label = psStringCopy(label);
+    _object->reduction = psStringCopy(reduction);
     _object->dvodb = psStringCopy(dvodb);
     _object->registered = psTimeCopy(registered);
@@ -14097,4 +15601,6 @@
     psFree(object->state);
     psFree(object->workdir);
+    psFree(object->label);
+    psFree(object->reduction);
     psFree(object->dvodb);
     psFree(object->registered);
@@ -14122,4 +15628,14 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, "Key", "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item label");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, "Reduction class", "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item reduction");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, "255")) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
@@ -14160,5 +15676,5 @@
 }
 
-bool stackRunInsert(psDB * dbh, psS64 stack_id, const char *state, const char *workdir, const char *dvodb, psTime* registered, const char *skycell_id, const char *tess_id, const char *filter)
+bool stackRunInsert(psDB * dbh, psS64 stack_id, const char *state, const char *workdir, const char *label, const char *reduction, const char *dvodb, psTime* registered, const char *skycell_id, const char *tess_id, const char *filter)
 {
     psMetadata *md = psMetadataAlloc();
@@ -14175,4 +15691,14 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, workdir)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item workdir");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, NULL, label)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item label");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, reduction)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item reduction");
         psFree(md);
         return false;
@@ -14226,5 +15752,5 @@
 bool stackRunInsertObject(psDB *dbh, stackRunRow *object)
 {
-    return stackRunInsert(dbh, object->stack_id, object->state, object->workdir, object->dvodb, object->registered, object->skycell_id, object->tess_id, object->filter);
+    return stackRunInsert(dbh, object->stack_id, object->state, object->workdir, object->label, object->reduction, object->dvodb, object->registered, object->skycell_id, object->tess_id, object->filter);
 }
 
@@ -14314,4 +15840,14 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, NULL, object->label)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item label");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, object->reduction)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item reduction");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, object->dvodb)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
@@ -14363,4 +15899,14 @@
         return false;
     }
+    char* label = psMetadataLookupPtr(&status, md, "label");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item label");
+        return false;
+    }
+    char* reduction = psMetadataLookupPtr(&status, md, "reduction");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item reduction");
+        return false;
+    }
     char* dvodb = psMetadataLookupPtr(&status, md, "dvodb");
     if (!status) {
@@ -14389,5 +15935,5 @@
     }
 
-    return stackRunRowAlloc(stack_id, state, workdir, dvodb, registered, skycell_id, tess_id, filter);
+    return stackRunRowAlloc(stack_id, state, workdir, label, reduction, dvodb, registered, skycell_id, tess_id, filter);
 }
 psArray *stackRunSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -14807,5 +16353,5 @@
 static void stackSumSkyfileRowFree(stackSumSkyfileRow *object);
 
-stackSumSkyfileRow *stackSumSkyfileRowAlloc(psS64 stack_id, const char *uri, const char *path_base, psF64 bg, psF64 bg_stdev, psF32 dtime_stack, const char *hostname, psF32 good_frac, psS16 fault)
+stackSumSkyfileRow *stackSumSkyfileRowAlloc(psS64 stack_id, const char *uri, const char *path_base, psF64 bg, psF64 bg_stdev, psF32 dtime_stack, psF32 dtime_match_mean, psF32 dtime_match_stdev, psF32 dtime_initial, psF32 dtime_reject, psF32 dtime_final, psF32 dtime_phot, psF32 dtime_script, psF32 match_mean, psF32 match_stdev, psF32 match_rms, psF32 stamps_mean, psF32 stamps_stdev, psS32 stamps_min, psS32 reject_images, psF32 reject_pix_mean, psF32 reject_pix_stdev, psS32 sources, const char *hostname, psF32 good_frac, psS16 fault)
 {
     stackSumSkyfileRow *_object;
@@ -14820,4 +16366,21 @@
     _object->bg_stdev = bg_stdev;
     _object->dtime_stack = dtime_stack;
+    _object->dtime_match_mean = dtime_match_mean;
+    _object->dtime_match_stdev = dtime_match_stdev;
+    _object->dtime_initial = dtime_initial;
+    _object->dtime_reject = dtime_reject;
+    _object->dtime_final = dtime_final;
+    _object->dtime_phot = dtime_phot;
+    _object->dtime_script = dtime_script;
+    _object->match_mean = match_mean;
+    _object->match_stdev = match_stdev;
+    _object->match_rms = match_rms;
+    _object->stamps_mean = stamps_mean;
+    _object->stamps_stdev = stamps_stdev;
+    _object->stamps_min = stamps_min;
+    _object->reject_images = reject_images;
+    _object->reject_pix_mean = reject_pix_mean;
+    _object->reject_pix_stdev = reject_pix_stdev;
+    _object->sources = sources;
     _object->hostname = psStringCopy(hostname);
     _object->good_frac = good_frac;
@@ -14867,4 +16430,89 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_match_mean", PS_DATA_F32, "Key", 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_match_mean");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_match_stdev", PS_DATA_F32, "Key", 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_match_stdev");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_initial", PS_DATA_F32, "Key", 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_initial");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_reject", PS_DATA_F32, "Key", 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_reject");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_final", PS_DATA_F32, "Key", 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_final");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_phot", PS_DATA_F32, "Key", 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_phot");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_script", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_script");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "match_mean", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item match_mean");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "match_stdev", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item match_stdev");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "match_rms", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item match_rms");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "stamps_mean", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item stamps_mean");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "stamps_stdev", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item stamps_stdev");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "stamps_min", PS_DATA_S32, NULL, 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item stamps_min");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "reject_images", PS_DATA_S32, NULL, 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item reject_images");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "reject_pix_mean", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item reject_pix_mean");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "reject_pix_stdev", PS_DATA_F32, NULL, 0.0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item reject_pix_stdev");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "sources", PS_DATA_S32, NULL, 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item sources");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "hostname", PS_DATA_STRING, NULL, "64")) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item hostname");
@@ -14895,5 +16543,5 @@
 }
 
-bool stackSumSkyfileInsert(psDB * dbh, psS64 stack_id, const char *uri, const char *path_base, psF64 bg, psF64 bg_stdev, psF32 dtime_stack, const char *hostname, psF32 good_frac, psS16 fault)
+bool stackSumSkyfileInsert(psDB * dbh, psS64 stack_id, const char *uri, const char *path_base, psF64 bg, psF64 bg_stdev, psF32 dtime_stack, psF32 dtime_match_mean, psF32 dtime_match_stdev, psF32 dtime_initial, psF32 dtime_reject, psF32 dtime_final, psF32 dtime_phot, psF32 dtime_script, psF32 match_mean, psF32 match_stdev, psF32 match_rms, psF32 stamps_mean, psF32 stamps_stdev, psS32 stamps_min, psS32 reject_images, psF32 reject_pix_mean, psF32 reject_pix_stdev, psS32 sources, const char *hostname, psF32 good_frac, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -14925,4 +16573,89 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_stack", PS_DATA_F32, NULL, dtime_stack)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_stack");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_match_mean", PS_DATA_F32, NULL, dtime_match_mean)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_match_mean");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_match_stdev", PS_DATA_F32, NULL, dtime_match_stdev)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_match_stdev");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_initial", PS_DATA_F32, NULL, dtime_initial)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_initial");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_reject", PS_DATA_F32, NULL, dtime_reject)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_reject");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_final", PS_DATA_F32, NULL, dtime_final)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_final");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_phot", PS_DATA_F32, NULL, dtime_phot)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_phot");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_script", PS_DATA_F32, NULL, dtime_script)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_script");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "match_mean", PS_DATA_F32, NULL, match_mean)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item match_mean");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "match_stdev", PS_DATA_F32, NULL, match_stdev)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item match_stdev");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "match_rms", PS_DATA_F32, NULL, match_rms)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item match_rms");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "stamps_mean", PS_DATA_F32, NULL, stamps_mean)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item stamps_mean");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "stamps_stdev", PS_DATA_F32, NULL, stamps_stdev)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item stamps_stdev");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "stamps_min", PS_DATA_S32, NULL, stamps_min)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item stamps_min");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "reject_images", PS_DATA_S32, NULL, reject_images)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item reject_images");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "reject_pix_mean", PS_DATA_F32, NULL, reject_pix_mean)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item reject_pix_mean");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "reject_pix_stdev", PS_DATA_F32, NULL, reject_pix_stdev)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item reject_pix_stdev");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "sources", PS_DATA_S32, NULL, sources)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item sources");
         psFree(md);
         return false;
@@ -14966,5 +16699,5 @@
 bool stackSumSkyfileInsertObject(psDB *dbh, stackSumSkyfileRow *object)
 {
-    return stackSumSkyfileInsert(dbh, object->stack_id, object->uri, object->path_base, object->bg, object->bg_stdev, object->dtime_stack, object->hostname, object->good_frac, object->fault);
+    return stackSumSkyfileInsert(dbh, object->stack_id, object->uri, object->path_base, object->bg, object->bg_stdev, object->dtime_stack, object->dtime_match_mean, object->dtime_match_stdev, object->dtime_initial, object->dtime_reject, object->dtime_final, object->dtime_phot, object->dtime_script, object->match_mean, object->match_stdev, object->match_rms, object->stamps_mean, object->stamps_stdev, object->stamps_min, object->reject_images, object->reject_pix_mean, object->reject_pix_stdev, object->sources, object->hostname, object->good_frac, object->fault);
 }
 
@@ -15069,4 +16802,89 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_match_mean", PS_DATA_F32, NULL, object->dtime_match_mean)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_match_mean");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_match_stdev", PS_DATA_F32, NULL, object->dtime_match_stdev)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_match_stdev");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_initial", PS_DATA_F32, NULL, object->dtime_initial)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_initial");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_reject", PS_DATA_F32, NULL, object->dtime_reject)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_reject");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_final", PS_DATA_F32, NULL, object->dtime_final)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_final");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_phot", PS_DATA_F32, NULL, object->dtime_phot)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_phot");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dtime_script", PS_DATA_F32, NULL, object->dtime_script)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dtime_script");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "match_mean", PS_DATA_F32, NULL, object->match_mean)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item match_mean");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "match_stdev", PS_DATA_F32, NULL, object->match_stdev)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item match_stdev");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "match_rms", PS_DATA_F32, NULL, object->match_rms)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item match_rms");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "stamps_mean", PS_DATA_F32, NULL, object->stamps_mean)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item stamps_mean");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "stamps_stdev", PS_DATA_F32, NULL, object->stamps_stdev)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item stamps_stdev");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "stamps_min", PS_DATA_S32, NULL, object->stamps_min)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item stamps_min");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "reject_images", PS_DATA_S32, NULL, object->reject_images)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item reject_images");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "reject_pix_mean", PS_DATA_F32, NULL, object->reject_pix_mean)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item reject_pix_mean");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "reject_pix_stdev", PS_DATA_F32, NULL, object->reject_pix_stdev)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item reject_pix_stdev");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "sources", PS_DATA_S32, NULL, object->sources)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item sources");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "hostname", PS_DATA_STRING, NULL, object->hostname)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item hostname");
@@ -15123,4 +16941,89 @@
         return false;
     }
+    psF32 dtime_match_mean = psMetadataLookupF32(&status, md, "dtime_match_mean");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dtime_match_mean");
+        return false;
+    }
+    psF32 dtime_match_stdev = psMetadataLookupF32(&status, md, "dtime_match_stdev");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dtime_match_stdev");
+        return false;
+    }
+    psF32 dtime_initial = psMetadataLookupF32(&status, md, "dtime_initial");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dtime_initial");
+        return false;
+    }
+    psF32 dtime_reject = psMetadataLookupF32(&status, md, "dtime_reject");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dtime_reject");
+        return false;
+    }
+    psF32 dtime_final = psMetadataLookupF32(&status, md, "dtime_final");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dtime_final");
+        return false;
+    }
+    psF32 dtime_phot = psMetadataLookupF32(&status, md, "dtime_phot");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dtime_phot");
+        return false;
+    }
+    psF32 dtime_script = psMetadataLookupF32(&status, md, "dtime_script");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dtime_script");
+        return false;
+    }
+    psF32 match_mean = psMetadataLookupF32(&status, md, "match_mean");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item match_mean");
+        return false;
+    }
+    psF32 match_stdev = psMetadataLookupF32(&status, md, "match_stdev");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item match_stdev");
+        return false;
+    }
+    psF32 match_rms = psMetadataLookupF32(&status, md, "match_rms");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item match_rms");
+        return false;
+    }
+    psF32 stamps_mean = psMetadataLookupF32(&status, md, "stamps_mean");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stamps_mean");
+        return false;
+    }
+    psF32 stamps_stdev = psMetadataLookupF32(&status, md, "stamps_stdev");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stamps_stdev");
+        return false;
+    }
+    psS32 stamps_min = psMetadataLookupS32(&status, md, "stamps_min");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stamps_min");
+        return false;
+    }
+    psS32 reject_images = psMetadataLookupS32(&status, md, "reject_images");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item reject_images");
+        return false;
+    }
+    psF32 reject_pix_mean = psMetadataLookupF32(&status, md, "reject_pix_mean");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item reject_pix_mean");
+        return false;
+    }
+    psF32 reject_pix_stdev = psMetadataLookupF32(&status, md, "reject_pix_stdev");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item reject_pix_stdev");
+        return false;
+    }
+    psS32 sources = psMetadataLookupS32(&status, md, "sources");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item sources");
+        return false;
+    }
     char* hostname = psMetadataLookupPtr(&status, md, "hostname");
     if (!status) {
@@ -15139,5 +17042,5 @@
     }
 
-    return stackSumSkyfileRowAlloc(stack_id, uri, path_base, bg, bg_stdev, dtime_stack, hostname, good_frac, fault);
+    return stackSumSkyfileRowAlloc(stack_id, uri, path_base, bg, bg_stdev, dtime_stack, dtime_match_mean, dtime_match_stdev, dtime_initial, dtime_reject, dtime_final, dtime_phot, dtime_script, match_mean, match_stdev, match_rms, stamps_mean, stamps_stdev, stamps_min, reject_images, reject_pix_mean, reject_pix_stdev, sources, hostname, good_frac, fault);
 }
 psArray *stackSumSkyfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -15257,5 +17160,5 @@
 static void detRunRowFree(detRunRow *object);
 
-detRunRow *detRunRowAlloc(psS64 det_id, psS32 iteration, const char *det_type, const char *mode, const char *state, const char *filelevel, const char *workdir, const char *camera, const char *telescope, const char *exp_type, const char *reduction, const char *filter, psF32 airmass_min, psF32 airmass_max, psF32 exp_time_min, psF32 exp_time_max, psF32 ccd_temp_min, psF32 ccd_temp_max, psF64 posang_min, psF64 posang_max, psTime* registered, psTime* time_begin, psTime* time_end, psTime* use_begin, psTime* use_end, psF32 solang_min, psF32 solang_max, const char *label, psS32 parent)
+detRunRow *detRunRowAlloc(psS64 det_id, psS32 iteration, const char *det_type, const char *mode, const char *state, const char *filelevel, const char *workdir, const char *camera, const char *telescope, const char *exp_type, const char *reduction, const char *filter, psF32 airmass_min, psF32 airmass_max, psF32 exp_time_min, psF32 exp_time_max, psF32 ccd_temp_min, psF32 ccd_temp_max, psF64 posang_min, psF64 posang_max, psTime* registered, psTime* time_begin, psTime* time_end, psTime* use_begin, psTime* use_end, psF32 solang_min, psF32 solang_max, const char *label, psS64 ref_det_id, psS32 ref_iter)
 {
     detRunRow       *_object;
@@ -15292,5 +17195,6 @@
     _object->solang_max = solang_max;
     _object->label = psStringCopy(label);
-    _object->parent = parent;
+    _object->ref_det_id = ref_det_id;
+    _object->ref_iter = ref_iter;
 
     return _object;
@@ -15460,6 +17364,11 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "parent", PS_DATA_S32, "Key", 0)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item parent");
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "ref_det_id", PS_DATA_S64, "reference for 'verify' and 'correction' analysis", 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ref_det_id");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "ref_iter", PS_DATA_S32, "reference for 'verify' and 'correction' analysis", 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ref_iter");
         psFree(md);
         return false;
@@ -15478,5 +17387,5 @@
 }
 
-bool detRunInsert(psDB * dbh, psS64 det_id, psS32 iteration, const char *det_type, const char *mode, const char *state, const char *filelevel, const char *workdir, const char *camera, const char *telescope, const char *exp_type, const char *reduction, const char *filter, psF32 airmass_min, psF32 airmass_max, psF32 exp_time_min, psF32 exp_time_max, psF32 ccd_temp_min, psF32 ccd_temp_max, psF64 posang_min, psF64 posang_max, psTime* registered, psTime* time_begin, psTime* time_end, psTime* use_begin, psTime* use_end, psF32 solang_min, psF32 solang_max, const char *label, psS32 parent)
+bool detRunInsert(psDB * dbh, psS64 det_id, psS32 iteration, const char *det_type, const char *mode, const char *state, const char *filelevel, const char *workdir, const char *camera, const char *telescope, const char *exp_type, const char *reduction, const char *filter, psF32 airmass_min, psF32 airmass_max, psF32 exp_time_min, psF32 exp_time_max, psF32 ccd_temp_min, psF32 ccd_temp_max, psF64 posang_min, psF64 posang_max, psTime* registered, psTime* time_begin, psTime* time_end, psTime* use_begin, psTime* use_end, psF32 solang_min, psF32 solang_max, const char *label, psS64 ref_det_id, psS32 ref_iter)
 {
     psMetadata *md = psMetadataAlloc();
@@ -15621,6 +17530,11 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "parent", PS_DATA_S32, NULL, parent)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item parent");
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "ref_det_id", PS_DATA_S64, NULL, ref_det_id)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ref_det_id");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "ref_iter", PS_DATA_S32, NULL, ref_iter)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ref_iter");
         psFree(md);
         return false;
@@ -15649,5 +17563,5 @@
 bool detRunInsertObject(psDB *dbh, detRunRow *object)
 {
-    return detRunInsert(dbh, object->det_id, object->iteration, object->det_type, object->mode, object->state, object->filelevel, object->workdir, object->camera, object->telescope, object->exp_type, object->reduction, object->filter, object->airmass_min, object->airmass_max, object->exp_time_min, object->exp_time_max, object->ccd_temp_min, object->ccd_temp_max, object->posang_min, object->posang_max, object->registered, object->time_begin, object->time_end, object->use_begin, object->use_end, object->solang_min, object->solang_max, object->label, object->parent);
+    return detRunInsert(dbh, object->det_id, object->iteration, object->det_type, object->mode, object->state, object->filelevel, object->workdir, object->camera, object->telescope, object->exp_type, object->reduction, object->filter, object->airmass_min, object->airmass_max, object->exp_time_min, object->exp_time_max, object->ccd_temp_min, object->ccd_temp_max, object->posang_min, object->posang_max, object->registered, object->time_begin, object->time_end, object->use_begin, object->use_end, object->solang_min, object->solang_max, object->label, object->ref_det_id, object->ref_iter);
 }
 
@@ -15862,6 +17776,11 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "parent", PS_DATA_S32, NULL, object->parent)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item parent");
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "ref_det_id", PS_DATA_S64, NULL, object->ref_det_id)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ref_det_id");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "ref_iter", PS_DATA_S32, NULL, object->ref_iter)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ref_iter");
         psFree(md);
         return false;
@@ -16016,11 +17935,16 @@
         return false;
     }
-    psS32 parent = psMetadataLookupS32(&status, md, "parent");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item parent");
-        return false;
-    }
-
-    return detRunRowAlloc(det_id, iteration, det_type, mode, state, filelevel, workdir, camera, telescope, exp_type, reduction, filter, airmass_min, airmass_max, exp_time_min, exp_time_max, ccd_temp_min, ccd_temp_max, posang_min, posang_max, registered, time_begin, time_end, use_begin, use_end, solang_min, solang_max, label, parent);
+    psS64 ref_det_id = psMetadataLookupS64(&status, md, "ref_det_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item ref_det_id");
+        return false;
+    }
+    psS32 ref_iter = psMetadataLookupS32(&status, md, "ref_iter");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item ref_iter");
+        return false;
+    }
+
+    return detRunRowAlloc(det_id, iteration, det_type, mode, state, filelevel, workdir, camera, telescope, exp_type, reduction, filter, airmass_min, airmass_max, exp_time_min, exp_time_max, ccd_temp_min, ccd_temp_max, posang_min, posang_max, registered, time_begin, time_end, use_begin, use_end, solang_min, solang_max, label, ref_det_id, ref_iter);
 }
 psArray *detRunSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -16482,5 +18406,5 @@
 static void detProcessedImfileRowFree(detProcessedImfileRow *object);
 
-detProcessedImfileRow *detProcessedImfileRowAlloc(psS64 det_id, psS64 exp_id, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 fringe_0, psF64 fringe_1, psF64 fringe_2, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, psS16 fault)
+detProcessedImfileRow *detProcessedImfileRowAlloc(psS64 det_id, psS64 exp_id, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 fringe_0, psF64 fringe_1, psF64 fringe_2, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, const char *data_state, psS16 fault)
 {
     detProcessedImfileRow *_object;
@@ -16506,4 +18430,5 @@
     _object->user_5 = user_5;
     _object->path_base = psStringCopy(path_base);
+    _object->data_state = psStringCopy(data_state);
     _object->fault = fault;
 
@@ -16517,4 +18442,5 @@
     psFree(object->recipe);
     psFree(object->path_base);
+    psFree(object->data_state);
 }
 
@@ -16607,4 +18533,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, "full, cleaned, purged (only track end states; request states are in detRunSummary by iteration)", "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "Key NOT NULL", 0)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
@@ -16625,5 +18556,5 @@
 }
 
-bool detProcessedImfileInsert(psDB * dbh, psS64 det_id, psS64 exp_id, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 fringe_0, psF64 fringe_1, psF64 fringe_2, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, psS16 fault)
+bool detProcessedImfileInsert(psDB * dbh, psS64 det_id, psS64 exp_id, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 fringe_0, psF64 fringe_1, psF64 fringe_2, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, const char *data_state, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -16710,4 +18641,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, path_base)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item path_base");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
         psFree(md);
         return false;
@@ -16741,5 +18677,5 @@
 bool detProcessedImfileInsertObject(psDB *dbh, detProcessedImfileRow *object)
 {
-    return detProcessedImfileInsert(dbh, object->det_id, object->exp_id, object->class_id, object->uri, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->fringe_0, object->fringe_1, object->fringe_2, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->path_base, object->fault);
+    return detProcessedImfileInsert(dbh, object->det_id, object->exp_id, object->class_id, object->uri, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->fringe_0, object->fringe_1, object->fringe_2, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->path_base, object->data_state, object->fault);
 }
 
@@ -16899,4 +18835,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, object->data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, object->fault)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
@@ -16998,4 +18939,9 @@
         return false;
     }
+    char* data_state = psMetadataLookupPtr(&status, md, "data_state");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item data_state");
+        return false;
+    }
     psS16 fault = psMetadataLookupS16(&status, md, "fault");
     if (!status) {
@@ -17004,5 +18950,5 @@
     }
 
-    return detProcessedImfileRowAlloc(det_id, exp_id, class_id, uri, recipe, bg, bg_stdev, bg_mean_stdev, fringe_0, fringe_1, fringe_2, user_1, user_2, user_3, user_4, user_5, path_base, fault);
+    return detProcessedImfileRowAlloc(det_id, exp_id, class_id, uri, recipe, bg, bg_stdev, bg_mean_stdev, fringe_0, fringe_1, fringe_2, user_1, user_2, user_3, user_4, user_5, path_base, data_state, fault);
 }
 psArray *detProcessedImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -17122,5 +19068,5 @@
 static void detProcessedExpRowFree(detProcessedExpRow *object);
 
-detProcessedExpRow *detProcessedExpRowAlloc(psS64 det_id, psS64 exp_id, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 fringe_0, psF64 fringe_1, psF64 fringe_2, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, psS16 fault)
+detProcessedExpRow *detProcessedExpRowAlloc(psS64 det_id, psS64 exp_id, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 fringe_0, psF64 fringe_1, psF64 fringe_2, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, const char *data_state, psS16 fault)
 {
     detProcessedExpRow *_object;
@@ -17144,4 +19090,5 @@
     _object->user_5 = user_5;
     _object->path_base = psStringCopy(path_base);
+    _object->data_state = psStringCopy(data_state);
     _object->fault = fault;
 
@@ -17153,4 +19100,5 @@
     psFree(object->recipe);
     psFree(object->path_base);
+    psFree(object->data_state);
 }
 
@@ -17233,4 +19181,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, "full, cleaned, purged (only track end states; request states are in detRunSummary by iteration)", "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "Key NOT NULL", 0)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
@@ -17251,5 +19204,5 @@
 }
 
-bool detProcessedExpInsert(psDB * dbh, psS64 det_id, psS64 exp_id, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 fringe_0, psF64 fringe_1, psF64 fringe_2, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, psS16 fault)
+bool detProcessedExpInsert(psDB * dbh, psS64 det_id, psS64 exp_id, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 fringe_0, psF64 fringe_1, psF64 fringe_2, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, const char *data_state, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -17326,4 +19279,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, path_base)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item path_base");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
         psFree(md);
         return false;
@@ -17357,5 +19315,5 @@
 bool detProcessedExpInsertObject(psDB *dbh, detProcessedExpRow *object)
 {
-    return detProcessedExpInsert(dbh, object->det_id, object->exp_id, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->fringe_0, object->fringe_1, object->fringe_2, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->path_base, object->fault);
+    return detProcessedExpInsert(dbh, object->det_id, object->exp_id, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->fringe_0, object->fringe_1, object->fringe_2, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->path_base, object->data_state, object->fault);
 }
 
@@ -17505,4 +19463,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, object->data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, object->fault)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
@@ -17594,4 +19557,9 @@
         return false;
     }
+    char* data_state = psMetadataLookupPtr(&status, md, "data_state");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item data_state");
+        return false;
+    }
     psS16 fault = psMetadataLookupS16(&status, md, "fault");
     if (!status) {
@@ -17600,5 +19568,5 @@
     }
 
-    return detProcessedExpRowAlloc(det_id, exp_id, recipe, bg, bg_stdev, bg_mean_stdev, fringe_0, fringe_1, fringe_2, user_1, user_2, user_3, user_4, user_5, path_base, fault);
+    return detProcessedExpRowAlloc(det_id, exp_id, recipe, bg, bg_stdev, bg_mean_stdev, fringe_0, fringe_1, fringe_2, user_1, user_2, user_3, user_4, user_5, path_base, data_state, fault);
 }
 psArray *detProcessedExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -17718,5 +19686,5 @@
 static void detStackedImfileRowFree(detStackedImfileRow *object);
 
-detStackedImfileRow *detStackedImfileRowAlloc(psS64 det_id, psS32 iteration, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, psS16 fault)
+detStackedImfileRow *detStackedImfileRowAlloc(psS64 det_id, psS32 iteration, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *data_state, psS16 fault)
 {
     detStackedImfileRow *_object;
@@ -17738,4 +19706,5 @@
     _object->user_4 = user_4;
     _object->user_5 = user_5;
+    _object->data_state = psStringCopy(data_state);
     _object->fault = fault;
 
@@ -17748,4 +19717,5 @@
     psFree(object->uri);
     psFree(object->recipe);
+    psFree(object->data_state);
 }
 
@@ -17818,4 +19788,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, "full, cleaned, purged (only track end states; request states are in detRunSummary by iteration)", "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "Key NOT NULL", 0)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
@@ -17836,5 +19811,5 @@
 }
 
-bool detStackedImfileInsert(psDB * dbh, psS64 det_id, psS32 iteration, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, psS16 fault)
+bool detStackedImfileInsert(psDB * dbh, psS64 det_id, psS32 iteration, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *data_state, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -17901,4 +19876,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "user_5", PS_DATA_F64, NULL, user_5)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item user_5");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
         psFree(md);
         return false;
@@ -17932,5 +19912,5 @@
 bool detStackedImfileInsertObject(psDB *dbh, detStackedImfileRow *object)
 {
-    return detStackedImfileInsert(dbh, object->det_id, object->iteration, object->class_id, object->uri, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->fault);
+    return detStackedImfileInsert(dbh, object->det_id, object->iteration, object->class_id, object->uri, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->data_state, object->fault);
 }
 
@@ -18070,4 +20050,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, object->data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, object->fault)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
@@ -18149,4 +20134,9 @@
         return false;
     }
+    char* data_state = psMetadataLookupPtr(&status, md, "data_state");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item data_state");
+        return false;
+    }
     psS16 fault = psMetadataLookupS16(&status, md, "fault");
     if (!status) {
@@ -18155,5 +20145,5 @@
     }
 
-    return detStackedImfileRowAlloc(det_id, iteration, class_id, uri, recipe, bg, bg_stdev, bg_mean_stdev, user_1, user_2, user_3, user_4, user_5, fault);
+    return detStackedImfileRowAlloc(det_id, iteration, class_id, uri, recipe, bg, bg_stdev, bg_mean_stdev, user_1, user_2, user_3, user_4, user_5, data_state, fault);
 }
 psArray *detStackedImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -18273,5 +20263,5 @@
 static void detNormalizedStatImfileRowFree(detNormalizedStatImfileRow *object);
 
-detNormalizedStatImfileRow *detNormalizedStatImfileRowAlloc(psS64 det_id, psS32 iteration, const char *class_id, psF32 norm, psS16 fault)
+detNormalizedStatImfileRow *detNormalizedStatImfileRowAlloc(psS64 det_id, psS32 iteration, const char *class_id, psF32 norm, const char *data_state, psS16 fault)
 {
     detNormalizedStatImfileRow *_object;
@@ -18284,4 +20274,5 @@
     _object->class_id = psStringCopy(class_id);
     _object->norm = norm;
+    _object->data_state = psStringCopy(data_state);
     _object->fault = fault;
 
@@ -18292,4 +20283,5 @@
 {
     psFree(object->class_id);
+    psFree(object->data_state);
 }
 
@@ -18317,4 +20309,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, "full, cleaned, purged (only track end states; request states are in detRunSummary by iteration)", "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "Key NOT NULL", 0)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
@@ -18335,5 +20332,5 @@
 }
 
-bool detNormalizedStatImfileInsert(psDB * dbh, psS64 det_id, psS32 iteration, const char *class_id, psF32 norm, psS16 fault)
+bool detNormalizedStatImfileInsert(psDB * dbh, psS64 det_id, psS32 iteration, const char *class_id, psF32 norm, const char *data_state, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -18355,4 +20352,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "norm", PS_DATA_F32, NULL, norm)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item norm");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
         psFree(md);
         return false;
@@ -18386,5 +20388,5 @@
 bool detNormalizedStatImfileInsertObject(psDB *dbh, detNormalizedStatImfileRow *object)
 {
-    return detNormalizedStatImfileInsert(dbh, object->det_id, object->iteration, object->class_id, object->norm, object->fault);
+    return detNormalizedStatImfileInsert(dbh, object->det_id, object->iteration, object->class_id, object->norm, object->data_state, object->fault);
 }
 
@@ -18479,4 +20481,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, object->data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, object->fault)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
@@ -18513,4 +20520,9 @@
         return false;
     }
+    char* data_state = psMetadataLookupPtr(&status, md, "data_state");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item data_state");
+        return false;
+    }
     psS16 fault = psMetadataLookupS16(&status, md, "fault");
     if (!status) {
@@ -18519,5 +20531,5 @@
     }
 
-    return detNormalizedStatImfileRowAlloc(det_id, iteration, class_id, norm, fault);
+    return detNormalizedStatImfileRowAlloc(det_id, iteration, class_id, norm, data_state, fault);
 }
 psArray *detNormalizedStatImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -18637,5 +20649,5 @@
 static void detNormalizedImfileRowFree(detNormalizedImfileRow *object);
 
-detNormalizedImfileRow *detNormalizedImfileRowAlloc(psS64 det_id, psS32 iteration, const char *class_id, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, psS16 fault)
+detNormalizedImfileRow *detNormalizedImfileRowAlloc(psS64 det_id, psS32 iteration, const char *class_id, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, const char *data_state, psS16 fault)
 {
     detNormalizedImfileRow *_object;
@@ -18657,4 +20669,5 @@
     _object->user_5 = user_5;
     _object->path_base = psStringCopy(path_base);
+    _object->data_state = psStringCopy(data_state);
     _object->fault = fault;
 
@@ -18667,4 +20680,5 @@
     psFree(object->uri);
     psFree(object->path_base);
+    psFree(object->data_state);
 }
 
@@ -18737,4 +20751,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, "full, cleaned, purged (only track end states; request states are in detRunSummary by iteration)", "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "Key NOT NULL", 0)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
@@ -18755,5 +20774,5 @@
 }
 
-bool detNormalizedImfileInsert(psDB * dbh, psS64 det_id, psS32 iteration, const char *class_id, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, psS16 fault)
+bool detNormalizedImfileInsert(psDB * dbh, psS64 det_id, psS32 iteration, const char *class_id, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, const char *data_state, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -18820,4 +20839,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, path_base)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item path_base");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
         psFree(md);
         return false;
@@ -18851,5 +20875,5 @@
 bool detNormalizedImfileInsertObject(psDB *dbh, detNormalizedImfileRow *object)
 {
-    return detNormalizedImfileInsert(dbh, object->det_id, object->iteration, object->class_id, object->uri, object->bg, object->bg_stdev, object->bg_mean_stdev, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->path_base, object->fault);
+    return detNormalizedImfileInsert(dbh, object->det_id, object->iteration, object->class_id, object->uri, object->bg, object->bg_stdev, object->bg_mean_stdev, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->path_base, object->data_state, object->fault);
 }
 
@@ -18989,4 +21013,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, object->data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, object->fault)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
@@ -19068,4 +21097,9 @@
         return false;
     }
+    char* data_state = psMetadataLookupPtr(&status, md, "data_state");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item data_state");
+        return false;
+    }
     psS16 fault = psMetadataLookupS16(&status, md, "fault");
     if (!status) {
@@ -19074,5 +21108,5 @@
     }
 
-    return detNormalizedImfileRowAlloc(det_id, iteration, class_id, uri, bg, bg_stdev, bg_mean_stdev, user_1, user_2, user_3, user_4, user_5, path_base, fault);
+    return detNormalizedImfileRowAlloc(det_id, iteration, class_id, uri, bg, bg_stdev, bg_mean_stdev, user_1, user_2, user_3, user_4, user_5, path_base, data_state, fault);
 }
 psArray *detNormalizedImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -19192,5 +21226,5 @@
 static void detNormalizedExpRowFree(detNormalizedExpRow *object);
 
-detNormalizedExpRow *detNormalizedExpRowAlloc(psS64 det_id, psS32 iteration, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, psS16 fault)
+detNormalizedExpRow *detNormalizedExpRowAlloc(psS64 det_id, psS32 iteration, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, const char *data_state, psS16 fault)
 {
     detNormalizedExpRow *_object;
@@ -19211,4 +21245,5 @@
     _object->user_5 = user_5;
     _object->path_base = psStringCopy(path_base);
+    _object->data_state = psStringCopy(data_state);
     _object->fault = fault;
 
@@ -19220,4 +21255,5 @@
     psFree(object->recipe);
     psFree(object->path_base);
+    psFree(object->data_state);
 }
 
@@ -19285,4 +21321,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, "full, cleaned, purged (only track end states; request states are in detRunSummary by iteration)", "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "Key NOT NULL", 0)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
@@ -19303,5 +21344,5 @@
 }
 
-bool detNormalizedExpInsert(psDB * dbh, psS64 det_id, psS32 iteration, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, psS16 fault)
+bool detNormalizedExpInsert(psDB * dbh, psS64 det_id, psS32 iteration, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, const char *data_state, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -19363,4 +21404,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, path_base)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item path_base");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
         psFree(md);
         return false;
@@ -19394,5 +21440,5 @@
 bool detNormalizedExpInsertObject(psDB *dbh, detNormalizedExpRow *object)
 {
-    return detNormalizedExpInsert(dbh, object->det_id, object->iteration, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->path_base, object->fault);
+    return detNormalizedExpInsert(dbh, object->det_id, object->iteration, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->path_base, object->data_state, object->fault);
 }
 
@@ -19527,4 +21573,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, object->data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, object->fault)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
@@ -19601,4 +21652,9 @@
         return false;
     }
+    char* data_state = psMetadataLookupPtr(&status, md, "data_state");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item data_state");
+        return false;
+    }
     psS16 fault = psMetadataLookupS16(&status, md, "fault");
     if (!status) {
@@ -19607,5 +21663,5 @@
     }
 
-    return detNormalizedExpRowAlloc(det_id, iteration, recipe, bg, bg_stdev, bg_mean_stdev, user_1, user_2, user_3, user_4, user_5, path_base, fault);
+    return detNormalizedExpRowAlloc(det_id, iteration, recipe, bg, bg_stdev, bg_mean_stdev, user_1, user_2, user_3, user_4, user_5, path_base, data_state, fault);
 }
 psArray *detNormalizedExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -19725,5 +21781,5 @@
 static void detResidImfileRowFree(detResidImfileRow *object);
 
-detResidImfileRow *detResidImfileRowAlloc(psS64 det_id, psS32 iteration, psS64 exp_id, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 bg_skewness, psF64 bg_kurtosis, psF64 bin_stdev, psF64 fringe_0, psF64 fringe_1, psF64 fringe_2, psF64 fringe_resid_0, psF64 fringe_resid_1, psF64 fringe_resid_2, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, psS16 fault)
+detResidImfileRow *detResidImfileRowAlloc(psS64 det_id, psS32 iteration, psS64 ref_det_id, psS32 ref_iter, psS64 exp_id, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 bg_skewness, psF64 bg_kurtosis, psF64 bin_stdev, psF64 fringe_0, psF64 fringe_1, psF64 fringe_2, psF64 fringe_resid_0, psF64 fringe_resid_1, psF64 fringe_resid_2, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, const char *data_state, psS16 fault)
 {
     detResidImfileRow *_object;
@@ -19734,4 +21790,6 @@
     _object->det_id = det_id;
     _object->iteration = iteration;
+    _object->ref_det_id = ref_det_id;
+    _object->ref_iter = ref_iter;
     _object->exp_id = exp_id;
     _object->class_id = psStringCopy(class_id);
@@ -19756,4 +21814,5 @@
     _object->user_5 = user_5;
     _object->path_base = psStringCopy(path_base);
+    _object->data_state = psStringCopy(data_state);
     _object->fault = fault;
 
@@ -19767,4 +21826,5 @@
     psFree(object->recipe);
     psFree(object->path_base);
+    psFree(object->data_state);
 }
 
@@ -19782,4 +21842,14 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "ref_det_id", PS_DATA_S64, "detrend master actually applied (same as above for 'master', but not for 'verify')", 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ref_det_id");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "ref_iter", PS_DATA_S32, "detrend master actually applied (same as above for 'master', but not for 'verify')", 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ref_iter");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_id", PS_DATA_S64, "Primary Key fkey(det_id, iteration) ref detNormalizedExp(det_id, iteration)", 64)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id");
@@ -19892,4 +21962,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, "full, cleaned, purged (only track end states; request states are in detRunSummary by iteration)", "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "Key NOT NULL", 0)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
@@ -19910,5 +21985,5 @@
 }
 
-bool detResidImfileInsert(psDB * dbh, psS64 det_id, psS32 iteration, psS64 exp_id, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 bg_skewness, psF64 bg_kurtosis, psF64 bin_stdev, psF64 fringe_0, psF64 fringe_1, psF64 fringe_2, psF64 fringe_resid_0, psF64 fringe_resid_1, psF64 fringe_resid_2, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, psS16 fault)
+bool detResidImfileInsert(psDB * dbh, psS64 det_id, psS32 iteration, psS64 ref_det_id, psS32 ref_iter, psS64 exp_id, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 bg_skewness, psF64 bg_kurtosis, psF64 bin_stdev, psF64 fringe_0, psF64 fringe_1, psF64 fringe_2, psF64 fringe_resid_0, psF64 fringe_resid_1, psF64 fringe_resid_2, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, const char *data_state, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -19923,4 +21998,14 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "ref_det_id", PS_DATA_S64, NULL, ref_det_id)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ref_det_id");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "ref_iter", PS_DATA_S32, NULL, ref_iter)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ref_iter");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_id", PS_DATA_S64, NULL, exp_id)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id");
@@ -20030,4 +22115,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, path_base)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item path_base");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
         psFree(md);
         return false;
@@ -20061,5 +22151,5 @@
 bool detResidImfileInsertObject(psDB *dbh, detResidImfileRow *object)
 {
-    return detResidImfileInsert(dbh, object->det_id, object->iteration, object->exp_id, object->class_id, object->uri, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->bg_skewness, object->bg_kurtosis, object->bin_stdev, object->fringe_0, object->fringe_1, object->fringe_2, object->fringe_resid_0, object->fringe_resid_1, object->fringe_resid_2, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->path_base, object->fault);
+    return detResidImfileInsert(dbh, object->det_id, object->iteration, object->ref_det_id, object->ref_iter, object->exp_id, object->class_id, object->uri, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->bg_skewness, object->bg_kurtosis, object->bin_stdev, object->fringe_0, object->fringe_1, object->fringe_2, object->fringe_resid_0, object->fringe_resid_1, object->fringe_resid_2, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->path_base, object->data_state, object->fault);
 }
 
@@ -20144,4 +22234,14 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "ref_det_id", PS_DATA_S64, NULL, object->ref_det_id)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ref_det_id");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "ref_iter", PS_DATA_S32, NULL, object->ref_iter)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item ref_iter");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_id", PS_DATA_S64, NULL, object->exp_id)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id");
@@ -20254,4 +22354,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, object->data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, object->fault)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
@@ -20278,4 +22383,14 @@
         return false;
     }
+    psS64 ref_det_id = psMetadataLookupS64(&status, md, "ref_det_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item ref_det_id");
+        return false;
+    }
+    psS32 ref_iter = psMetadataLookupS32(&status, md, "ref_iter");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item ref_iter");
+        return false;
+    }
     psS64 exp_id = psMetadataLookupS64(&status, md, "exp_id");
     if (!status) {
@@ -20388,4 +22503,9 @@
         return false;
     }
+    char* data_state = psMetadataLookupPtr(&status, md, "data_state");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item data_state");
+        return false;
+    }
     psS16 fault = psMetadataLookupS16(&status, md, "fault");
     if (!status) {
@@ -20394,5 +22514,5 @@
     }
 
-    return detResidImfileRowAlloc(det_id, iteration, exp_id, class_id, uri, recipe, bg, bg_stdev, bg_mean_stdev, bg_skewness, bg_kurtosis, bin_stdev, fringe_0, fringe_1, fringe_2, fringe_resid_0, fringe_resid_1, fringe_resid_2, user_1, user_2, user_3, user_4, user_5, path_base, fault);
+    return detResidImfileRowAlloc(det_id, iteration, ref_det_id, ref_iter, exp_id, class_id, uri, recipe, bg, bg_stdev, bg_mean_stdev, bg_skewness, bg_kurtosis, bin_stdev, fringe_0, fringe_1, fringe_2, fringe_resid_0, fringe_resid_1, fringe_resid_2, user_1, user_2, user_3, user_4, user_5, path_base, data_state, fault);
 }
 psArray *detResidImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -20512,5 +22632,5 @@
 static void detResidExpRowFree(detResidExpRow *object);
 
-detResidExpRow *detResidExpRowAlloc(psS64 det_id, psS32 iteration, psS64 exp_id, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 bg_skewness, psF64 bg_kurtosis, psF64 bin_stdev, psF64 fringe_0, psF64 fringe_1, psF64 fringe_2, psF64 fringe_resid_0, psF64 fringe_resid_1, psF64 fringe_resid_2, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, bool accept, psS16 fault)
+detResidExpRow *detResidExpRowAlloc(psS64 det_id, psS32 iteration, psS64 exp_id, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 bg_skewness, psF64 bg_kurtosis, psF64 bin_stdev, psF64 fringe_0, psF64 fringe_1, psF64 fringe_2, psF64 fringe_resid_0, psF64 fringe_resid_1, psF64 fringe_resid_2, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, const char *data_state, bool accept, psS16 fault)
 {
     detResidExpRow  *_object;
@@ -20541,4 +22661,5 @@
     _object->user_5 = user_5;
     _object->path_base = psStringCopy(path_base);
+    _object->data_state = psStringCopy(data_state);
     _object->accept = accept;
     _object->fault = fault;
@@ -20551,4 +22672,5 @@
     psFree(object->recipe);
     psFree(object->path_base);
+    psFree(object->data_state);
 }
 
@@ -20666,4 +22788,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, "full, cleaned, purged (only track end states; request states are in detRunSummary by iteration)", "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "accept", PS_DATA_BOOL, NULL, 0)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item accept");
@@ -20689,5 +22816,5 @@
 }
 
-bool detResidExpInsert(psDB * dbh, psS64 det_id, psS32 iteration, psS64 exp_id, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 bg_skewness, psF64 bg_kurtosis, psF64 bin_stdev, psF64 fringe_0, psF64 fringe_1, psF64 fringe_2, psF64 fringe_resid_0, psF64 fringe_resid_1, psF64 fringe_resid_2, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, bool accept, psS16 fault)
+bool detResidExpInsert(psDB * dbh, psS64 det_id, psS32 iteration, psS64 exp_id, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 bg_skewness, psF64 bg_kurtosis, psF64 bin_stdev, psF64 fringe_0, psF64 fringe_1, psF64 fringe_2, psF64 fringe_resid_0, psF64 fringe_resid_1, psF64 fringe_resid_2, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, const char *data_state, bool accept, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -20799,4 +22926,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, path_base)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item path_base");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
         psFree(md);
         return false;
@@ -20835,5 +22967,5 @@
 bool detResidExpInsertObject(psDB *dbh, detResidExpRow *object)
 {
-    return detResidExpInsert(dbh, object->det_id, object->iteration, object->exp_id, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->bg_skewness, object->bg_kurtosis, object->bin_stdev, object->fringe_0, object->fringe_1, object->fringe_2, object->fringe_resid_0, object->fringe_resid_1, object->fringe_resid_2, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->path_base, object->accept, object->fault);
+    return detResidExpInsert(dbh, object->det_id, object->iteration, object->exp_id, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->bg_skewness, object->bg_kurtosis, object->bin_stdev, object->fringe_0, object->fringe_1, object->fringe_2, object->fringe_resid_0, object->fringe_resid_1, object->fringe_resid_2, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->path_base, object->data_state, object->accept, object->fault);
 }
 
@@ -21018,4 +23150,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, object->data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "accept", PS_DATA_BOOL, NULL, object->accept)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item accept");
@@ -21147,4 +23284,9 @@
         return false;
     }
+    char* data_state = psMetadataLookupPtr(&status, md, "data_state");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item data_state");
+        return false;
+    }
     bool accept = psMetadataLookupBool(&status, md, "accept");
     if (!status) {
@@ -21158,5 +23300,5 @@
     }
 
-    return detResidExpRowAlloc(det_id, iteration, exp_id, recipe, bg, bg_stdev, bg_mean_stdev, bg_skewness, bg_kurtosis, bin_stdev, fringe_0, fringe_1, fringe_2, fringe_resid_0, fringe_resid_1, fringe_resid_2, user_1, user_2, user_3, user_4, user_5, path_base, accept, fault);
+    return detResidExpRowAlloc(det_id, iteration, exp_id, recipe, bg, bg_stdev, bg_mean_stdev, bg_skewness, bg_kurtosis, bin_stdev, fringe_0, fringe_1, fringe_2, fringe_resid_0, fringe_resid_1, fringe_resid_2, user_1, user_2, user_3, user_4, user_5, path_base, data_state, accept, fault);
 }
 psArray *detResidExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -21276,5 +23418,5 @@
 static void detRunSummaryRowFree(detRunSummaryRow *object);
 
-detRunSummaryRow *detRunSummaryRowAlloc(psS64 det_id, psS32 iteration, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, bool accept, psS16 fault)
+detRunSummaryRow *detRunSummaryRowAlloc(psS64 det_id, psS32 iteration, const char *data_state, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, bool accept, psS16 fault)
 {
     detRunSummaryRow *_object;
@@ -21285,4 +23427,5 @@
     _object->det_id = det_id;
     _object->iteration = iteration;
+    _object->data_state = psStringCopy(data_state);
     _object->bg = bg;
     _object->bg_stdev = bg_stdev;
@@ -21296,4 +23439,5 @@
 static void detRunSummaryRowFree(detRunSummaryRow *object)
 {
+    psFree(object->data_state);
 }
 
@@ -21311,4 +23455,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, "full, goto_cleaned, cleaned, goto_full, goto_purged, purged", "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "bg", PS_DATA_F64, NULL, 0.0)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item bg");
@@ -21349,5 +23498,5 @@
 }
 
-bool detRunSummaryInsert(psDB * dbh, psS64 det_id, psS32 iteration, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, bool accept, psS16 fault)
+bool detRunSummaryInsert(psDB * dbh, psS64 det_id, psS32 iteration, const char *data_state, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, bool accept, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -21359,4 +23508,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "iteration", PS_DATA_S32, NULL, iteration)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item iteration");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
         psFree(md);
         return false;
@@ -21410,5 +23564,5 @@
 bool detRunSummaryInsertObject(psDB *dbh, detRunSummaryRow *object)
 {
-    return detRunSummaryInsert(dbh, object->det_id, object->iteration, object->bg, object->bg_stdev, object->bg_mean_stdev, object->accept, object->fault);
+    return detRunSummaryInsert(dbh, object->det_id, object->iteration, object->data_state, object->bg, object->bg_stdev, object->bg_mean_stdev, object->accept, object->fault);
 }
 
@@ -21493,4 +23647,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, object->data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "bg", PS_DATA_F64, NULL, object->bg)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item bg");
@@ -21537,4 +23696,9 @@
         return false;
     }
+    char* data_state = psMetadataLookupPtr(&status, md, "data_state");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item data_state");
+        return false;
+    }
     psF64 bg = psMetadataLookupF64(&status, md, "bg");
     if (!status) {
@@ -21563,5 +23727,5 @@
     }
 
-    return detRunSummaryRowAlloc(det_id, iteration, bg, bg_stdev, bg_mean_stdev, accept, fault);
+    return detRunSummaryRowAlloc(det_id, iteration, data_state, bg, bg_stdev, bg_mean_stdev, accept, fault);
 }
 psArray *detRunSummarySelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -21681,5 +23845,5 @@
 static void detRegisteredImfileRowFree(detRegisteredImfileRow *object);
 
-detRegisteredImfileRow *detRegisteredImfileRowAlloc(psS64 det_id, psS32 iteration, const char *class_id, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, psS16 fault)
+detRegisteredImfileRow *detRegisteredImfileRowAlloc(psS64 det_id, psS32 iteration, const char *class_id, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, const char *data_state, psS16 fault)
 {
     detRegisteredImfileRow *_object;
@@ -21701,4 +23865,5 @@
     _object->user_5 = user_5;
     _object->path_base = psStringCopy(path_base);
+    _object->data_state = psStringCopy(data_state);
     _object->fault = fault;
 
@@ -21711,4 +23876,5 @@
     psFree(object->uri);
     psFree(object->path_base);
+    psFree(object->data_state);
 }
 
@@ -21781,4 +23947,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, "full, cleaned, purged (only track end states; request states are in detRunSummary by iteration)", "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "Key NOT NULL", 0)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
@@ -21799,5 +23970,5 @@
 }
 
-bool detRegisteredImfileInsert(psDB * dbh, psS64 det_id, psS32 iteration, const char *class_id, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, psS16 fault)
+bool detRegisteredImfileInsert(psDB * dbh, psS64 det_id, psS32 iteration, const char *class_id, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *path_base, const char *data_state, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -21864,4 +24035,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, path_base)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item path_base");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
         psFree(md);
         return false;
@@ -21895,5 +24071,5 @@
 bool detRegisteredImfileInsertObject(psDB *dbh, detRegisteredImfileRow *object)
 {
-    return detRegisteredImfileInsert(dbh, object->det_id, object->iteration, object->class_id, object->uri, object->bg, object->bg_stdev, object->bg_mean_stdev, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->path_base, object->fault);
+    return detRegisteredImfileInsert(dbh, object->det_id, object->iteration, object->class_id, object->uri, object->bg, object->bg_stdev, object->bg_mean_stdev, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->path_base, object->data_state, object->fault);
 }
 
@@ -22033,4 +24209,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "data_state", PS_DATA_STRING, NULL, object->data_state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item data_state");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, object->fault)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
@@ -22112,4 +24293,9 @@
         return false;
     }
+    char* data_state = psMetadataLookupPtr(&status, md, "data_state");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item data_state");
+        return false;
+    }
     psS16 fault = psMetadataLookupS16(&status, md, "fault");
     if (!status) {
@@ -22118,5 +24304,5 @@
     }
 
-    return detRegisteredImfileRowAlloc(det_id, iteration, class_id, uri, bg, bg_stdev, bg_mean_stdev, user_1, user_2, user_3, user_4, user_5, path_base, fault);
+    return detRegisteredImfileRowAlloc(det_id, iteration, class_id, uri, bg, bg_stdev, bg_mean_stdev, user_1, user_2, user_3, user_4, user_5, path_base, data_state, fault);
 }
 psArray *detRegisteredImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -25506,5 +27692,5 @@
 static void flatcorrRunRowFree(flatcorrRunRow *object);
 
-flatcorrRunRow *flatcorrRunRowAlloc(psS64 corr_id, const char *dvodb, const char *filter, const char *state, const char *workdir, const char *label, const char *stats, const char *region)
+flatcorrRunRow *flatcorrRunRowAlloc(psS64 corr_id, const char *dvodb, const char *filter, const char *state, const char *workdir, const char *label, const char *reduction, const char *region, const char *hostname, psS16 fault)
 {
     flatcorrRunRow  *_object;
@@ -25519,6 +27705,8 @@
     _object->workdir = psStringCopy(workdir);
     _object->label = psStringCopy(label);
-    _object->stats = psStringCopy(stats);
+    _object->reduction = psStringCopy(reduction);
     _object->region = psStringCopy(region);
+    _object->hostname = psStringCopy(hostname);
+    _object->fault = fault;
 
     return _object;
@@ -25532,6 +27720,7 @@
     psFree(object->workdir);
     psFree(object->label);
-    psFree(object->stats);
+    psFree(object->reduction);
     psFree(object->region);
+    psFree(object->hostname);
 }
 
@@ -25569,14 +27758,24 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "stats", PS_DATA_STRING, NULL, "255")) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item stats");
-        psFree(md);
-        return false;
-    }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "region", PS_DATA_STRING, NULL, "255")) {
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item reduction");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "region", PS_DATA_STRING, NULL, "64")) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item region");
         psFree(md);
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "hostname", PS_DATA_STRING, NULL, "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item hostname");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "Key NOT NULL", 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
 
     bool status = psDBCreateTable(dbh, FLATCORRRUN_TABLE_NAME, md);
@@ -25592,5 +27791,5 @@
 }
 
-bool flatcorrRunInsert(psDB * dbh, psS64 corr_id, const char *dvodb, const char *filter, const char *state, const char *workdir, const char *label, const char *stats, const char *region)
+bool flatcorrRunInsert(psDB * dbh, psS64 corr_id, const char *dvodb, const char *filter, const char *state, const char *workdir, const char *label, const char *reduction, const char *region, const char *hostname, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -25625,6 +27824,6 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "stats", PS_DATA_STRING, NULL, stats)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item stats");
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, reduction)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item reduction");
         psFree(md);
         return false;
@@ -25632,4 +27831,14 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "region", PS_DATA_STRING, NULL, region)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item region");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "hostname", PS_DATA_STRING, NULL, hostname)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item hostname");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, fault)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
         psFree(md);
         return false;
@@ -25658,5 +27867,5 @@
 bool flatcorrRunInsertObject(psDB *dbh, flatcorrRunRow *object)
 {
-    return flatcorrRunInsert(dbh, object->corr_id, object->dvodb, object->filter, object->state, object->workdir, object->label, object->stats, object->region);
+    return flatcorrRunInsert(dbh, object->corr_id, object->dvodb, object->filter, object->state, object->workdir, object->label, object->reduction, object->region, object->hostname, object->fault);
 }
 
@@ -25761,6 +27970,6 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "stats", PS_DATA_STRING, NULL, object->stats)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item stats");
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, object->reduction)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item reduction");
         psFree(md);
         return false;
@@ -25771,4 +27980,14 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "hostname", PS_DATA_STRING, NULL, object->hostname)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item hostname");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, object->fault)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
 
 
@@ -25810,7 +28029,7 @@
         return false;
     }
-    char* stats = psMetadataLookupPtr(&status, md, "stats");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item stats");
+    char* reduction = psMetadataLookupPtr(&status, md, "reduction");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item reduction");
         return false;
     }
@@ -25820,6 +28039,16 @@
         return false;
     }
-
-    return flatcorrRunRowAlloc(corr_id, dvodb, filter, state, workdir, label, stats, region);
+    char* hostname = psMetadataLookupPtr(&status, md, "hostname");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item hostname");
+        return false;
+    }
+    psS16 fault = psMetadataLookupS16(&status, md, "fault");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item fault");
+        return false;
+    }
+
+    return flatcorrRunRowAlloc(corr_id, dvodb, filter, state, workdir, label, reduction, region, hostname, fault);
 }
 psArray *flatcorrRunSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -25937,12 +28166,12 @@
     return true;
 }
-static void flatcorrExpRowFree(flatcorrExpRow *object);
-
-flatcorrExpRow *flatcorrExpRowAlloc(psS64 corr_id, psS64 chip_id)
-{
-    flatcorrExpRow  *_object;
-
-    _object = psAlloc(sizeof(flatcorrExpRow));
-    psMemSetDeallocator(_object, (psFreeFunc)flatcorrExpRowFree);
+static void flatcorrChipLinkRowFree(flatcorrChipLinkRow *object);
+
+flatcorrChipLinkRow *flatcorrChipLinkRowAlloc(psS64 corr_id, psS64 chip_id)
+{
+    flatcorrChipLinkRow *_object;
+
+    _object = psAlloc(sizeof(flatcorrChipLinkRow));
+    psMemSetDeallocator(_object, (psFreeFunc)flatcorrChipLinkRowFree);
 
     _object->corr_id = corr_id;
@@ -25952,9 +28181,9 @@
 }
 
-static void flatcorrExpRowFree(flatcorrExpRow *object)
-{
-}
-
-bool flatcorrExpCreateTable(psDB *dbh)
+static void flatcorrChipLinkRowFree(flatcorrChipLinkRow *object)
+{
+}
+
+bool flatcorrChipLinkCreateTable(psDB *dbh)
 {
     psMetadata *md = psMetadataAlloc();
@@ -25964,5 +28193,5 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, "Primary Key fkey(chip_id) ref chipRun(chip_id)", 64)) {
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, "Primary Key fkey(chip_id) ref chipRun(chip_id)", 0)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id");
         psFree(md);
@@ -25970,5 +28199,5 @@
     }
 
-    bool status = psDBCreateTable(dbh, FLATCORREXP_TABLE_NAME, md);
+    bool status = psDBCreateTable(dbh, FLATCORRCHIPLINK_TABLE_NAME, md);
 
     psFree(md);
@@ -25977,10 +28206,10 @@
 }
 
-bool flatcorrExpDropTable(psDB *dbh)
-{
-    return psDBDropTable(dbh, FLATCORREXP_TABLE_NAME);
-}
-
-bool flatcorrExpInsert(psDB * dbh, psS64 corr_id, psS64 chip_id)
+bool flatcorrChipLinkDropTable(psDB *dbh)
+{
+    return psDBDropTable(dbh, FLATCORRCHIPLINK_TABLE_NAME);
+}
+
+bool flatcorrChipLinkInsert(psDB * dbh, psS64 corr_id, psS64 chip_id)
 {
     psMetadata *md = psMetadataAlloc();
@@ -25996,5 +28225,5 @@
     }
 
-    bool status = psDBInsertOneRow(dbh, FLATCORREXP_TABLE_NAME, md);
+    bool status = psDBInsertOneRow(dbh, FLATCORRCHIPLINK_TABLE_NAME, md);
     psFree(md);
 
@@ -26002,11 +28231,11 @@
 }
 
-long long flatcorrExpDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
+long long flatcorrChipLinkDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
 {
     long long       deleted = 0;
 
-    long long count = psDBDeleteRows(dbh, FLATCORREXP_TABLE_NAME, where, limit);
+    long long count = psDBDeleteRows(dbh, FLATCORRCHIPLINK_TABLE_NAME, where, limit);
     if (count < 0) {
-        psError(PS_ERR_UNKNOWN, true, "failed to delete row from flatcorrExp");
+        psError(PS_ERR_UNKNOWN, true, "failed to delete row from flatcorrChipLink");
         return count;
 
@@ -26016,13 +28245,13 @@
     return deleted;
 }
-bool flatcorrExpInsertObject(psDB *dbh, flatcorrExpRow *object)
-{
-    return flatcorrExpInsert(dbh, object->corr_id, object->chip_id);
-}
-
-bool flatcorrExpInsertObjects(psDB *dbh, psArray *objects)
+bool flatcorrChipLinkInsertObject(psDB *dbh, flatcorrChipLinkRow *object)
+{
+    return flatcorrChipLinkInsert(dbh, object->corr_id, object->chip_id);
+}
+
+bool flatcorrChipLinkInsertObjects(psDB *dbh, psArray *objects)
 {
     for (long i = 0; i < psArrayLength(objects); i++) {
-        if (!flatcorrExpInsertObject(dbh, objects->data[i])) {
+        if (!flatcorrChipLinkInsertObject(dbh, objects->data[i])) {
             return false;
         }
@@ -26032,11 +28261,11 @@
 }
 
-bool flatcorrExpInsertFits(psDB *dbh, const psFits *fits)
+bool flatcorrChipLinkInsertFits(psDB *dbh, const psFits *fits)
 {
     psArray         *rowSet;
 
-    // move to (the first?) extension named  FLATCORREXP_TABLE_NAME
-    if (!psFitsMoveExtName(fits, FLATCORREXP_TABLE_NAME)) {
-        psError(PS_ERR_UNKNOWN, true, "failed to find FITS extension %s", FLATCORREXP_TABLE_NAME);
+    // move to (the first?) extension named  FLATCORRCHIPLINK_TABLE_NAME
+    if (!psFitsMoveExtName(fits, FLATCORRCHIPLINK_TABLE_NAME)) {
+        psError(PS_ERR_UNKNOWN, true, "failed to find FITS extension %s", FLATCORRCHIPLINK_TABLE_NAME);
         return false;
     }
@@ -26056,5 +28285,5 @@
     }
 
-    if (!psDBInsertRows(dbh, FLATCORREXP_TABLE_NAME, rowSet)) {
+    if (!psDBInsertRows(dbh, FLATCORRCHIPLINK_TABLE_NAME, rowSet)) {
         psError(PS_ERR_UNKNOWN, false, "databse insert failed");
         psFree(rowSet);
@@ -26067,9 +28296,9 @@
 }
 
-bool flatcorrExpSelectRowsFits(psDB *dbh, psFits *fits, const psMetadata *where, unsigned long long limit)
+bool flatcorrChipLinkSelectRowsFits(psDB *dbh, psFits *fits, const psMetadata *where, unsigned long long limit)
 {
     psArray         *rowSet;
 
-    rowSet = psDBSelectRows(dbh, FLATCORREXP_TABLE_NAME, where, limit);
+    rowSet = psDBSelectRows(dbh, FLATCORRCHIPLINK_TABLE_NAME, where, limit);
     if (!rowSet) {
         return false;
@@ -26077,5 +28306,5 @@
 
     // output to fits
-    if (!psFitsWriteTable(fits, NULL, rowSet, FLATCORREXP_TABLE_NAME)) {
+    if (!psFitsWriteTable(fits, NULL, rowSet, FLATCORRCHIPLINK_TABLE_NAME)) {
         psError(PS_ERR_UNKNOWN, false, "FITS table write failed");
         psFree(rowSet);
@@ -26088,5 +28317,5 @@
 }
 
-psMetadata *flatcorrExpMetadataFromObject(const flatcorrExpRow *object)
+psMetadata *flatcorrChipLinkMetadataFromObject(const flatcorrChipLinkRow *object)
 {
     psMetadata *md = psMetadataAlloc();
@@ -26106,5 +28335,5 @@
 }
 
-flatcorrExpRow *flatcorrExpObjectFromMetadata(psMetadata *md)
+flatcorrChipLinkRow *flatcorrChipLinkObjectFromMetadata(psMetadata *md)
 {
 
@@ -26121,7 +28350,7 @@
     }
 
-    return flatcorrExpRowAlloc(corr_id, chip_id);
-}
-psArray *flatcorrExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
+    return flatcorrChipLinkRowAlloc(corr_id, chip_id);
+}
+psArray *flatcorrChipLinkSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
 {
     psArray         *rowSet;
@@ -26129,5 +28358,5 @@
     psU64           i;
 
-    rowSet = psDBSelectRows(dbh, FLATCORREXP_TABLE_NAME, where, limit);
+    rowSet = psDBSelectRows(dbh, FLATCORRCHIPLINK_TABLE_NAME, where, limit);
     if (!rowSet) {
         return NULL;
@@ -26139,5 +28368,5 @@
 
     for (i = 0; i < rowSet->n; i++) {
-        flatcorrExpRow *object = flatcorrExpObjectFromMetadata(rowSet->data[i]);
+        flatcorrChipLinkRow *object = flatcorrChipLinkObjectFromMetadata(rowSet->data[i]);
         if (!object) {
             psFree(object);
@@ -26154,11 +28383,11 @@
     return returnSet;
 }
-bool flatcorrExpDeleteObject(psDB *dbh, const flatcorrExpRow *object)
-{
-    psMetadata *where = flatcorrExpMetadataFromObject(object);
-    long long count = psDBDeleteRows(dbh, FLATCORREXP_TABLE_NAME, where, 0);
+bool flatcorrChipLinkDeleteObject(psDB *dbh, const flatcorrChipLinkRow *object)
+{
+    psMetadata *where = flatcorrChipLinkMetadataFromObject(object);
+    long long count = psDBDeleteRows(dbh, FLATCORRCHIPLINK_TABLE_NAME, where, 0);
     psFree(where);
     if (count < 0) {
-        psError(PS_ERR_UNKNOWN, true, "failed to delete row from flatcorrExp");
+        psError(PS_ERR_UNKNOWN, true, "failed to delete row from flatcorrChipLink");
         return false;
     }
@@ -26166,21 +28395,21 @@
         // XXX should this be a psAbort() instead?  It is possible that
         // having an object match multiple rows was by design.
-        psError(PS_ERR_UNKNOWN, true, "flatcorrExpRow object matched more then one row.  Check your database schema");
-        return false;
-    }
-
-    return true;
-}
-long long flatcorrExpDeleteRowObjects(psDB *dbh, const psArray *objects, unsigned long long limit)
+        psError(PS_ERR_UNKNOWN, true, "flatcorrChipLinkRow object matched more then one row.  Check your database schema");
+        return false;
+    }
+
+    return true;
+}
+long long flatcorrChipLinkDeleteRowObjects(psDB *dbh, const psArray *objects, unsigned long long limit)
 {
     long long       deleted = 0;
 
     for (long long i = 0; i < objects->n; i++) {
-        flatcorrExpRow *object = objects->data[i];
-        psMetadata *where = flatcorrExpMetadataFromObject(object);
-        long long count = psDBDeleteRows(dbh, FLATCORREXP_TABLE_NAME, where, limit);
+        flatcorrChipLinkRow *object = objects->data[i];
+        psMetadata *where = flatcorrChipLinkMetadataFromObject(object);
+        long long count = psDBDeleteRows(dbh, FLATCORRCHIPLINK_TABLE_NAME, where, limit);
         psFree(where);
         if (count < 0) {
-            psError(PS_ERR_UNKNOWN, true, "failed to delete row from flatcorrExp");
+            psError(PS_ERR_UNKNOWN, true, "failed to delete row from flatcorrChipLink");
             return count;
         }
@@ -26191,5 +28420,5 @@
     return deleted;
 }
-bool flatcorrExpPrintObjects(FILE *stream, psArray *objects, bool mdcf)
+bool flatcorrChipLinkPrintObjects(FILE *stream, psArray *objects, bool mdcf)
 {
     PS_ASSERT_PTR_NON_NULL(objects, false);
@@ -26197,9 +28426,9 @@
     psMetadata *output = psMetadataAlloc();
     for (long i = 0; i < psArrayLength(objects); i++) {
-        psMetadata *md = flatcorrExpMetadataFromObject(objects->data[i]);
+        psMetadata *md = flatcorrChipLinkMetadataFromObject(objects->data[i]);
         if (!psMetadataAddMetadata(
             output,
             PS_LIST_TAIL,
-            FLATCORREXP_TABLE_NAME,
+            FLATCORRCHIPLINK_TABLE_NAME,
             PS_META_DUPLICATE_OK,
             NULL,
@@ -26222,9 +28451,330 @@
     return true;
 }
-bool flatcorrExpPrintObject(FILE *stream, flatcorrExpRow *object, bool mdcf)
+bool flatcorrChipLinkPrintObject(FILE *stream, flatcorrChipLinkRow *object, bool mdcf)
 {
     PS_ASSERT_PTR_NON_NULL(object, false);
 
-    psMetadata *md = flatcorrExpMetadataFromObject(object);
+    psMetadata *md = flatcorrChipLinkMetadataFromObject(object);
+
+    if (!ippdbPrintMetadataRaw(stream, md, mdcf)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to print metadata");
+        psFree(md);
+    }
+
+    psFree(md);
+
+    return true;
+}
+static void flatcorrCamLinkRowFree(flatcorrCamLinkRow *object);
+
+flatcorrCamLinkRow *flatcorrCamLinkRowAlloc(psS64 corr_id, psS64 chip_id, psS64 cam_id)
+{
+    flatcorrCamLinkRow *_object;
+
+    _object = psAlloc(sizeof(flatcorrCamLinkRow));
+    psMemSetDeallocator(_object, (psFreeFunc)flatcorrCamLinkRowFree);
+
+    _object->corr_id = corr_id;
+    _object->chip_id = chip_id;
+    _object->cam_id = cam_id;
+
+    return _object;
+}
+
+static void flatcorrCamLinkRowFree(flatcorrCamLinkRow *object)
+{
+}
+
+bool flatcorrCamLinkCreateTable(psDB *dbh)
+{
+    psMetadata *md = psMetadataAlloc();
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "corr_id", PS_DATA_S64, "Primary Key fkey(corr_id) ref flatcorrRun(corr_id)", 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item corr_id");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, "Primary Key fkey(chip_id) ref chipRun(chip_id)", 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_id", PS_DATA_S64, "Primary Key fkey(chip_id) ref chipRun(chip_id)", 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item cam_id");
+        psFree(md);
+        return false;
+    }
+
+    bool status = psDBCreateTable(dbh, FLATCORRCAMLINK_TABLE_NAME, md);
+
+    psFree(md);
+
+    return status;
+}
+
+bool flatcorrCamLinkDropTable(psDB *dbh)
+{
+    return psDBDropTable(dbh, FLATCORRCAMLINK_TABLE_NAME);
+}
+
+bool flatcorrCamLinkInsert(psDB * dbh, psS64 corr_id, psS64 chip_id, psS64 cam_id)
+{
+    psMetadata *md = psMetadataAlloc();
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "corr_id", PS_DATA_S64, NULL, corr_id)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item corr_id");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, NULL, chip_id)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_id", PS_DATA_S64, NULL, cam_id)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item cam_id");
+        psFree(md);
+        return false;
+    }
+
+    bool status = psDBInsertOneRow(dbh, FLATCORRCAMLINK_TABLE_NAME, md);
+    psFree(md);
+
+    return status;
+}
+
+long long flatcorrCamLinkDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
+{
+    long long       deleted = 0;
+
+    long long count = psDBDeleteRows(dbh, FLATCORRCAMLINK_TABLE_NAME, where, limit);
+    if (count < 0) {
+        psError(PS_ERR_UNKNOWN, true, "failed to delete row from flatcorrCamLink");
+        return count;
+
+        deleted += count;
+    }
+
+    return deleted;
+}
+bool flatcorrCamLinkInsertObject(psDB *dbh, flatcorrCamLinkRow *object)
+{
+    return flatcorrCamLinkInsert(dbh, object->corr_id, object->chip_id, object->cam_id);
+}
+
+bool flatcorrCamLinkInsertObjects(psDB *dbh, psArray *objects)
+{
+    for (long i = 0; i < psArrayLength(objects); i++) {
+        if (!flatcorrCamLinkInsertObject(dbh, objects->data[i])) {
+            return false;
+        }
+    }
+
+    return true;
+}
+
+bool flatcorrCamLinkInsertFits(psDB *dbh, const psFits *fits)
+{
+    psArray         *rowSet;
+
+    // move to (the first?) extension named  FLATCORRCAMLINK_TABLE_NAME
+    if (!psFitsMoveExtName(fits, FLATCORRCAMLINK_TABLE_NAME)) {
+        psError(PS_ERR_UNKNOWN, true, "failed to find FITS extension %s", FLATCORRCAMLINK_TABLE_NAME);
+        return false;
+    }
+
+    // check HDU type
+    if (psFitsGetExtType(fits) != PS_FITS_TYPE_BINARY_TABLE)  {
+        psError(PS_ERR_UNKNOWN, true, "FITS HDU type is not PS_FITS_TYPE_BINARY_TABLE");
+        return false;
+    }
+
+    // read fits table
+    rowSet = psFitsReadTable(fits);
+    if (!rowSet) {
+        psError(PS_ERR_UNKNOWN, true, "FITS read error or FITS table is empty");
+        psFree(rowSet);
+        return false;
+    }
+
+    if (!psDBInsertRows(dbh, FLATCORRCAMLINK_TABLE_NAME, rowSet)) {
+        psError(PS_ERR_UNKNOWN, false, "databse insert failed");
+        psFree(rowSet);
+        return false;
+    }
+
+    psFree(rowSet);
+
+    return true;
+}
+
+bool flatcorrCamLinkSelectRowsFits(psDB *dbh, psFits *fits, const psMetadata *where, unsigned long long limit)
+{
+    psArray         *rowSet;
+
+    rowSet = psDBSelectRows(dbh, FLATCORRCAMLINK_TABLE_NAME, where, limit);
+    if (!rowSet) {
+        return false;
+    }
+
+    // output to fits
+    if (!psFitsWriteTable(fits, NULL, rowSet, FLATCORRCAMLINK_TABLE_NAME)) {
+        psError(PS_ERR_UNKNOWN, false, "FITS table write failed");
+        psFree(rowSet);
+        return false;
+    }
+
+    psFree(rowSet);
+
+    return true;
+}
+
+psMetadata *flatcorrCamLinkMetadataFromObject(const flatcorrCamLinkRow *object)
+{
+    psMetadata *md = psMetadataAlloc();
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "corr_id", PS_DATA_S64, NULL, object->corr_id)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item corr_id");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, NULL, object->chip_id)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "cam_id", PS_DATA_S64, NULL, object->cam_id)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item cam_id");
+        psFree(md);
+        return false;
+    }
+
+
+    return md;
+}
+
+flatcorrCamLinkRow *flatcorrCamLinkObjectFromMetadata(psMetadata *md)
+{
+
+bool status = false;
+    psS64 corr_id = psMetadataLookupS64(&status, md, "corr_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item corr_id");
+        return false;
+    }
+    psS64 chip_id = psMetadataLookupS64(&status, md, "chip_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item chip_id");
+        return false;
+    }
+    psS64 cam_id = psMetadataLookupS64(&status, md, "cam_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item cam_id");
+        return false;
+    }
+
+    return flatcorrCamLinkRowAlloc(corr_id, chip_id, cam_id);
+}
+psArray *flatcorrCamLinkSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
+{
+    psArray         *rowSet;
+    psArray         *returnSet;
+    psU64           i;
+
+    rowSet = psDBSelectRows(dbh, FLATCORRCAMLINK_TABLE_NAME, where, limit);
+    if (!rowSet) {
+        return NULL;
+    }
+
+    // convert psMetadata rows to row objects
+
+    returnSet = psArrayAllocEmpty(rowSet->n);
+
+    for (i = 0; i < rowSet->n; i++) {
+        flatcorrCamLinkRow *object = flatcorrCamLinkObjectFromMetadata(rowSet->data[i]);
+        if (!object) {
+            psFree(object);
+            psFree(returnSet);
+            psError(PS_ERR_UNKNOWN, false, "database error");
+            return NULL;
+        }
+        psArrayAdd(returnSet, 0, object);
+        psFree(object);
+    }
+
+    psFree(rowSet);
+
+    return returnSet;
+}
+bool flatcorrCamLinkDeleteObject(psDB *dbh, const flatcorrCamLinkRow *object)
+{
+    psMetadata *where = flatcorrCamLinkMetadataFromObject(object);
+    long long count = psDBDeleteRows(dbh, FLATCORRCAMLINK_TABLE_NAME, where, 0);
+    psFree(where);
+    if (count < 0) {
+        psError(PS_ERR_UNKNOWN, true, "failed to delete row from flatcorrCamLink");
+        return false;
+    }
+    if (count > 1) {
+        // XXX should this be a psAbort() instead?  It is possible that
+        // having an object match multiple rows was by design.
+        psError(PS_ERR_UNKNOWN, true, "flatcorrCamLinkRow object matched more then one row.  Check your database schema");
+        return false;
+    }
+
+    return true;
+}
+long long flatcorrCamLinkDeleteRowObjects(psDB *dbh, const psArray *objects, unsigned long long limit)
+{
+    long long       deleted = 0;
+
+    for (long long i = 0; i < objects->n; i++) {
+        flatcorrCamLinkRow *object = objects->data[i];
+        psMetadata *where = flatcorrCamLinkMetadataFromObject(object);
+        long long count = psDBDeleteRows(dbh, FLATCORRCAMLINK_TABLE_NAME, where, limit);
+        psFree(where);
+        if (count < 0) {
+            psError(PS_ERR_UNKNOWN, true, "failed to delete row from flatcorrCamLink");
+            return count;
+        }
+
+        deleted += count;
+    }
+
+    return deleted;
+}
+bool flatcorrCamLinkPrintObjects(FILE *stream, psArray *objects, bool mdcf)
+{
+    PS_ASSERT_PTR_NON_NULL(objects, false);
+
+    psMetadata *output = psMetadataAlloc();
+    for (long i = 0; i < psArrayLength(objects); i++) {
+        psMetadata *md = flatcorrCamLinkMetadataFromObject(objects->data[i]);
+        if (!psMetadataAddMetadata(
+            output,
+            PS_LIST_TAIL,
+            FLATCORRCAMLINK_TABLE_NAME,
+            PS_META_DUPLICATE_OK,
+            NULL,
+            md
+        )) {
+            psError(PS_ERR_UNKNOWN, false, "failed to add metadata");
+            psFree(md);
+            psFree(output);
+            return false;
+        }
+        psFree(md);
+    }
+
+    if (!ippdbPrintMetadataRaw(stream, output, mdcf)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to print metadata");
+        psFree(output);
+    }
+    psFree(output);
+
+    return true;
+}
+bool flatcorrCamLinkPrintObject(FILE *stream, flatcorrCamLinkRow *object, bool mdcf)
+{
+    PS_ASSERT_PTR_NON_NULL(object, false);
+
+    psMetadata *md = flatcorrCamLinkMetadataFromObject(object);
 
     if (!ippdbPrintMetadataRaw(stream, md, mdcf)) {
@@ -26604,4 +29154,436 @@
     return true;
 }
+static void pstampProjectRowFree(pstampProjectRow *object);
+
+pstampProjectRow *pstampProjectRowAlloc(psS64 proj_id, const char *name, const char *state, const char *dbname, const char *dvodb, const char *camera, const char *telescope, bool need_magic)
+{
+    pstampProjectRow *_object;
+
+    _object = psAlloc(sizeof(pstampProjectRow));
+    psMemSetDeallocator(_object, (psFreeFunc)pstampProjectRowFree);
+
+    _object->proj_id = proj_id;
+    _object->name = psStringCopy(name);
+    _object->state = psStringCopy(state);
+    _object->dbname = psStringCopy(dbname);
+    _object->dvodb = psStringCopy(dvodb);
+    _object->camera = psStringCopy(camera);
+    _object->telescope = psStringCopy(telescope);
+    _object->need_magic = need_magic;
+
+    return _object;
+}
+
+static void pstampProjectRowFree(pstampProjectRow *object)
+{
+    psFree(object->name);
+    psFree(object->state);
+    psFree(object->dbname);
+    psFree(object->dvodb);
+    psFree(object->camera);
+    psFree(object->telescope);
+}
+
+bool pstampProjectCreateTable(psDB *dbh)
+{
+    psMetadata *md = psMetadataAlloc();
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "proj_id", PS_DATA_S64, "Primary Key AUTO_INCREMENT", 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item proj_id");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "name", PS_DATA_STRING, "UNIQUE", "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item name");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "state", PS_DATA_STRING, NULL, "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item state");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dbname", PS_DATA_STRING, NULL, "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dbname");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "camera", PS_DATA_STRING, NULL, "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item camera");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "telescope", PS_DATA_STRING, NULL, "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item telescope");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "need_magic", PS_DATA_BOOL, NULL, 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item need_magic");
+        psFree(md);
+        return false;
+    }
+
+    bool status = psDBCreateTable(dbh, PSTAMPPROJECT_TABLE_NAME, md);
+
+    psFree(md);
+
+    return status;
+}
+
+bool pstampProjectDropTable(psDB *dbh)
+{
+    return psDBDropTable(dbh, PSTAMPPROJECT_TABLE_NAME);
+}
+
+bool pstampProjectInsert(psDB * dbh, psS64 proj_id, const char *name, const char *state, const char *dbname, const char *dvodb, const char *camera, const char *telescope, bool need_magic)
+{
+    psMetadata *md = psMetadataAlloc();
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "proj_id", PS_DATA_S64, NULL, proj_id)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item proj_id");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "name", PS_DATA_STRING, NULL, name)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item name");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "state", PS_DATA_STRING, NULL, state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item state");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dbname", PS_DATA_STRING, NULL, dbname)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dbname");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, dvodb)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "camera", PS_DATA_STRING, NULL, camera)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item camera");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "telescope", PS_DATA_STRING, NULL, telescope)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item telescope");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "need_magic", PS_DATA_BOOL, NULL, need_magic)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item need_magic");
+        psFree(md);
+        return false;
+    }
+
+    bool status = psDBInsertOneRow(dbh, PSTAMPPROJECT_TABLE_NAME, md);
+    psFree(md);
+
+    return status;
+}
+
+long long pstampProjectDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
+{
+    long long       deleted = 0;
+
+    long long count = psDBDeleteRows(dbh, PSTAMPPROJECT_TABLE_NAME, where, limit);
+    if (count < 0) {
+        psError(PS_ERR_UNKNOWN, true, "failed to delete row from pstampProject");
+        return count;
+
+        deleted += count;
+    }
+
+    return deleted;
+}
+bool pstampProjectInsertObject(psDB *dbh, pstampProjectRow *object)
+{
+    return pstampProjectInsert(dbh, object->proj_id, object->name, object->state, object->dbname, object->dvodb, object->camera, object->telescope, object->need_magic);
+}
+
+bool pstampProjectInsertObjects(psDB *dbh, psArray *objects)
+{
+    for (long i = 0; i < psArrayLength(objects); i++) {
+        if (!pstampProjectInsertObject(dbh, objects->data[i])) {
+            return false;
+        }
+    }
+
+    return true;
+}
+
+bool pstampProjectInsertFits(psDB *dbh, const psFits *fits)
+{
+    psArray         *rowSet;
+
+    // move to (the first?) extension named  PSTAMPPROJECT_TABLE_NAME
+    if (!psFitsMoveExtName(fits, PSTAMPPROJECT_TABLE_NAME)) {
+        psError(PS_ERR_UNKNOWN, true, "failed to find FITS extension %s", PSTAMPPROJECT_TABLE_NAME);
+        return false;
+    }
+
+    // check HDU type
+    if (psFitsGetExtType(fits) != PS_FITS_TYPE_BINARY_TABLE)  {
+        psError(PS_ERR_UNKNOWN, true, "FITS HDU type is not PS_FITS_TYPE_BINARY_TABLE");
+        return false;
+    }
+
+    // read fits table
+    rowSet = psFitsReadTable(fits);
+    if (!rowSet) {
+        psError(PS_ERR_UNKNOWN, true, "FITS read error or FITS table is empty");
+        psFree(rowSet);
+        return false;
+    }
+
+    if (!psDBInsertRows(dbh, PSTAMPPROJECT_TABLE_NAME, rowSet)) {
+        psError(PS_ERR_UNKNOWN, false, "databse insert failed");
+        psFree(rowSet);
+        return false;
+    }
+
+    psFree(rowSet);
+
+    return true;
+}
+
+bool pstampProjectSelectRowsFits(psDB *dbh, psFits *fits, const psMetadata *where, unsigned long long limit)
+{
+    psArray         *rowSet;
+
+    rowSet = psDBSelectRows(dbh, PSTAMPPROJECT_TABLE_NAME, where, limit);
+    if (!rowSet) {
+        return false;
+    }
+
+    // output to fits
+    if (!psFitsWriteTable(fits, NULL, rowSet, PSTAMPPROJECT_TABLE_NAME)) {
+        psError(PS_ERR_UNKNOWN, false, "FITS table write failed");
+        psFree(rowSet);
+        return false;
+    }
+
+    psFree(rowSet);
+
+    return true;
+}
+
+psMetadata *pstampProjectMetadataFromObject(const pstampProjectRow *object)
+{
+    psMetadata *md = psMetadataAlloc();
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "proj_id", PS_DATA_S64, NULL, object->proj_id)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item proj_id");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "name", PS_DATA_STRING, NULL, object->name)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item name");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "state", PS_DATA_STRING, NULL, object->state)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item state");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dbname", PS_DATA_STRING, NULL, object->dbname)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dbname");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, object->dvodb)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "camera", PS_DATA_STRING, NULL, object->camera)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item camera");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "telescope", PS_DATA_STRING, NULL, object->telescope)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item telescope");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "need_magic", PS_DATA_BOOL, NULL, object->need_magic)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item need_magic");
+        psFree(md);
+        return false;
+    }
+
+
+    return md;
+}
+
+pstampProjectRow *pstampProjectObjectFromMetadata(psMetadata *md)
+{
+
+bool status = false;
+    psS64 proj_id = psMetadataLookupS64(&status, md, "proj_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item proj_id");
+        return false;
+    }
+    char* name = psMetadataLookupPtr(&status, md, "name");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item name");
+        return false;
+    }
+    char* state = psMetadataLookupPtr(&status, md, "state");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item state");
+        return false;
+    }
+    char* dbname = psMetadataLookupPtr(&status, md, "dbname");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dbname");
+        return false;
+    }
+    char* dvodb = psMetadataLookupPtr(&status, md, "dvodb");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dvodb");
+        return false;
+    }
+    char* camera = psMetadataLookupPtr(&status, md, "camera");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item camera");
+        return false;
+    }
+    char* telescope = psMetadataLookupPtr(&status, md, "telescope");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item telescope");
+        return false;
+    }
+    bool need_magic = psMetadataLookupBool(&status, md, "need_magic");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item need_magic");
+        return false;
+    }
+
+    return pstampProjectRowAlloc(proj_id, name, state, dbname, dvodb, camera, telescope, need_magic);
+}
+psArray *pstampProjectSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
+{
+    psArray         *rowSet;
+    psArray         *returnSet;
+    psU64           i;
+
+    rowSet = psDBSelectRows(dbh, PSTAMPPROJECT_TABLE_NAME, where, limit);
+    if (!rowSet) {
+        return NULL;
+    }
+
+    // convert psMetadata rows to row objects
+
+    returnSet = psArrayAllocEmpty(rowSet->n);
+
+    for (i = 0; i < rowSet->n; i++) {
+        pstampProjectRow *object = pstampProjectObjectFromMetadata(rowSet->data[i]);
+        if (!object) {
+            psFree(object);
+            psFree(returnSet);
+            psError(PS_ERR_UNKNOWN, false, "database error");
+            return NULL;
+        }
+        psArrayAdd(returnSet, 0, object);
+        psFree(object);
+    }
+
+    psFree(rowSet);
+
+    return returnSet;
+}
+bool pstampProjectDeleteObject(psDB *dbh, const pstampProjectRow *object)
+{
+    psMetadata *where = pstampProjectMetadataFromObject(object);
+    long long count = psDBDeleteRows(dbh, PSTAMPPROJECT_TABLE_NAME, where, 0);
+    psFree(where);
+    if (count < 0) {
+        psError(PS_ERR_UNKNOWN, true, "failed to delete row from pstampProject");
+        return false;
+    }
+    if (count > 1) {
+        // XXX should this be a psAbort() instead?  It is possible that
+        // having an object match multiple rows was by design.
+        psError(PS_ERR_UNKNOWN, true, "pstampProjectRow object matched more then one row.  Check your database schema");
+        return false;
+    }
+
+    return true;
+}
+long long pstampProjectDeleteRowObjects(psDB *dbh, const psArray *objects, unsigned long long limit)
+{
+    long long       deleted = 0;
+
+    for (long long i = 0; i < objects->n; i++) {
+        pstampProjectRow *object = objects->data[i];
+        psMetadata *where = pstampProjectMetadataFromObject(object);
+        long long count = psDBDeleteRows(dbh, PSTAMPPROJECT_TABLE_NAME, where, limit);
+        psFree(where);
+        if (count < 0) {
+            psError(PS_ERR_UNKNOWN, true, "failed to delete row from pstampProject");
+            return count;
+        }
+
+        deleted += count;
+    }
+
+    return deleted;
+}
+bool pstampProjectPrintObjects(FILE *stream, psArray *objects, bool mdcf)
+{
+    PS_ASSERT_PTR_NON_NULL(objects, false);
+
+    psMetadata *output = psMetadataAlloc();
+    for (long i = 0; i < psArrayLength(objects); i++) {
+        psMetadata *md = pstampProjectMetadataFromObject(objects->data[i]);
+        if (!psMetadataAddMetadata(
+            output,
+            PS_LIST_TAIL,
+            PSTAMPPROJECT_TABLE_NAME,
+            PS_META_DUPLICATE_OK,
+            NULL,
+            md
+        )) {
+            psError(PS_ERR_UNKNOWN, false, "failed to add metadata");
+            psFree(md);
+            psFree(output);
+            return false;
+        }
+        psFree(md);
+    }
+
+    if (!ippdbPrintMetadataRaw(stream, output, mdcf)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to print metadata");
+        psFree(output);
+    }
+    psFree(output);
+
+    return true;
+}
+bool pstampProjectPrintObject(FILE *stream, pstampProjectRow *object, bool mdcf)
+{
+    PS_ASSERT_PTR_NON_NULL(object, false);
+
+    psMetadata *md = pstampProjectMetadataFromObject(object);
+
+    if (!ippdbPrintMetadataRaw(stream, md, mdcf)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to print metadata");
+        psFree(md);
+    }
+
+    psFree(md);
+
+    return true;
+}
 static void pstampRequestRowFree(pstampRequestRow *object);
 
@@ -27037,5 +30019,5 @@
 static void pstampJobRowFree(pstampJobRow *object);
 
-pstampJobRow *pstampJobRowAlloc(psS64 job_id, psS64 req_id, const char *rownum, const char *state, const char *jobType, psS32 fault, const char *uri, const char *outputBase, const char *args)
+pstampJobRow *pstampJobRowAlloc(psS64 job_id, psS64 req_id, const char *rownum, const char *state, const char *jobType, psS32 fault, const char *uri, psS64 exp_id, const char *outputBase, const char *args)
 {
     pstampJobRow    *_object;
@@ -27051,4 +30033,5 @@
     _object->fault = fault;
     _object->uri = psStringCopy(uri);
+    _object->exp_id = exp_id;
     _object->outputBase = psStringCopy(outputBase);
     _object->args = psStringCopy(args);
@@ -27105,4 +30088,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_id", PS_DATA_S64, NULL, 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "outputBase", PS_DATA_STRING, NULL, "255")) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item outputBase");
@@ -27128,5 +30116,5 @@
 }
 
-bool pstampJobInsert(psDB * dbh, psS64 job_id, psS64 req_id, const char *rownum, const char *state, const char *jobType, psS32 fault, const char *uri, const char *outputBase, const char *args)
+bool pstampJobInsert(psDB * dbh, psS64 job_id, psS64 req_id, const char *rownum, const char *state, const char *jobType, psS32 fault, const char *uri, psS64 exp_id, const char *outputBase, const char *args)
 {
     psMetadata *md = psMetadataAlloc();
@@ -27163,4 +30151,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "uri", PS_DATA_STRING, NULL, uri)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item uri");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_id", PS_DATA_S64, NULL, exp_id)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id");
         psFree(md);
         return false;
@@ -27199,5 +30192,5 @@
 bool pstampJobInsertObject(psDB *dbh, pstampJobRow *object)
 {
-    return pstampJobInsert(dbh, object->job_id, object->req_id, object->rownum, object->state, object->jobType, object->fault, object->uri, object->outputBase, object->args);
+    return pstampJobInsert(dbh, object->job_id, object->req_id, object->rownum, object->state, object->jobType, object->fault, object->uri, object->exp_id, object->outputBase, object->args);
 }
 
@@ -27307,4 +30300,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_id", PS_DATA_S64, NULL, object->exp_id)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "outputBase", PS_DATA_STRING, NULL, object->outputBase)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item outputBase");
@@ -27361,4 +30359,9 @@
         return false;
     }
+    psS64 exp_id = psMetadataLookupS64(&status, md, "exp_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item exp_id");
+        return false;
+    }
     char* outputBase = psMetadataLookupPtr(&status, md, "outputBase");
     if (!status) {
@@ -27372,5 +30375,5 @@
     }
 
-    return pstampJobRowAlloc(job_id, req_id, rownum, state, jobType, fault, uri, outputBase, args);
+    return pstampJobRowAlloc(job_id, req_id, rownum, state, jobType, fault, uri, exp_id, outputBase, args);
 }
 psArray *pstampJobSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
Index: /trunk/ippdb/src/ippdb.h
===================================================================
--- /trunk/ippdb/src/ippdb.h	(revision 20204)
+++ /trunk/ippdb/src/ippdb.h	(revision 20205)
@@ -1649,4 +1649,6 @@
     char            *filter;
     char            *comment;
+    char            *obs_mode;
+    char            *obs_group;
     psF32           airmass;
     psF64           ra;
@@ -1688,5 +1690,9 @@
     psF64           user_5;
     char            *object;
-    psF32           solang;
+    psF32           sun_angle;
+    psF32           sun_alt;
+    psF32           moon_angle;
+    psF32           moon_alt;
+    psF32           moon_phase;
     char            *hostname;
     psS16           fault;
@@ -1715,4 +1721,6 @@
     const char      *filter,
     const char      *comment,
+    const char      *obs_mode,
+    const char      *obs_group,
     psF32           airmass,
     psF64           ra,
@@ -1754,5 +1762,9 @@
     psF64           user_5,
     const char      *object,
-    psF32           solang,
+    psF32           sun_angle,
+    psF32           sun_alt,
+    psF32           moon_angle,
+    psF32           moon_alt,
+    psF32           moon_phase,
     const char      *hostname,
     psS16           fault,
@@ -1802,4 +1814,6 @@
     const char      *filter,
     const char      *comment,
+    const char      *obs_mode,
+    const char      *obs_group,
     psF32           airmass,
     psF64           ra,
@@ -1841,5 +1855,9 @@
     psF64           user_5,
     const char      *object,
-    psF32           solang,
+    psF32           sun_angle,
+    psF32           sun_alt,
+    psF32           moon_angle,
+    psF32           moon_alt,
+    psF32           moon_phase,
     const char      *hostname,
     psS16           fault,
@@ -2012,4 +2030,6 @@
     char            *filter;
     char            *comment;
+    char            *obs_mode;
+    char            *obs_group;
     psF32           airmass;
     psF64           ra;
@@ -2051,4 +2071,9 @@
     psF64           user_5;
     char            *object;
+    psF32           sun_angle;
+    psF32           sun_alt;
+    psF32           moon_angle;
+    psF32           moon_alt;
+    psF32           moon_phase;
     char            *hostname;
     psS16           fault;
@@ -2074,4 +2099,6 @@
     const char      *filter,
     const char      *comment,
+    const char      *obs_mode,
+    const char      *obs_group,
     psF32           airmass,
     psF64           ra,
@@ -2113,4 +2140,9 @@
     psF64           user_5,
     const char      *object,
+    psF32           sun_angle,
+    psF32           sun_alt,
+    psF32           moon_angle,
+    psF32           moon_alt,
+    psF32           moon_phase,
     const char      *hostname,
     psS16           fault,
@@ -2157,4 +2189,6 @@
     const char      *filter,
     const char      *comment,
+    const char      *obs_mode,
+    const char      *obs_group,
     psF32           airmass,
     psF64           ra,
@@ -2196,4 +2230,9 @@
     psF64           user_5,
     const char      *object,
+    psF32           sun_angle,
+    psF32           sun_alt,
+    psF32           moon_angle,
+    psF32           moon_alt,
+    psF32           moon_phase,
     const char      *hostname,
     psS16           fault,
@@ -2783,4 +2822,5 @@
     psS64           exp_id;
     char            *class_id;
+    char            *data_state;
     char            *uri;
     psF32           bg;
@@ -2792,20 +2832,38 @@
     psF32           fringe_1;
     psF32           fringe_2;
-    psF32           sigma_ra;
-    psF32           sigma_dec;
     psF32           ap_resid;
     psF32           ap_resid_stdev;
-    psF32           zp_mean;
-    psF32           zp_stdev;
     psF32           fwhm_major;
     psF32           fwhm_minor;
+    psF32           iq_m2;
+    psF32           iq_m2_err;
+    psF32           iq_m2_lq;
+    psF32           iq_m2_uq;
+    psF32           iq_m2c;
+    psF32           iq_m2c_err;
+    psF32           iq_m2c_lq;
+    psF32           iq_m2c_uq;
+    psF32           iq_m2s;
+    psF32           iq_m2s_err;
+    psF32           iq_m2s_lq;
+    psF32           iq_m2s_uq;
+    psF32           iq_m3;
+    psF32           iq_m3_err;
+    psF32           iq_m3_lq;
+    psF32           iq_m3_uq;
+    psF32           iq_m4;
+    psF32           iq_m4_err;
+    psF32           iq_m4_lq;
+    psF32           iq_m4_uq;
     psF32           dtime_detrend;
     psF32           dtime_photom;
-    psF32           dtime_astrom;
+    psF32           dtime_total;
+    psF32           dtime_script;
     char            *hostname;
     psS32           n_stars;
+    psS32           n_psfstars;
+    psS32           n_iqstars;
     psS32           n_extended;
     psS32           n_cr;
-    psS32           n_astrom;
     char            *path_base;
     psS16           fault;
@@ -2821,4 +2879,5 @@
     psS64           exp_id,
     const char      *class_id,
+    const char      *data_state,
     const char      *uri,
     psF32           bg,
@@ -2830,20 +2889,38 @@
     psF32           fringe_1,
     psF32           fringe_2,
-    psF32           sigma_ra,
-    psF32           sigma_dec,
     psF32           ap_resid,
     psF32           ap_resid_stdev,
-    psF32           zp_mean,
-    psF32           zp_stdev,
     psF32           fwhm_major,
     psF32           fwhm_minor,
+    psF32           iq_m2,
+    psF32           iq_m2_err,
+    psF32           iq_m2_lq,
+    psF32           iq_m2_uq,
+    psF32           iq_m2c,
+    psF32           iq_m2c_err,
+    psF32           iq_m2c_lq,
+    psF32           iq_m2c_uq,
+    psF32           iq_m2s,
+    psF32           iq_m2s_err,
+    psF32           iq_m2s_lq,
+    psF32           iq_m2s_uq,
+    psF32           iq_m3,
+    psF32           iq_m3_err,
+    psF32           iq_m3_lq,
+    psF32           iq_m3_uq,
+    psF32           iq_m4,
+    psF32           iq_m4_err,
+    psF32           iq_m4_lq,
+    psF32           iq_m4_uq,
     psF32           dtime_detrend,
     psF32           dtime_photom,
-    psF32           dtime_astrom,
+    psF32           dtime_total,
+    psF32           dtime_script,
     const char      *hostname,
     psS32           n_stars,
+    psS32           n_psfstars,
+    psS32           n_iqstars,
     psS32           n_extended,
     psS32           n_cr,
-    psS32           n_astrom,
     const char      *path_base,
     psS16           fault
@@ -2880,4 +2957,5 @@
     psS64           exp_id,
     const char      *class_id,
+    const char      *data_state,
     const char      *uri,
     psF32           bg,
@@ -2889,20 +2967,38 @@
     psF32           fringe_1,
     psF32           fringe_2,
-    psF32           sigma_ra,
-    psF32           sigma_dec,
     psF32           ap_resid,
     psF32           ap_resid_stdev,
-    psF32           zp_mean,
-    psF32           zp_stdev,
     psF32           fwhm_major,
     psF32           fwhm_minor,
+    psF32           iq_m2,
+    psF32           iq_m2_err,
+    psF32           iq_m2_lq,
+    psF32           iq_m2_uq,
+    psF32           iq_m2c,
+    psF32           iq_m2c_err,
+    psF32           iq_m2c_lq,
+    psF32           iq_m2c_uq,
+    psF32           iq_m2s,
+    psF32           iq_m2s_err,
+    psF32           iq_m2s_lq,
+    psF32           iq_m2s_uq,
+    psF32           iq_m3,
+    psF32           iq_m3_err,
+    psF32           iq_m3_lq,
+    psF32           iq_m3_uq,
+    psF32           iq_m4,
+    psF32           iq_m4_err,
+    psF32           iq_m4_lq,
+    psF32           iq_m4_uq,
     psF32           dtime_detrend,
     psF32           dtime_photom,
-    psF32           dtime_astrom,
+    psF32           dtime_total,
+    psF32           dtime_script,
     const char      *hostname,
     psS32           n_stars,
+    psS32           n_psfstars,
+    psS32           n_iqstars,
     psS32           n_extended,
     psS32           n_cr,
-    psS32           n_astrom,
     const char      *path_base,
     psS16           fault
@@ -3500,9 +3596,31 @@
     psF32           fwhm_major;
     psF32           fwhm_minor;
-    psF32           dtime_detrend;
-    psF32           dtime_photom;
+    psF32           iq_m2;
+    psF32           iq_m2_err;
+    psF32           iq_m2_lq;
+    psF32           iq_m2_uq;
+    psF32           iq_m2c;
+    psF32           iq_m2c_err;
+    psF32           iq_m2c_lq;
+    psF32           iq_m2c_uq;
+    psF32           iq_m2s;
+    psF32           iq_m2s_err;
+    psF32           iq_m2s_lq;
+    psF32           iq_m2s_uq;
+    psF32           iq_m3;
+    psF32           iq_m3_err;
+    psF32           iq_m3_lq;
+    psF32           iq_m3_uq;
+    psF32           iq_m4;
+    psF32           iq_m4_err;
+    psF32           iq_m4_lq;
+    psF32           iq_m4_uq;
+    psF32           dtime_script;
     psF32           dtime_astrom;
+    psF32           dtime_addstar;
     char            *hostname;
     psS32           n_stars;
+    psS32           n_psfstars;
+    psS32           n_iqstars;
     psS32           n_extended;
     psS32           n_cr;
@@ -3536,9 +3654,31 @@
     psF32           fwhm_major,
     psF32           fwhm_minor,
-    psF32           dtime_detrend,
-    psF32           dtime_photom,
+    psF32           iq_m2,
+    psF32           iq_m2_err,
+    psF32           iq_m2_lq,
+    psF32           iq_m2_uq,
+    psF32           iq_m2c,
+    psF32           iq_m2c_err,
+    psF32           iq_m2c_lq,
+    psF32           iq_m2c_uq,
+    psF32           iq_m2s,
+    psF32           iq_m2s_err,
+    psF32           iq_m2s_lq,
+    psF32           iq_m2s_uq,
+    psF32           iq_m3,
+    psF32           iq_m3_err,
+    psF32           iq_m3_lq,
+    psF32           iq_m3_uq,
+    psF32           iq_m4,
+    psF32           iq_m4_err,
+    psF32           iq_m4_lq,
+    psF32           iq_m4_uq,
+    psF32           dtime_script,
     psF32           dtime_astrom,
+    psF32           dtime_addstar,
     const char      *hostname,
     psS32           n_stars,
+    psS32           n_psfstars,
+    psS32           n_iqstars,
     psS32           n_extended,
     psS32           n_cr,
@@ -3593,9 +3733,31 @@
     psF32           fwhm_major,
     psF32           fwhm_minor,
-    psF32           dtime_detrend,
-    psF32           dtime_photom,
+    psF32           iq_m2,
+    psF32           iq_m2_err,
+    psF32           iq_m2_lq,
+    psF32           iq_m2_uq,
+    psF32           iq_m2c,
+    psF32           iq_m2c_err,
+    psF32           iq_m2c_lq,
+    psF32           iq_m2c_uq,
+    psF32           iq_m2s,
+    psF32           iq_m2s_err,
+    psF32           iq_m2s_lq,
+    psF32           iq_m2s_uq,
+    psF32           iq_m3,
+    psF32           iq_m3_err,
+    psF32           iq_m3_lq,
+    psF32           iq_m3_uq,
+    psF32           iq_m4,
+    psF32           iq_m4_err,
+    psF32           iq_m4_lq,
+    psF32           iq_m4_uq,
+    psF32           dtime_script,
     psF32           dtime_astrom,
+    psF32           dtime_addstar,
     const char      *hostname,
     psS32           n_stars,
+    psS32           n_psfstars,
+    psS32           n_iqstars,
     psS32           n_extended,
     psS32           n_cr,
@@ -4183,6 +4345,8 @@
     char            *uri;
     psF32           dtime_fake;
+    psF32           dtime_script;
     char            *hostname;
     char            *path_base;
+    char            *data_state;
     psS16           fault;
     psTime*         epoch;
@@ -4200,6 +4364,8 @@
     const char      *uri,
     psF32           dtime_fake,
+    psF32           dtime_script,
     const char      *hostname,
     const char      *path_base,
+    const char      *data_state,
     psS16           fault,
     psTime*         epoch
@@ -4238,6 +4404,8 @@
     const char      *uri,
     psF32           dtime_fake,
+    psF32           dtime_script,
     const char      *hostname,
     const char      *path_base,
+    const char      *data_state,
     psS16           fault,
     psTime*         epoch
@@ -5032,7 +5200,9 @@
     char            *uri;
     char            *path_base;
+    char            *data_state;
     psF64           bg;
     psF64           bg_stdev;
     psF32           dtime_warp;
+    psF32           dtime_script;
     char            *hostname;
     psF32           good_frac;
@@ -5056,7 +5226,9 @@
     const char      *uri,
     const char      *path_base,
+    const char      *data_state,
     psF64           bg,
     psF64           bg_stdev,
     psF32           dtime_warp,
+    psF32           dtime_script,
     const char      *hostname,
     psF32           good_frac,
@@ -5101,7 +5273,9 @@
     const char      *uri,
     const char      *path_base,
+    const char      *data_state,
     psF64           bg,
     psF64           bg_stdev,
     psF32           dtime_warp,
+    psF32           dtime_script,
     const char      *hostname,
     psF32           good_frac,
@@ -5464,4 +5638,6 @@
     psS64           diff_id;
     char            *state;
+    char            *label;
+    char            *reduction;
     char            *workdir;
     char            *dvodb;
@@ -5479,4 +5655,6 @@
     psS64           diff_id,
     const char      *state,
+    const char      *label,
+    const char      *reduction,
     const char      *workdir,
     const char      *dvodb,
@@ -5515,4 +5693,6 @@
     psS64           diff_id,
     const char      *state,
+    const char      *label,
+    const char      *reduction,
     const char      *workdir,
     const char      *dvodb,
@@ -5894,7 +6074,18 @@
     psF64           bg_stdev;
     psS32           stamps_num;
+    psF32           stamps_mean;
     psF32           stamps_rms;
+    psF32           norm;
+    psF32           bg_diff;
+    psF32           kernel_x;
+    psF32           kernel_y;
+    psF32           kernel_xx;
+    psF32           kernel_xy;
+    psF32           kernel_yy;
     psS32           sources;
     psF32           dtime_diff;
+    psF32           dtime_match;
+    psF32           dtime_phot;
+    psF32           dtime_script;
     char            *hostname;
     psF32           good_frac;
@@ -5914,7 +6105,18 @@
     psF64           bg_stdev,
     psS32           stamps_num,
+    psF32           stamps_mean,
     psF32           stamps_rms,
+    psF32           norm,
+    psF32           bg_diff,
+    psF32           kernel_x,
+    psF32           kernel_y,
+    psF32           kernel_xx,
+    psF32           kernel_xy,
+    psF32           kernel_yy,
     psS32           sources,
     psF32           dtime_diff,
+    psF32           dtime_match,
+    psF32           dtime_phot,
+    psF32           dtime_script,
     const char      *hostname,
     psF32           good_frac,
@@ -5955,7 +6157,18 @@
     psF64           bg_stdev,
     psS32           stamps_num,
+    psF32           stamps_mean,
     psF32           stamps_rms,
+    psF32           norm,
+    psF32           bg_diff,
+    psF32           kernel_x,
+    psF32           kernel_y,
+    psF32           kernel_xx,
+    psF32           kernel_xy,
+    psF32           kernel_yy,
     psS32           sources,
     psF32           dtime_diff,
+    psF32           dtime_match,
+    psF32           dtime_phot,
+    psF32           dtime_script,
     const char      *hostname,
     psF32           good_frac,
@@ -6119,4 +6332,6 @@
     char            *state;
     char            *workdir;
+    char            *label;
+    char            *reduction;
     char            *dvodb;
     psTime*         registered;
@@ -6135,4 +6350,6 @@
     const char      *state,
     const char      *workdir,
+    const char      *label,
+    const char      *reduction,
     const char      *dvodb,
     psTime*         registered,
@@ -6172,4 +6389,6 @@
     const char      *state,
     const char      *workdir,
+    const char      *label,
+    const char      *reduction,
     const char      *dvodb,
     psTime*         registered,
@@ -6536,4 +6755,21 @@
     psF64           bg_stdev;
     psF32           dtime_stack;
+    psF32           dtime_match_mean;
+    psF32           dtime_match_stdev;
+    psF32           dtime_initial;
+    psF32           dtime_reject;
+    psF32           dtime_final;
+    psF32           dtime_phot;
+    psF32           dtime_script;
+    psF32           match_mean;
+    psF32           match_stdev;
+    psF32           match_rms;
+    psF32           stamps_mean;
+    psF32           stamps_stdev;
+    psS32           stamps_min;
+    psS32           reject_images;
+    psF32           reject_pix_mean;
+    psF32           reject_pix_stdev;
+    psS32           sources;
     char            *hostname;
     psF32           good_frac;
@@ -6553,4 +6789,21 @@
     psF64           bg_stdev,
     psF32           dtime_stack,
+    psF32           dtime_match_mean,
+    psF32           dtime_match_stdev,
+    psF32           dtime_initial,
+    psF32           dtime_reject,
+    psF32           dtime_final,
+    psF32           dtime_phot,
+    psF32           dtime_script,
+    psF32           match_mean,
+    psF32           match_stdev,
+    psF32           match_rms,
+    psF32           stamps_mean,
+    psF32           stamps_stdev,
+    psS32           stamps_min,
+    psS32           reject_images,
+    psF32           reject_pix_mean,
+    psF32           reject_pix_stdev,
+    psS32           sources,
     const char      *hostname,
     psF32           good_frac,
@@ -6591,4 +6844,21 @@
     psF64           bg_stdev,
     psF32           dtime_stack,
+    psF32           dtime_match_mean,
+    psF32           dtime_match_stdev,
+    psF32           dtime_initial,
+    psF32           dtime_reject,
+    psF32           dtime_final,
+    psF32           dtime_phot,
+    psF32           dtime_script,
+    psF32           match_mean,
+    psF32           match_stdev,
+    psF32           match_rms,
+    psF32           stamps_mean,
+    psF32           stamps_stdev,
+    psS32           stamps_min,
+    psS32           reject_images,
+    psF32           reject_pix_mean,
+    psF32           reject_pix_stdev,
+    psS32           sources,
     const char      *hostname,
     psF32           good_frac,
@@ -6777,5 +7047,6 @@
     psF32           solang_max;
     char            *label;
-    psS32           parent;
+    psS64           ref_det_id;
+    psS32           ref_iter;
 } detRunRow;
 
@@ -6814,5 +7085,6 @@
     psF32           solang_max,
     const char      *label,
-    psS32           parent
+    psS64           ref_det_id,
+    psS32           ref_iter
 );
 
@@ -6872,5 +7144,6 @@
     psF32           solang_max,
     const char      *label,
-    psS32           parent
+    psS64           ref_det_id,
+    psS32           ref_iter
 );
 
@@ -7249,4 +7522,5 @@
     psF64           user_5;
     char            *path_base;
+    char            *data_state;
     psS16           fault;
 } detProcessedImfileRow;
@@ -7275,4 +7549,5 @@
     psF64           user_5,
     const char      *path_base,
+    const char      *data_state,
     psS16           fault
 );
@@ -7322,4 +7597,5 @@
     psF64           user_5,
     const char      *path_base,
+    const char      *data_state,
     psS16           fault
 );
@@ -7493,4 +7769,5 @@
     psF64           user_5;
     char            *path_base;
+    char            *data_state;
     psS16           fault;
 } detProcessedExpRow;
@@ -7517,4 +7794,5 @@
     psF64           user_5,
     const char      *path_base,
+    const char      *data_state,
     psS16           fault
 );
@@ -7562,4 +7840,5 @@
     psF64           user_5,
     const char      *path_base,
+    const char      *data_state,
     psS16           fault
 );
@@ -7731,4 +8010,5 @@
     psF64           user_4;
     psF64           user_5;
+    char            *data_state;
     psS16           fault;
 } detStackedImfileRow;
@@ -7753,4 +8033,5 @@
     psF64           user_4,
     psF64           user_5,
+    const char      *data_state,
     psS16           fault
 );
@@ -7796,4 +8077,5 @@
     psF64           user_4,
     psF64           user_5,
+    const char      *data_state,
     psS16           fault
 );
@@ -7956,4 +8238,5 @@
     char            *class_id;
     psF32           norm;
+    char            *data_state;
     psS16           fault;
 } detNormalizedStatImfileRow;
@@ -7969,4 +8252,5 @@
     const char      *class_id,
     psF32           norm,
+    const char      *data_state,
     psS16           fault
 );
@@ -8003,4 +8287,5 @@
     const char      *class_id,
     psF32           norm,
+    const char      *data_state,
     psS16           fault
 );
@@ -8172,4 +8457,5 @@
     psF64           user_5;
     char            *path_base;
+    char            *data_state;
     psS16           fault;
 } detNormalizedImfileRow;
@@ -8194,4 +8480,5 @@
     psF64           user_5,
     const char      *path_base,
+    const char      *data_state,
     psS16           fault
 );
@@ -8237,4 +8524,5 @@
     psF64           user_5,
     const char      *path_base,
+    const char      *data_state,
     psS16           fault
 );
@@ -8405,4 +8693,5 @@
     psF64           user_5;
     char            *path_base;
+    char            *data_state;
     psS16           fault;
 } detNormalizedExpRow;
@@ -8426,4 +8715,5 @@
     psF64           user_5,
     const char      *path_base,
+    const char      *data_state,
     psS16           fault
 );
@@ -8468,4 +8758,5 @@
     psF64           user_5,
     const char      *path_base,
+    const char      *data_state,
     psS16           fault
 );
@@ -8626,4 +8917,6 @@
     psS64           det_id;
     psS32           iteration;
+    psS64           ref_det_id;
+    psS32           ref_iter;
     psS64           exp_id;
     char            *class_id;
@@ -8648,4 +8941,5 @@
     psF64           user_5;
     char            *path_base;
+    char            *data_state;
     psS16           fault;
 } detResidImfileRow;
@@ -8659,4 +8953,6 @@
     psS64           det_id,
     psS32           iteration,
+    psS64           ref_det_id,
+    psS32           ref_iter,
     psS64           exp_id,
     const char      *class_id,
@@ -8681,4 +8977,5 @@
     psF64           user_5,
     const char      *path_base,
+    const char      *data_state,
     psS16           fault
 );
@@ -8713,4 +9010,6 @@
     psS64           det_id,
     psS32           iteration,
+    psS64           ref_det_id,
+    psS32           ref_iter,
     psS64           exp_id,
     const char      *class_id,
@@ -8735,4 +9034,5 @@
     psF64           user_5,
     const char      *path_base,
+    const char      *data_state,
     psS16           fault
 );
@@ -8913,4 +9213,5 @@
     psF64           user_5;
     char            *path_base;
+    char            *data_state;
     bool            accept;
     psS16           fault;
@@ -8945,4 +9246,5 @@
     psF64           user_5,
     const char      *path_base,
+    const char      *data_state,
     bool            accept,
     psS16           fault
@@ -8998,4 +9300,5 @@
     psF64           user_5,
     const char      *path_base,
+    const char      *data_state,
     bool            accept,
     psS16           fault
@@ -9157,4 +9460,5 @@
     psS64           det_id;
     psS32           iteration;
+    char            *data_state;
     psF64           bg;
     psF64           bg_stdev;
@@ -9172,4 +9476,5 @@
     psS64           det_id,
     psS32           iteration,
+    const char      *data_state,
     psF64           bg,
     psF64           bg_stdev,
@@ -9208,4 +9513,5 @@
     psS64           det_id,
     psS32           iteration,
+    const char      *data_state,
     psF64           bg,
     psF64           bg_stdev,
@@ -9381,4 +9687,5 @@
     psF64           user_5;
     char            *path_base;
+    char            *data_state;
     psS16           fault;
 } detRegisteredImfileRow;
@@ -9403,4 +9710,5 @@
     psF64           user_5,
     const char      *path_base,
+    const char      *data_state,
     psS16           fault
 );
@@ -9446,4 +9754,5 @@
     psF64           user_5,
     const char      *path_base,
+    const char      *data_state,
     psS16           fault
 );
@@ -11468,6 +11777,8 @@
     char            *workdir;
     char            *label;
-    char            *stats;
+    char            *reduction;
     char            *region;
+    char            *hostname;
+    psS16           fault;
 } flatcorrRunRow;
 
@@ -11484,6 +11795,8 @@
     const char      *workdir,
     const char      *label,
-    const char      *stats,
-    const char      *region
+    const char      *reduction,
+    const char      *region,
+    const char      *hostname,
+    psS16           fault
 );
 
@@ -11521,6 +11834,8 @@
     const char      *workdir,
     const char      *label,
-    const char      *stats,
-    const char      *region
+    const char      *reduction,
+    const char      *region,
+    const char      *hostname,
+    psS16           fault
 );
 
@@ -11672,7 +11987,7 @@
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** flatcorrExpRow data structure
- *
- * Structure for representing a single row of flatcorrExp table data.
+/** flatcorrChipLinkRow data structure
+ *
+ * Structure for representing a single row of flatcorrChipLink table data.
  */
 
@@ -11680,31 +11995,31 @@
     psS64           corr_id;
     psS64           chip_id;
-} flatcorrExpRow;
-
-/** Creates a new flatcorrExpRow object
- *
- *  @return A new flatcorrExpRow object or NULL on failure.
- */
-
-flatcorrExpRow *flatcorrExpRowAlloc(
+} flatcorrChipLinkRow;
+
+/** Creates a new flatcorrChipLinkRow object
+ *
+ *  @return A new flatcorrChipLinkRow object or NULL on failure.
+ */
+
+flatcorrChipLinkRow *flatcorrChipLinkRowAlloc(
     psS64           corr_id,
     psS64           chip_id
 );
 
-/** Creates a new flatcorrExp table
- *
- * @return true on success
- */
-
-bool flatcorrExpCreateTable(
+/** Creates a new flatcorrChipLink table
+ *
+ * @return true on success
+ */
+
+bool flatcorrChipLinkCreateTable(
     psDB            *dbh                ///< Database handle
 );
 
-/** Deletes a flatcorrExp table
- *
- * @return true on success
- */
-
-bool flatcorrExpDropTable(
+/** Deletes a flatcorrChipLink table
+ *
+ * @return true on success
+ */
+
+bool flatcorrChipLinkDropTable(
     psDB            *dbh                ///< Database handle
 );
@@ -11717,5 +12032,5 @@
  */
 
-bool flatcorrExpInsert(
+bool flatcorrChipLinkInsert(
     psDB            *dbh,               ///< Database handle
     psS64           corr_id,
@@ -11728,5 +12043,5 @@
  */
 
-long long flatcorrExpDelete(
+long long flatcorrChipLinkDelete(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
@@ -11734,5 +12049,5 @@
 );
 
-/** Insert a single flatcorrExpRow object into a table
+/** Insert a single flatcorrChipLinkRow object into a table
  *
  * This function constructs and inserts a single row based on it's parameters.
@@ -11741,10 +12056,10 @@
  */
 
-bool flatcorrExpInsertObject(
-    psDB            *dbh,               ///< Database handle
-    flatcorrExpRow  *object             ///< flatcorrExpRow object
-);
-
-/** Insert an array of flatcorrExpRow object into a table
+bool flatcorrChipLinkInsertObject(
+    psDB            *dbh,               ///< Database handle
+    flatcorrChipLinkRow *object             ///< flatcorrChipLinkRow object
+);
+
+/** Insert an array of flatcorrChipLinkRow object into a table
  *
  * This function constructs and inserts multiple rows based on it's parameters.
@@ -11753,10 +12068,10 @@
  */
 
-bool flatcorrExpInsertObjects(
-    psDB            *dbh,               ///< Database handle
-    psArray         *objects            ///< array of flatcorrExpRow objects
-);
-
-/** Insert data from a binary FITS table flatcorrExpRow into the database
+bool flatcorrChipLinkInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of flatcorrChipLinkRow objects
+);
+
+/** Insert data from a binary FITS table flatcorrChipLinkRow into the database
  *
  * This function expects a psFits object with a FITS table as the first
@@ -11768,5 +12083,5 @@
  */
 
-bool flatcorrExpInsertFits(
+bool flatcorrChipLinkInsertFits(
     psDB            *dbh,               ///< Database handle
     const psFits    *fits               ///< psFits object
@@ -11783,5 +12098,5 @@
  */
 
-bool flatcorrExpSelectRowsFits(
+bool flatcorrChipLinkSelectRowsFits(
     psDB            *dbh,               ///< Database handle
     psFits          *fits,              ///< psFits object
@@ -11790,22 +12105,22 @@
 );
 
-/** Convert a flatcorrExpRow into an equivalent psMetadata
+/** Convert a flatcorrChipLinkRow into an equivalent psMetadata
  *
  * @return A psMetadata pointer or NULL on error
  */
 
-psMetadata *flatcorrExpMetadataFromObject(
-    const flatcorrExpRow *object             ///< fooRow to convert into a psMetadata
+psMetadata *flatcorrChipLinkMetadataFromObject(
+    const flatcorrChipLinkRow *object             ///< fooRow to convert into a psMetadata
 );
 
 /** Convert a psMetadata into an equivalent fooRow
  *
- * @return A flatcorrExpRow pointer or NULL on error
- */
-
-flatcorrExpRow *flatcorrExpObjectFromMetadata(
+ * @return A flatcorrChipLinkRow pointer or NULL on error
+ */
+
+flatcorrChipLinkRow *flatcorrChipLinkObjectFromMetadata(
     psMetadata      *md                 ///< psMetadata to convert into a fooRow
 );
-/** Selects up to limit rows from the database and returns as flatcorrExpRow objects in a psArray
+/** Selects up to limit rows from the database and returns as flatcorrChipLinkRow objects in a psArray
  *
  *  See psDBSelectRows() for documentation on the format of where.
@@ -11814,10 +12129,10 @@
  */
 
-psArray *flatcorrExpSelectRowObjects(
+psArray *flatcorrChipLinkSelectRowObjects(
     psDB            *dbh,               ///< Database handle
     const psMetadata *where,            ///< Row match criteria
     unsigned long long limit            ///< Maximum number of elements to return
 );
-/** Deletes a row from the database coresponding to an flatcorrExp
+/** Deletes a row from the database coresponding to an flatcorrChipLink
  *
  *  Note that a 'where' search psMetadata is constructed from each object and
@@ -11827,7 +12142,7 @@
  */
 
-bool flatcorrExpDeleteObject(
-    psDB            *dbh,               ///< Database handle
-    const flatcorrExpRow *object    ///< Object to delete
+bool flatcorrChipLinkDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const flatcorrChipLinkRow *object    ///< Object to delete
 );
 /** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
@@ -11839,10 +12154,10 @@
  */
 
-long long flatcorrExpDeleteRowObjects(
+long long flatcorrChipLinkDeleteRowObjects(
     psDB            *dbh,               ///< Database handle
     const psArray   *objects,           ///< Array of objects to delete
     unsigned long long limit            ///< Maximum number of elements to delete 
 );
-/** Formats and prints an array of flatcorrExpRow objects
+/** Formats and prints an array of flatcorrChipLinkRow objects
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -11852,10 +12167,10 @@
  */
 
-bool flatcorrExpPrintObjects(
+bool flatcorrChipLinkPrintObjects(
     FILE            *stream,            ///< a stream
-    psArray         *objects,           ///< An array of flatcorrExpRow objects
+    psArray         *objects,           ///< An array of flatcorrChipLinkRow objects
     bool            mdcf                ///< format as mdconfig or simple
 );
-/** Formats and prints an flatcorrExpRow object
+/** Formats and prints an flatcorrChipLinkRow object
  *
  * When mdcf is set the formated output is in psMetadataConfig
@@ -11865,7 +12180,208 @@
  */
 
-bool flatcorrExpPrintObject(
+bool flatcorrChipLinkPrintObject(
     FILE            *stream,            ///< a stream
-    flatcorrExpRow *object,    ///< an flatcorrExpRow object
+    flatcorrChipLinkRow *object,    ///< an flatcorrChipLinkRow object
+    bool            mdcf                ///< format as mdconfig or simple
+);
+/** flatcorrCamLinkRow data structure
+ *
+ * Structure for representing a single row of flatcorrCamLink table data.
+ */
+
+typedef struct {
+    psS64           corr_id;
+    psS64           chip_id;
+    psS64           cam_id;
+} flatcorrCamLinkRow;
+
+/** Creates a new flatcorrCamLinkRow object
+ *
+ *  @return A new flatcorrCamLinkRow object or NULL on failure.
+ */
+
+flatcorrCamLinkRow *flatcorrCamLinkRowAlloc(
+    psS64           corr_id,
+    psS64           chip_id,
+    psS64           cam_id
+);
+
+/** Creates a new flatcorrCamLink table
+ *
+ * @return true on success
+ */
+
+bool flatcorrCamLinkCreateTable(
+    psDB            *dbh                ///< Database handle
+);
+
+/** Deletes a flatcorrCamLink table
+ *
+ * @return true on success
+ */
+
+bool flatcorrCamLinkDropTable(
+    psDB            *dbh                ///< Database handle
+);
+
+/** Insert a single row into a table
+ *
+ * This function constructs and inserts a single row based on it's parameters.
+ *
+ * @return true on success
+ */
+
+bool flatcorrCamLinkInsert(
+    psDB            *dbh,               ///< Database handle
+    psS64           corr_id,
+    psS64           chip_id,
+    psS64           cam_id
+);
+
+/** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
+ *
+ * @return A The number of rows removed or a negative value on error
+ */
+
+long long flatcorrCamLinkDelete(
+    psDB            *dbh,               ///< Database handle
+    const psMetadata *where,            ///< Row match criteria
+    unsigned long long limit            ///< Maximum number of elements to delete 
+);
+
+/** Insert a single flatcorrCamLinkRow object into a table
+ *
+ * This function constructs and inserts a single row based on it's parameters.
+ *
+ * @return true on success
+ */
+
+bool flatcorrCamLinkInsertObject(
+    psDB            *dbh,               ///< Database handle
+    flatcorrCamLinkRow *object             ///< flatcorrCamLinkRow object
+);
+
+/** Insert an array of flatcorrCamLinkRow object into a table
+ *
+ * This function constructs and inserts multiple rows based on it's parameters.
+ *
+ * @return true on success
+ */
+
+bool flatcorrCamLinkInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of flatcorrCamLinkRow objects
+);
+
+/** Insert data from a binary FITS table flatcorrCamLinkRow into the database
+ *
+ * This function expects a psFits object with a FITS table as the first
+ * extension.  The table must have at least one row of data in it, that is of
+ * the appropriate format (number of columns and their type).  All other
+ * extensions are ignored.
+ *
+ * @return true on success
+ */
+
+bool flatcorrCamLinkInsertFits(
+    psDB            *dbh,               ///< Database handle
+    const psFits    *fits               ///< psFits object
+);
+
+/** Selects up to limit from the database and returns them in a binary FITS table
+ *
+ * This function assumes an empty psFits object and will create a FITS table
+ * as the first extension.
+ *
+ *  See psDBSelectRows() for documentation on the format of where.
+ *
+ * @return true on success
+ */
+
+bool flatcorrCamLinkSelectRowsFits(
+    psDB            *dbh,               ///< Database handle
+    psFits          *fits,              ///< psFits object
+    const psMetadata *where,            ///< Row match criteria
+    unsigned long long limit            ///< Maximum number of elements to return
+);
+
+/** Convert a flatcorrCamLinkRow into an equivalent psMetadata
+ *
+ * @return A psMetadata pointer or NULL on error
+ */
+
+psMetadata *flatcorrCamLinkMetadataFromObject(
+    const flatcorrCamLinkRow *object             ///< fooRow to convert into a psMetadata
+);
+
+/** Convert a psMetadata into an equivalent fooRow
+ *
+ * @return A flatcorrCamLinkRow pointer or NULL on error
+ */
+
+flatcorrCamLinkRow *flatcorrCamLinkObjectFromMetadata(
+    psMetadata      *md                 ///< psMetadata to convert into a fooRow
+);
+/** Selects up to limit rows from the database and returns as flatcorrCamLinkRow objects in a psArray
+ *
+ *  See psDBSelectRows() for documentation on the format of where.
+ *
+ * @return A psArray pointer or NULL on error
+ */
+
+psArray *flatcorrCamLinkSelectRowObjects(
+    psDB            *dbh,               ///< Database handle
+    const psMetadata *where,            ///< Row match criteria
+    unsigned long long limit            ///< Maximum number of elements to return
+);
+/** Deletes a row from the database coresponding to an flatcorrCamLink
+ *
+ *  Note that a 'where' search psMetadata is constructed from each object and
+ *  used to find rows to delete.
+ *
+ * @return A The number of rows removed or a negative value on error
+ */
+
+bool flatcorrCamLinkDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const flatcorrCamLinkRow *object    ///< Object to delete
+);
+/** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
+ *
+ *  Note that a 'where' search psMetadata is constructed from each object and
+ *  used to find rows to delete.
+ *
+ * @return A The number of rows removed or a negative value on error
+ */
+
+long long flatcorrCamLinkDeleteRowObjects(
+    psDB            *dbh,               ///< Database handle
+    const psArray   *objects,           ///< Array of objects to delete
+    unsigned long long limit            ///< Maximum number of elements to delete 
+);
+/** Formats and prints an array of flatcorrCamLinkRow objects
+ *
+ * When mdcf is set the formated output is in psMetadataConfig
+ * format, otherwise it is in a simple tabular format.
+ *
+ * @return true on success
+ */
+
+bool flatcorrCamLinkPrintObjects(
+    FILE            *stream,            ///< a stream
+    psArray         *objects,           ///< An array of flatcorrCamLinkRow objects
+    bool            mdcf                ///< format as mdconfig or simple
+);
+/** Formats and prints an flatcorrCamLinkRow object
+ *
+ * When mdcf is set the formated output is in psMetadataConfig
+ * format, otherwise it is in a simple tabular format.
+ *
+ * @return true on success
+ */
+
+bool flatcorrCamLinkPrintObject(
+    FILE            *stream,            ///< a stream
+    flatcorrCamLinkRow *object,    ///< an flatcorrCamLinkRow object
     bool            mdcf                ///< format as mdconfig or simple
 );
@@ -12075,4 +12591,220 @@
     FILE            *stream,            ///< a stream
     pstampDataStoreRow *object,    ///< an pstampDataStoreRow object
+    bool            mdcf                ///< format as mdconfig or simple
+);
+/** pstampProjectRow data structure
+ *
+ * Structure for representing a single row of pstampProject table data.
+ */
+
+typedef struct {
+    psS64           proj_id;
+    char            *name;
+    char            *state;
+    char            *dbname;
+    char            *dvodb;
+    char            *camera;
+    char            *telescope;
+    bool            need_magic;
+} pstampProjectRow;
+
+/** Creates a new pstampProjectRow object
+ *
+ *  @return A new pstampProjectRow object or NULL on failure.
+ */
+
+pstampProjectRow *pstampProjectRowAlloc(
+    psS64           proj_id,
+    const char      *name,
+    const char      *state,
+    const char      *dbname,
+    const char      *dvodb,
+    const char      *camera,
+    const char      *telescope,
+    bool            need_magic
+);
+
+/** Creates a new pstampProject table
+ *
+ * @return true on success
+ */
+
+bool pstampProjectCreateTable(
+    psDB            *dbh                ///< Database handle
+);
+
+/** Deletes a pstampProject table
+ *
+ * @return true on success
+ */
+
+bool pstampProjectDropTable(
+    psDB            *dbh                ///< Database handle
+);
+
+/** Insert a single row into a table
+ *
+ * This function constructs and inserts a single row based on it's parameters.
+ *
+ * @return true on success
+ */
+
+bool pstampProjectInsert(
+    psDB            *dbh,               ///< Database handle
+    psS64           proj_id,
+    const char      *name,
+    const char      *state,
+    const char      *dbname,
+    const char      *dvodb,
+    const char      *camera,
+    const char      *telescope,
+    bool            need_magic
+);
+
+/** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
+ *
+ * @return A The number of rows removed or a negative value on error
+ */
+
+long long pstampProjectDelete(
+    psDB            *dbh,               ///< Database handle
+    const psMetadata *where,            ///< Row match criteria
+    unsigned long long limit            ///< Maximum number of elements to delete 
+);
+
+/** Insert a single pstampProjectRow object into a table
+ *
+ * This function constructs and inserts a single row based on it's parameters.
+ *
+ * @return true on success
+ */
+
+bool pstampProjectInsertObject(
+    psDB            *dbh,               ///< Database handle
+    pstampProjectRow *object             ///< pstampProjectRow object
+);
+
+/** Insert an array of pstampProjectRow object into a table
+ *
+ * This function constructs and inserts multiple rows based on it's parameters.
+ *
+ * @return true on success
+ */
+
+bool pstampProjectInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of pstampProjectRow objects
+);
+
+/** Insert data from a binary FITS table pstampProjectRow into the database
+ *
+ * This function expects a psFits object with a FITS table as the first
+ * extension.  The table must have at least one row of data in it, that is of
+ * the appropriate format (number of columns and their type).  All other
+ * extensions are ignored.
+ *
+ * @return true on success
+ */
+
+bool pstampProjectInsertFits(
+    psDB            *dbh,               ///< Database handle
+    const psFits    *fits               ///< psFits object
+);
+
+/** Selects up to limit from the database and returns them in a binary FITS table
+ *
+ * This function assumes an empty psFits object and will create a FITS table
+ * as the first extension.
+ *
+ *  See psDBSelectRows() for documentation on the format of where.
+ *
+ * @return true on success
+ */
+
+bool pstampProjectSelectRowsFits(
+    psDB            *dbh,               ///< Database handle
+    psFits          *fits,              ///< psFits object
+    const psMetadata *where,            ///< Row match criteria
+    unsigned long long limit            ///< Maximum number of elements to return
+);
+
+/** Convert a pstampProjectRow into an equivalent psMetadata
+ *
+ * @return A psMetadata pointer or NULL on error
+ */
+
+psMetadata *pstampProjectMetadataFromObject(
+    const pstampProjectRow *object             ///< fooRow to convert into a psMetadata
+);
+
+/** Convert a psMetadata into an equivalent fooRow
+ *
+ * @return A pstampProjectRow pointer or NULL on error
+ */
+
+pstampProjectRow *pstampProjectObjectFromMetadata(
+    psMetadata      *md                 ///< psMetadata to convert into a fooRow
+);
+/** Selects up to limit rows from the database and returns as pstampProjectRow objects in a psArray
+ *
+ *  See psDBSelectRows() for documentation on the format of where.
+ *
+ * @return A psArray pointer or NULL on error
+ */
+
+psArray *pstampProjectSelectRowObjects(
+    psDB            *dbh,               ///< Database handle
+    const psMetadata *where,            ///< Row match criteria
+    unsigned long long limit            ///< Maximum number of elements to return
+);
+/** Deletes a row from the database coresponding to an pstampProject
+ *
+ *  Note that a 'where' search psMetadata is constructed from each object and
+ *  used to find rows to delete.
+ *
+ * @return A The number of rows removed or a negative value on error
+ */
+
+bool pstampProjectDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const pstampProjectRow *object    ///< Object to delete
+);
+/** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
+ *
+ *  Note that a 'where' search psMetadata is constructed from each object and
+ *  used to find rows to delete.
+ *
+ * @return A The number of rows removed or a negative value on error
+ */
+
+long long pstampProjectDeleteRowObjects(
+    psDB            *dbh,               ///< Database handle
+    const psArray   *objects,           ///< Array of objects to delete
+    unsigned long long limit            ///< Maximum number of elements to delete 
+);
+/** Formats and prints an array of pstampProjectRow objects
+ *
+ * When mdcf is set the formated output is in psMetadataConfig
+ * format, otherwise it is in a simple tabular format.
+ *
+ * @return true on success
+ */
+
+bool pstampProjectPrintObjects(
+    FILE            *stream,            ///< a stream
+    psArray         *objects,           ///< An array of pstampProjectRow objects
+    bool            mdcf                ///< format as mdconfig or simple
+);
+/** Formats and prints an pstampProjectRow object
+ *
+ * When mdcf is set the formated output is in psMetadataConfig
+ * format, otherwise it is in a simple tabular format.
+ *
+ * @return true on success
+ */
+
+bool pstampProjectPrintObject(
+    FILE            *stream,            ///< a stream
+    pstampProjectRow *object,    ///< an pstampProjectRow object
     bool            mdcf                ///< format as mdconfig or simple
 );
@@ -12306,4 +13038,5 @@
     psS32           fault;
     char            *uri;
+    psS64           exp_id;
     char            *outputBase;
     char            *args;
@@ -12323,4 +13056,5 @@
     psS32           fault,
     const char      *uri,
+    psS64           exp_id,
     const char      *outputBase,
     const char      *args
@@ -12361,4 +13095,5 @@
     psS32           fault,
     const char      *uri,
+    psS64           exp_id,
     const char      *outputBase,
     const char      *args
Index: /trunk/ippdb/tests/alloc.c
===================================================================
--- /trunk/ippdb/tests/alloc.c	(revision 20204)
+++ /trunk/ippdb/tests/alloc.c	(revision 20205)
@@ -306,5 +306,5 @@
         rawExpRow       *object;
 
-        object = rawExpRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, "a string", -16, "0001-01-01T00:00:00Z"    );
+        object = rawExpRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -16, "0001-01-01T00:00:00Z"    );
 
         if (!object) {
@@ -371,4 +371,12 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(object->obs_mode, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->obs_group, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (!object->airmass == 32.32) {
             psFree(object);
@@ -527,5 +535,21 @@
             exit(EXIT_FAILURE);
         }
-        if (!object->solang == 32.32) {
+        if (!object->sun_angle == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->sun_alt == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->moon_angle == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->moon_alt == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->moon_phase == 32.32) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -549,5 +573,5 @@
         rawImfileRow    *object;
 
-        object = rawImfileRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16, "0001-01-01T00:00:00Z"    );
+        object = rawImfileRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -16, "0001-01-01T00:00:00Z"    );
 
         if (!object) {
@@ -602,4 +626,12 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(object->obs_mode, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->obs_group, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (!object->airmass == 32.32) {
             psFree(object);
@@ -758,4 +790,24 @@
             exit(EXIT_FAILURE);
         }
+        if (!object->sun_angle == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->sun_alt == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->moon_angle == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->moon_alt == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->moon_phase == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(object->hostname, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
@@ -858,5 +910,5 @@
         chipProcessedImfileRow *object;
 
-        object = chipProcessedImfileRowAlloc(-64, -64, "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -32, -32, -32, -32, "a string", -16    );
+        object = chipProcessedImfileRowAlloc(-64, -64, "a string", "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -32, -32, -32, -32, -32, "a string", -16    );
 
         if (!object) {
@@ -876,4 +928,8 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(object->data_state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
@@ -912,4 +968,275 @@
             exit(EXIT_FAILURE);
         }
+        if (!object->ap_resid == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->ap_resid_stdev == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fwhm_major == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fwhm_minor == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2 == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2_err == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2_lq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2_uq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2c == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2c_err == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2c_lq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2c_uq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2s == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2s_err == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2s_lq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2s_uq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m3 == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m3_err == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m3_lq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m3_uq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m4 == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m4_err == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m4_lq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m4_uq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_detrend == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_photom == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_total == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_script == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->hostname, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->n_stars == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->n_psfstars == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->n_iqstars == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->n_extended == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->n_cr == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        chipMaskRow     *object;
+
+        object = chipMaskRowAlloc("a string"    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        camRunRow       *object;
+
+        object = camRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string"    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->cam_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->chip_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->workdir_state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->expgroup, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->end_stage, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        camProcessedExpRow *object;
+
+        object = camProcessedExpRowAlloc(-64, "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -32, -32, -32, -32, -32, -32, "a string", -16    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->cam_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->bg == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->bg_stdev == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->bg_mean_stdev == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->bias == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->bias_stdev == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fringe_0 == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fringe_1 == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fringe_2 == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (!object->sigma_ra == 32.32) {
             psFree(object);
@@ -944,9 +1271,85 @@
             exit(EXIT_FAILURE);
         }
-        if (!object->dtime_detrend == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->dtime_photom == 32.32) {
+        if (!object->iq_m2 == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2_err == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2_lq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2_uq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2c == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2c_err == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2c_lq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2c_uq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2s == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2s_err == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2s_lq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2s_uq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m3 == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m3_err == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m3_lq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m3_uq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m4 == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m4_err == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m4_lq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m4_uq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_script == 32.32) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -956,4 +1359,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!object->dtime_addstar == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(object->hostname, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
@@ -964,4 +1371,12 @@
             exit(EXIT_FAILURE);
         }
+        if (!object->n_psfstars == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->n_iqstars == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (!object->n_extended == -32) {
             psFree(object);
@@ -989,7 +1404,7 @@
 
     {
-        chipMaskRow     *object;
-
-        object = chipMaskRowAlloc("a string"    );
+        camMaskRow      *object;
+
+        object = camMaskRowAlloc("a string"    );
 
         if (!object) {
@@ -1006,41 +1421,2092 @@
 
     {
-        camRunRow       *object;
-
-        object = camRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string"    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
+        fakeRunRow      *object;
+
+        object = fakeRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z"    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->fake_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (!object->cam_id == -64) {
             psFree(object);
             exit(EXIT_FAILURE);
         }
+        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->expgroup, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->end_stage, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        fakeProcessedImfileRow *object;
+
+        object = fakeProcessedImfileRowAlloc(-64, -64, "a string", "a string", 32.32, 32.32, "a string", "a string", "a string", -16, "0001-01-01T00:00:00Z"    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->fake_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->exp_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_fake == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_script == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->hostname, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->data_state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        fakeMaskRow     *object;
+
+        object = fakeMaskRowAlloc("a string"    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        warpRunRow      *object;
+
+        object = warpRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", true    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->warp_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fake_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->mode, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->workdir_state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->end_stage, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->magiced == true) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        warpSkyCellMapRow *object;
+
+        object = warpSkyCellMapRowAlloc(-64, "a string", "a string", "a string", -16    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->warp_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->skycell_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        warpSkyfileRow  *object;
+
+        object = warpSkyfileRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, 32.32, 32.32, "a string", 32.32, -32, -32, -32, -32, true, -16    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->warp_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->skycell_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->data_state, "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->dtime_warp == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_script == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->hostname, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->good_frac == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->xmin == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->xmax == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->ymin == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->ymax == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->ignored == true) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        warpMaskRow     *object;
+
+        object = warpMaskRowAlloc("a string"    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        diffRunRow      *object;
+
+        object = diffRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string"    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->diff_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->skycell_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        diffInputSkyfileRow *object;
+
+        object = diffInputSkyfileRowAlloc(-64, true, -64, -64, "a string", "a string", "a string"    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->diff_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->template == true) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->stack_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->warp_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->skycell_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->kind, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        diffSkyfileRow  *object;
+
+        object = diffSkyfileRowAlloc(-64, "a string", "a string", 64.64, 64.64, -32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, -32, 32.32, 32.32, 32.32, 32.32, "a string", 32.32, -16    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->diff_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->path_base, "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->stamps_num == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->stamps_mean == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->stamps_rms == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->norm == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->bg_diff == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->kernel_x == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->kernel_y == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->kernel_xx == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->kernel_xy == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->kernel_yy == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->sources == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_diff == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_match == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_phot == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_script == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->hostname, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->good_frac == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        stackRunRow     *object;
+
+        object = stackRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string"    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->stack_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->skycell_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        stackInputSkyfileRow *object;
+
+        object = stackInputSkyfileRowAlloc(-64, -64    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->stack_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->warp_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        stackSumSkyfileRow *object;
+
+        object = stackSumSkyfileRowAlloc(-64, "a string", "a string", 64.64, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, -32, -32, 32.32, 32.32, -32, "a string", 32.32, -16    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->stack_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->path_base, "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->dtime_stack == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_match_mean == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_match_stdev == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_initial == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_reject == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_final == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_phot == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_script == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->match_mean == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->match_stdev == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->match_rms == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->stamps_mean == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->stamps_stdev == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->stamps_min == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->reject_images == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->reject_pix_mean == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->reject_pix_stdev == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->sources == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->hostname, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->good_frac == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        detRunRow       *object;
+
+        object = detRunRowAlloc(-64, -32, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", 32.32, 32.32, "a string", -64, -32    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->det_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iteration == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->det_type, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->mode, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->filelevel, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->camera, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->telescope, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->exp_type, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->airmass_min == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->airmass_max == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->exp_time_min == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->exp_time_max == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->ccd_temp_min == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->ccd_temp_max == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->posang_min == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->posang_max == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->solang_min == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->solang_max == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->ref_det_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->ref_iter == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        detInputExpRow  *object;
+
+        object = detInputExpRowAlloc(-64, -32, -64, true    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->det_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iteration == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->exp_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->include == true) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        detProcessedImfileRow *object;
+
+        object = detProcessedImfileRowAlloc(-64, -64, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->det_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->exp_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
+            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 (!object->fringe_0 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fringe_1 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fringe_2 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_1 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_2 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_3 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_4 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_5 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->data_state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        detProcessedExpRow *object;
+
+        object = detProcessedExpRowAlloc(-64, -64, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->det_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->exp_id == -64) {
+            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 (!object->fringe_0 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fringe_1 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fringe_2 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_1 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_2 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_3 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_4 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_5 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->data_state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        detStackedImfileRow *object;
+
+        object = detStackedImfileRowAlloc(-64, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->det_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iteration == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
+            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 (!object->user_1 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_2 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_3 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_4 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_5 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->data_state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        detNormalizedStatImfileRow *object;
+
+        object = detNormalizedStatImfileRowAlloc(-64, -32, "a string", 32.32, "a string", -16    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->det_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iteration == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->norm == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->data_state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        detNormalizedImfileRow *object;
+
+        object = detNormalizedImfileRowAlloc(-64, -32, "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->det_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iteration == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->uri, "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 (!object->user_1 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_2 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_3 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_4 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_5 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->data_state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        detNormalizedExpRow *object;
+
+        object = detNormalizedExpRowAlloc(-64, -32, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->det_id == -64) {
+            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 (!object->user_1 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_2 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_3 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_4 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_5 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->data_state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        detResidImfileRow *object;
+
+        object = detResidImfileRowAlloc(-64, -32, -64, -32, -64, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->det_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iteration == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->ref_det_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->ref_iter == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->exp_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
+            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 (!object->bg_skewness == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->bg_kurtosis == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->bin_stdev == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fringe_0 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fringe_1 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fringe_2 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fringe_resid_0 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fringe_resid_1 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fringe_resid_2 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_1 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_2 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_3 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_4 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_5 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->data_state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        detResidExpRow  *object;
+
+        object = detResidExpRowAlloc(-64, -32, -64, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", true, -16    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->det_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iteration == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->exp_id == -64) {
+            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 (!object->bg_skewness == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->bg_kurtosis == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->bin_stdev == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fringe_0 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fringe_1 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fringe_2 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fringe_resid_0 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fringe_resid_1 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fringe_resid_2 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_1 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_2 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_3 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_4 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_5 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->data_state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->accept == true) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        detRunSummaryRow *object;
+
+        object = detRunSummaryRowAlloc(-64, -32, "a string", 64.64, 64.64, 64.64, true, -16    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->det_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iteration == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->data_state, "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 (!object->accept == true) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        detRegisteredImfileRow *object;
+
+        object = detRegisteredImfileRowAlloc(-64, -32, "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->det_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iteration == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->uri, "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 (!object->user_1 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_2 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_3 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_4 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->user_5 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->data_state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        detCorrectedExpRow *object;
+
+        object = detCorrectedExpRowAlloc(-64, -64, "a string", -64, "a string", "a string", "a string", -16    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->det_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->exp_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->corr_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->corr_type, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        detCorrectedImfileRow *object;
+
+        object = detCorrectedImfileRowAlloc(-64, -64, "a string", "a string", "a string", -16    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->det_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->exp_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        magicRunRow     *object;
+
+        object = magicRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", -16    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->magic_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->exp_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->workdir_state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        magicInputSkyfileRow *object;
+
+        object = magicInputSkyfileRowAlloc(-64, -64, "a string"    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->magic_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->diff_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->node, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        magicTreeRow    *object;
+
+        object = magicTreeRowAlloc(-64, "a string", "a string"    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->magic_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->node, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->dep, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        magicNodeResultRow *object;
+
+        object = magicNodeResultRowAlloc(-64, "a string", "a string", -16    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->magic_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->node, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        magicMaskRow    *object;
+
+        object = magicMaskRowAlloc(-64, "a string", -32, -16    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->magic_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->streaks == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        calDBRow        *object;
+
+        object = calDBRowAlloc(-64, "a string", "a string"    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->cal_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        calRunRow       *object;
+
+        object = calRunRowAlloc(-64, "a string", "a string", "a string"    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->cal_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->region, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->last_step, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        flatcorrRunRow  *object;
+
+        object = flatcorrRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", -16    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->corr_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->region, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->hostname, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        flatcorrChipLinkRow *object;
+
+        object = flatcorrChipLinkRowAlloc(-64, -64    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->corr_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (!object->chip_id == -64) {
             psFree(object);
             exit(EXIT_FAILURE);
         }
+
+        psFree(object);
+    }
+
+    {
+        flatcorrCamLinkRow *object;
+
+        object = flatcorrCamLinkRowAlloc(-64, -64, -64    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->corr_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->chip_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->cam_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        pstampDataStoreRow *object;
+
+        object = pstampDataStoreRowAlloc(-64, "a string", "a string", "a string", "a string"    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->ds_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
         }
-        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->workdir_state, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->expgroup, "a string", MAX_STRING_LENGTH)) {
+        if (strncmp(object->lastFileset, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->outProduct, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        pstampProjectRow *object;
+
+        object = pstampProjectRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", true    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->proj_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->name, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->dbname, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -1050,26 +3516,50 @@
             exit(EXIT_FAILURE);
         }
-        if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->end_stage, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        camProcessedExpRow *object;
-
-        object = camProcessedExpRowAlloc(-64, "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -32, -32, -32, -32, "a string", -16    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->cam_id == -64) {
+        if (strncmp(object->camera, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->telescope, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->need_magic == true) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        pstampRequestRow *object;
+
+        object = pstampRequestRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", -32    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->req_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->ds_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->name, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->reqType, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->outProduct, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -1079,143 +3569,30 @@
             exit(EXIT_FAILURE);
         }
-        if (!object->bg == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->bg_stdev == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->bg_mean_stdev == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->bias == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->bias_stdev == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fringe_0 == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fringe_1 == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fringe_2 == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->sigma_ra == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->sigma_dec == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->ap_resid == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->ap_resid_stdev == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->zp_mean == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->zp_stdev == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fwhm_major == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fwhm_minor == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->dtime_detrend == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->dtime_photom == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->dtime_astrom == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->hostname, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->n_stars == -32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->n_extended == -32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->n_cr == -32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->n_astrom == -32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fault == -16) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        camMaskRow      *object;
-
-        object = camMaskRowAlloc("a string"    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        fakeRunRow      *object;
-
-        object = fakeRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z"    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->fake_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->cam_id == -64) {
+        if (!object->fault == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        pstampJobRow    *object;
+
+        object = pstampJobRowAlloc(-64, -64, "a string", "a string", "a string", -32, "a string", -64, "a string", "a string"    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->job_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->req_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->rownum, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -1225,1900 +3602,17 @@
             exit(EXIT_FAILURE);
         }
-        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->expgroup, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->end_stage, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        fakeProcessedImfileRow *object;
-
-        object = fakeProcessedImfileRowAlloc(-64, -64, "a string", "a string", 32.32, "a string", "a string", -16, "0001-01-01T00:00:00Z"    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->fake_id == -64) {
+        if (strncmp(object->jobType, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
         }
         if (!object->exp_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->dtime_fake == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->hostname, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fault == -16) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        fakeMaskRow     *object;
-
-        object = fakeMaskRowAlloc("a string"    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        warpRunRow      *object;
-
-        object = warpRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", true    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->warp_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fake_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->mode, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->workdir_state, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->end_stage, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->magiced == true) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        warpSkyCellMapRow *object;
-
-        object = warpSkyCellMapRowAlloc(-64, "a string", "a string", "a string", -16    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->warp_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->skycell_id, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fault == -16) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        warpSkyfileRow  *object;
-
-        object = warpSkyfileRowAlloc(-64, "a string", "a string", "a string", "a string", 64.64, 64.64, 32.32, "a string", 32.32, -32, -32, -32, -32, true, -16    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->warp_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->skycell_id, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->path_base, "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->dtime_warp == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->hostname, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->good_frac == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->xmin == -32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->xmax == -32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->ymin == -32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->ymax == -32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->ignored == true) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fault == -16) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        warpMaskRow     *object;
-
-        object = warpMaskRowAlloc("a string"    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        diffRunRow      *object;
-
-        object = diffRunRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string"    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->diff_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->skycell_id, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        diffInputSkyfileRow *object;
-
-        object = diffInputSkyfileRowAlloc(-64, true, -64, -64, "a string", "a string", "a string"    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->diff_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->template == true) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->stack_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->warp_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->skycell_id, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->kind, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        diffSkyfileRow  *object;
-
-        object = diffSkyfileRowAlloc(-64, "a string", "a string", 64.64, 64.64, -32, 32.32, -32, 32.32, "a string", 32.32, -16    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->diff_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->path_base, "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->stamps_num == -32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->stamps_rms == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->sources == -32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->dtime_diff == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->hostname, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->good_frac == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fault == -16) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        stackRunRow     *object;
-
-        object = stackRunRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string"    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->stack_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->skycell_id, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        stackInputSkyfileRow *object;
-
-        object = stackInputSkyfileRowAlloc(-64, -64    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->stack_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->warp_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        stackSumSkyfileRow *object;
-
-        object = stackSumSkyfileRowAlloc(-64, "a string", "a string", 64.64, 64.64, 32.32, "a string", 32.32, -16    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->stack_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->path_base, "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->dtime_stack == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->hostname, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->good_frac == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fault == -16) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        detRunRow       *object;
-
-        object = detRunRowAlloc(-64, -32, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", 32.32, 32.32, "a string", -32    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->det_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->iteration == -32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->det_type, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->mode, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->filelevel, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->camera, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->telescope, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->exp_type, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->airmass_min == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->airmass_max == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->exp_time_min == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->exp_time_max == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->ccd_temp_min == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->ccd_temp_max == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->posang_min == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->posang_max == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->solang_min == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->solang_max == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->parent == -32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        detInputExpRow  *object;
-
-        object = detInputExpRowAlloc(-64, -32, -64, true    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->det_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->iteration == -32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->exp_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->include == true) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        detProcessedImfileRow *object;
-
-        object = detProcessedImfileRowAlloc(-64, -64, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->det_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->exp_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
-            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 (!object->fringe_0 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fringe_1 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fringe_2 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_1 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_2 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_3 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_4 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_5 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fault == -16) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        detProcessedExpRow *object;
-
-        object = detProcessedExpRowAlloc(-64, -64, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->det_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->exp_id == -64) {
-            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 (!object->fringe_0 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fringe_1 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fringe_2 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_1 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_2 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_3 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_4 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_5 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fault == -16) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        detStackedImfileRow *object;
-
-        object = detStackedImfileRowAlloc(-64, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, -16    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->det_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->iteration == -32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
-            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 (!object->user_1 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_2 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_3 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_4 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_5 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fault == -16) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        detNormalizedStatImfileRow *object;
-
-        object = detNormalizedStatImfileRowAlloc(-64, -32, "a string", 32.32, -16    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->det_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->iteration == -32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->norm == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fault == -16) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        detNormalizedImfileRow *object;
-
-        object = detNormalizedImfileRowAlloc(-64, -32, "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->det_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->iteration == -32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->uri, "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 (!object->user_1 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_2 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_3 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_4 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_5 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fault == -16) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        detNormalizedExpRow *object;
-
-        object = detNormalizedExpRowAlloc(-64, -32, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->det_id == -64) {
-            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 (!object->user_1 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_2 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_3 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_4 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_5 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fault == -16) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        detResidImfileRow *object;
-
-        object = detResidImfileRowAlloc(-64, -32, -64, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->det_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->iteration == -32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->exp_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
-            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 (!object->bg_skewness == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->bg_kurtosis == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->bin_stdev == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fringe_0 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fringe_1 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fringe_2 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fringe_resid_0 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fringe_resid_1 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fringe_resid_2 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_1 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_2 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_3 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_4 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_5 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fault == -16) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        detResidExpRow  *object;
-
-        object = detResidExpRowAlloc(-64, -32, -64, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", true, -16    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->det_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->iteration == -32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->exp_id == -64) {
-            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 (!object->bg_skewness == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->bg_kurtosis == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->bin_stdev == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fringe_0 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fringe_1 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fringe_2 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fringe_resid_0 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fringe_resid_1 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fringe_resid_2 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_1 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_2 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_3 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_4 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_5 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->accept == true) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fault == -16) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        detRunSummaryRow *object;
-
-        object = detRunSummaryRowAlloc(-64, -32, 64.64, 64.64, 64.64, true, -16    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->det_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->iteration == -32) {
-            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 (!object->accept == true) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fault == -16) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        detRegisteredImfileRow *object;
-
-        object = detRegisteredImfileRowAlloc(-64, -32, "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->det_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->iteration == -32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->uri, "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 (!object->user_1 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_2 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_3 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_4 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->user_5 == 64.64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fault == -16) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        detCorrectedExpRow *object;
-
-        object = detCorrectedExpRowAlloc(-64, -64, "a string", -64, "a string", "a string", "a string", -16    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->det_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->exp_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->corr_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->corr_type, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fault == -16) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        detCorrectedImfileRow *object;
-
-        object = detCorrectedImfileRowAlloc(-64, -64, "a string", "a string", "a string", -16    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->det_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->exp_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fault == -16) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        magicRunRow     *object;
-
-        object = magicRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", -16    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->magic_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->exp_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->workdir_state, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fault == -16) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        magicInputSkyfileRow *object;
-
-        object = magicInputSkyfileRowAlloc(-64, -64, "a string"    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->magic_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->diff_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->node, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        magicTreeRow    *object;
-
-        object = magicTreeRowAlloc(-64, "a string", "a string"    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->magic_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->node, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->dep, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        magicNodeResultRow *object;
-
-        object = magicNodeResultRowAlloc(-64, "a string", "a string", -16    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->magic_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->node, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fault == -16) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        magicMaskRow    *object;
-
-        object = magicMaskRowAlloc(-64, "a string", -32, -16    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->magic_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->streaks == -32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fault == -16) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        calDBRow        *object;
-
-        object = calDBRowAlloc(-64, "a string", "a string"    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->cal_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        calRunRow       *object;
-
-        object = calRunRowAlloc(-64, "a string", "a string", "a string"    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->cal_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->region, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->last_step, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        flatcorrRunRow  *object;
-
-        object = flatcorrRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string"    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->corr_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->region, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        flatcorrExpRow  *object;
-
-        object = flatcorrExpRowAlloc(-64, -64    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->corr_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->chip_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        pstampDataStoreRow *object;
-
-        object = pstampDataStoreRowAlloc(-64, "a string", "a string", "a string", "a string"    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->ds_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->lastFileset, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->outProduct, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        pstampRequestRow *object;
-
-        object = pstampRequestRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", -32    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->req_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->ds_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->name, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->reqType, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->outProduct, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fault == -32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        pstampJobRow    *object;
-
-        object = pstampJobRowAlloc(-64, -64, "a string", "a string", "a string", -32, "a string", "a string", "a string"    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->job_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->req_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->rownum, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->jobType, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->fault == -32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
Index: /trunk/ippdb/tests/createtable.c
===================================================================
--- /trunk/ippdb/tests/createtable.c	(revision 20204)
+++ /trunk/ippdb/tests/createtable.c	(revision 20205)
@@ -778,5 +778,20 @@
         }
 
-        if(!flatcorrExpCreateTable(dbh)) {
+        if(!flatcorrChipLinkCreateTable(dbh)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if(!flatcorrCamLinkCreateTable(dbh)) {
             exit(EXIT_FAILURE);
         }
@@ -794,4 +809,19 @@
 
         if(!pstampDataStoreCreateTable(dbh)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if(!pstampProjectCreateTable(dbh)) {
             exit(EXIT_FAILURE);
         }
Index: /trunk/ippdb/tests/dbcleanup.c
===================================================================
--- /trunk/ippdb/tests/dbcleanup.c	(revision 20204)
+++ /trunk/ippdb/tests/dbcleanup.c	(revision 20205)
@@ -62,6 +62,8 @@
     p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS calRun");
     p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS flatcorrRun");
-    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS flatcorrExp");
+    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS flatcorrChipLink");
+    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS flatcorrCamLink");
     p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS pstampDataStore");
+    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS pstampProject");
     p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS pstampRequest");
     p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS pstampJob");
Index: /trunk/ippdb/tests/dbsetup.c
===================================================================
--- /trunk/ippdb/tests/dbsetup.c	(revision 20204)
+++ /trunk/ippdb/tests/dbsetup.c	(revision 20205)
@@ -166,9 +166,15 @@
     flatcorrRunCreateTable(dbh);
 
-    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS flatcorrExp");
-    flatcorrExpCreateTable(dbh);
+    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS flatcorrChipLink");
+    flatcorrChipLinkCreateTable(dbh);
+
+    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS flatcorrCamLink");
+    flatcorrCamLinkCreateTable(dbh);
 
     p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS pstampDataStore");
     pstampDataStoreCreateTable(dbh);
+
+    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS pstampProject");
+    pstampProjectCreateTable(dbh);
 
     p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS pstampRequest");
Index: /trunk/ippdb/tests/droptable.c
===================================================================
--- /trunk/ippdb/tests/droptable.c	(revision 20204)
+++ /trunk/ippdb/tests/droptable.c	(revision 20205)
@@ -778,5 +778,20 @@
         }
 
-        if (!flatcorrExpDropTable(dbh)) {
+        if (!flatcorrChipLinkDropTable(dbh)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!flatcorrCamLinkDropTable(dbh)) {
             exit(EXIT_FAILURE);
         }
@@ -794,4 +809,19 @@
 
         if (!pstampDataStoreDropTable(dbh)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!pstampProjectDropTable(dbh)) {
             exit(EXIT_FAILURE);
         }
Index: /trunk/ippdb/tests/insert.c
===================================================================
--- /trunk/ippdb/tests/insert.c	(revision 20204)
+++ /trunk/ippdb/tests/insert.c	(revision 20205)
@@ -118,20 +118,20 @@
         }
 
-        if (!rawExpInsert(dbh, -64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, "a string", -16, "0001-01-01T00:00:00Z")) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!rawImfileInsert(dbh, -64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16, "0001-01-01T00:00:00Z")) {
+        if (!rawExpInsert(dbh, -64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -16, "0001-01-01T00:00:00Z")) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!rawImfileInsert(dbh, -64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -16, "0001-01-01T00:00:00Z")) {
             exit(EXIT_FAILURE);
         }
@@ -178,5 +178,5 @@
         }
 
-        if (!chipProcessedImfileInsert(dbh, -64, -64, "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -32, -32, -32, -32, "a string", -16)) {
+        if (!chipProcessedImfileInsert(dbh, -64, -64, "a string", "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -32, -32, -32, -32, -32, "a string", -16)) {
             exit(EXIT_FAILURE);
         }
@@ -223,5 +223,5 @@
         }
 
-        if (!camProcessedExpInsert(dbh, -64, "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -32, -32, -32, -32, "a string", -16)) {
+        if (!camProcessedExpInsert(dbh, -64, "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -32, -32, -32, -32, -32, -32, "a string", -16)) {
             exit(EXIT_FAILURE);
         }
@@ -268,5 +268,5 @@
         }
 
-        if (!fakeProcessedImfileInsert(dbh, -64, -64, "a string", "a string", 32.32, "a string", "a string", -16, "0001-01-01T00:00:00Z")) {
+        if (!fakeProcessedImfileInsert(dbh, -64, -64, "a string", "a string", 32.32, 32.32, "a string", "a string", "a string", -16, "0001-01-01T00:00:00Z")) {
             exit(EXIT_FAILURE);
         }
@@ -328,5 +328,5 @@
         }
 
-        if (!warpSkyfileInsert(dbh, -64, "a string", "a string", "a string", "a string", 64.64, 64.64, 32.32, "a string", 32.32, -32, -32, -32, -32, true, -16)) {
+        if (!warpSkyfileInsert(dbh, -64, "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, 32.32, 32.32, "a string", 32.32, -32, -32, -32, -32, true, -16)) {
             exit(EXIT_FAILURE);
         }
@@ -358,5 +358,5 @@
         }
 
-        if (!diffRunInsert(dbh, -64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string")) {
+        if (!diffRunInsert(dbh, -64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string")) {
             exit(EXIT_FAILURE);
         }
@@ -388,20 +388,20 @@
         }
 
-        if (!diffSkyfileInsert(dbh, -64, "a string", "a string", 64.64, 64.64, -32, 32.32, -32, 32.32, "a string", 32.32, -16)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!stackRunInsert(dbh, -64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string")) {
+        if (!diffSkyfileInsert(dbh, -64, "a string", "a string", 64.64, 64.64, -32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, -32, 32.32, 32.32, 32.32, 32.32, "a string", 32.32, -16)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!stackRunInsert(dbh, -64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string")) {
             exit(EXIT_FAILURE);
         }
@@ -433,20 +433,20 @@
         }
 
-        if (!stackSumSkyfileInsert(dbh, -64, "a string", "a string", 64.64, 64.64, 32.32, "a string", 32.32, -16)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!detRunInsert(dbh, -64, -32, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", 32.32, 32.32, "a string", -32)) {
+        if (!stackSumSkyfileInsert(dbh, -64, "a string", "a string", 64.64, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, -32, -32, 32.32, 32.32, -32, "a string", 32.32, -16)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!detRunInsert(dbh, -64, -32, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", 32.32, 32.32, "a string", -64, -32)) {
             exit(EXIT_FAILURE);
         }
@@ -478,140 +478,140 @@
         }
 
-        if (!detProcessedImfileInsert(dbh, -64, -64, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!detProcessedExpInsert(dbh, -64, -64, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!detStackedImfileInsert(dbh, -64, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, -16)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!detNormalizedStatImfileInsert(dbh, -64, -32, "a string", 32.32, -16)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!detNormalizedImfileInsert(dbh, -64, -32, "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!detNormalizedExpInsert(dbh, -64, -32, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!detResidImfileInsert(dbh, -64, -32, -64, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!detResidExpInsert(dbh, -64, -32, -64, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", true, -16)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!detRunSummaryInsert(dbh, -64, -32, 64.64, 64.64, 64.64, true, -16)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!detRegisteredImfileInsert(dbh, -64, -32, "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16)) {
+        if (!detProcessedImfileInsert(dbh, -64, -64, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!detProcessedExpInsert(dbh, -64, -64, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!detStackedImfileInsert(dbh, -64, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!detNormalizedStatImfileInsert(dbh, -64, -32, "a string", 32.32, "a string", -16)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!detNormalizedImfileInsert(dbh, -64, -32, "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!detNormalizedExpInsert(dbh, -64, -32, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!detResidImfileInsert(dbh, -64, -32, -64, -32, -64, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!detResidExpInsert(dbh, -64, -32, -64, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", true, -16)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!detRunSummaryInsert(dbh, -64, -32, "a string", 64.64, 64.64, 64.64, true, -16)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!detRegisteredImfileInsert(dbh, -64, -32, "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16)) {
             exit(EXIT_FAILURE);
         }
@@ -763,20 +763,35 @@
         }
 
-        if (!flatcorrRunInsert(dbh, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string")) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!flatcorrExpInsert(dbh, -64, -64)) {
+        if (!flatcorrRunInsert(dbh, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", -16)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!flatcorrChipLinkInsert(dbh, -64, -64)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!flatcorrCamLinkInsert(dbh, -64, -64, -64)) {
             exit(EXIT_FAILURE);
         }
@@ -808,4 +823,19 @@
         }
 
+        if (!pstampProjectInsert(dbh, -64, "a string", "a string", "a string", "a string", "a string", "a string", true)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
         if (!pstampRequestInsert(dbh, -64, -64, "a string", "a string", "a string", "a string", "a string", -32)) {
             exit(EXIT_FAILURE);
@@ -823,5 +853,5 @@
         }
 
-        if (!pstampJobInsert(dbh, -64, -64, "a string", "a string", "a string", -32, "a string", "a string", "a string")) {
+        if (!pstampJobInsert(dbh, -64, -64, "a string", "a string", "a string", -32, "a string", -64, "a string", "a string")) {
             exit(EXIT_FAILURE);
         }
Index: /trunk/ippdb/tests/insertfits.c
===================================================================
--- /trunk/ippdb/tests/insertfits.c	(revision 20204)
+++ /trunk/ippdb/tests/insertfits.c	(revision 20205)
@@ -1350,5 +1350,31 @@
         }
 
-        if (!flatcorrExpInsertFits(dbh, fits)) {
+        if (!flatcorrChipLinkInsertFits(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 (!flatcorrCamLinkInsertFits(dbh, fits)) {
             exit(EXIT_FAILURE);
         }
@@ -1377,4 +1403,30 @@
 
         if (!pstampDataStoreInsertFits(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 (!pstampProjectInsertFits(dbh, fits)) {
             exit(EXIT_FAILURE);
         }
Index: /trunk/ippdb/tests/insertobject.c
===================================================================
--- /trunk/ippdb/tests/insertobject.c	(revision 20204)
+++ /trunk/ippdb/tests/insertobject.c	(revision 20205)
@@ -168,5 +168,5 @@
         }
 
-        object = rawExpRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, "a string", -16, "0001-01-01T00:00:00Z");
+        object = rawExpRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -16, "0001-01-01T00:00:00Z");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -190,5 +190,5 @@
         }
 
-        object = rawImfileRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16, "0001-01-01T00:00:00Z");
+        object = rawImfileRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -16, "0001-01-01T00:00:00Z");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -256,5 +256,5 @@
         }
 
-        object = chipProcessedImfileRowAlloc(-64, -64, "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -32, -32, -32, -32, "a string", -16);
+        object = chipProcessedImfileRowAlloc(-64, -64, "a string", "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -32, -32, -32, -32, -32, "a string", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -322,5 +322,5 @@
         }
 
-        object = camProcessedExpRowAlloc(-64, "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -32, -32, -32, -32, "a string", -16);
+        object = camProcessedExpRowAlloc(-64, "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -32, -32, -32, -32, -32, -32, "a string", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -388,5 +388,5 @@
         }
 
-        object = fakeProcessedImfileRowAlloc(-64, -64, "a string", "a string", 32.32, "a string", "a string", -16, "0001-01-01T00:00:00Z");
+        object = fakeProcessedImfileRowAlloc(-64, -64, "a string", "a string", 32.32, 32.32, "a string", "a string", "a string", -16, "0001-01-01T00:00:00Z");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -476,5 +476,5 @@
         }
 
-        object = warpSkyfileRowAlloc(-64, "a string", "a string", "a string", "a string", 64.64, 64.64, 32.32, "a string", 32.32, -32, -32, -32, -32, true, -16);
+        object = warpSkyfileRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, 32.32, 32.32, "a string", 32.32, -32, -32, -32, -32, true, -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -520,5 +520,5 @@
         }
 
-        object = diffRunRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string");
+        object = diffRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -564,5 +564,5 @@
         }
 
-        object = diffSkyfileRowAlloc(-64, "a string", "a string", 64.64, 64.64, -32, 32.32, -32, 32.32, "a string", 32.32, -16);
+        object = diffSkyfileRowAlloc(-64, "a string", "a string", 64.64, 64.64, -32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, -32, 32.32, 32.32, 32.32, 32.32, "a string", 32.32, -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -586,5 +586,5 @@
         }
 
-        object = stackRunRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string");
+        object = stackRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -630,5 +630,5 @@
         }
 
-        object = stackSumSkyfileRowAlloc(-64, "a string", "a string", 64.64, 64.64, 32.32, "a string", 32.32, -16);
+        object = stackSumSkyfileRowAlloc(-64, "a string", "a string", 64.64, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, -32, -32, 32.32, 32.32, -32, "a string", 32.32, -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -652,5 +652,5 @@
         }
 
-        object = detRunRowAlloc(-64, -32, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", 32.32, 32.32, "a string", -32);
+        object = detRunRowAlloc(-64, -32, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", 32.32, 32.32, "a string", -64, -32);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -696,5 +696,5 @@
         }
 
-        object = detProcessedImfileRowAlloc(-64, -64, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16);
+        object = detProcessedImfileRowAlloc(-64, -64, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -718,5 +718,5 @@
         }
 
-        object = detProcessedExpRowAlloc(-64, -64, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16);
+        object = detProcessedExpRowAlloc(-64, -64, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -740,5 +740,5 @@
         }
 
-        object = detStackedImfileRowAlloc(-64, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, -16);
+        object = detStackedImfileRowAlloc(-64, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -762,5 +762,5 @@
         }
 
-        object = detNormalizedStatImfileRowAlloc(-64, -32, "a string", 32.32, -16);
+        object = detNormalizedStatImfileRowAlloc(-64, -32, "a string", 32.32, "a string", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -784,5 +784,5 @@
         }
 
-        object = detNormalizedImfileRowAlloc(-64, -32, "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16);
+        object = detNormalizedImfileRowAlloc(-64, -32, "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -806,5 +806,5 @@
         }
 
-        object = detNormalizedExpRowAlloc(-64, -32, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16);
+        object = detNormalizedExpRowAlloc(-64, -32, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -828,5 +828,5 @@
         }
 
-        object = detResidImfileRowAlloc(-64, -32, -64, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16);
+        object = detResidImfileRowAlloc(-64, -32, -64, -32, -64, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -850,5 +850,5 @@
         }
 
-        object = detResidExpRowAlloc(-64, -32, -64, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", true, -16);
+        object = detResidExpRowAlloc(-64, -32, -64, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", true, -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -872,5 +872,5 @@
         }
 
-        object = detRunSummaryRowAlloc(-64, -32, 64.64, 64.64, 64.64, true, -16);
+        object = detRunSummaryRowAlloc(-64, -32, "a string", 64.64, 64.64, 64.64, true, -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -894,5 +894,5 @@
         }
 
-        object = detRegisteredImfileRowAlloc(-64, -32, "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16);
+        object = detRegisteredImfileRowAlloc(-64, -32, "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -1114,5 +1114,5 @@
         }
 
-        object = flatcorrRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string");
+        object = flatcorrRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -1129,17 +1129,39 @@
     {
         psDB            *dbh;
-        flatcorrExpRow  *object;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        object = flatcorrExpRowAlloc(-64, -64);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!flatcorrExpInsertObject(dbh, object)) {
+        flatcorrChipLinkRow *object;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        object = flatcorrChipLinkRowAlloc(-64, -64);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!flatcorrChipLinkInsertObject(dbh, object)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+        flatcorrCamLinkRow *object;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        object = flatcorrCamLinkRowAlloc(-64, -64, -64);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!flatcorrCamLinkInsertObject(dbh, object)) {
             exit(EXIT_FAILURE);
         }
@@ -1173,4 +1195,26 @@
     {
         psDB            *dbh;
+        pstampProjectRow *object;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        object = pstampProjectRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", true);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!pstampProjectInsertObject(dbh, object)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
         pstampRequestRow *object;
 
@@ -1202,5 +1246,5 @@
         }
 
-        object = pstampJobRowAlloc(-64, -64, "a string", "a string", "a string", -32, "a string", "a string", "a string");
+        object = pstampJobRowAlloc(-64, -64, "a string", "a string", "a string", -32, "a string", -64, "a string", "a string");
         if (!object) {
             exit(EXIT_FAILURE);
Index: /trunk/ippdb/tests/metadatafromobject.c
===================================================================
--- /trunk/ippdb/tests/metadatafromobject.c	(revision 20204)
+++ /trunk/ippdb/tests/metadatafromobject.c	(revision 20205)
@@ -360,5 +360,5 @@
         bool            status;
 
-        object = rawExpRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, "a string", -16, "0001-01-01T00:00:00Z");
+        object = rawExpRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -16, "0001-01-01T00:00:00Z");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -430,4 +430,12 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(psMetadataLookupPtr(&status, md, "obs_mode"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "obs_group"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataLookupF32(&status, md, "airmass") == 32.32) {
             psFree(md);
@@ -586,5 +594,21 @@
             exit(EXIT_FAILURE);
         }
-        if (!psMetadataLookupF32(&status, md, "solang") == 32.32) {
+        if (!psMetadataLookupF32(&status, md, "sun_angle") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "sun_alt") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "moon_angle") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "moon_alt") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "moon_phase") == 32.32) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -609,5 +633,5 @@
         bool            status;
 
-        object = rawImfileRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16, "0001-01-01T00:00:00Z");
+        object = rawImfileRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -16, "0001-01-01T00:00:00Z");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -667,4 +691,12 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(psMetadataLookupPtr(&status, md, "obs_mode"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "obs_group"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataLookupF32(&status, md, "airmass") == 32.32) {
             psFree(md);
@@ -823,4 +855,24 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataLookupF32(&status, md, "sun_angle") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "sun_alt") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "moon_angle") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "moon_alt") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "moon_phase") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(psMetadataLookupPtr(&status, md, "hostname"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
@@ -936,5 +988,5 @@
         bool            status;
 
-        object = chipProcessedImfileRowAlloc(-64, -64, "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -32, -32, -32, -32, "a string", -16);
+        object = chipProcessedImfileRowAlloc(-64, -64, "a string", "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -32, -32, -32, -32, -32, "a string", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -958,4 +1010,8 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(psMetadataLookupPtr(&status, md, "data_state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
@@ -994,4 +1050,295 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataLookupF32(&status, md, "ap_resid") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "ap_resid_stdev") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "fwhm_major") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "fwhm_minor") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m2") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m2_err") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m2_lq") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m2_uq") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m2c") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m2c_err") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m2c_lq") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m2c_uq") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m2s") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m2s_err") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m2s_lq") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m2s_uq") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m3") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m3_err") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m3_lq") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m3_uq") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m4") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m4_err") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m4_lq") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m4_uq") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "dtime_detrend") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "dtime_photom") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "dtime_total") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "dtime_script") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "hostname"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "n_stars") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "n_psfstars") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "n_iqstars") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "n_extended") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "n_cr") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        chipMaskRow     *object;
+        bool            status;
+
+        object = chipMaskRowAlloc("a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = chipMaskMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        camRunRow       *object;
+        bool            status;
+
+        object = camRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = camRunMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "workdir_state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "reduction"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "expgroup"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "tess_id"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "end_stage"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        camProcessedExpRow *object;
+        bool            status;
+
+        object = camProcessedExpRowAlloc(-64, "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -32, -32, -32, -32, -32, -32, "a string", -16);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = camProcessedExpMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "bg") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "bg_stdev") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "bg_mean_stdev") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "bias") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "bias_stdev") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "fringe_0") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "fringe_1") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "fringe_2") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataLookupF32(&status, md, "sigma_ra") == 32.32) {
             psFree(md);
@@ -1026,9 +1373,85 @@
             exit(EXIT_FAILURE);
         }
-        if (!psMetadataLookupF32(&status, md, "dtime_detrend") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "dtime_photom") == 32.32) {
+        if (!psMetadataLookupF32(&status, md, "iq_m2") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m2_err") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m2_lq") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m2_uq") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m2c") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m2c_err") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m2c_lq") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m2c_uq") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m2s") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m2s_err") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m2s_lq") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m2s_uq") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m3") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m3_err") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m3_lq") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m3_uq") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m4") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m4_err") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m4_lq") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "iq_m4_uq") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "dtime_script") == 32.32) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -1038,4 +1461,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataLookupF32(&status, md, "dtime_addstar") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(psMetadataLookupPtr(&status, md, "hostname"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
@@ -1046,4 +1473,12 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataLookupS32(&status, md, "n_psfstars") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "n_iqstars") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataLookupS32(&status, md, "n_extended") == -32) {
             psFree(md);
@@ -1071,13 +1506,13 @@
     {
         psMetadata      *md;
-        chipMaskRow     *object;
-        bool            status;
-
-        object = chipMaskRowAlloc("a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = chipMaskMetadataFromObject(object);
+        camMaskRow      *object;
+        bool            status;
+
+        object = camMaskRowAlloc("a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = camMaskMetadataFromObject(object);
         if (!md) {
             exit(EXIT_FAILURE);
@@ -1096,13 +1531,13 @@
     {
         psMetadata      *md;
-        camRunRow       *object;
-        bool            status;
-
-        object = camRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = camRunMetadataFromObject(object);
+        fakeRunRow      *object;
+        bool            status;
+
+        object = fakeRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = fakeRunMetadataFromObject(object);
         if (!md) {
             exit(EXIT_FAILURE);
@@ -1125,4 +1560,156 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "reduction"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "expgroup"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "tess_id"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "end_stage"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        fakeProcessedImfileRow *object;
+        bool            status;
+
+        object = fakeProcessedImfileRowAlloc(-64, -64, "a string", "a string", 32.32, 32.32, "a string", "a string", "a string", -16, "0001-01-01T00:00:00Z");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = fakeProcessedImfileMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "dtime_fake") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "dtime_script") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "hostname"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "data_state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        fakeMaskRow     *object;
+        bool            status;
+
+        object = fakeMaskRowAlloc("a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = fakeMaskMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        warpRunRow      *object;
+        bool            status;
+
+        object = warpRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", true);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = warpRunMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "mode"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(psMetadataLookupPtr(&status, md, "workdir_state"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
@@ -1133,9 +1720,215 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "tess_id"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "end_stage"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupBool(&status, md, "magiced") == true) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        warpSkyCellMapRow *object;
+        bool            status;
+
+        object = warpSkyCellMapRowAlloc(-64, "a string", "a string", "a string", -16);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = warpSkyCellMapMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "skycell_id"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "tess_id"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        warpSkyfileRow  *object;
+        bool            status;
+
+        object = warpSkyfileRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, 32.32, 32.32, "a string", 32.32, -32, -32, -32, -32, true, -16);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = warpSkyfileMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "skycell_id"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "tess_id"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "data_state"), "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 (!psMetadataLookupF32(&status, md, "dtime_warp") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "dtime_script") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "hostname"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "good_frac") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "xmin") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "xmax") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "ymin") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "ymax") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupBool(&status, md, "ignored") == true) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        warpMaskRow     *object;
+        bool            status;
+
+        object = warpMaskRowAlloc("a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = warpMaskMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        diffRunRow      *object;
+        bool            status;
+
+        object = diffRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = diffRunMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(psMetadataLookupPtr(&status, md, "reduction"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
             exit(EXIT_FAILURE);
         }
-        if (strncmp(psMetadataLookupPtr(&status, md, "expgroup"), "a string", MAX_STRING_LENGTH)) {
+        if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -1145,27 +1938,76 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "skycell_id"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(psMetadataLookupPtr(&status, md, "tess_id"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
             exit(EXIT_FAILURE);
         }
-        if (strncmp(psMetadataLookupPtr(&status, md, "end_stage"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        camProcessedExpRow *object;
-        bool            status;
-
-        object = camProcessedExpRowAlloc(-64, "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, "a string", -32, -32, -32, -32, "a string", -16);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = camProcessedExpMetadataFromObject(object);
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        diffInputSkyfileRow *object;
+        bool            status;
+
+        object = diffInputSkyfileRowAlloc(-64, true, -64, -64, "a string", "a string", "a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = diffInputSkyfileMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupBool(&status, md, "template") == true) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "skycell_id"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "tess_id"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "kind"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        diffSkyfileRow  *object;
+        bool            status;
+
+        object = diffSkyfileRowAlloc(-64, "a string", "a string", 64.64, 64.64, -32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, -32, 32.32, 32.32, 32.32, 32.32, "a string", 32.32, -16);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = diffSkyfileMetadataFromObject(object);
         if (!md) {
             exit(EXIT_FAILURE);
@@ -1181,77 +2023,73 @@
             exit(EXIT_FAILURE);
         }
-        if (!psMetadataLookupF32(&status, md, "bg") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "bg_stdev") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "bg_mean_stdev") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "bias") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "bias_stdev") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "fringe_0") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "fringe_1") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "fringe_2") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "sigma_ra") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "sigma_dec") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "ap_resid") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "ap_resid_stdev") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "zp_mean") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "zp_stdev") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "fwhm_major") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "fwhm_minor") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "dtime_detrend") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "dtime_photom") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "dtime_astrom") == 32.32) {
+        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "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 (!psMetadataLookupS32(&status, md, "stamps_num") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "stamps_mean") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "stamps_rms") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "norm") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "bg_diff") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "kernel_x") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "kernel_y") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "kernel_xx") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "kernel_xy") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "kernel_yy") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "sources") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "dtime_diff") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "dtime_match") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "dtime_phot") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "dtime_script") == 32.32) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -1261,17 +2099,122 @@
             exit(EXIT_FAILURE);
         }
-        if (!psMetadataLookupS32(&status, md, "n_stars") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "n_extended") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "n_cr") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "n_astrom") == -32) {
+        if (!psMetadataLookupF32(&status, md, "good_frac") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        stackRunRow     *object;
+        bool            status;
+
+        object = stackRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = stackRunMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "reduction"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "skycell_id"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "tess_id"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        stackInputSkyfileRow *object;
+        bool            status;
+
+        object = stackInputSkyfileRowAlloc(-64, -64);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = stackInputSkyfileMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        stackSumSkyfileRow *object;
+        bool            status;
+
+        object = stackSumSkyfileRowAlloc(-64, "a string", "a string", 64.64, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, -32, -32, 32.32, 32.32, -32, "a string", 32.32, -16);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = stackSumSkyfileMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -1281,47 +2224,1203 @@
             exit(EXIT_FAILURE);
         }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        camMaskRow      *object;
-        bool            status;
-
-        object = camMaskRowAlloc("a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = camMaskMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
+        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 (!psMetadataLookupF32(&status, md, "dtime_stack") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "dtime_match_mean") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "dtime_match_stdev") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "dtime_initial") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "dtime_reject") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "dtime_final") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "dtime_phot") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "dtime_script") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "match_mean") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "match_stdev") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "match_rms") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "stamps_mean") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "stamps_stdev") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "stamps_min") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "reject_images") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "reject_pix_mean") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "reject_pix_stdev") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "sources") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "hostname"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "good_frac") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        detRunRow       *object;
+        bool            status;
+
+        object = detRunRowAlloc(-64, -32, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", 32.32, 32.32, "a string", -64, -32);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = detRunMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "det_type"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "mode"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "filelevel"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            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 (strncmp(psMetadataLookupPtr(&status, md, "reduction"), "a string", MAX_STRING_LENGTH)) {
+            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_min") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "airmass_max") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "exp_time_min") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "exp_time_max") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "ccd_temp_min") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "ccd_temp_max") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "posang_min") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "posang_max") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "solang_min") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "solang_max") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
             exit(EXIT_FAILURE);
         }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        fakeRunRow      *object;
-        bool            status;
-
-        object = fakeRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = fakeRunMetadataFromObject(object);
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "ref_iter") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        detInputExpRow  *object;
+        bool            status;
+
+        object = detInputExpRowAlloc(-64, -32, -64, true);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = detInputExpMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupBool(&status, md, "include") == true) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        detProcessedImfileRow *object;
+        bool            status;
+
+        object = detProcessedImfileRowAlloc(-64, -64, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = detProcessedImfileMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
+            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 (!psMetadataLookupF64(&status, md, "fringe_0") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "fringe_1") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "fringe_2") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_1") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_2") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_3") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_4") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_5") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "data_state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        detProcessedExpRow *object;
+        bool            status;
+
+        object = detProcessedExpRowAlloc(-64, -64, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = detProcessedExpMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            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 (!psMetadataLookupF64(&status, md, "fringe_0") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "fringe_1") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "fringe_2") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_1") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_2") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_3") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_4") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_5") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "data_state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        detStackedImfileRow *object;
+        bool            status;
+
+        object = detStackedImfileRowAlloc(-64, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = detStackedImfileMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
+            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 (!psMetadataLookupF64(&status, md, "user_1") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_2") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_3") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_4") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_5") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "data_state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        detNormalizedStatImfileRow *object;
+        bool            status;
+
+        object = detNormalizedStatImfileRowAlloc(-64, -32, "a string", 32.32, "a string", -16);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = detNormalizedStatImfileMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "norm") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "data_state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        detNormalizedImfileRow *object;
+        bool            status;
+
+        object = detNormalizedImfileRowAlloc(-64, -32, "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = detNormalizedImfileMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "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 (!psMetadataLookupF64(&status, md, "user_1") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_2") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_3") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_4") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_5") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "data_state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        detNormalizedExpRow *object;
+        bool            status;
+
+        object = detNormalizedExpRowAlloc(-64, -32, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = detNormalizedExpMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            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 (!psMetadataLookupF64(&status, md, "user_1") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_2") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_3") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_4") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_5") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "data_state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        detResidImfileRow *object;
+        bool            status;
+
+        object = detResidImfileRowAlloc(-64, -32, -64, -32, -64, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = detResidImfileMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "ref_iter") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
+            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 (!psMetadataLookupF64(&status, md, "bg_skewness") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "bg_kurtosis") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "bin_stdev") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "fringe_0") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "fringe_1") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "fringe_2") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "fringe_resid_0") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "fringe_resid_1") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "fringe_resid_2") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_1") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_2") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_3") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_4") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_5") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "data_state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        detResidExpRow  *object;
+        bool            status;
+
+        object = detResidExpRowAlloc(-64, -32, -64, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", true, -16);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = detResidExpMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            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 (!psMetadataLookupF64(&status, md, "bg_skewness") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "bg_kurtosis") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "bin_stdev") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "fringe_0") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "fringe_1") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "fringe_2") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "fringe_resid_0") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "fringe_resid_1") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "fringe_resid_2") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_1") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_2") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_3") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_4") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_5") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "data_state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupBool(&status, md, "accept") == true) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        detRunSummaryRow *object;
+        bool            status;
+
+        object = detRunSummaryRowAlloc(-64, -32, "a string", 64.64, 64.64, 64.64, true, -16);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = detRunSummaryMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "data_state"), "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 (!psMetadataLookupBool(&status, md, "accept") == true) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        detRegisteredImfileRow *object;
+        bool            status;
+
+        object = detRegisteredImfileRowAlloc(-64, -32, "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = detRegisteredImfileMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "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 (!psMetadataLookupF64(&status, md, "user_1") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_2") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_3") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_4") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "user_5") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "data_state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        detCorrectedExpRow *object;
+        bool            status;
+
+        object = detCorrectedExpRowAlloc(-64, -64, "a string", -64, "a string", "a string", "a string", -16);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = detCorrectedExpMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "corr_type"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        detCorrectedImfileRow *object;
+        bool            status;
+
+        object = detCorrectedImfileRowAlloc(-64, -64, "a string", "a string", "a string", -16);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = detCorrectedImfileMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        magicRunRow     *object;
+        bool            status;
+
+        object = magicRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", -16);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = magicRunMetadataFromObject(object);
         if (!md) {
             exit(EXIT_FAILURE);
@@ -1344,13 +3443,412 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(psMetadataLookupPtr(&status, md, "workdir_state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
             exit(EXIT_FAILURE);
         }
+        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        magicInputSkyfileRow *object;
+        bool            status;
+
+        object = magicInputSkyfileRowAlloc(-64, -64, "a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = magicInputSkyfileMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "node"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        magicTreeRow    *object;
+        bool            status;
+
+        object = magicTreeRowAlloc(-64, "a string", "a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = magicTreeMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "node"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "dep"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        magicNodeResultRow *object;
+        bool            status;
+
+        object = magicNodeResultRowAlloc(-64, "a string", "a string", -16);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = magicNodeResultMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "node"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        magicMaskRow    *object;
+        bool            status;
+
+        object = magicMaskRowAlloc(-64, "a string", -32, -16);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = magicMaskMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "streaks") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        calDBRow        *object;
+        bool            status;
+
+        object = calDBRowAlloc(-64, "a string", "a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = calDBMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        calRunRow       *object;
+        bool            status;
+
+        object = calRunRowAlloc(-64, "a string", "a string", "a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = calRunMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "region"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "last_step"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        flatcorrRunRow  *object;
+        bool            status;
+
+        object = flatcorrRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", -16);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = flatcorrRunMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(psMetadataLookupPtr(&status, md, "reduction"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
             exit(EXIT_FAILURE);
         }
-        if (strncmp(psMetadataLookupPtr(&status, md, "expgroup"), "a string", MAX_STRING_LENGTH)) {
+        if (strncmp(psMetadataLookupPtr(&status, md, "region"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "hostname"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        flatcorrChipLinkRow *object;
+        bool            status;
+
+        object = flatcorrChipLinkRowAlloc(-64, -64);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = flatcorrChipLinkMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        flatcorrCamLinkRow *object;
+        bool            status;
+
+        object = flatcorrCamLinkRowAlloc(-64, -64, -64);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = flatcorrCamLinkMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        pstampDataStoreRow *object;
+        bool            status;
+
+        object = pstampDataStoreRowAlloc(-64, "a string", "a string", "a string", "a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = pstampDataStoreMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "lastFileset"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "outProduct"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        pstampProjectRow *object;
+        bool            status;
+
+        object = pstampProjectRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", true);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = pstampProjectMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "name"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "dbname"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -1360,43 +3858,56 @@
             exit(EXIT_FAILURE);
         }
-        if (strncmp(psMetadataLookupPtr(&status, md, "tess_id"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "end_stage"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        fakeProcessedImfileRow *object;
-        bool            status;
-
-        object = fakeProcessedImfileRowAlloc(-64, -64, "a string", "a string", 32.32, "a string", "a string", -16, "0001-01-01T00:00:00Z");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = fakeProcessedImfileMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
+        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 (!psMetadataLookupBool(&status, md, "need_magic") == true) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        pstampRequestRow *object;
+        bool            status;
+
+        object = pstampRequestRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", -32);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = pstampRequestMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "name"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "reqType"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "outProduct"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -1406,75 +3917,36 @@
             exit(EXIT_FAILURE);
         }
-        if (!psMetadataLookupF32(&status, md, "dtime_fake") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "hostname"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        fakeMaskRow     *object;
-        bool            status;
-
-        object = fakeMaskRowAlloc("a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = fakeMaskMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        warpRunRow      *object;
-        bool            status;
-
-        object = warpRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", true);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = warpRunMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "mode"), "a string", MAX_STRING_LENGTH)) {
+        if (!psMetadataLookupS32(&status, md, "fault") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        pstampJobRow    *object;
+        bool            status;
+
+        object = pstampJobRowAlloc(-64, -64, "a string", "a string", "a string", -32, "a string", -64, "a string", "a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = pstampJobMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "rownum"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -1484,103 +3956,9 @@
             exit(EXIT_FAILURE);
         }
-        if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "workdir_state"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "tess_id"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "end_stage"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupBool(&status, md, "magiced") == true) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        warpSkyCellMapRow *object;
-        bool            status;
-
-        object = warpSkyCellMapRowAlloc(-64, "a string", "a string", "a string", -16);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = warpSkyCellMapMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "skycell_id"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "tess_id"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        warpSkyfileRow  *object;
-        bool            status;
-
-        object = warpSkyfileRowAlloc(-64, "a string", "a string", "a string", "a string", 64.64, 64.64, 32.32, "a string", 32.32, -32, -32, -32, -32, true, -16);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = warpSkyfileMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "skycell_id"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "tess_id"), "a string", MAX_STRING_LENGTH)) {
+        if (strncmp(psMetadataLookupPtr(&status, md, "jobType"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "fault") == -32) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -1590,1880 +3968,4 @@
             exit(EXIT_FAILURE);
         }
-        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "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 (!psMetadataLookupF32(&status, md, "dtime_warp") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "hostname"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "good_frac") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "xmin") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "xmax") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "ymin") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "ymax") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupBool(&status, md, "ignored") == true) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        warpMaskRow     *object;
-        bool            status;
-
-        object = warpMaskRowAlloc("a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = warpMaskMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        diffRunRow      *object;
-        bool            status;
-
-        object = diffRunRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = diffRunMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "skycell_id"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "tess_id"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        diffInputSkyfileRow *object;
-        bool            status;
-
-        object = diffInputSkyfileRowAlloc(-64, true, -64, -64, "a string", "a string", "a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = diffInputSkyfileMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupBool(&status, md, "template") == true) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "skycell_id"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "tess_id"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "kind"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        diffSkyfileRow  *object;
-        bool            status;
-
-        object = diffSkyfileRowAlloc(-64, "a string", "a string", 64.64, 64.64, -32, 32.32, -32, 32.32, "a string", 32.32, -16);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = diffSkyfileMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "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 (!psMetadataLookupS32(&status, md, "stamps_num") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "stamps_rms") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "sources") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "dtime_diff") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "hostname"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "good_frac") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        stackRunRow     *object;
-        bool            status;
-
-        object = stackRunRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = stackRunMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "skycell_id"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "tess_id"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        stackInputSkyfileRow *object;
-        bool            status;
-
-        object = stackInputSkyfileRowAlloc(-64, -64);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = stackInputSkyfileMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        stackSumSkyfileRow *object;
-        bool            status;
-
-        object = stackSumSkyfileRowAlloc(-64, "a string", "a string", 64.64, 64.64, 32.32, "a string", 32.32, -16);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = stackSumSkyfileMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "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 (!psMetadataLookupF32(&status, md, "dtime_stack") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "hostname"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "good_frac") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        detRunRow       *object;
-        bool            status;
-
-        object = detRunRowAlloc(-64, -32, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", 32.32, 32.32, "a string", -32);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = detRunMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "det_type"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "mode"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "filelevel"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            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 (strncmp(psMetadataLookupPtr(&status, md, "reduction"), "a string", MAX_STRING_LENGTH)) {
-            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_min") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "airmass_max") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "exp_time_min") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "exp_time_max") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "ccd_temp_min") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "ccd_temp_max") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "posang_min") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "posang_max") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "solang_min") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "solang_max") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "parent") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        detInputExpRow  *object;
-        bool            status;
-
-        object = detInputExpRowAlloc(-64, -32, -64, true);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = detInputExpMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupBool(&status, md, "include") == true) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        detProcessedImfileRow *object;
-        bool            status;
-
-        object = detProcessedImfileRowAlloc(-64, -64, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = detProcessedImfileMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
-            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 (!psMetadataLookupF64(&status, md, "fringe_0") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "fringe_1") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "fringe_2") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_1") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_2") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_3") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_4") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_5") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        detProcessedExpRow *object;
-        bool            status;
-
-        object = detProcessedExpRowAlloc(-64, -64, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = detProcessedExpMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            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 (!psMetadataLookupF64(&status, md, "fringe_0") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "fringe_1") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "fringe_2") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_1") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_2") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_3") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_4") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_5") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        detStackedImfileRow *object;
-        bool            status;
-
-        object = detStackedImfileRowAlloc(-64, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, -16);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = detStackedImfileMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
-            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 (!psMetadataLookupF64(&status, md, "user_1") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_2") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_3") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_4") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_5") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        detNormalizedStatImfileRow *object;
-        bool            status;
-
-        object = detNormalizedStatImfileRowAlloc(-64, -32, "a string", 32.32, -16);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = detNormalizedStatImfileMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "norm") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        detNormalizedImfileRow *object;
-        bool            status;
-
-        object = detNormalizedImfileRowAlloc(-64, -32, "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = detNormalizedImfileMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "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 (!psMetadataLookupF64(&status, md, "user_1") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_2") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_3") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_4") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_5") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        detNormalizedExpRow *object;
-        bool            status;
-
-        object = detNormalizedExpRowAlloc(-64, -32, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = detNormalizedExpMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            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 (!psMetadataLookupF64(&status, md, "user_1") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_2") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_3") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_4") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_5") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        detResidImfileRow *object;
-        bool            status;
-
-        object = detResidImfileRowAlloc(-64, -32, -64, "a string", "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = detResidImfileMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
-            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 (!psMetadataLookupF64(&status, md, "bg_skewness") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "bg_kurtosis") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "bin_stdev") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "fringe_0") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "fringe_1") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "fringe_2") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "fringe_resid_0") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "fringe_resid_1") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "fringe_resid_2") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_1") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_2") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_3") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_4") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_5") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        detResidExpRow  *object;
-        bool            status;
-
-        object = detResidExpRowAlloc(-64, -32, -64, "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", true, -16);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = detResidExpMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            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 (!psMetadataLookupF64(&status, md, "bg_skewness") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "bg_kurtosis") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "bin_stdev") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "fringe_0") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "fringe_1") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "fringe_2") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "fringe_resid_0") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "fringe_resid_1") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "fringe_resid_2") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_1") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_2") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_3") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_4") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_5") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupBool(&status, md, "accept") == true) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        detRunSummaryRow *object;
-        bool            status;
-
-        object = detRunSummaryRowAlloc(-64, -32, 64.64, 64.64, 64.64, true, -16);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = detRunSummaryMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
-            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 (!psMetadataLookupBool(&status, md, "accept") == true) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        detRegisteredImfileRow *object;
-        bool            status;
-
-        object = detRegisteredImfileRowAlloc(-64, -32, "a string", "a string", 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", -16);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = detRegisteredImfileMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "iteration") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "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 (!psMetadataLookupF64(&status, md, "user_1") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_2") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_3") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_4") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "user_5") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        detCorrectedExpRow *object;
-        bool            status;
-
-        object = detCorrectedExpRowAlloc(-64, -64, "a string", -64, "a string", "a string", "a string", -16);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = detCorrectedExpMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "corr_type"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        detCorrectedImfileRow *object;
-        bool            status;
-
-        object = detCorrectedImfileRowAlloc(-64, -64, "a string", "a string", "a string", -16);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = detCorrectedImfileMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        magicRunRow     *object;
-        bool            status;
-
-        object = magicRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", -16);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = magicRunMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "workdir_state"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        magicInputSkyfileRow *object;
-        bool            status;
-
-        object = magicInputSkyfileRowAlloc(-64, -64, "a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = magicInputSkyfileMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "node"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        magicTreeRow    *object;
-        bool            status;
-
-        object = magicTreeRowAlloc(-64, "a string", "a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = magicTreeMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "node"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "dep"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        magicNodeResultRow *object;
-        bool            status;
-
-        object = magicNodeResultRowAlloc(-64, "a string", "a string", -16);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = magicNodeResultMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "node"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        magicMaskRow    *object;
-        bool            status;
-
-        object = magicMaskRowAlloc(-64, "a string", -32, -16);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = magicMaskMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "streaks") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        calDBRow        *object;
-        bool            status;
-
-        object = calDBRowAlloc(-64, "a string", "a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = calDBMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        calRunRow       *object;
-        bool            status;
-
-        object = calRunRowAlloc(-64, "a string", "a string", "a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = calRunMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "region"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "last_step"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        flatcorrRunRow  *object;
-        bool            status;
-
-        object = flatcorrRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = flatcorrRunMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "region"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        flatcorrExpRow  *object;
-        bool            status;
-
-        object = flatcorrExpRowAlloc(-64, -64);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = flatcorrExpMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        pstampDataStoreRow *object;
-        bool            status;
-
-        object = pstampDataStoreRowAlloc(-64, "a string", "a string", "a string", "a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = pstampDataStoreMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "lastFileset"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "outProduct"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        pstampRequestRow *object;
-        bool            status;
-
-        object = pstampRequestRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", -32);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = pstampRequestMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "name"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "reqType"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "outProduct"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "fault") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        pstampJobRow    *object;
-        bool            status;
-
-        object = pstampJobRowAlloc(-64, -64, "a string", "a string", "a string", -32, "a string", "a string", "a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = pstampJobMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "rownum"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "jobType"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "fault") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
             exit(EXIT_FAILURE);
Index: /trunk/ippdb/tests/objectfrommetadata.c
===================================================================
--- /trunk/ippdb/tests/objectfrommetadata.c	(revision 20204)
+++ /trunk/ippdb/tests/objectfrommetadata.c	(revision 20205)
@@ -597,4 +597,12 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "obs_mode", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "obs_group", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, 32.32)) {
             psFree(md);
@@ -753,5 +761,21 @@
             exit(EXIT_FAILURE);
         }
-        if (!psMetadataAddF32(md, PS_LIST_TAIL, "solang", 0, NULL, 32.32)) {
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "sun_angle", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "sun_alt", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "moon_angle", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "moon_alt", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "moon_phase", 0, NULL, 32.32)) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -834,4 +858,12 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(object->obs_mode, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->obs_group, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (!object->airmass == 32.32) {
             psFree(object);
@@ -990,5 +1022,21 @@
             exit(EXIT_FAILURE);
         }
-        if (!object->solang == 32.32) {
+        if (!object->sun_angle == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->sun_alt == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->moon_angle == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->moon_alt == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->moon_phase == 32.32) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -1059,4 +1107,12 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "obs_mode", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "obs_group", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataAddF32(md, PS_LIST_TAIL, "airmass", 0, NULL, 32.32)) {
             psFree(md);
@@ -1212,4 +1268,24 @@
         }
         if (!psMetadataAddStr(md, PS_LIST_TAIL, "object", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "sun_angle", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "sun_alt", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "moon_angle", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "moon_alt", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "moon_phase", 0, NULL, 32.32)) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -1280,4 +1356,12 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(object->obs_mode, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->obs_group, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (!object->airmass == 32.32) {
             psFree(object);
@@ -1433,4 +1517,24 @@
         }
         if (strncmp(object->object, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->sun_angle == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->sun_alt == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->moon_angle == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->moon_alt == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->moon_phase == 32.32) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -1605,4 +1709,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "data_state", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataAddStr(md, PS_LIST_TAIL, "uri", 0, NULL, "a string")) {
             psFree(md);
@@ -1641,12 +1749,4 @@
             exit(EXIT_FAILURE);
         }
-        if (!psMetadataAddF32(md, PS_LIST_TAIL, "sigma_ra", 0, NULL, 32.32)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataAddF32(md, PS_LIST_TAIL, "sigma_dec", 0, NULL, 32.32)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
         if (!psMetadataAddF32(md, PS_LIST_TAIL, "ap_resid", 0, NULL, 32.32)) {
             psFree(md);
@@ -1657,12 +1757,4 @@
             exit(EXIT_FAILURE);
         }
-        if (!psMetadataAddF32(md, PS_LIST_TAIL, "zp_mean", 0, NULL, 32.32)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataAddF32(md, PS_LIST_TAIL, "zp_stdev", 0, NULL, 32.32)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
         if (!psMetadataAddF32(md, PS_LIST_TAIL, "fwhm_major", 0, NULL, 32.32)) {
             psFree(md);
@@ -1673,4 +1765,84 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m2", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m2_err", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m2_lq", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m2_uq", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m2c", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m2c_err", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m2c_lq", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m2c_uq", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m2s", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m2s_err", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m2s_lq", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m2s_uq", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m3", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m3_err", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m3_lq", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m3_uq", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m4", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m4_err", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m4_lq", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m4_uq", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataAddF32(md, PS_LIST_TAIL, "dtime_detrend", 0, NULL, 32.32)) {
             psFree(md);
@@ -1681,5 +1853,9 @@
             exit(EXIT_FAILURE);
         }
-        if (!psMetadataAddF32(md, PS_LIST_TAIL, "dtime_astrom", 0, NULL, 32.32)) {
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "dtime_total", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "dtime_script", 0, NULL, 32.32)) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -1693,4 +1869,12 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddS32(md, PS_LIST_TAIL, "n_psfstars", 0, NULL, -32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddS32(md, PS_LIST_TAIL, "n_iqstars", 0, NULL, -32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataAddS32(md, PS_LIST_TAIL, "n_extended", 0, NULL, -32)) {
             psFree(md);
@@ -1698,8 +1882,4 @@
         }
         if (!psMetadataAddS32(md, PS_LIST_TAIL, "n_cr", 0, NULL, -32)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataAddS32(md, PS_LIST_TAIL, "n_astrom", 0, NULL, -32)) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -1731,4 +1911,8 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(object->data_state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
@@ -1767,12 +1951,4 @@
             exit(EXIT_FAILURE);
         }
-        if (!object->sigma_ra == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->sigma_dec == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
         if (!object->ap_resid == 32.32) {
             psFree(object);
@@ -1783,12 +1959,4 @@
             exit(EXIT_FAILURE);
         }
-        if (!object->zp_mean == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->zp_stdev == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
         if (!object->fwhm_major == 32.32) {
             psFree(object);
@@ -1799,4 +1967,84 @@
             exit(EXIT_FAILURE);
         }
+        if (!object->iq_m2 == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2_err == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2_lq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2_uq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2c == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2c_err == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2c_lq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2c_uq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2s == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2s_err == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2s_lq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2s_uq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m3 == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m3_err == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m3_lq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m3_uq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m4 == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m4_err == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m4_lq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m4_uq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (!object->dtime_detrend == 32.32) {
             psFree(object);
@@ -1807,5 +2055,9 @@
             exit(EXIT_FAILURE);
         }
-        if (!object->dtime_astrom == 32.32) {
+        if (!object->dtime_total == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_script == 32.32) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -1819,4 +2071,12 @@
             exit(EXIT_FAILURE);
         }
+        if (!object->n_psfstars == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->n_iqstars == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (!object->n_extended == -32) {
             psFree(object);
@@ -1824,8 +2084,4 @@
         }
         if (!object->n_cr == -32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->n_astrom == -32) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -2046,9 +2302,85 @@
             exit(EXIT_FAILURE);
         }
-        if (!psMetadataAddF32(md, PS_LIST_TAIL, "dtime_detrend", 0, NULL, 32.32)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataAddF32(md, PS_LIST_TAIL, "dtime_photom", 0, NULL, 32.32)) {
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m2", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m2_err", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m2_lq", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m2_uq", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m2c", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m2c_err", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m2c_lq", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m2c_uq", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m2s", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m2s_err", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m2s_lq", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m2s_uq", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m3", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m3_err", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m3_lq", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m3_uq", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m4", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m4_err", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m4_lq", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "iq_m4_uq", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "dtime_script", 0, NULL, 32.32)) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -2058,4 +2390,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "dtime_addstar", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataAddStr(md, PS_LIST_TAIL, "hostname", 0, NULL, "a string")) {
             psFree(md);
@@ -2063,4 +2399,12 @@
         }
         if (!psMetadataAddS32(md, PS_LIST_TAIL, "n_stars", 0, NULL, -32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddS32(md, PS_LIST_TAIL, "n_psfstars", 0, NULL, -32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddS32(md, PS_LIST_TAIL, "n_iqstars", 0, NULL, -32)) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -2165,9 +2509,85 @@
             exit(EXIT_FAILURE);
         }
-        if (!object->dtime_detrend == 32.32) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->dtime_photom == 32.32) {
+        if (!object->iq_m2 == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2_err == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2_lq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2_uq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2c == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2c_err == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2c_lq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2c_uq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2s == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2s_err == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2s_lq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m2s_uq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m3 == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m3_err == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m3_lq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m3_uq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m4 == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m4_err == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m4_lq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->iq_m4_uq == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_script == 32.32) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -2177,4 +2597,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!object->dtime_addstar == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(object->hostname, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
@@ -2182,4 +2606,12 @@
         }
         if (!object->n_stars == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->n_psfstars == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->n_iqstars == -32) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -2357,4 +2789,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "dtime_script", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataAddStr(md, PS_LIST_TAIL, "hostname", 0, NULL, "a string")) {
             psFree(md);
@@ -2362,4 +2798,8 @@
         }
         if (!psMetadataAddStr(md, PS_LIST_TAIL, "path_base", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "data_state", 0, NULL, "a string")) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -2398,4 +2838,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!object->dtime_script == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(object->hostname, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
@@ -2403,4 +2847,8 @@
         }
         if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->data_state, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -2628,4 +3076,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "data_state", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg", 0, NULL, 64.64)) {
             psFree(md);
@@ -2637,4 +3089,8 @@
         }
         if (!psMetadataAddF32(md, PS_LIST_TAIL, "dtime_warp", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "dtime_script", 0, NULL, 32.32)) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -2699,4 +3155,8 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(object->data_state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (!object->bg == 64.64) {
             psFree(object);
@@ -2708,4 +3168,8 @@
         }
         if (!object->dtime_warp == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_script == 32.32) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -2784,4 +3248,12 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "label", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "reduction", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) {
             psFree(md);
@@ -2816,4 +3288,12 @@
         }
         if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -2938,8 +3418,40 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "stamps_mean", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataAddF32(md, PS_LIST_TAIL, "stamps_rms", 0, NULL, 32.32)) {
             psFree(md);
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "norm", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "bg_diff", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "kernel_x", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "kernel_y", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "kernel_xx", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "kernel_xy", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "kernel_yy", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataAddS32(md, PS_LIST_TAIL, "sources", 0, NULL, -32)) {
             psFree(md);
@@ -2947,4 +3459,16 @@
         }
         if (!psMetadataAddF32(md, PS_LIST_TAIL, "dtime_diff", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "dtime_match", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "dtime_phot", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "dtime_script", 0, NULL, 32.32)) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -2993,8 +3517,40 @@
             exit(EXIT_FAILURE);
         }
+        if (!object->stamps_mean == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (!object->stamps_rms == 32.32) {
             psFree(object);
             exit(EXIT_FAILURE);
         }
+        if (!object->norm == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->bg_diff == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->kernel_x == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->kernel_y == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->kernel_xx == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->kernel_xy == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->kernel_yy == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (!object->sources == -32) {
             psFree(object);
@@ -3002,4 +3558,16 @@
         }
         if (!object->dtime_diff == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_match == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_phot == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_script == 32.32) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -3036,4 +3604,12 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "label", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "reduction", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataAddStr(md, PS_LIST_TAIL, "dvodb", 0, NULL, "a string")) {
             psFree(md);
@@ -3072,4 +3648,12 @@
         }
         if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -3156,4 +3740,72 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "dtime_match_mean", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "dtime_match_stdev", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "dtime_initial", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "dtime_reject", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "dtime_final", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "dtime_phot", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "dtime_script", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "match_mean", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "match_stdev", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "match_rms", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "stamps_mean", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "stamps_stdev", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddS32(md, PS_LIST_TAIL, "stamps_min", 0, NULL, -32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddS32(md, PS_LIST_TAIL, "reject_images", 0, NULL, -32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "reject_pix_mean", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddF32(md, PS_LIST_TAIL, "reject_pix_stdev", 0, NULL, 32.32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddS32(md, PS_LIST_TAIL, "sources", 0, NULL, -32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataAddStr(md, PS_LIST_TAIL, "hostname", 0, NULL, "a string")) {
             psFree(md);
@@ -3196,4 +3848,72 @@
         }
         if (!object->dtime_stack == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_match_mean == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_match_stdev == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_initial == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_reject == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_final == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_phot == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->dtime_script == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->match_mean == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->match_stdev == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->match_rms == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->stamps_mean == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->stamps_stdev == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->stamps_min == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->reject_images == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->reject_pix_mean == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->reject_pix_stdev == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->sources == -32) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -3325,5 +4045,8 @@
             exit(EXIT_FAILURE);
         }
-        if (!psMetadataAddS32(md, PS_LIST_TAIL, "parent", 0, NULL, -32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddS32(md, PS_LIST_TAIL, "ref_iter", 0, NULL, -32)) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -3444,5 +4167,8 @@
             exit(EXIT_FAILURE);
         }
-        if (!object->parent == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->ref_iter == -32) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -3569,4 +4295,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "data_state", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
             psFree(md);
             exit(EXIT_FAILURE);
@@ -3644,4 +4374,8 @@
         }
         if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->data_state, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -3717,4 +4451,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "data_state", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
             psFree(md);
             exit(EXIT_FAILURE);
@@ -3784,4 +4522,8 @@
         }
         if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->data_state, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -3850,4 +4592,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "data_state", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
             psFree(md);
             exit(EXIT_FAILURE);
@@ -3910,4 +4656,8 @@
         }
         if (!object->user_5 == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->data_state, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -3940,4 +4690,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "data_state", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
             psFree(md);
             exit(EXIT_FAILURE);
@@ -3964,4 +4718,8 @@
         }
         if (!object->norm == 32.32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->data_state, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -4030,4 +4788,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "data_state", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
             psFree(md);
             exit(EXIT_FAILURE);
@@ -4090,4 +4852,8 @@
         }
         if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->data_state, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -4152,4 +4918,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "data_state", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
             psFree(md);
             exit(EXIT_FAILURE);
@@ -4208,4 +4978,8 @@
         }
         if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->data_state, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -4233,4 +5007,11 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddS32(md, PS_LIST_TAIL, "ref_iter", 0, NULL, -32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataAddStr(md, PS_LIST_TAIL, "class_id", 0, NULL, "a string")) {
             psFree(md);
@@ -4314,4 +5095,8 @@
         }
         if (!psMetadataAddStr(md, PS_LIST_TAIL, "path_base", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "data_state", 0, NULL, "a string")) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -4339,4 +5124,11 @@
             exit(EXIT_FAILURE);
         }
+        if (!object->ref_iter == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
@@ -4420,4 +5212,8 @@
         }
         if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->data_state, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -4521,4 +5317,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "data_state", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataAdd(md, PS_LIST_TAIL, "accept", PS_DATA_BOOL, NULL, true)) {
             psFree(md);
@@ -4620,4 +5420,8 @@
         }
         if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->data_state, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -4646,4 +5450,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "data_state", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataAddF64(md, PS_LIST_TAIL, "bg", 0, NULL, 64.64)) {
             psFree(md);
@@ -4678,4 +5486,8 @@
         }
         if (!object->iteration == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->data_state, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -4760,4 +5572,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "data_state", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
             psFree(md);
             exit(EXIT_FAILURE);
@@ -4820,4 +5636,8 @@
         }
         if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->data_state, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -5332,9 +6152,16 @@
             exit(EXIT_FAILURE);
         }
-        if (!psMetadataAddStr(md, PS_LIST_TAIL, "stats", 0, NULL, "a string")) {
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "reduction", 0, NULL, "a string")) {
             psFree(md);
             exit(EXIT_FAILURE);
         }
         if (!psMetadataAddStr(md, PS_LIST_TAIL, "region", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "hostname", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
             psFree(md);
             exit(EXIT_FAILURE);
@@ -5372,9 +6199,16 @@
             exit(EXIT_FAILURE);
         }
-        if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {
+        if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
         }
         if (strncmp(object->region, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->hostname, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
             psFree(object);
             exit(EXIT_FAILURE);
@@ -5386,5 +6220,5 @@
     {
         psMetadata      *md;
-        flatcorrExpRow  *object;
+        flatcorrChipLinkRow *object;
 
         md = psMetadataAlloc();
@@ -5396,5 +6230,5 @@
         }
 
-        object = flatcorrExpObjectFromMetadata(md);
+        object = flatcorrChipLinkObjectFromMetadata(md);
         if (!object) {
             psFree(md);
@@ -5404,4 +6238,40 @@
         psFree(md);
 
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        psMetadata      *md;
+        flatcorrCamLinkRow *object;
+
+        md = psMetadataAlloc();
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        object = flatcorrCamLinkObjectFromMetadata(md);
+        if (!object) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
             psFree(object);
             exit(EXIT_FAILURE);
@@ -5472,4 +6342,84 @@
     {
         psMetadata      *md;
+        pstampProjectRow *object;
+
+        md = psMetadataAlloc();
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "name", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "state", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "dbname", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "dvodb", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "camera", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "telescope", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAdd(md, PS_LIST_TAIL, "need_magic", PS_DATA_BOOL, NULL, true)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        object = pstampProjectObjectFromMetadata(md);
+        if (!object) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->name, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->dbname, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->camera, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->telescope, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->need_magic == true) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        psMetadata      *md;
         pstampRequestRow *object;
 
@@ -5579,4 +6529,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataAddStr(md, PS_LIST_TAIL, "outputBase", 0, NULL, "a string")) {
             psFree(md);
@@ -5622,4 +6575,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(object->outputBase, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
Index: /trunk/ippdb/tests/selectrowsfits.c
===================================================================
--- /trunk/ippdb/tests/selectrowsfits.c	(revision 20204)
+++ /trunk/ippdb/tests/selectrowsfits.c	(revision 20205)
@@ -1143,5 +1143,27 @@
         }
 
-        if (!flatcorrExpSelectRowsFits(dbh, fits, NULL, 1)) {
+        if (!flatcorrChipLinkSelectRowsFits(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 (!flatcorrCamLinkSelectRowsFits(dbh, fits, NULL, 1)) {
             exit(EXIT_FAILURE);
         }
@@ -1166,4 +1188,26 @@
 
         if (!pstampDataStoreSelectRowsFits(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 (!pstampProjectSelectRowsFits(dbh, fits, NULL, 1)) {
             exit(EXIT_FAILURE);
         }
