Index: trunk/psModules/src/camera/pmFPARead.c
===================================================================
--- trunk/psModules/src/camera/pmFPARead.c	(revision 18028)
+++ trunk/psModules/src/camera/pmFPARead.c	(revision 18030)
@@ -97,6 +97,5 @@
         return false;
     }
-    if (!pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_CELLS |
-                            PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_DATABASE, true, NULL)) {
+    if (!pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_CELLS, true, NULL)) {
         psError(PS_ERR_IO, false, "Failed to read concepts for cell.\n");
         return false;
@@ -142,5 +141,6 @@
                                   pmReadout *readout, // Readout of interest
                                   int numScans, // Number of scans to read at a time
-                                  fpaReadType type // Type of image
+                                  fpaReadType type, // Type of image
+                                  psDB *db // Database handle for concepts
     )
 {
@@ -151,4 +151,9 @@
     psImage *image = *readoutImageByType(readout, type); // Appropriate image from readout
 
+    if (!pmConceptsReadCell(readout->parent, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_DATABASE,
+                            true, db)) {
+        psError(PS_ERR_IO, false, "Failed to read concepts for cell.");
+        return false;
+    }
     // Header and concepts have been read by a call to cellNumReadouts(), so we can just assume they're there.
 
@@ -202,5 +207,6 @@
                         int z,          // Plane number
                         int numScans,   // Number of scans to read at a time
-                        fpaReadType type // Type of image
+                        fpaReadType type, // Type of image
+                        psDB *db        // Database handle for concepts
     )
 {
@@ -230,5 +236,5 @@
     int next;                           // Next position
     int last;                           // Last position
-    if (!readoutScanProperties(&next, &last, readout, numScans, type)) {
+    if (!readoutScanProperties(&next, &last, readout, numScans, type, db)) {
         psError(PS_ERR_UNKNOWN, false, "Unable to determine readout properties.");
         return false;
@@ -387,5 +393,6 @@
                              int numScans, // Number of scans (row or col depends on CELL.READDIR); 0 for all
                              int overlap, // Number of scans (row/col) to overlap between scans
-                             fpaReadType type // Type of image
+                             fpaReadType type, // Type of image
+                             psDB *db   // Database handle for concepts
     )
 {
@@ -417,5 +424,5 @@
     int next;                           // Next position
     int last;                           // Last position
-    if (!readoutScanProperties(&next, &last, readout, numScans, type)) {
+    if (!readoutScanProperties(&next, &last, readout, numScans, type, db)) {
         psError(PS_ERR_UNKNOWN, false, "Unable to determine readout properties.");
         return false;
@@ -888,13 +895,13 @@
 
 
-bool pmReadoutMore(pmReadout *readout, psFits *fits, int z, int numScans)
+bool pmReadoutMore(pmReadout *readout, psFits *fits, int z, int numScans, psDB *db)
 {
     PS_ASSERT_PTR_NON_NULL(readout, false);
     PS_ASSERT_FITS_NON_NULL(fits, false);
 
-    return readoutMore(readout, fits, z, numScans, FPA_READ_TYPE_IMAGE);
-}
-
-bool pmReadoutReadChunk(pmReadout *readout, psFits *fits, int z, int numScans, int overlap)
+    return readoutMore(readout, fits, z, numScans, FPA_READ_TYPE_IMAGE, db);
+}
+
+bool pmReadoutReadChunk(pmReadout *readout, psFits *fits, int z, int numScans, int overlap, psDB *db)
 {
     PS_ASSERT_PTR_NON_NULL(readout, false);
@@ -903,13 +910,13 @@
     PS_ASSERT_INT_NONNEGATIVE(numScans, false);
 
-    return readoutReadChunk(readout, fits, z, numScans, overlap, FPA_READ_TYPE_IMAGE);
-}
-
-bool pmReadoutRead(pmReadout *readout, psFits *fits, int z)
+    return readoutReadChunk(readout, fits, z, numScans, overlap, FPA_READ_TYPE_IMAGE, db);
+}
+
+bool pmReadoutRead(pmReadout *readout, psFits *fits, int z, psDB *db)
 {
     PS_ASSERT_PTR_NON_NULL(readout, false);
     PS_ASSERT_FITS_NON_NULL(fits, false);
 
-    return readoutReadChunk(readout, fits, z, 0, 0, FPA_READ_TYPE_IMAGE);
+    return readoutReadChunk(readout, fits, z, 0, 0, FPA_READ_TYPE_IMAGE, db);
 }
 
@@ -951,13 +958,13 @@
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
-bool pmReadoutMoreMask(pmReadout *readout, psFits *fits, int z, int numScans)
+bool pmReadoutMoreMask(pmReadout *readout, psFits *fits, int z, int numScans, psDB *db)
 {
     PS_ASSERT_PTR_NON_NULL(readout, false);
     PS_ASSERT_FITS_NON_NULL(fits, false);
 
-    return readoutMore(readout, fits, z, numScans, FPA_READ_TYPE_MASK);
-}
-
-bool pmReadoutReadChunkMask(pmReadout *readout, psFits *fits, int z, int numScans, int overlap)
+    return readoutMore(readout, fits, z, numScans, FPA_READ_TYPE_MASK, db);
+}
+
+bool pmReadoutReadChunkMask(pmReadout *readout, psFits *fits, int z, int numScans, int overlap, psDB *db)
 {
     PS_ASSERT_PTR_NON_NULL(readout, false);
@@ -966,13 +973,13 @@
     PS_ASSERT_INT_NONNEGATIVE(numScans, false);
 
-    return readoutReadChunk(readout, fits, z, numScans, overlap, FPA_READ_TYPE_MASK);
-}
-
-bool pmReadoutReadMask(pmReadout *readout, psFits *fits, int z)
+    return readoutReadChunk(readout, fits, z, numScans, overlap, FPA_READ_TYPE_MASK, db);
+}
+
+bool pmReadoutReadMask(pmReadout *readout, psFits *fits, int z, psDB *db)
 {
     PS_ASSERT_PTR_NON_NULL(readout, false);
     PS_ASSERT_FITS_NON_NULL(fits, false);
 
-    return readoutReadChunk(readout, fits, z, 0, 0, FPA_READ_TYPE_MASK);
+    return readoutReadChunk(readout, fits, z, 0, 0, FPA_READ_TYPE_MASK, db);
 }
 
@@ -1005,13 +1012,13 @@
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
-bool pmReadoutMoreWeight(pmReadout *readout, psFits *fits, int z, int numScans)
+bool pmReadoutMoreWeight(pmReadout *readout, psFits *fits, int z, int numScans, psDB *db)
 {
     PS_ASSERT_PTR_NON_NULL(readout, false);
     PS_ASSERT_FITS_NON_NULL(fits, false);
 
-    return readoutMore(readout, fits, z, numScans, FPA_READ_TYPE_WEIGHT);
-}
-
-bool pmReadoutReadChunkWeight(pmReadout *readout, psFits *fits, int z, int numScans, int overlap)
+    return readoutMore(readout, fits, z, numScans, FPA_READ_TYPE_WEIGHT, db);
+}
+
+bool pmReadoutReadChunkWeight(pmReadout *readout, psFits *fits, int z, int numScans, int overlap, psDB *db)
 {
     PS_ASSERT_PTR_NON_NULL(readout, false);
@@ -1020,13 +1027,13 @@
     PS_ASSERT_INT_NONNEGATIVE(numScans, false);
 
-    return readoutReadChunk(readout, fits, z, numScans, overlap, FPA_READ_TYPE_WEIGHT);
-}
-
-bool pmReadoutReadWeight(pmReadout *readout, psFits *fits, int z)
+    return readoutReadChunk(readout, fits, z, numScans, overlap, FPA_READ_TYPE_WEIGHT, db);
+}
+
+bool pmReadoutReadWeight(pmReadout *readout, psFits *fits, int z, psDB *db)
 {
     PS_ASSERT_PTR_NON_NULL(readout, false);
     PS_ASSERT_FITS_NON_NULL(fits, false);
 
-    return readoutReadChunk(readout, fits, z, 0, 0, FPA_READ_TYPE_WEIGHT);
+    return readoutReadChunk(readout, fits, z, 0, 0, FPA_READ_TYPE_WEIGHT, db);
 }
 
