Index: trunk/psLib/src/astronomy/psAstrometry.c
===================================================================
--- trunk/psLib/src/astronomy/psAstrometry.c	(revision 2600)
+++ trunk/psLib/src/astronomy/psAstrometry.c	(revision 2855)
@@ -8,6 +8,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.52 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-12-02 21:12:51 $
+ *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-12-30 20:18:36 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -399,9 +399,14 @@
 
     // create array of NULL psCells
-    chip->cells = psArrayAlloc(nCells);
+    int n = (nCells > 0) ? nCells : 1;
+    chip->cells = psArrayAlloc(n);
     psPtr* cells = chip->cells->data;
-    for (psS32 i=0;i<nCells;i++) {
+    for (psS32 i=0;i<n;i++) {
         cells[i] = NULL;
     }
+    chip->cells->n = 0; // per requirement
+
+    *(int*)&chip->row0 = 0;
+    *(int*)&chip->col0 = 0;
 
     chip->metadata = NULL;
@@ -429,9 +434,14 @@
 
     // create array of NULL psReadouts
-    cell->readouts = psArrayAlloc(nReadouts);
+    int n = (nReadouts > 0) ? nReadouts : 1;
+    cell->readouts = psArrayAlloc(n);
     psPtr* readouts = cell->readouts->data;
-    for (psS32 i=0;i<nReadouts;i++) {
+    for (psS32 i=0;i<n;i++) {
         readouts[i] = NULL;
     }
+    cell->readouts->n = 0; // per requirement
+
+    *(int*)&cell->row0 = 0;
+    *(int*)&cell->col0 = 0;
 
     cell->metadata = NULL;
@@ -452,19 +462,16 @@
 }
 
-psReadout* psReadoutAlloc(psS32 col0,
-                          psS32 row0,
-                          const psImage* image)
-{
-    PS_INT_CHECK_NON_NEGATIVE(col0, NULL);
-    PS_INT_CHECK_NON_NEGATIVE(row0, NULL);
-
+psReadout* psReadoutAlloc()
+{
     psReadout* readout = psAlloc(sizeof(psReadout));
 
-    *(psU32*)&readout->colBins = 1;
-    *(psU32*)&readout->rowBins = 1;
-    *(psS32*)&readout->col0 = col0;
-    *(psS32*)&readout->row0 = row0;
-
-    readout->image = (psImage*)image;
+    *(psU32*)&readout->colBins = 0;
+    *(psU32*)&readout->rowBins = 0;
+    *(psU32*)&readout->rowParity = 0;
+    *(psU32*)&readout->colParity = 0;
+    *(psS32*)&readout->col0 = 0;
+    *(psS32*)&readout->row0 = 0;
+
+    readout->image = NULL;
     readout->mask = NULL;
     readout->objects = NULL;
@@ -718,5 +725,5 @@
     PS_PTR_CHECK_NULL(cellCoord, NULL);
     PS_PTR_CHECK_NULL(cell, NULL);
-    PS_PTR_CHECK_NULL(cell->toTP, NULL);
+    PS_PTR_CHECK_NULL(cell->toSky, NULL);
     PS_PTR_CHECK_NULL(cell->parent, NULL);
     PS_PTR_CHECK_NULL(cell->parent->parent, NULL);
