Index: trunk/psphot/src/psphotChoosePSF.c
===================================================================
--- trunk/psphot/src/psphotChoosePSF.c	(revision 6427)
+++ trunk/psphot/src/psphotChoosePSF.c	(revision 6481)
@@ -11,4 +11,13 @@
 
     psTimerStart ("psphot");
+
+    // check if a PSF model is supplied by the user
+    char *psfFile = psMetadataLookupStr (&status, config, "PSF_INPUT_FILE");
+    if (status) {
+	int Nfail;
+	psMetadata *psfData = psMetadataConfigParse (NULL, &Nfail, psfFile, FALSE);
+	pmPSF *psf = pmPSFfromMD (psfData);
+	return psf;
+    }
 
     // examine PSF sources in S/N order (brightest first)
