Index: trunk/pstamp/src/ppstampMakeStamp.c
===================================================================
--- trunk/pstamp/src/ppstampMakeStamp.c	(revision 35610)
+++ trunk/pstamp/src/ppstampMakeStamp.c	(revision 35611)
@@ -814,4 +814,9 @@
     psArray *inSources = inDetections->allSources;
 
+    // copy analysis metadata in order to pick up any data stored there from the input file.
+    // This includes detection efficiency analysis and extended source parameters.
+    psMetadataCopy(outReadout->analysis, inReadout->analysis);
+
+    // now replace the sources with a new container
     pmDetections *outDetections = pmDetectionsAlloc();
     psMetadataAddPtr (outReadout->analysis, PS_LIST_TAIL, "PSPHOT.DETECTIONS", PS_META_REPLACE | PS_DATA_UNKNOWN,
@@ -820,5 +825,6 @@
     psArray *outSources = outDetections->allSources = psArrayAllocEmpty( 100 );
 
-    // include sources that are off the stamp by just a little bit
+    // include sources that are off the stamp by just a little bit 
+    // XXX: should I be doing this?
     #define EXPAND_SIZE 16
     psRegion sourceRegion = extractRegion;
@@ -828,4 +834,6 @@
     sourceRegion.y1 += EXPAND_SIZE;
 
+    bool adjustCoords = extractRegion.x0 != 0 || extractRegion.y0 != 0;
+
     for (int i = 0; i < inSources->n; i++ ) {
         pmSource *src = inSources->data[i];
@@ -837,4 +845,30 @@
             continue;
         }
+        if (adjustCoords) {
+            // adjust the source position for the stamp coordinate system
+            src->peak->x  -= extractRegion.x0;
+            src->peak->xf -= extractRegion.x0;
+
+            src->peak->y  -= extractRegion.y0;
+            src->peak->yf -= extractRegion.y0;
+            if (src->moments) {
+                src->moments->Mx -= extractRegion.x0;
+                src->moments->My -= extractRegion.y0;
+            }
+            if (src->modelPSF) {
+                src->modelPSF->params->data.F32[PM_PAR_XPOS] -= extractRegion.x0;
+                src->modelPSF->params->data.F32[PM_PAR_YPOS] -= extractRegion.y0;
+            }
+
+            if (src->modelFits) {
+                for (int j = 0; j < src->modelFits->n; j++) {
+                    pmModel *model = src->modelFits->data[j];
+                    assert (model != NULL);
+                    model->params->data.F32[PM_PAR_XPOS] -= extractRegion.x0;
+                    model->params->data.F32[PM_PAR_YPOS] -= extractRegion.y0;
+                }
+            }
+        }
+
         psArrayAdd(outSources, 100, src);
     }
