Index: /branches/rel10_ifa/psModules/src/astrom/pmHDUGetLowest.c
===================================================================
--- /branches/rel10_ifa/psModules/src/astrom/pmHDUGetLowest.c	(revision 6576)
+++ /branches/rel10_ifa/psModules/src/astrom/pmHDUGetLowest.c	(revision 6576)
@@ -0,0 +1,24 @@
+#include <stdio.h>
+#include "pmFPA.h"
+#include "pmHDU.h"
+#include "pmHDUGetLowest.h"
+
+// Get the lowest HDU
+pmHDU *pmHDUGetLowest(pmFPA *fpa, // The FPA
+                      pmChip *chip, // The chip, or NULL
+                      pmCell *cell // The cell, or NULL
+                     )
+{
+    pmHDU *hdu = NULL;          // The HDU that's at the lowest level
+    if (cell) {
+        hdu = pmHDUFromCell(cell);
+    } else if (chip) {
+        hdu = pmHDUFromChip(chip);
+    } else if (fpa) {
+        hdu = pmHDUFromFPA(fpa);
+    }
+
+    return hdu;
+}
+
+
Index: /branches/rel10_ifa/psModules/src/astrom/pmHDUGetLowest.h
===================================================================
--- /branches/rel10_ifa/psModules/src/astrom/pmHDUGetLowest.h	(revision 6576)
+++ /branches/rel10_ifa/psModules/src/astrom/pmHDUGetLowest.h	(revision 6576)
@@ -0,0 +1,12 @@
+#ifndef PM_HDU_GET_LOWEST
+#define PM_HDU_GET_LOWEST
+
+#include "pmFPA.h"
+#include "pmHDU.h"
+
+pmHDU *pmHDUGetLowest(pmFPA *fpa, // The FPA
+                      pmChip *chip, // The chip, or NULL
+                      pmCell *cell // The cell, or NULL
+                     );
+
+#endif
