Index: trunk/psModules/src/camera/pmFPAConstruct.c
===================================================================
--- trunk/psModules/src/camera/pmFPAConstruct.c	(revision 9698)
+++ trunk/psModules/src/camera/pmFPAConstruct.c	(revision 9699)
@@ -797,9 +797,18 @@
 
 
+// Print spaces to indent
+#define INDENT(FILE, LEVEL) \
+{ \
+    for (int i = 0; i < (LEVEL); i++) { \
+        fprintf(FILE, " "); \
+    } \
+}
+
 void pmFPAPrint(FILE *fd, const pmFPA *fpa, bool header, bool concepts)
 {
     PS_ASSERT_PTR_NON_NULL(fpa,);
 
-    psTrace("psModules.camera", 1, "FPA:\n");
+    IDENT(fd, 1);
+    fprintf(fd,  1, "FPA:\n");
     if (fpa->hdu) {
         pmHDUPrint(fd, fpa->hdu, 2, header);
@@ -812,5 +821,6 @@
     // Iterate over the FPA
     for (int i = 0; i < chips->n; i++) {
-        psTrace("psModules.camera", 3, "Chip: %d\n", i);
+        INDENT(fd, 3);
+        fprintf(fd, "Chip: %d\n", i);
         pmChip *chip = chips->data[i]; // The chip
         if (chip->hdu) {
@@ -824,5 +834,6 @@
         psArray *cells = chip->cells;   // Array of cells
         for (int j = 0; j < cells->n; j++) {
-            psTrace("psModules.camera", 5, "Cell: %d\n", j);
+            INDENT(fd, 5);
+            fprintf(fd, "Cell: %d\n", j);
             pmCell *cell = cells->data[j]; // The cell
             if (cell->hdu) {
@@ -836,11 +847,15 @@
             for (int k = 0; k < readouts->n; k++) {
                 pmReadout *readout = readouts->data[k]; // The readout
-                psTrace("psModules.camera", 6, "Readout %d:\n", k);
-                psTrace("psModules.camera", 7, "row0: %d\n", readout->row0);
-                psTrace("psModules.camera", 7, "col0: %d\n", readout->col0);
+                INDENT(fd, 6);
+                fprintf(fd, "Readout %d:\n", k);
+                INDENT(fd, 7);
+                fprintf(fd, "col0: %d\n", readout->col0);
+                INDENT(fd, 7);
+                fprintf(fd, "row0: %d\n", readout->row0);
                 psImage *image = readout->image; // The image
                 psList *bias = readout->bias; // The list of bias images
                 if (image) {
-                    psTrace("psModules.camera", 7, "Image: [%d:%d,%d:%d] (%dx%d)\n", image->col0, image->col0 +
+                    INDENT(fd, 7);
+                    fprintf(fd, "Image: [%d:%d,%d:%d] (%dx%d)\n", image->col0, image->col0 +
                             image->numCols, image->row0, image->row0 + image->numRows, image->numCols,
                             image->numRows);
@@ -850,5 +865,6 @@
                     psImage *biasImage = NULL; // Bias image from iteration
                     while ((biasImage = psListGetAndIncrement(biasIter))) {
-                        psTrace("psModules.camera", 7, "Bias:  [%d:%d,%d:%d] (%dx%d)\n", biasImage->col0,
+                        INDENT(fd, 7);
+                        fprintf(fd, "Bias:  [%d:%d,%d:%d] (%dx%d)\n", biasImage->col0,
                                 biasImage->col0 + biasImage->numCols, biasImage->row0,
                                 biasImage->row0 + biasImage->numRows, biasImage->numCols, biasImage->numRows);
Index: trunk/psModules/src/camera/pmHDUUtils.c
===================================================================
--- trunk/psModules/src/camera/pmHDUUtils.c	(revision 9698)
+++ trunk/psModules/src/camera/pmHDUUtils.c	(revision 9699)
@@ -80,56 +80,70 @@
 }
 
+// Print spaces to indent
+#define INDENT(FILE, LEVEL) \
+{ \
+    for (int i = 0; i < (LEVEL); i++) { \
+        fprintf(FILE, " "); \
+    } \
+}
+
 void pmHDUPrint(FILE *fd, const pmHDU *hdu, int level, bool header)
 {
     PS_ASSERT_PTR_NON_NULL(hdu,);
 
-    #ifndef PS_NO_TRACE
-
+    INDENT(fd, level);
     if (hdu->blankPHU) {
-        psTrace("psModules.camera", level, "HDU: (PHU)\n");
+        fprintf(fd, "HDU: (PHU)\n");
     } else {
-        psTrace("psModules.camera", level, "HDU: %s\n", hdu->extname);
+        fprintf(fd, "HDU: %s\n", hdu->extname);
     }
 
-    psTrace("psModules.camera", level + 1, "Format: %p\n", hdu->format);
+    INDENT(fd, level + 1);
+    fprintf(fd, "Format: %p\n", hdu->format);
     if (header) {
+        INDENT(fd, level + 1);
         if (hdu->header) {
-            psTrace("psModules.camera", level + 1, "Header:\n");
+            fprintf(fd, "Header:\n");
             psMetadataPrint(fd, hdu->header, level + 2);
         } else {
-            psTrace("psModules.camera", level + 1, "No header.\n");
+            fprintf(fd, "No header.\n");
         }
     }
 
+    INDENT(fd, level + 1);
     if (hdu->images) {
-        psTrace("psModules.camera", level + 1, "Images:\n");
+        fprintf(fd, "Images:\n");
         for (long i = 0; i < hdu->images->n; i++) {
             psImage *image = hdu->images->data[i]; // Image of interest
-            psTrace("psModules.camera", level + 2, "%ld: %dx%d\n", i, image->numCols, image->numRows);
+            INDENT(fd, level + 2);
+            fprintf(fd, "%ld: %dx%d\n", i, image->numCols, image->numRows);
         }
     } else {
-        psTrace("psModules.camera", level + 1, "NO images.\n");
+        fprintf(fd, "NO images.\n");
     }
 
+    INDENT(fd, level + 1);
     if (hdu->masks) {
-        psTrace("psModules.camera", level + 1, "Masks:\n");
+        fprintf(fd, "Masks:\n");
         for (long i = 0; i < hdu->masks->n; i++) {
             psImage *mask = hdu->masks->data[i]; // Mask of interest
-            psTrace("psModules.camera", level + 2, "%ld: %dx%d\n", i, mask->numCols, mask->numRows);
+            INDENT(fd, level + 2);
+            fprintf(fd, "%ld: %dx%d\n", i, mask->numCols, mask->numRows);
         }
     } else {
-        psTrace("psModules.camera", level + 1, "NO masks.\n");
+        fprintf(fd, "NO masks.\n");
     }
 
+    INDENT(fd, level + 1);
     if (hdu->weights) {
-        psTrace("psModules.camera", level + 1, "Weights:\n");
+        fprintf(fd, "Weights:\n");
         for (long i = 0; i < hdu->masks->n; i++) {
             psImage *weight = hdu->weights->data[i]; // Weight image of interest
-            psTrace("psModules.camera", level + 2, "%ld: %dx%d\n", i, weight->numCols, weight->numRows);
+            INDENT(fd, level + 2);
+            fprintf(fd, "%ld: %dx%d\n", i, weight->numCols, weight->numRows);
         }
     } else {
-        psTrace("psModules.camera", level + 1, "NO weights.\n");
+        fprintf(fd, "NO weights.\n");
     }
-    #endif
 
     return;
