Index: /branches/pap_branch_080320/ppMerge/src/ppMergeCamera.c
===================================================================
--- /branches/pap_branch_080320/ppMerge/src/ppMergeCamera.c	(revision 17089)
+++ /branches/pap_branch_080320/ppMerge/src/ppMergeCamera.c	(revision 17090)
@@ -175,4 +175,30 @@
     }
 
+    // Cull chips and cells that don't have data
+    // Otherwise the abundance of metadata in the concepts (esp. for GPC) can overload the memory
+    for (int i = 0; i < numFiles; i++) {
+        pmFPAfile *input = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", i); // File of interest
+        pmFPA *fpa = input->fpa;        // FPA of interest
+        psArray *chips = fpa->chips; // Array of chips in output
+        for (int i = 0; i < chips->n; i++) {
+            pmChip *chip = chips->data[i]; // Chip of interest
+            psArray *cells = chip->cells; // Array of cells
+            int culled = 0;             // Number of culled cells
+            for (int j = 0; j < cells->n; j++) {
+                pmCell *cell = cells->data[j];
+                pmHDU *hdu = pmHDUGetLowest(fpa, chip, cell); // HDU for cell
+                if (!hdu || hdu->blankPHU) {
+                    psFree(cell->concepts);
+                    cell->concepts = NULL;
+                    culled++;
+                }
+            }
+            if (culled == cells->n) {
+                psFree(chip->concepts);
+                chip->concepts = NULL;
+            }
+        }
+    }
+
     // Count the cells
     {
