Index: trunk/psModules/src/concepts/pmConceptsAverage.c
===================================================================
--- trunk/psModules/src/concepts/pmConceptsAverage.c	(revision 15373)
+++ trunk/psModules/src/concepts/pmConceptsAverage.c	(revision 15379)
@@ -97,4 +97,5 @@
     int xBin = 0, yBin = 0;             // Binning
     int x0 = 0, y0 = 0;                 // Offset
+    int xParity = 0, yParity = 0;       // Parity
 
     int nCells = 0;                     // Number of cells;
@@ -121,6 +122,8 @@
             if (same) {
                 // Only makes sense to update these if they are the same cell
-                x0  = psMetadataLookupS32(NULL, cell->concepts, "CELL.X0");
-                y0  = psMetadataLookupS32(NULL, cell->concepts, "CELL.Y0");
+                x0 = psMetadataLookupS32(NULL, cell->concepts, "CELL.X0");
+                y0 = psMetadataLookupS32(NULL, cell->concepts, "CELL.Y0");
+                xParity = psMetadataLookupS32(NULL, cell->concepts, "CELL.XPARITY");
+                yParity = psMetadataLookupS32(NULL, cell->concepts, "CELL.YPARITY");
             }
         } else {
@@ -154,4 +157,14 @@
                     psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Differing CELL.Y0 in use: %d vs %d\n",
                             y0, psMetadataLookupS32(NULL, cell->concepts, "CELL.Y0"));
+                    success = false;
+                }
+                if (xParity != psMetadataLookupS32(NULL, cell->concepts, "CELL.XPARITY")) {
+                    psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Differing CELL.XPARITY in use: %d vs %d\n",
+                            xParity, psMetadataLookupS32(NULL, cell->concepts, "CELL.XPARITY"));
+                    success = false;
+                }
+                if (yParity != psMetadataLookupS32(NULL, cell->concepts, "CELL.YPARITY")) {
+                    psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Differing CELL.YPARITY in use: %d vs %d\n",
+                            yParity, psMetadataLookupS32(NULL, cell->concepts, "CELL.YPARITY"));
                     success = false;
                 }
@@ -189,4 +202,6 @@
         MD_UPDATE(target->concepts, "CELL.X0", S32, x0);
         MD_UPDATE(target->concepts, "CELL.Y0", S32, y0);
+        MD_UPDATE(target->concepts, "CELL.XPARITY", S32, xParity);
+        MD_UPDATE(target->concepts, "CELL.YPARITY", S32, yParity);
     }
 
Index: trunk/psModules/src/concepts/pmConceptsAverage.h
===================================================================
--- trunk/psModules/src/concepts/pmConceptsAverage.h	(revision 15373)
+++ trunk/psModules/src/concepts/pmConceptsAverage.h	(revision 15379)
@@ -4,6 +4,6 @@
  * @author Paul Price, IfA
  *
- * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
- * @date $Date: 2007-08-11 01:05:59 $
+ * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+ * @date $Date: 2007-10-25 23:05:14 $
  * Copyright 2005-2006 Institute for Astronomy, University of Hawaii
  */
@@ -42,4 +42,5 @@
 /// - CELL.TIMESYS
 /// - CELL.X0, CELL.Y0
+/// - CELL.XPARITY, CELL.YPARITY
 /// And for others, it takes the "worst" possible value:
 /// - CELL.SATURATION
@@ -47,4 +48,5 @@
 /// These concepts are only handled if the cells are all the same cell (mosaicking vs stacking):
 /// - CELL.X0, CELL.Y0
+/// - CELL.XPARITY, CELL.YPARITY
 bool pmConceptsAverageCells(pmCell *target,///< Target cell
                             psList *sources, ///< List of source cells
