Index: trunk/ppTranslate/src/ppMopsRead.c
===================================================================
--- trunk/ppTranslate/src/ppMopsRead.c	(revision 28218)
+++ trunk/ppTranslate/src/ppMopsRead.c	(revision 28243)
@@ -4,4 +4,5 @@
 
 #include <stdio.h>
+#include <string.h>
 #include <pslib.h>
 
@@ -16,5 +17,6 @@
     psArray *detections = psArrayAlloc(num); // Array of detections, to return
     for (int i = 0; i < num; i++) {
-        psFits *fits = psFitsOpen(inNames->data[i], "r"); // FITS file
+        const char *name = inNames->data[i]; // File name
+        psFits *fits = psFitsOpen(name, "r"); // FITS file
         if (!fits) {
             psError(PS_ERR_IO, false, "Unable to open input %d", i);
@@ -41,5 +43,6 @@
             continue;
         }
-        ppMopsDetections *det = ppMopsDetectionsAlloc();
+        ppMopsDetections *det = detections->data[i] = ppMopsDetectionsAlloc();
+        det->component = psStringNCopy(name, strrchr(name, '.') - name); // Strip off extension
         det->header = header;
         det->num = size;
@@ -61,4 +64,9 @@
         det->naxis2 = psMetadataLookupS32(NULL, header, "IMNAXIS2");
 
+        det->psfHeader = psFitsReadHeader(NULL, fits);
+        if (!det->psfHeader) {
+            psError(psErrorCodeLast(), false, "Unable to read header %d", i);
+            return false;
+        }
         psMetadata *table = det->table = psFitsReadTableAllColumns(fits); // Table of interest
         if (!table) {
@@ -66,5 +74,4 @@
             return false;
         }
-        psFitsClose(fits);
 
         psVector *ra = psMetadataLookupVector(NULL, table, "RA_PSF");
@@ -80,7 +87,29 @@
         }
 
-        psTrace("ppMops.read", 2, "Read %ld rows from %s\n", det->num, (const char*)inNames->data[i]);
+        psTrace("ppMops.read", 2, "Read %ld rows from %s\n", det->num, det->component);
 
-        detections->data[i] = det;
+        if (!psFitsMoveExtName(fits, "SkyChip.deteff")) {
+            psWarning("No detection efficiencies included in %s", det->component);
+            psErrorStackPrint(stderr, "No detection efficiencies included in %s", det->component);
+            psErrorClear();
+            continue;
+        }
+
+        det->deteffHeader = psFitsReadHeader(NULL, fits);
+        if (!det->deteffHeader) {
+            psWarning("Unable to read detection efficiency header in %s", det->component);
+            psErrorClear();
+            continue;
+        }
+        det->deteffTable = psFitsReadTableAllColumns(fits);
+        if (!det->deteffTable) {
+            psFree(det->deteffHeader);
+            det->deteffHeader = NULL;
+            psWarning("Unable to read detection efficiency table in %s", det->component);
+            psErrorClear();
+            continue;
+        }
+        psTrace("ppMops.read", 2, "Read detection efficiency from %s\n", det->component);
+        psFitsClose(fits);
     }
 
