Index: trunk/psModules/src/concepts/Makefile.am
===================================================================
--- trunk/psModules/src/concepts/Makefile.am	(revision 7604)
+++ trunk/psModules/src/concepts/Makefile.am	(revision 7679)
@@ -7,5 +7,6 @@
 	pmConceptsRead.c \
 	pmConceptsWrite.c \
-	pmConceptsStandard.c
+	pmConceptsStandard.c \
+	pmConceptsPhotcode.c
 
 psmoduleincludedir = $(includedir)
@@ -14,5 +15,6 @@
 	pmConceptsRead.h \
 	pmConceptsWrite.h \
-	pmConceptsStandard.h
+	pmConceptsStandard.h \
+	pmConceptsPhotcode.h
 
 CLEANFILES = *~
Index: trunk/psModules/src/concepts/pmConcepts.c
===================================================================
--- trunk/psModules/src/concepts/pmConcepts.c	(revision 7604)
+++ trunk/psModules/src/concepts/pmConcepts.c	(revision 7679)
@@ -409,4 +409,11 @@
         #endif
 
+        // FPA.CAMERA
+        {
+            psMetadataItem *fpaCamera = psMetadataItemAllocStr("FPA.CAMERA", "Camera used", "");
+            pmConceptRegister(fpaCamera, NULL, NULL, PM_FPA_LEVEL_FPA);
+            psFree(fpaCamera);
+        }
+
         // FPA.AIRMASS
         {
Index: trunk/psModules/src/concepts/pmConceptsPhotcode.c
===================================================================
--- trunk/psModules/src/concepts/pmConceptsPhotcode.c	(revision 7679)
+++ trunk/psModules/src/concepts/pmConceptsPhotcode.c	(revision 7679)
@@ -0,0 +1,32 @@
+#include <stdio.h>
+#include <pslib.h>
+
+#include "pmConceptsPhotcode.h"
+
+char *pmConceptsPhotcodeForView (pmConfig *config, pmFPAfile *file, pmFPAview *view)
+{
+
+    if (view->chip < -1) {
+        psError(PS_ERR_IO, true, "photcodes undefined for FPA: defined by chip\n");
+        return NULL;
+    }
+
+    // select recipe options supplied on command line
+    psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, "PHASE2");
+    if (recipe == NULL) {
+        psError(PS_ERR_IO, true, "recipe PHASE2 not found\n");
+        return NULL;
+    }
+
+    // select photcode rule from recipe
+    char *rule = psMetadataLookupStr (NULL, recipe, "PHOTCODE.RULE");
+    if (rule == NULL) {
+        psError(PS_ERR_IO, true, "PHOTCODE.RULE not found in PHASE2 recipe\n");
+        return NULL;
+    }
+
+    // convert rule to real photcode
+    char *photcode = pmFPAfileNameFromRule (rule, file, view);
+
+    return photcode;
+}
Index: trunk/psModules/src/concepts/pmConceptsPhotcode.h
===================================================================
--- trunk/psModules/src/concepts/pmConceptsPhotcode.h	(revision 7679)
+++ trunk/psModules/src/concepts/pmConceptsPhotcode.h	(revision 7679)
@@ -0,0 +1,11 @@
+#ifndef PM_CONCEPTS_PHOTCODE_H
+#define PM_CONCEPTS_PHOTCODE_H
+
+#include "pslib.h"
+#include "pmConfig.h"
+#include "pmFPAview.h"
+#include "pmFPAfile.h"
+
+char *pmConceptsPhotcodeForView (pmConfig *config, pmFPAfile *file, pmFPAview *view);
+
+# endif
