Index: trunk/ppImage/src/ppImage.c
===================================================================
--- trunk/ppImage/src/ppImage.c	(revision 7639)
+++ trunk/ppImage/src/ppImage.c	(revision 7647)
@@ -2,4 +2,6 @@
 
 int main(int argc, char **argv) {
+
+    psLibInit(NULL);
 
     psTimerStart(TIMERNAME);
@@ -11,6 +13,6 @@
     pmConfig *config = ppImageArguments(&argc, argv);
     if (config == NULL) {
-	psErrorStackPrint(stderr, "");
-	exit(1);
+        psErrorStackPrint(stderr, "");
+        exit(1);
     }
 
@@ -19,12 +21,12 @@
     ppImageOptions *options = ppImageParseCamera(config);
     if (options == NULL) {
-	psErrorStackPrint(stderr, "");
-	exit(1);
+        psErrorStackPrint(stderr, "");
+        exit(1);
     }
 
     // Image Arithmetic Loop
     if (!ppImageLoop(config, options)) {
-	psErrorStackPrint(stderr, "");
-	exit(1);
+        psErrorStackPrint(stderr, "");
+        exit(1);
     }
 
@@ -42,41 +44,41 @@
     psMetadataIterator *iter = psMetadataIteratorAlloc (config->files, PS_LIST_HEAD, NULL);
     while ((item = psMetadataGetAndIncrement (iter)) != NULL) {
-	pmFPAfile *file = item->data.V;
-	pmFPA *fpa = file->fpa;
-	fprintf (stderr, "file %s\n", file->name);
-	if (!fpa) {
-	    fprintf (stderr, "  has no FPA\n");
-	    continue;
-	}
-	if (fpa->hdu) {
-	    if (fpa->hdu->images) fprintf (stderr, "  (%d,%d) images\n", -1, -1);
-	    if (fpa->hdu->weights) fprintf (stderr, "  (%d,%d) weights\n", -1, -1);
-	    if (fpa->hdu->masks) fprintf (stderr, "  (%d,%d) masks\n", -1, -1);
-	    if (fpa->hdu->header) fprintf (stderr, "  (%d,%d) header\n", -1, -1);
-	    continue;
-	}
-	fprintf (stderr, "  has no fpa data (%d,%d)\n", -1, -1);
-	for (int i = 0; i < fpa->chips->n; i++) {
-	    pmChip *chip = fpa->chips->data[i];
-	    if (chip->hdu) {
-		if (chip->hdu->images) fprintf (stderr, "  (%d,%d) images\n", i, -1);
-		if (chip->hdu->weights) fprintf (stderr, "  (%d,%d) weights\n", i, -1);
-		if (chip->hdu->masks) fprintf (stderr, "  (%d,%d) masks\n", i, -1);
-		if (chip->hdu->header) fprintf (stderr, "  (%d,%d) header\n", i, -1);
-		continue;
-	    }
-	    fprintf (stderr, "  has no chip data (%d,%d)\n", i, -1);
-	    for (int j = 0; j < chip->cells->n; j++) {
-		pmCell *cell = chip->cells->data[j];
-		if (cell->hdu) {
-		    if (cell->hdu->images) fprintf (stderr, "  (%d,%d) images\n", i, j);
-		    if (cell->hdu->weights) fprintf (stderr, "  (%d,%d) weights\n", i, j);
-		    if (cell->hdu->masks) fprintf (stderr, "  (%d,%d) masks\n", i, j);
-		    if (cell->hdu->header) fprintf (stderr, "  (%d,%d) header\n", i, j);
-		    continue;
-		}
-		fprintf (stderr, "  has no cell data (%d,%d)\n", i, j);
-	    }
-	}
+        pmFPAfile *file = item->data.V;
+        pmFPA *fpa = file->fpa;
+        fprintf (stderr, "file %s\n", file->name);
+        if (!fpa) {
+            fprintf (stderr, "  has no FPA\n");
+            continue;
+        }
+        if (fpa->hdu) {
+            if (fpa->hdu->images) fprintf (stderr, "  (%d,%d) images\n", -1, -1);
+            if (fpa->hdu->weights) fprintf (stderr, "  (%d,%d) weights\n", -1, -1);
+            if (fpa->hdu->masks) fprintf (stderr, "  (%d,%d) masks\n", -1, -1);
+            if (fpa->hdu->header) fprintf (stderr, "  (%d,%d) header\n", -1, -1);
+            continue;
+        }
+        fprintf (stderr, "  has no fpa data (%d,%d)\n", -1, -1);
+        for (int i = 0; i < fpa->chips->n; i++) {
+            pmChip *chip = fpa->chips->data[i];
+            if (chip->hdu) {
+                if (chip->hdu->images) fprintf (stderr, "  (%d,%d) images\n", i, -1);
+                if (chip->hdu->weights) fprintf (stderr, "  (%d,%d) weights\n", i, -1);
+                if (chip->hdu->masks) fprintf (stderr, "  (%d,%d) masks\n", i, -1);
+                if (chip->hdu->header) fprintf (stderr, "  (%d,%d) header\n", i, -1);
+                continue;
+            }
+            fprintf (stderr, "  has no chip data (%d,%d)\n", i, -1);
+            for (int j = 0; j < chip->cells->n; j++) {
+                pmCell *cell = chip->cells->data[j];
+                if (cell->hdu) {
+                    if (cell->hdu->images) fprintf (stderr, "  (%d,%d) images\n", i, j);
+                    if (cell->hdu->weights) fprintf (stderr, "  (%d,%d) weights\n", i, j);
+                    if (cell->hdu->masks) fprintf (stderr, "  (%d,%d) masks\n", i, j);
+                    if (cell->hdu->header) fprintf (stderr, "  (%d,%d) header\n", i, j);
+                    continue;
+                }
+                fprintf (stderr, "  has no cell data (%d,%d)\n", i, j);
+            }
+        }
     }
     psFree (iter);
