Index: /branches/eam_branches/ipp-20220316/fpcamera/Makefile.am
===================================================================
--- /branches/eam_branches/ipp-20220316/fpcamera/Makefile.am	(revision 42177)
+++ /branches/eam_branches/ipp-20220316/fpcamera/Makefile.am	(revision 42178)
@@ -3,8 +3,3 @@
 CLEANFILES = *.pyc *~ core core.*
 
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA= fpcamera.pc
-
-EXTRA_DIST = \
-	fpcamera.pc.in \
-	autogen.sh
+EXTRA_DIST = autogen.sh
Index: /branches/eam_branches/ipp-20220316/fpcamera/configure.ac
===================================================================
--- /branches/eam_branches/ipp-20220316/fpcamera/configure.ac	(revision 42177)
+++ /branches/eam_branches/ipp-20220316/fpcamera/configure.ac	(revision 42178)
@@ -185,4 +185,5 @@
 PKG_CHECK_MODULES([PSLIB],    [pslib >= 1.0.0])
 PKG_CHECK_MODULES([PSMODULE], [psmodules >= 1.0.0])
+PKG_CHECK_MODULES([PSPHOT],   [psphot >= 0.8.0]) 
 PKG_CHECK_MODULES([PPSTATS],  [ppStats >= 1.0.0]) 
 
Index: /branches/eam_branches/ipp-20220316/fpcamera/src/Makefile.am
===================================================================
--- /branches/eam_branches/ipp-20220316/fpcamera/src/Makefile.am	(revision 42177)
+++ /branches/eam_branches/ipp-20220316/fpcamera/src/Makefile.am	(revision 42178)
@@ -71,4 +71,5 @@
 fpcameraVersion.c: fpcameraVersionDefinitions.h
 fpcameraVersionDefinitions.h: fpcameraVersionDefinitions.h.in FORCE
-	pslib-setsvnversion.pl FPCAMERA fpcameraVersionDefinitions.h.in fpcameraVersionDefinitions.h
+#pslib-setsvnversion.pl FPCAMERA fpcameraVersionDefinitions.h.in fpcameraVersionDefinitions.h
+	cat fpcameraVersionDefinitions.h.in | tr '@' '"' > fpcameraVersionDefinitions.h
 FORCE: ;
Index: /branches/eam_branches/ipp-20220316/fpcamera/src/fpcamera.h
===================================================================
--- /branches/eam_branches/ipp-20220316/fpcamera/src/fpcamera.h	(revision 42177)
+++ /branches/eam_branches/ipp-20220316/fpcamera/src/fpcamera.h	(revision 42178)
@@ -22,4 +22,5 @@
 #include <pslib.h>
 #include <psmodules.h>
+#include <psphot.h>
 #include <ppStats.h>
 #include "fpcameraErrorCodes.h"
Index: /branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraAnalysis.c
===================================================================
--- /branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraAnalysis.c	(revision 42177)
+++ /branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraAnalysis.c	(revision 42178)
@@ -7,5 +7,4 @@
 
     bool status;
-    int nStars;
 
     // measure the total elapsed time in fpcameraAnalysis.
Index: /branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraCleanup.c
===================================================================
--- /branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraCleanup.c	(revision 42177)
+++ /branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraCleanup.c	(revision 42178)
@@ -1,16 +1,5 @@
-/** @file fpcameraCleanup.c
- *
- *  @brief
- *
- *  @ingroup fpcamera
- *
- *  @author IfA
- *  @version $Revision: 1.8.2.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2009-02-19 17:59:50 $
- *  Copyright 2009 Institute for Astronomy, University of Hawaii
- */
+# include "fpcamera.h"
 
