Changeset 10854 for trunk/psModules/src/objects/pmSourceIO_CMP.c
- Timestamp:
- Dec 29, 2006, 8:32:01 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmSourceIO_CMP.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmSourceIO_CMP.c
r10258 r10854 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1. 19$ $Name: not supported by cvs2svn $6 * @date $Date: 2006-1 1-29 02:36:38$5 * @version $Revision: 1.20 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2006-12-29 18:32:01 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 244 244 psString line = psStringNCopy (&buffer[j*BYTES_STAR], BYTES_STAR); 245 245 246 psList *list = psStringSplit (line, " ", false); 247 psArray *array = psListToArray (list); 246 psArray *array = psStringSplitArray (line, " ", false); 248 247 249 248 // XXX this is a bit cheap: I don't even attempt to interpret the … … 251 250 // your milage may vary... 252 251 pmSource *source = pmSourceAlloc (); 253 pmModel *model = pmModelAlloc (modelType); 254 255 PAR = model->params->data.F32; 256 dPAR = model->dparams->data.F32; 252 source->modelPSF = pmModelAlloc (modelType); 253 source->type = PM_SOURCE_TYPE_STAR; 254 255 PAR = source->modelPSF->params->data.F32; 256 dPAR = source->modelPSF->dparams->data.F32; 257 257 258 258 PAR[PM_PAR_SKY] = pow (atof (array->data[5]), 10.0); … … 267 267 axes.theta = atof (array->data[10]); 268 268 269 if (!isfinite(axes.major)) 270 goto skip_source; 271 if (!isfinite(axes.minor)) 272 goto skip_source; 273 if (!isfinite(axes.theta)) 274 goto skip_source; 275 269 276 shape = psEllipseAxesToShape (axes); 270 277 … … 273 280 PAR[PM_PAR_SXY] = shape.sxy; 274 281 275 source->modelPSF = model;276 source->type = PM_SOURCE_TYPE_STAR;277 278 282 psArrayAdd (sources, 100, source); 279 283 284 skip_source: 280 285 psFree (line); 281 psFree (list);282 286 psFree (array); 283 287 psFree (source);
Note:
See TracChangeset
for help on using the changeset viewer.