Index: trunk/psModules/src/camera/pmFPARead.h
===================================================================
--- trunk/psModules/src/camera/pmFPARead.h	(revision 18028)
+++ trunk/psModules/src/camera/pmFPARead.h	(revision 18030)
@@ -4,6 +4,6 @@
  * @author Paul Price, IfA
  *
- * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
- * @date $Date: 2008-02-22 01:20:24 $
+ * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
+ * @date $Date: 2008-06-09 22:59:02 $
  * Copyright 2005-2006 Institute for Astronomy, University of Hawaii
  */
@@ -19,5 +19,6 @@
                    psFits *fits,        ///< FITS file from which to read
                    int z,               ///< Readout number/plane; zero-offset indexing
-                   int numScans         ///< Number of scans (rows/cols) to read
+                   int numScans,        ///< Number of scans (rows/cols) to read
+                   psDB *db             ///< Database handle for concepts
     );
 
@@ -29,5 +30,6 @@
                         int z,          ///< Readout number/plane; zero-offset indexing
                         int numScans,   ///< Number of scans (rows/cols) to read
-                        int overlap     ///< Overlap between consecutive reads
+                        int overlap,    ///< Overlap between consecutive reads
+                        psDB *db        ///< Database handle for concepts
     );
 
@@ -35,5 +37,6 @@
 bool pmReadoutRead(pmReadout *readout,  ///< Readout of interest
                    psFits *fits,        ///< FITS file from which to read
-                   int z               ///< Readout number/plane; zero-offset indexing
+                   int z,               ///< Readout number/plane; zero-offset indexing
+                   psDB *db             ///< Database handle for concepts
     );
 
