Index: trunk/psphot/src/psphotExtendedSourceAnalysis.c
===================================================================
--- trunk/psphot/src/psphotExtendedSourceAnalysis.c	(revision 27819)
+++ trunk/psphot/src/psphotExtendedSourceAnalysis.c	(revision 28013)
@@ -1,6 +1,12 @@
 # include "psphotInternal.h"
 
+// ?? these cannot happen here --> we would need to do this in psphotExtendedSourceAnalysis
+// XXX option to choose a consistent position
+// XXX option to choose a consistent elliptical contour
+// XXX SDSS uses the r-band petrosian radius to measure petrosian fluxes in all bands
+// XXX consistent choice of extendedness...
+
 // for now, let's store the detections on the readout->analysis for each readout
-bool psphotExtendedSourceAnalysis (pmConfig *config, const pmFPAview *view)
+bool psphotExtendedSourceAnalysis (pmConfig *config, const pmFPAview *view, const char *filerule)
 {
     bool status = true;
@@ -21,6 +27,6 @@
     // loop over the available readouts
     for (int i = 0; i < num; i++) {
-	if (!psphotExtendedSourceAnalysisReadout (config, view, "PSPHOT.INPUT", i, recipe)) {
-            psError (PSPHOT_ERR_CONFIG, false, "failed on measure extended source aperture-like parameters for PSPHOT.INPUT entry %d", i);
+	if (!psphotExtendedSourceAnalysisReadout (config, view, filerule, i, recipe)) {
+            psError (PSPHOT_ERR_CONFIG, false, "failed on measure extended source aperture-like parameters for %s entry %d", filerule, i);
 	    return false;
 	}
@@ -30,5 +36,5 @@
 
 // aperture-like measurements for extended sources
-bool psphotExtendedSourceAnalysisReadout (pmConfig *config, const pmFPAview *view, const char *filename, int index, psMetadata *recipe) {
+bool psphotExtendedSourceAnalysisReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe) {
 
     bool status;
@@ -42,5 +48,5 @@
 
     // find the currently selected readout
-    pmFPAfile *file = pmFPAfileSelectSingle(config->files, filename, index); // File of interest
+    pmFPAfile *file = pmFPAfileSelectSingle(config->files, filerule, index); // File of interest
     psAssert (file, "missing file?");
 
