Index: /trunk/psLib/src/astronomy/psAstrometry.c
===================================================================
--- /trunk/psLib/src/astronomy/psAstrometry.c	(revision 1815)
+++ /trunk/psLib/src/astronomy/psAstrometry.c	(revision 1816)
@@ -1,5 +1,5 @@
 /** @file  psAstrometry.c
 *
-*  @brief This file defines the basic types for astronomical coordinate 
+*  @brief This file defines the basic types for astronomical coordinate
 *  transformation
 *
@@ -8,6 +8,6 @@
 *  @author George Gusciora, MHPCC
 *
-*  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-09-10 23:41:45 $
+*  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-09-15 22:58:35 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -197,4 +197,5 @@
     if (readout != NULL) {
         psFree(readout->image);
+        psFree(readout->mask);
         psFree(readout->objects);
         psFree(readout->metadata);
@@ -383,4 +384,5 @@
 
     readout->image = psMemIncrRefCounter((psImage*)image);
+    readout->mask = NULL;
     readout->objects = NULL;
     readout->metadata = NULL;
Index: /trunk/psLib/src/astronomy/psAstrometry.h
===================================================================
--- /trunk/psLib/src/astronomy/psAstrometry.h	(revision 1815)
+++ /trunk/psLib/src/astronomy/psAstrometry.h	(revision 1816)
@@ -1,5 +1,5 @@
 /** @file  psAstrometry.h
 *
-*  @brief This file defines the basic types for astronomical coordinate 
+*  @brief This file defines the basic types for astronomical coordinate
 *  transformation
 *
@@ -8,6 +8,6 @@
 *  @author George Gusciora, MHPCC
 *
-*  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-09-10 23:41:45 $
+*  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-09-15 22:57:12 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -40,5 +40,5 @@
  *  exposure means that subsequent transformations are faster.  For historical
  *  reasons, this structure is known colloquially as "Wallace's Grommit".
- *  
+ *
  */
 typedef struct
@@ -63,9 +63,9 @@
 /** Fixed Pattern Corrections
  *
- *  The fixed pattern is a correction to the general astrometric solution 
- *  formed by summing the residuals from many observations. The intent is to 
- *  correct for higher-order distortions in the camera system on a coarse 
- *  grid (larger than individual pixels, but smaller than a single cell). 
- *  Hence, in addition to the offsets, we need to specify the size and scale 
+ *  The fixed pattern is a correction to the general astrometric solution
+ *  formed by summing the residuals from many observations. The intent is to
+ *  correct for higher-order distortions in the camera system on a coarse
+ *  grid (larger than individual pixels, but smaller than a single cell).
+ *  Hence, in addition to the offsets, we need to specify the size and scale
  *  of the grid in x and y as well as the origin of the grid.
  */
@@ -93,6 +93,6 @@
 /** Readout data structure.
  *
- *  A readout is the result of a single read of a cell (or a portion thereof). 
- *  It contains a pointer to the pixel data, and additional pointers to the 
+ *  A readout is the result of a single read of a cell (or a portion thereof).
+ *  It contains a pointer to the pixel data, and additional pointers to the
  *  objects found in the readout, and the readout metadata.  It also contains
  *  the offset from the lower-left corner of the chip, in the case that the
@@ -107,15 +107,16 @@
     const int row0;                    ///< Offset from the bottom of chip.
 
-    psImage* image;                    ///< imaging area of Readout
-    psList* objects;                   ///< objects derived from Readout
-    psMetadata* metadata;              ///< readout-level metadata
+    psImage* image;                    ///< Imaging area of readout
+    psImage* mask;                     ///< Mask area for readout
+    psList* objects;                   ///< Objects derived from Readout
+    psMetadata* metadata;              ///< Readout-level metadata
 }
 psReadout;
 
 /** Cell data structure
- * 
+ *
  *  A cell consists of one or more readouts.  It also contains a pointer to the
- *  cell's metadata, and its parent chip.  On the astrometry side, it also 
- *  contains coordinate transforms from the cell to chip, from the cell to 
+ *  cell's metadata, and its parent chip.  On the astrometry side, it also
+ *  contains coordinate transforms from the cell to chip, from the cell to
  *  focal-plane, as well as a "quick and dirty" tranform from the cell to
  *  sky coordinates.
@@ -165,5 +166,5 @@
  *  the color the transformation is defined.  We also include some values to
  *  characterize the quality of the transformation: the root square deviation
- *  for the x and y transformation fits, and the chi-squared for the 
+ *  for the x and y transformation fits, and the chi-squared for the
  *  transformation fit.
  *
@@ -193,6 +194,6 @@
 /** Exposure Information
  *
- *  Several quantities from the telescope in order to make a first guess at 
- *  the astrometric solution.  From these quantities, further quantities can 
+ *  Several quantities from the telescope in order to make a first guess at
+ *  the astrometric solution.  From these quantities, further quantities can
  *  be derivedand stored for later use.
  *
@@ -226,6 +227,6 @@
 /** Allocator for psExposure
  *
- *  We need several quantities from the telescope in order to make a first 
- *  guess at the astrometric solution. From these quantities, further 
+ *  We need several quantities from the telescope in order to make a first
+ *  guess at the astrometric solution. From these quantities, further
  *  quantities can be derived and stored for later use.
  *
@@ -249,7 +250,7 @@
 /** Allocator for psFPA
  *
- *  This function shall make an empty psFPA, with the nChips allocated 
- *  pointers to psChips being set to NULL; all other pointers in the structure 
- *  shall be initialized to NULL, apart from the grommit, which shall be 
+ *  This function shall make an empty psFPA, with the nChips allocated
+ *  pointers to psChips being set to NULL; all other pointers in the structure
+ *  shall be initialized to NULL, apart from the grommit, which shall be
  *  constructed on the basis of the exp parameter.
  *
@@ -263,5 +264,5 @@
 /** Allocates a psChip
  *
- *  This allocator shall make an empty psChip, with the nCells allocated 
+ *  This allocator shall make an empty psChip, with the nCells allocated
  *  pointers to psCells being set to NULL; all other pointers in the structure
  *  shall be initialized to NULL.
@@ -276,6 +277,6 @@
 /** Allocates a psCell
  *
- *  The constructor shall make an empty psCell, with the nReadouts allocated 
- *  pointers to psReadouts being set to NULL; all other pointers in the 
+ *  The constructor shall make an empty psCell, with the nReadouts allocated
+ *  pointers to psReadouts being set to NULL; all other pointers in the
  *  structure shall be initialized to NULL.
  *
@@ -289,5 +290,5 @@
 /** Allocates a psReadout
  *
- *  All pointers in the structure other than the image shall be initialized 
+ *  All pointers in the structure other than the image shall be initialized
  *  to NULL.
  *
