Index: trunk/psModules/src/camera/pmFPAExtent.c
===================================================================
--- trunk/psModules/src/camera/pmFPAExtent.c	(revision 19388)
+++ trunk/psModules/src/camera/pmFPAExtent.c	(revision 20635)
@@ -92,8 +92,26 @@
     }
 
-    cellExtent->x0 += x0;
-    cellExtent->x1 += x0;
-    cellExtent->y0 += y0;
-    cellExtent->y1 += y0;
+    int xParityCell = psMetadataLookupS32(NULL, cell->concepts, "CELL.XPARITY");
+    int yParityCell = psMetadataLookupS32(NULL, cell->concepts, "CELL.YPARITY");
+
+    // CELL.X0,Y0 are the coordinate of the amp on the chip, subtract size if parity flipped
+    if (xParityCell > 0) {
+	cellExtent->x0 += x0;
+	cellExtent->x1 += x0;
+    } else {
+	float x0Cell = x0 - cellExtent->x1;
+	float x1Cell = x0 - cellExtent->x0;
+	cellExtent->x0 = x0Cell;
+	cellExtent->x1 = x1Cell;
+    }
+    if (yParityCell > 0) {
+	cellExtent->y0 += y0;
+	cellExtent->y1 += y0;
+    } else {
+	float y0Cell = y0 - cellExtent->y1;
+	float y1Cell = y0 - cellExtent->y0;
+	cellExtent->y0 = y0Cell;
+	cellExtent->y1 = y1Cell;
+    }
 
     return cellExtent;
