Index: trunk/archive/scripts/src/phase2/pmFPAConstruct.c
===================================================================
--- trunk/archive/scripts/src/phase2/pmFPAConstruct.c	(revision 5462)
+++ trunk/archive/scripts/src/phase2/pmFPAConstruct.c	(revision 5564)
@@ -88,5 +88,5 @@
 		psString extName = contentItem->name; // The name of the extension
 		pmChip *chip = pmChipAlloc(fpa, extName); // The chip
-		chip->data = pmPixelDataAlloc(extName); // Prepare chip to receive FITS data
+		chip->hdu = p_pmHDUAlloc(extName); // Prepare chip to receive FITS data
 		if (contentItem->type != PS_DATA_STRING) {
 		    psLogMsg(__func__, PS_LOG_WARN, "Type of content item (%x) is not string: ignored\n",
@@ -146,5 +146,5 @@
 		    pmCell *cell = pmCellAlloc(chip, cellData, extName); // The cell
 //		    psFree(cellData);
-		    cell->data = pmPixelDataAlloc(extName); // Prepare cell to receive FITS data
+		    cell->hdu = p_pmHDUAlloc(extName); // Prepare cell to receive FITS data
 
 		    psFree(chip);
@@ -157,5 +157,5 @@
 	} else if (strcasecmp(extType, "NONE") == 0) {
 	    // No extensions; Content contains metadata, each entry is a chip with its component cells
-	    fpa->data = pmPixelDataAlloc("PHU"); // Prepare FPA to receive FITS data
+	    fpa->hdu = p_pmHDUAlloc("PHU"); // Prepare FPA to receive FITS data
 	    while (contentItem = psMetadataGetAndIncrement(contentsIter)) {
 		psString chipName = contentItem->name; // The name of the chip
@@ -196,5 +196,5 @@
 	if (strcasecmp(extType, "NONE") == 0) {
 	    // There are no extensions --- only the PHU
-	    chip->data = pmPixelDataAlloc("PHU");
+	    chip->hdu = p_pmHDUAlloc("PHU");
 
 	    const char *contents = psMetadataLookupString(&mdStatus, camera, "CONTENTS");
@@ -247,5 +247,5 @@
 		pmCell *cell = pmCellAlloc(chip, cellData, extName); // The cell
 //		psFree(cellData);
-		cell->data = pmPixelDataAlloc(extName); // Prepare cell to receive FITS data
+		cell->hdu = p_pmHDUAlloc(extName); // Prepare cell to receive FITS data
 	    } // Iterating through contents
 	    psFree(contentsIter);
@@ -273,8 +273,8 @@
 {
     psTrace(__func__, 0, "FPA:\n");
-    if (fpa->data) {
-	psTrace(__func__, 1, "---> FPA is extension %s.\n", fpa->data->extname);
-	if (! fpa->data->images) {
-	    psTrace(__func__, 1, "---> NO PIXELS for extension %s\n", fpa->data->extname);
+    if (fpa->hdu) {
+	psTrace(__func__, 1, "---> FPA is extension %s.\n", fpa->hdu->extname);
+	if (! fpa->hdu->images) {
+	    psTrace(__func__, 1, "---> NO PIXELS for extension %s\n", fpa->hdu->extname);
 	}
     }
@@ -285,8 +285,8 @@
 	psTrace(__func__, 1, "Chip: %d\n", i);
 	pmChip *chip = chips->data[i]; // The chip
-	if (chip->data) {
-	    psTrace(__func__, 2, "---> Chip is extension %s.\n", chip->data->extname);
-	    if (! chip->data->images) {
-		psTrace(__func__, 2, "---> NO PIXELS for extension %s\n", chip->data->extname);
+	if (chip->hdu) {
+	    psTrace(__func__, 2, "---> Chip is extension %s.\n", chip->hdu->extname);
+	    if (! chip->hdu->images) {
+		psTrace(__func__, 2, "---> NO PIXELS for extension %s\n", chip->hdu->extname);
 	    }
 	}
@@ -296,8 +296,8 @@
 	    psTrace(__func__, 2, "Cell: %d\n", j);
 	    pmCell *cell = cells->data[j]; // The cell
-	    if (cell->data) {
-		psTrace(__func__, 3, "---> Cell is extension %s.\n", cell->data->extname);
-		if (! cell->data->images) {
-		    psTrace(__func__, 3, "---> NO PIXELS for extension %s\n", cell->data->extname);
+	    if (cell->hdu) {
+		psTrace(__func__, 3, "---> Cell is extension %s.\n", cell->hdu->extname);
+		if (! cell->hdu->images) {
+		    psTrace(__func__, 3, "---> NO PIXELS for extension %s\n", cell->hdu->extname);
 		}
 	    }
