Index: trunk/psModules/src/concepts/pmConcepts.c
===================================================================
--- trunk/psModules/src/concepts/pmConcepts.c	(revision 7447)
+++ trunk/psModules/src/concepts/pmConcepts.c	(revision 7469)
@@ -189,4 +189,6 @@
     }
 
+    psTrace(__func__, 3, "Writing concepts (%x %x %x): %x\n", fpa, chip, cell, source);
+
     if (source & PM_CONCEPT_SOURCE_CAMERA) {
         pmConceptsWriteToCamera(*specs, cell, concepts);
@@ -218,10 +220,22 @@
 bool pmConceptsReadFPA(pmFPA *fpa,      // FPA for which to read concepts
                        pmConceptSource source, // The source of the concepts to read
-                       psDB *db         // Database handle
+                       bool propagateDown, // Propagate to lower levels?
+                       psDB *db        // Database handle
                       )
 {
     PS_ASSERT_PTR_NON_NULL(fpa, false);
     psTrace("psModule.concepts", 5, "Reading FPA concepts: %x %x\n", conceptsFPA, fpa->concepts);
-    return conceptsRead(&conceptsFPA, fpa, NULL, NULL, &fpa->conceptsRead, source, db, fpa->concepts);
+    bool success = conceptsRead(&conceptsFPA, fpa, NULL, NULL, &fpa->conceptsRead, source, db, fpa->concepts);
+    if (propagateDown) {
+        psArray *chips = fpa->chips;    // Array of chips
+        for (long i = 0; i < chips->n; i++) {
+            pmChip *chip = chips->data[i]; // Chip of interest
+            if (chip && !chip->hdu) {
+                success |= pmConceptsReadChip(chip, source, false, true, db);
+            }
+        }
+    }
+
+    return success;
 }
 
@@ -229,4 +243,5 @@
 bool pmConceptsWriteFPA(pmFPA *fpa,     // FPA for which to write concepts
                         pmConceptSource source, // The source of the concepts to read
+                        bool propagateDown, // Propagate to lower levels?
                         psDB *db        // Database handle
                        )
@@ -234,5 +249,15 @@
     PS_ASSERT_PTR_NON_NULL(fpa, false);
     psTrace("psModule.concepts", 5, "Writing FPA concepts: %x %x\n", conceptsFPA, fpa->concepts);
-    return conceptsWrite(&conceptsFPA, fpa, NULL, NULL, source, db, fpa->concepts);
+    bool success = conceptsWrite(&conceptsFPA, fpa, NULL, NULL, source, db, fpa->concepts);
+    if (propagateDown) {
+        psArray *chips = fpa->chips;        // Array of chips
+        for (long i = 0; i < chips->n; i++) {
+            pmChip *chip = chips->data[i];  // Chip of interest
+            if (chip && !chip->hdu) {
+                success |= pmConceptsWriteChip(chip, source, false, true, db);
+            }
+        }
+    }
+    return success;
 }
 
@@ -249,5 +274,6 @@
 bool pmConceptsReadChip(pmChip *chip,   // Chip for which to read concepts
                         pmConceptSource source, // The source of the concepts to read
-                        bool propagate, // Propagate to higher levels as well?
+                        bool propagateUp, // Propagate to higher levels?
+                        bool propagateDown, // Propagate to lower levels?
                         psDB *db        // Database handle
                        )
@@ -256,8 +282,19 @@
     psTrace("psModule.concepts", 5, "Reading chip concepts: %x %x\n", conceptsChip, chip->concepts);
     pmFPA *fpa = chip->parent;          // FPA to which the chip belongs
-    return conceptsRead(&conceptsChip, fpa, chip, NULL, &chip->conceptsRead, source, db, chip->concepts) &&
-           ((propagate && conceptsRead(&conceptsFPA, fpa, chip, NULL, &fpa->conceptsRead, source, db,
-                                       fpa->concepts)) ||
-            !propagate);
+    bool success = conceptsRead(&conceptsChip, fpa, chip, NULL, &chip->conceptsRead, source, db,
+                                chip->concepts);
+    if (propagateUp && !fpa->hdu) {
+        success |= conceptsRead(&conceptsFPA, fpa, chip, NULL, &fpa->conceptsRead, source, db, fpa->concepts);
+    }
+    if (propagateDown) {
+        psArray *cells = chip->cells;        // Array of cells
+        for (long i = 0; i < cells->n; i++) {
+            pmCell *cell = cells->data[i];  // Cell of interest
+            if (cell && !cell->hdu) {
+                success |= pmConceptsReadCell(cell, source, false, db);
+            }
+        }
+    }
+    return success;
 }
 
