Index: trunk/psphot/src/psphotReadout.c
===================================================================
--- trunk/psphot/src/psphotReadout.c	(revision 20171)
+++ trunk/psphot/src/psphotReadout.c	(revision 20411)
@@ -1,3 +1,12 @@
 # include "psphotInternal.h"
+
+// this should be called by every program that links against libpsphot
+bool psphotInit () {
+
+    psphotErrorRegister();              // register our error codes/messages
+    psphotModelClassInit ();            // load implementation-specific models
+    psphotSetThreads ();
+    return true;
+}
 
 bool psphotReadout(pmConfig *config, const pmFPAview *view) {
@@ -149,5 +158,5 @@
 
     // construct an initial model for each object
-    psphotGuessModels (readout, sources, recipe, psf);
+    psphotGuessModels (config, readout, sources, psf);
 
     // XXX test output of models
@@ -207,5 +216,5 @@
 
     // create full input models
-    psphotGuessModels (readout, newSources, recipe, psf);
+    psphotGuessModels (config, readout, newSources, psf);
 
     // replace all sources so fit below applies to all at once
