Index: trunk/psphot/src/psphotEnsemblePSF.c
===================================================================
--- trunk/psphot/src/psphotEnsemblePSF.c	(revision 12792)
+++ trunk/psphot/src/psphotEnsemblePSF.c	(revision 13006)
@@ -24,5 +24,5 @@
 
     // source analysis is done in spatial order
-    refSources = psArraySort (refSources, psphotSortByY);
+    refSources = psArraySort (refSources, pmSourceSortByY);
 
     // storage arrays for fitSources and sequence index