@@ -265,5 +302,6 @@
 bool pmConceptsWriteChip(pmChip *chip,  // Chip for which to write concepts
                          pmConceptSource source, // The source of the concepts to read
-                         bool propagate,// Propagate to higher levels as well?
+                         bool propagateUp, // Propagate to higher levels?
+                         bool propagateDown, // Propagate to lower levels?
                          psDB *db        // Database handle
                         )
@@ -272,7 +310,18 @@
     psTrace("psModule.concepts", 5, "Writing chip concepts: %x %x\n", conceptsChip, chip->concepts);
     pmFPA *fpa = chip->parent;          // FPA to which the chip belongs
-    return conceptsWrite(&conceptsChip, fpa, chip, NULL, source, db, chip->concepts) &&
-           ((propagate && conceptsWrite(&conceptsFPA, fpa, chip, NULL, source, db, fpa->concepts)) ||
-            !propagate);
+    bool success = conceptsWrite(&conceptsChip, fpa, chip, NULL, source, db, chip->concepts);
+    if (propagateUp && !fpa->hdu) {
+        success |= conceptsWrite(&conceptsFPA, fpa, chip, NULL, source, db, fpa->concepts);
+    }
+    if (propagateDown) {
+        psArray *cells = chip->cells;        // Array of cells
+        for (long i = 0; i < cells->n; i++) {
+            pmCell *cell = cells->data[i];  // Cell of interest
+            if (cell && !cell->hdu) {
+                success |= pmConceptsWriteCell(cell, source, false, db);
+            }
+        }
+    }
+    return success;
 }
 
@@ -289,5 +338,5 @@
 bool pmConceptsReadCell(pmCell *cell,   // Cell for which to read concepts
                         pmConceptSource source, // The source of the concepts to read
-                        bool propagate,// Propagate to higher levels as well?
+                        bool propagateUp, // Propagate to higher levels?
                         psDB *db        // Database handle
                        )
@@ -298,17 +347,18 @@
     pmFPA *fpa = chip->parent;          // FPA to which the chip belongs
 
-    bool cellSuccess = conceptsRead(&conceptsCell, fpa, chip, cell, &cell->conceptsRead, source, db, cell->concepts);
-
-    bool chipSuccess = true;
-    if (propagate) {
-        chipSuccess = conceptsRead(&conceptsChip, fpa, chip, cell, &chip->conceptsRead, source, db, chip->concepts);
-    }
-
-    bool fpaSuccess = true;
-    if (propagate) {
-        fpaSuccess = conceptsRead(&conceptsFPA, fpa, chip, cell, &fpa->conceptsRead, source, db, fpa->concepts);
-    }
-
-    return (cellSuccess && chipSuccess && fpaSuccess);
+    bool success = conceptsRead(&conceptsCell, fpa, chip, cell, &cell->conceptsRead, source, db,
+                                cell->concepts);
+    if (propagateUp) {
+        if (!chip->hdu) {
+            success |= conceptsRead(&conceptsChip, fpa, chip, cell, &chip->conceptsRead, source, db,
+                                    chip->concepts);
+            if (!fpa->hdu) {
+                success |= conceptsRead(&conceptsFPA, fpa, chip, cell, &fpa->conceptsRead, source, db,
+                                        fpa->concepts);
+            }
+        }
+    }
+
+    return success;
 }
 
@@ -316,5 +366,5 @@
 bool pmConceptsWriteCell(pmCell *cell,  // FPA for which to write concepts
                          pmConceptSource source, // The source of the concepts to read
-                         bool propagate,// Propagate to higher levels as well?
+                         bool propagateUp, // Propagate to higher levels?
                          psDB *db       // Database handle
                         )
@@ -324,7 +374,16 @@
     pmChip *chip = cell->parent;        // Chip to which the cell belongs
     pmFPA *fpa = chip->parent;          // FPA to which the chip belongs
-    return conceptsWrite(&conceptsCell, fpa, chip, cell, source, db, cell->concepts) &&
-           ((propagate && conceptsWrite(&conceptsChip, fpa, chip, cell, source, db, chip->concepts) &&
-             conceptsWrite(&conceptsFPA, fpa, chip, cell, source, db, fpa->concepts)) || !propagate);
+
+    bool success = conceptsWrite(&conceptsCell, fpa, chip, cell, source, db, cell->concepts);
+    if (propagateUp) {
+        if (!chip->hdu) {
+            success |= conceptsWrite(&conceptsChip, fpa, chip, cell, source, db, chip->concepts);
+            if (!fpa->hdu) {
+                success |= conceptsWrite(&conceptsFPA, fpa, chip, cell, source, db, fpa->concepts);
+            }
+        }
+    }
+
+    return success;
 }
 