@@ -92,5 +95,6 @@
                        psFits *fits,    ///< FITS file from which to read
                        int z,           ///< Readout number/plane; zero-offset indexing
-                       int numScans     ///< Number of scans (rows/cols) to read
+                       int numScans,    ///< Number of scans (rows/cols) to read
+                       psDB *db         ///< Database handle for concepts
     );
 
@@ -102,5 +106,6 @@
                             int z,      ///< Readout number/plane; zero-offset indexing
                             int numScans, ///< Number of scans (rows/cols) to read
-                            int overlap ///< Overlap between consecutive reads
+                            int overlap, ///< Overlap between consecutive reads
+                            psDB *db    ///< Database handle for concepts
     );
 
@@ -108,5 +113,6 @@
 bool pmReadoutReadMask(pmReadout *readout, ///< Readout of interest
                        psFits *fits,    ///< FITS file from which to read
-                       int z            ///< Readout number/plane; zero-offset indexing
+                       int z,           ///< Readout number/plane; zero-offset indexing
+                       psDB *db         ///< Database handle for concepts
     );
 
@@ -141,5 +147,6 @@
                          psFits *fits,  ///< FITS file from which to read
                          int z,         ///< Readout number/plane; zero-offset indexing
-                         int numScans   ///< Number of scans (rows/cols) to read
+                         int numScans,  ///< Number of scans (rows/cols) to read
+                         psDB *db       ///< Database handle for concepts
     );
 
@@ -151,5 +158,6 @@
                               int z,    ///< Readout number/plane; zero-offset indexing
                               int numScans, ///< Number of scans (rows/cols) to read
-                              int overlap ///< Overlap between consecutive reads
+                              int overlap, ///< Overlap between consecutive reads
+                              psDB *db  ///< Database handle for concepts
     );
 
@@ -157,5 +165,6 @@
 bool pmReadoutReadWeight(pmReadout *readout, ///< Readout of interest
                          psFits *fits,  ///< FITS file from which to read
-                         int z          ///< Readout number/plane; zero-offset indexing
+                         int z,         ///< Readout number/plane; zero-offset indexing
+                         psDB *db       ///< Database handle for concepts
     );
 
