Index: trunk/ppSim/src/ppSimCreate.c
===================================================================
--- trunk/ppSim/src/ppSimCreate.c	(revision 29011)
+++ trunk/ppSim/src/ppSimCreate.c	(revision 29125)
@@ -28,18 +28,32 @@
     assert (config->camera);
 
-    // int nx = psMetadataLookupS32 (&status, config->arguments, "NX.CELL");
-    // if (nx) {
-    //   psMetadata *defaults = psMetadataLookupPtr(&status, config->camera, "DEFAULTS");
-    //   psMetadataLookupS32 (&status, defaults, "CELL.XSIZE");
-    //   psAssert (status, "CELL.XSIZE should be in DEFAULTS");
-    //   psMetadataAddF32(defaults, PS_LIST_TAIL, "CELL.XSIZE", PS_META_REPLACE, "", nx);
-    // }
-    // int ny = psMetadataLookupS32 (&status, config->arguments, "NY.CELL");
-    // if (ny) {
-    //   psMetadata *defaults = psMetadataLookupPtr(&status, config->camera, "DEFAULTS");
-    //   psMetadataLookupS32 (&status, defaults, "CELL.YSIZE");
-    //   psAssert (status, "CELL.YSIZE should be in DEFAULTS");
-    //   psMetadataAddF32(defaults, PS_LIST_TAIL, "CELL.YSIZE", PS_META_REPLACE, "", ny);
-    // }
+    int nx = psMetadataLookupS32 (&status, config->arguments, "NX.CELL");
+    int ny = psMetadataLookupS32 (&status, config->arguments, "NY.CELL");
+
+    if (nx || ny) {
+      // need to find format(s)
+      psMetadata *formats = psMetadataLookupPtr(&status, config->camera, "FORMATS");
+      psAssert (formats, "FORMATS missing from camera config");
+      
+      psMetadataIterator *iter = psMetadataIteratorAlloc(formats, PS_LIST_HEAD, NULL); // Iterator
+      psMetadataItem *format;               // Item from iteration
+      while ((format = psMetadataGetAndIncrement(iter))) {
+	psAssert (format->type == PS_DATA_METADATA, "unexpected format block");
+	
+	if (nx) {
+	  psMetadata *defaults = psMetadataLookupPtr(&status, format->data.md, "DEFAULTS");
+	  psMetadataLookupS32 (&status, defaults, "CELL.XSIZE");
+	  psAssert (status, "CELL.XSIZE should be in DEFAULTS");
+	  psMetadataAddF32(defaults, PS_LIST_TAIL, "CELL.XSIZE", PS_META_REPLACE, "", nx);
+	}
+	if (ny) {
+	  psMetadata *defaults = psMetadataLookupPtr(&status, format->data.md, "DEFAULTS");
+	  psMetadataLookupS32 (&status, defaults, "CELL.YSIZE");
+	  psAssert (status, "CELL.YSIZE should be in DEFAULTS");
+	  psMetadataAddF32(defaults, PS_LIST_TAIL, "CELL.YSIZE", PS_META_REPLACE, "", ny);
+	}
+      }
+      psFree(iter);
+    }
 
     // generate the fpa structure used by the output camera (determined from INPUT or specified)
