Index: trunk/psModules/src/astrom/pmAstrometryDistortion.c
===================================================================
--- trunk/psModules/src/astrom/pmAstrometryDistortion.c	(revision 8815)
+++ trunk/psModules/src/astrom/pmAstrometryDistortion.c	(revision 9730)
@@ -7,6 +7,6 @@
 *  @author EAM, IfA
 *
-*  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2006-09-15 09:49:01 $
+*  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2006-10-24 22:55:04 $
 *
 *  Copyright 2006 Institute for Astronomy, University of Hawaii
@@ -54,5 +54,5 @@
 
     if (grads == NULL) {
-        grads = psArrayAlloc (100);
+        grads = psArrayAllocEmpty (100);
     }
 
@@ -76,8 +76,8 @@
             int Ymax = Ymin + DY;
 
-            psVector *L  = psVectorAlloc (100, PS_TYPE_F32);
-            psVector *M  = psVectorAlloc (100, PS_TYPE_F32);
-            psVector *dP = psVectorAlloc (100, PS_TYPE_F32);
-            psVector *dQ = psVectorAlloc (100, PS_TYPE_F32);
+            psVector *L  = psVectorAllocEmpty (100, PS_TYPE_F32);
+            psVector *M  = psVectorAllocEmpty (100, PS_TYPE_F32);
+            psVector *dP = psVectorAllocEmpty (100, PS_TYPE_F32);
+            psVector *dQ = psVectorAllocEmpty (100, PS_TYPE_F32);
             int Npts = 0;
 
@@ -121,5 +121,4 @@
             psStats *stats = psStatsAlloc (PS_STAT_SAMPLE_MEDIAN | PS_STAT_SAMPLE_STDEV);
             psVector *mask = psVectorAlloc (Npts, PS_TYPE_MASK);
-            mask->n = Npts;
             psVectorInit (mask, 0);
 
@@ -175,10 +174,7 @@
         M->data.F32[i] = grad->FP.y;
     }
-    dPdL->n = dQdL->n = dPdM->n = dQdM->n = grads->n;
-    L->n = M->n = grads->n;
 
     psStats *stats = psStatsAlloc (PS_STAT_SAMPLE_MEDIAN | PS_STAT_SAMPLE_STDEV);
     psVector *mask = psVectorAlloc (grads->n, PS_TYPE_MASK);
-    mask->n = grads->n;
     psVectorInit (mask, 0);
 
