Index: trunk/psphot/src/psModulesUtils.c
===================================================================
--- trunk/psphot/src/psModulesUtils.c	(revision 6481)
+++ trunk/psphot/src/psModulesUtils.c	(revision 6522)
@@ -312,2 +312,23 @@
     return false;
 }
+
+ppImageLoadDepth ppImageCheckDepth (psMetadata *recipe, char *name) {
+
+    bool status;
+
+    // determine the load depth
+    const char *depth = psMetadataLookupStr(&status, recipe, name);
+    if (! status || ! depth || strlen(depth) == 0) {
+        psLogMsg("psphot", PS_LOG_ERROR, "%s not specified in recipe.", name);
+        exit(EXIT_FAILURE);
+    }
+
+    if (!strcasecmp(depth, "FPA"))  return (PP_LOAD_FPA);
+    if (!strcasecmp(depth, "CHIP")) return (PP_LOAD_CHIP);
+    if (!strcasecmp(depth, "CELL")) return (PP_LOAD_CELL);
+
+    psLogMsg(__func__, PS_LOG_ERROR, "%s in recipe is not FPA, CHIP or CELL.", name);
+    exit(EXIT_FAILURE);
+
+    return PP_LOAD_NONE;
+}
