Index: trunk/ippdb/src/ippdb.h
===================================================================
--- trunk/ippdb/src/ippdb.h	(revision 14061)
+++ trunk/ippdb/src/ippdb.h	(revision 14169)
@@ -1395,4 +1395,5 @@
     char            *workdir;
     char            *workdir_state;
+    char            *reduction;
 } newExpRow;
 
@@ -1409,5 +1410,6 @@
     const char      *state,
     const char      *workdir,
-    const char      *workdir_state
+    const char      *workdir_state,
+    const char      *reduction
 );
 
@@ -1445,5 +1447,6 @@
     const char      *state,
     const char      *workdir,
-    const char      *workdir_state
+    const char      *workdir_state,
+    const char      *reduction
 );
 
@@ -1811,4 +1814,5 @@
     char            *filelevel;
     char            *workdir;
+    char            *reduction;
     char            *filter;
     psF32           airmass;
@@ -1849,4 +1853,5 @@
     const char      *filelevel,
     const char      *workdir,
+    const char      *reduction,
     const char      *filter,
     psF32           airmass,
@@ -1908,4 +1913,5 @@
     const char      *filelevel,
     const char      *workdir,
+    const char      *reduction,
     const char      *filter,
     psF32           airmass,
@@ -2568,4 +2574,5 @@
 typedef struct {
     psS64           chip_id;
+    psS64           exp_id;
     char            *state;
     char            *workdir;
@@ -2584,4 +2591,5 @@
 chipRunRow *chipRunRowAlloc(
     psS64           chip_id,
+    psS64           exp_id,
     const char      *state,
     const char      *workdir,
@@ -2621,4 +2629,5 @@
     psDB            *dbh,               ///< Database handle
     psS64           chip_id,
+    psS64           exp_id,
     const char      *state,
     const char      *workdir,
@@ -2775,205 +2784,4 @@
     FILE            *stream,            ///< a stream
     chipRunRow *object,    ///< an chipRunRow object
-    bool            mdcf                ///< format as mdconfig or simple
-);
-/** chipInputImfileRow data structure
- *
- * Structure for representing a single row of chipInputImfile table data.
- */
-
-typedef struct {
-    psS64           chip_id;
-    psS64           exp_id;
-    char            *class_id;
-} chipInputImfileRow;
-
-/** Creates a new chipInputImfileRow object
- *
- *  @return A new chipInputImfileRow object or NULL on failure.
- */
-
-chipInputImfileRow *chipInputImfileRowAlloc(
-    psS64           chip_id,
-    psS64           exp_id,
-    const char      *class_id
-);
-
-/** Creates a new chipInputImfile table
- *
- * @return true on success
- */
-
-bool chipInputImfileCreateTable(
-    psDB            *dbh                ///< Database handle
-);
-
-/** Deletes a chipInputImfile table
- *
- * @return true on success
- */
-
-bool chipInputImfileDropTable(
-    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 chipInputImfileInsert(
-    psDB            *dbh,               ///< Database handle
-    psS64           chip_id,
-    psS64           exp_id,
-    const char      *class_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 chipInputImfileDelete(
-    psDB            *dbh,               ///< Database handle
-    const psMetadata *where,            ///< Row match criteria
-    unsigned long long limit            ///< Maximum number of elements to delete 
-);
-
-/** Insert a single chipInputImfileRow object into a table
- *
- * This function constructs and inserts a single row based on it's parameters.
- *
- * @return true on success
- */
-
-bool chipInputImfileInsertObject(
-    psDB            *dbh,               ///< Database handle
-    chipInputImfileRow *object             ///< chipInputImfileRow object
-);
-
-/** Insert an array of chipInputImfileRow object into a table
- *
- * This function constructs and inserts multiple rows based on it's parameters.
- *
- * @return true on success
- */
-
-bool chipInputImfileInsertObjects(
-    psDB            *dbh,               ///< Database handle
-    psArray         *objects            ///< array of chipInputImfileRow objects
-);
-
-/** Insert data from a binary FITS table chipInputImfileRow 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 chipInputImfileInsertFits(
-    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 chipInputImfileSelectRowsFits(
-    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 chipInputImfileRow into an equivalent psMetadata
- *
- * @return A psMetadata pointer or NULL on error
- */
-
-psMetadata *chipInputImfileMetadataFromObject(
-    const chipInputImfileRow *object             ///< fooRow to convert into a psMetadata
-);
-
-/** Convert a psMetadata into an equivalent fooRow
- *
- * @return A chipInputImfileRow pointer or NULL on error
- */
-
-chipInputImfileRow *chipInputImfileObjectFromMetadata(
-    psMetadata      *md                 ///< psMetadata to convert into a fooRow
-);
-/** Selects up to limit rows from the database and returns as chipInputImfileRow objects in a psArray
- *
- *  See psDBSelectRows() for documentation on the format of where.
- *
- * @return A psArray pointer or NULL on error
- */
-
-psArray *chipInputImfileSelectRowObjects(
-    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 chipInputImfile
- *
- *  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 chipInputImfileDeleteObject(
-    psDB            *dbh,               ///< Database handle
-    const chipInputImfileRow *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 chipInputImfileDeleteRowObjects(
-    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 chipInputImfileRow 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 chipInputImfilePrintObjects(
-    FILE            *stream,            ///< a stream
-    psArray         *objects,           ///< An array of chipInputImfileRow objects
-    bool            mdcf                ///< format as mdconfig or simple
-);
-/** Formats and prints an chipInputImfileRow 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 chipInputImfilePrintObject(
-    FILE            *stream,            ///< a stream
-    chipInputImfileRow *object,    ///< an chipInputImfileRow object
     bool            mdcf                ///< format as mdconfig or simple
 );
@@ -4731,4 +4539,5 @@
     psF64           bg;
     psF64           bg_stdev;
+    psS16           fault;
 } warpSkyfileRow;
 
@@ -4745,5 +4554,6 @@
     const char      *path_base,
     psF64           bg,
-    psF64           bg_stdev
+    psF64           bg_stdev,
+    psS16           fault
 );
 
@@ -4781,5 +4591,6 @@
     const char      *path_base,
     psF64           bg,
-    psF64           bg_stdev
+    psF64           bg_stdev,
+    psS16           fault
 );
 
@@ -5365,4 +5176,5 @@
     psF64           bg;
     psF64           bg_stdev;
+    psS16           fault;
 } diffSkyfileRow;
 
@@ -5377,5 +5189,6 @@
     const char      *path_base,
     psF64           bg,
-    psF64           bg_stdev
+    psF64           bg_stdev,
+    psS16           fault
 );
 
@@ -5411,5 +5224,6 @@
     const char      *path_base,
     psF64           bg,
-    psF64           bg_stdev
+    psF64           bg_stdev,
+    psS16           fault
 );
 
@@ -5983,4 +5797,5 @@
     psF64           bg;
     psF64           bg_stdev;
+    psS16           fault;
 } stackSumSkyfileRow;
 
@@ -5995,5 +5810,6 @@
     const char      *path_base,
     psF64           bg,
-    psF64           bg_stdev
+    psF64           bg_stdev,
+    psS16           fault
 );
 
@@ -6029,5 +5845,6 @@
     const char      *path_base,
     psF64           bg,
-    psF64           bg_stdev
+    psF64           bg_stdev,
+    psS16           fault
 );
 
