Index: /trunk/psModules/src/objects/pmSourceIO_CMP.c
===================================================================
--- /trunk/psModules/src/objects/pmSourceIO_CMP.c	(revision 10853)
+++ /trunk/psModules/src/objects/pmSourceIO_CMP.c	(revision 10854)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-11-29 02:36:38 $
+ *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-12-29 18:32:01 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -244,6 +244,5 @@
             psString line = psStringNCopy (&buffer[j*BYTES_STAR], BYTES_STAR);
 
-            psList *list = psStringSplit (line, " ", false);
-            psArray *array = psListToArray (list);
+            psArray *array = psStringSplitArray (line, " ", false);
 
             // XXX this is a bit cheap: I don't even attempt to interpret the
@@ -251,8 +250,9 @@
             // your milage may vary...
             pmSource *source = pmSourceAlloc ();
-            pmModel *model = pmModelAlloc (modelType);
-
-            PAR = model->params->data.F32;
-            dPAR = model->dparams->data.F32;
+            source->modelPSF = pmModelAlloc (modelType);
+            source->type = PM_SOURCE_TYPE_STAR;
+
+            PAR = source->modelPSF->params->data.F32;
+            dPAR = source->modelPSF->dparams->data.F32;
 
             PAR[PM_PAR_SKY] = pow (atof (array->data[5]), 10.0);
@@ -267,4 +267,11 @@
             axes.theta  = atof (array->data[10]);
 
+            if (!isfinite(axes.major))
+                goto skip_source;
+            if (!isfinite(axes.minor))
+                goto skip_source;
+            if (!isfinite(axes.theta))
+                goto skip_source;
+
             shape = psEllipseAxesToShape (axes);
 
@@ -273,11 +280,8 @@
             PAR[PM_PAR_SXY] = shape.sxy;
 
-            source->modelPSF = model;
-            source->type = PM_SOURCE_TYPE_STAR;
-
             psArrayAdd (sources, 100, source);
 
+skip_source:
             psFree (line);
-            psFree (list);
             psFree (array);
             psFree (source);
