Index: trunk/psModules/src/camera/pmFPAConstruct.c
===================================================================
--- trunk/psModules/src/camera/pmFPAConstruct.c	(revision 11182)
+++ trunk/psModules/src/camera/pmFPAConstruct.c	(revision 11216)
@@ -471,5 +471,6 @@
                             const pmFPAview *phuView, // The view corresponding to the PHU, or NULL
                             const psMetadata *header, // The PHU header, or NULL
-                            const psMetadata *format // Format of file
+                            const psMetadata *format, // Format of file
+                            bool install // Install the provided header in the location that we find?
                            )
 {
@@ -540,5 +541,5 @@
             return NULL;
         }
-        if (processContents(fpa, NULL, NULL, phdu, PM_FPA_LEVEL_FPA, contents, format) < 0) {
+        if (install && processContents(fpa, NULL, NULL, phdu, PM_FPA_LEVEL_FPA, contents, format) < 0) {
             psError(PS_ERR_IO, false, "Error setting CONTENTS");
             psFree(phdu);
@@ -548,5 +549,5 @@
         psFree(phdu);
 
-        if (header && !pmConceptsRead(fpa, NULL, NULL, PM_CONCEPT_SOURCE_PHU, NULL)) {
+        if (install && header && !pmConceptsRead(fpa, NULL, NULL, PM_CONCEPT_SOURCE_PHU, NULL)) {
             psWarning("Unable to read concepts from PHU.\n");
         }
@@ -645,20 +646,22 @@
         }
 
-        const char *content = getContent(fileInfo, contents, chip, cell); // The chip:cell:cellType triples
-        if (!content || strlen(content) == 0) {
-            psError(PS_ERR_IO, false, "Unable to get CONTENTS.\n");
-            psFree(phdu);
-            psFree(view);
-            return NULL;
-        }
-        if (processContents(fpa, chip, cell, phdu, level, content, format) < 0) {
-            psError(PS_ERR_IO, false, "Error setting CONTENTS");
-            psFree(phdu);
-            psFree(view);
-            return NULL;
+        if (install) {
+            const char *content = getContent(fileInfo, contents, chip, cell); // chip:cell:cellType triples
+            if (!content || strlen(content) == 0) {
+                psError(PS_ERR_IO, false, "Unable to get CONTENTS.\n");
+                psFree(phdu);
+                psFree(view);
+                return NULL;
+            }
+            if (processContents(fpa, chip, cell, phdu, level, content, format) < 0) {
+                psError(PS_ERR_IO, false, "Error setting CONTENTS");
+                psFree(phdu);
+                psFree(view);
+                return NULL;
+            }
         }
         psFree(phdu);
 
-        if (header && !pmConceptsRead(fpa, chip, cell, PM_CONCEPT_SOURCE_PHU, NULL)) {
+        if (install && header && !pmConceptsRead(fpa, chip, cell, PM_CONCEPT_SOURCE_PHU, NULL)) {
             psWarning("Unable to read concepts from PHU.\n");
         }
@@ -724,27 +727,31 @@
         }
 
-        pmHDU *hdu = pmHDUAlloc(extName); // The extension
-        // Casting to avoid "warning: passing arg 1 of `p_psMemIncrRefCounter' discards qualifiers from
-        // pointer target type"
-        hdu->format = psMemIncrRefCounter((const psPtr)format);
-
-        if (processContents(fpa, chip, cell, hdu, level, contentsItem->data.V, format) < 0) {
-            psError(PS_ERR_IO, false, "Error setting CONTENTS");
-            psFree(view);
+        if (install) {
+            pmHDU *hdu = pmHDUAlloc(extName); // The extension
+            // Casting to avoid "warning: passing arg 1 of `p_psMemIncrRefCounter' discards qualifiers from
+            // pointer target type"
+            hdu->format = psMemIncrRefCounter((const psPtr)format);
+
+            if (processContents(fpa, chip, cell, hdu, level, contentsItem->data.V, format) < 0) {
+                psError(PS_ERR_IO, false, "Error setting CONTENTS");
+                psFree(view);
+                psFree(hdu);
+                psFree(contentsIter);
+                return NULL;
+            }
             psFree(hdu);
-            psFree(contentsIter);
-            return NULL;
-        }
-        psFree(hdu);
+        }
     }
     psFree(contentsIter);
 
-    if (!pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS, true, NULL)) {
-        psWarning("Unable to read concepts from defaults for FPA.  Attempting to "
-                  "proceed anyway.\n");
-    }
-
-    if (header && !pmConceptsRead(fpa, chip, cell, PM_CONCEPT_SOURCE_PHU, NULL)) {
-        psWarning("Unable to read concepts from PHU.\n");
+    if (install) {
+        if (!pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS, true, NULL)) {
+            psWarning("Unable to read concepts from defaults for FPA.  Attempting to "
+                      "proceed anyway.\n");
+        }
+
+        if (header && !pmConceptsRead(fpa, chip, cell, PM_CONCEPT_SOURCE_PHU, NULL)) {
+            psWarning("Unable to read concepts from PHU.\n");
+        }
     }
 
@@ -759,5 +766,5 @@
     PS_ASSERT_PTR_NON_NULL(format, false);
 
-    pmFPAview *view = addSource(fpa, phuView, NULL, format);
+    pmFPAview *view = addSource(fpa, phuView, NULL, format, true);
     bool status = (view == NULL);
     psFree(view);
@@ -795,5 +802,15 @@
     psFree(newFPAname);                 // Drop reference
 
-    return addSource(fpa, NULL, phu, format);
+    return addSource(fpa, NULL, phu, format, true);
+}
+
+
+pmFPAview *pmFPAIdentifySourceFromHeader(pmFPA *fpa, psMetadata *phu, const psMetadata *format)
+{
+    PS_ASSERT_PTR_NON_NULL(fpa, NULL);
+    PS_ASSERT_PTR_NON_NULL(phu, NULL);
+    PS_ASSERT_PTR_NON_NULL(format, NULL);
+
+    return addSource(fpa, NULL, phu, format, false);
 }
 
Index: trunk/psModules/src/camera/pmFPAConstruct.h
===================================================================
--- trunk/psModules/src/camera/pmFPAConstruct.h	(revision 11182)
+++ trunk/psModules/src/camera/pmFPAConstruct.h	(revision 11216)
@@ -7,6 +7,6 @@
 /// @author Paul Price, IfA
 ///
-/// @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
-/// @date $Date: 2006-10-17 00:55:01 $
+/// @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+/// @date $Date: 2007-01-20 04:24:42 $
 ///
 /// Copyright 2005-2006 Institute for Astronomy, University of Hawaii
@@ -48,4 +48,10 @@
                                    );
 
+/// Identify a source in the focal plane hierarchy, specified by a (primary) header
+///
+/// This is the same as pmFPAAddSourceFromHeader, except the input is not added into the FPA hierarchy.
+/// This function serves only to identify where in the hierarchy it should go, not prepare for reading, etc.
+pmFPAview *pmFPAIdentifySourceFromHeader(pmFPA *fpa, psMetadata *phu, const psMetadata *format);
+
 /// Print a representation of the FPA, including its headers and concepts.
 ///
