Index: /trunk/psLib/src/astronomy/psAstrometry.c
===================================================================
--- /trunk/psLib/src/astronomy/psAstrometry.c	(revision 1784)
+++ /trunk/psLib/src/astronomy/psAstrometry.c	(revision 1785)
@@ -8,6 +8,6 @@
 *  @author George Gusciora, MHPCC
 *
-*  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-09-01 00:57:48 $
+*  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-09-10 23:41:45 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -206,4 +206,52 @@
 /*****************************************************************************/
 
+
+/*
+ *
+ * XXX: Verify that you interpreted the SDR correctly.
+ *
+ * XXX: Must add memory deallocater.
+ */
+psFixedPattern *psFixedPatternAlloc(double x0,
+                                    double y0,
+                                    double xScale,
+                                    double yScale,
+                                    const psImage *x,
+                                    const psImage *y)
+{
+    psFixedPattern *tmp;
+    int i;
+    int j;
+
+    tmp = (psFixedPattern *) psAlloc(sizeof(psFixedPattern));
+    tmp->nX = x->numRows * x->numCols;
+    tmp->nY = y->numRows * y->numCols;
+    tmp->x0 = x0;
+    tmp->y0 = y0;
+    tmp->xScale = xScale;
+    tmp->yScale = yScale;
+    tmp->x = (double **) psAlloc(x->numRows * sizeof(float *));
+    for (i=0;i<x->numRows;i++) {
+        (tmp->x)[i] = (double *) psAlloc(x->numCols * sizeof(float));
+    }
+    for (i=0;i<x->numRows;i++) {
+        for (j=0;j<x->numRows;j++) {
+            (tmp->x)[i][j] = x->data.F64[i][j];
+        }
+    }
+
+    tmp->y = (double **) psAlloc(y->numRows * sizeof(float *));
+    for (i=0;i<y->numRows;i++) {
+        (tmp->y)[i] = (double *) psAlloc(y->numCols * sizeof(float));
+    }
+    for (i=0;i<y->numRows;i++) {
+        for (j=0;j<y->numRows;j++) {
+            (tmp->y)[i][j] = y->data.F64[i][j];
+        }
+    }
+    return(tmp);
+}
+
+
 psExposure* psExposureAlloc(double ra, double dec, double hourAngle,
                             double zenith, double azimuth, double localTime, float date,
Index: /trunk/psLib/src/astronomy/psAstrometry.h
===================================================================
--- /trunk/psLib/src/astronomy/psAstrometry.h	(revision 1784)
+++ /trunk/psLib/src/astronomy/psAstrometry.h	(revision 1785)
@@ -8,6 +8,6 @@
 *  @author George Gusciora, MHPCC
 *
-*  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-09-01 00:57:48 $
+*  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-09-10 23:41:45 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -83,4 +83,12 @@
 psFixedPattern;
 
+psFixedPattern *psFixedPatternAlloc(double x0,           ///< X Position of 0,0 corner on focal plane
+                                    double y0,           ///< Y Position of 0,0 corner on focal plane
+                                    double xScale,       ///< Scale of the grid in x direction
+                                    double yScale,       ///< Scale of the grid in x direction
+                                    const psImage *x,    ///< The grid of offsets in x
+                                    const psImage *y     ///< The grid of offsets in y
+                                   );
+
 /** Readout data structure.
  *