-# include "fpcameraStandAlone.h"
-
+/* \brief this loop saves the photometry/astrometry data files */
 void fpcameraCleanup (pmConfig *config, psMetadata *stats) {
 
Index: /branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraDataLoad.c
===================================================================
--- /branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraDataLoad.c	(revision 42177)
+++ /branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraDataLoad.c	(revision 42178)
@@ -6,8 +6,4 @@
 
 bool fpcameraDataLoad (pmConfig *config) {
-
-    pmChip *chip;
-    pmCell *cell;
-    pmReadout *readout;
 
     psTimerStart ("fpcamera");
Index: /branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraDataSave.c
===================================================================
--- /branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraDataSave.c	(revision 42177)
+++ /branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraDataSave.c	(revision 42178)
@@ -6,13 +6,13 @@
 bool fpcameraDataSave (pmConfig *config, psMetadata *stats) {
 
+    bool status;
     pmChip *chip;
     pmCell *cell;
     pmReadout *readout;
-
     pmFPAview *view = NULL;
 
     // select the current recipe
-    psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, FPCAMERA_RECIPE);
-    if (!recipe) ESCAPE(FPCAMERA_ERR_CONFIG, "Can't find FPCAMERA recipe!");
+    psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, FPCAMERA_RECIPE);
+    if (!recipe) ESCAPE (FPCAMERA_ERR_CONFIG, "Can't find FPCAMERA recipe");
 
     // select the output data sources
@@ -49,10 +49,7 @@
                 if (hdu && hdu != lastHDU) {
                     fpcameraVersionHeaderFull(hdu->header);
-		    // Append teh reference catalog to the header as well.
+		    // Append the reference catalog to the header as well.
 		    char *catdir = psMetadataLookupStr(NULL,recipe,"FPCAMERA.CATDIR");
-
-		    psMetadata *recipe = psMetadataLookupPtr(NULL, config->recipes, FPCAMERA_RECIPE);
 		    psMetadataAddStr(hdu->header,PS_LIST_TAIL, "PSREFCAT", PS_META_REPLACE, NULL, catdir);
-
                     lastHDU = hdu;
                 }
@@ -68,5 +65,4 @@
     // XXX fix : if (!fpcameraMetadataStats (config, stats)) ESCAPE(FPCAMERA_ERR_UNKNOWN, "failure to save state in Metadata");
 
-    bool status;
     psString dump_file = psMetadataLookupStr(&status, config->arguments, "DUMP_CONFIG");
     if (dump_file) {
Index: /branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraLoadRefstars.c
===================================================================
--- /branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraLoadRefstars.c	(revision 42177)
+++ /branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraLoadRefstars.c	(revision 42178)
@@ -2,6 +2,7 @@
 # define ELIXIR_MODE 1
 
-# define ESCAPE(ERROR,FORMAT,...) { psError(ERROR, false, FORMAT, __VA_ARGS__); return false; }
-
+# define ESCAPE(ERROR,...) { p_psError(__FILE__,__LINE__,__func__,ERROR,false,__VA_ARGS__); return false; }
+
+/* \brief this loop saves the photometry/astrometry data files */
 bool fpcameraLoadRefstars (pmFPAfile *input, pmConfig *config) {
 
@@ -42,5 +43,5 @@
     // substitute abstract name with concrete name, if present in FPCAMERA.CATDIRS
     psMetadata *catdirs = psMetadataLookupMetadata(&status, config->site, "FPCAMERA.CATDIRS"); // List of cameras
-    if (!catdir) ESCAPE(FPCAMERA_ERR_CONFIG, "Unable to find FPCAMERA.CATDIRS in the system configuration.\n");
+    if (!catdirs) ESCAPE(FPCAMERA_ERR_CONFIG, "Unable to find FPCAMERA.CATDIRS in the system configuration.\n");
 
     // the name in the recipe may be one of:
@@ -140,5 +141,5 @@
         ESCAPE(FPCAMERA_ERR_REFSTARS, "error reading reference data");
     }
-    if (refstars->n == 0) ESCAPE(PSASTRO_ERR_REFSTARS, "no reference stars found");
+    if (refstars->n == 0) ESCAPE(FPCAMERA_ERR_REFSTARS, "no reference stars found");
 
     psLogMsg ("fpcamera", 3, "loaded %ld reference stars : %f sec\n", refstars->n, psTimerMark ("fpcamera"));
Index: /branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraParseCamera.c
===================================================================
--- /branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraParseCamera.c	(revision 42177)
+++ /branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraParseCamera.c	(revision 42178)
@@ -1,5 +1,5 @@
 # include "fpcamera.h"
 
-# define ESCAPE(ERROR,FORMAT,...) { psError(ERROR, false, FORMAT, __VA_ARGS__); return false; }
+# define ESCAPE(ERROR,...) { p_psError(__FILE__,__LINE__,__func__,ERROR,false,__VA_ARGS__); return false; }
 
 bool fpcameraParseCamera (pmConfig *config) {
Index: /branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraReadAstrometry.c
===================================================================
--- /branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraReadAstrometry.c	(revision 42177)
+++ /branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraReadAstrometry.c	(revision 42178)
@@ -4,6 +4,8 @@
 bool fpcameraReadAstrometry (pmFPAfile *input, pmConfig *config) {
 
+    bool status;
+
     // select the current recipe (just needed for pixel scale)
-    psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, FPCAMERA_RECIPE);
+    psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, FPCAMERA_RECIPE);
     if (!recipe) {
 	psError(FPCAMERA_ERR_CONFIG, true, "Can't find FPCAMERA recipe!\n");
@@ -31,4 +33,5 @@
     } 
 
+    pmChip *chip;
     while ((chip = pmFPAviewNextChip (view, input->fpa, 1)) != NULL) {
 	psTrace ("fpcamera", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process);
