Index: trunk/ppStats/src/ppStatsChip.c
===================================================================
--- trunk/ppStats/src/ppStatsChip.c	(revision 18137)
+++ trunk/ppStats/src/ppStatsChip.c	(revision 18168)
@@ -2,9 +2,9 @@
 
 psExit ppStatsChip(psMetadata *fpaResults, // Metadata holding the fpa results
-		   pmChip *chip,     // Chip for which to get statistics
-		   psFits *fits,     // FITS file handle
-		   pmFPAview *view,  // View for analysis
-		   ppStatsData *data,// The data
-		   const pmConfig *config // Configuration
+                   pmChip *chip,     // Chip for which to get statistics
+                   psFits *fits,     // FITS file handle
+                   pmFPAview *view,  // View for analysis
+                   ppStatsData *data,// The data
+                   pmConfig *config // Configuration
     )
 {
@@ -22,5 +22,5 @@
     }
     if (!chip->file_exists && !chip->data_exists) {
-	return PS_EXIT_SUCCESS;
+        return PS_EXIT_SUCCESS;
     }
 
@@ -36,28 +36,28 @@
     // Extract Header values
     if (psListLength(data->headers)) {
-	// extract from existing headers
-	if (chip->hdu) {
-	    if (fits && !pmChipReadHeader(chip, fits, config->database)) {
-		psError (PS_ERR_IO, false, "trouble reading chip header\n");
-		psFree(chipResults);
-		return PS_EXIT_DATA_ERROR;
-	    }
-	    pmHDU *hdu = chip->hdu;     // HDU for headers
-	    p_ppStatsGetMetadata(chipResults, hdu->header, data->headers);
-	}
-	// extract from data->analysis output MD entries
-	if (psListLength(data->analysis)) {
-	    p_ppStatsGetAnalysis (chipResults, data->headers, chip->analysis, data->analysis);
-	}
+        // extract from existing headers
+        if (chip->hdu) {
+            if (fits && !pmChipReadHeader(chip, fits, config)) {
+                psError (PS_ERR_IO, false, "trouble reading chip header\n");
+                psFree(chipResults);
+                return PS_EXIT_DATA_ERROR;
+            }
+            pmHDU *hdu = chip->hdu;     // HDU for headers
+            p_ppStatsGetMetadata(chipResults, hdu->header, data->headers);
+        }
+        // extract from data->analysis output MD entries
+        if (psListLength(data->analysis)) {
+            p_ppStatsGetAnalysis (chipResults, data->headers, chip->analysis, data->analysis);
+        }
     }
 
     // Extract Concept values
     if (psListLength(data->concepts) > 0) {
-        if (fits && chip->hdu && !pmChipReadHeader(chip, fits, config->database)) {
+        if (fits && chip->hdu && !pmChipReadHeader(chip, fits, config)) {
             psError (PS_ERR_IO, false, "trouble reading chip header\n");
             psFree(chipResults);
             return PS_EXIT_DATA_ERROR;
         }
-        pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_ALL, false, false, config->database);
+        pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_ALL, false, false, config);
         p_ppStatsGetMetadata(chipResults, chip->concepts, data->concepts);
     }
@@ -73,5 +73,5 @@
     // Iterate over cells (if view->cell is set, skip all others)
     for (int i = 0; i < cells->n; i++) {
-	if ((view->cell >= 0) && (i != view->cell)) continue; 
+        if ((view->cell >= 0) && (i != view->cell)) continue;
         pmCell *cell = cells->data[i];  // Cell of interest
         psExit result = ppStatsCell(chipResults, cell, fits, view, data, config);
