Changeset 6943
- Timestamp:
- Apr 21, 2006, 11:28:31 AM (20 years ago)
- Location:
- trunk/psModules/src
- Files:
-
- 8 edited
-
objects/pmGrowthCurve.c (modified) (2 diffs)
-
objects/pmModel.c (modified) (4 diffs)
-
objects/pmPSFtry.c (modified) (5 diffs)
-
objects/pmPeaks.c (modified) (4 diffs)
-
objects/pmSourceContour.c (modified) (4 diffs)
-
objects/pmSourceIO_CMF.c (modified) (2 diffs)
-
objects/pmSourcePhotometry.c (modified) (2 diffs)
-
pslib/psSparse.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmGrowthCurve.c
r6872 r6943 5 5 * @author EAM, IfA 6 6 * 7 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $8 * @date $Date: 2006-04- 17 18:01:05$7 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2006-04-21 21:25:52 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 35 35 growth->radius = psVectorCreate (NULL, minRadius, maxRadius, 1.0, PS_TYPE_F32); 36 36 growth->apMag = psVectorAlloc (growth->radius->n, PS_TYPE_F32); 37 growth->apMag->n = growth->radius->n; 37 38 38 39 // XXX may want to extend this to allow for a different refRadius; -
trunk/psModules/src/objects/pmModel.c
r6872 r6943 6 6 * @author EAM, IfA 7 7 * 8 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-04- 17 18:01:05$8 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-04-21 21:26:01 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 61 61 tmp->params = psVectorAlloc(Nparams, PS_TYPE_F32); 62 62 tmp->dparams = psVectorAlloc(Nparams, PS_TYPE_F32); 63 tmp->params->n = tmp->dparams->n = Nparams; 63 64 64 65 for (psS32 i = 0; i < tmp->params->n; i++) { … … 111 112 x->data.F32[0] = (psF32) (col + image->col0); 112 113 x->data.F32[1] = (psF32) (row + image->row0); 114 x->n = 2; 113 115 psF32 tmpF; 114 116 pmModelFunc modelFunc; … … 136 138 137 139 psVector *x = psVectorAlloc(2, PS_TYPE_F32); 140 x->n = 2; 138 141 psVector *params = model->params; 139 142 pmModelFunc modelFunc = pmModelFunc_GetFunction (model->type); -
trunk/psModules/src/objects/pmPSFtry.c
r6910 r6943 5 5 * @author EAM, IfA 6 6 * 7 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $8 * @date $Date: 2006-04- 19 20:37:35$7 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2006-04-21 21:26:22 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 67 67 test->fitMag = psVectorAlloc (sources->n, PS_TYPE_F64); 68 68 test->mask = psVectorAlloc (sources->n, PS_TYPE_U8); 69 test->metric->n = test->fitMag->n = test->mask->n = sources->n; 70 test->modelEXT->n = test->modelPSF->n = sources->n; 69 71 70 72 for (int i = 0; i < test->modelEXT->n; i++) { … … 190 192 psVector *chisq = psVectorAlloc (psfTry->sources->n, PS_TYPE_F64); 191 193 psVector *mask = psVectorAlloc (psfTry->sources->n, PS_TYPE_MASK); 194 flux->n = mask->n = chisq->n = psfTry->sources->n; 192 195 193 196 // write sources with models first … … 211 214 psVectorClipFitPolynomial1D (psfTry->psf->ChiTrend, stats, mask, 1, chisq, NULL, flux); 212 215 for (int i = 0; i < psfTry->psf->ChiTrend->nX + 1; i++) { 213 psLogMsg ("pmPSFtry", 4, "chisq vs flux fit term %d: %f +/- %f\n", i, psfTry->psf->ChiTrend->coeff[i]*pow(10000, i), psfTry->psf->ChiTrend->coeffErr[i] );216 psLogMsg ("pmPSFtry", 4, "chisq vs flux fit term %d: %f +/- %f\n", i, psfTry->psf->ChiTrend->coeff[i]*pow(10000, i), psfTry->psf->ChiTrend->coeffErr[i]*pow(10000,i)); 214 217 } 215 218 psLogMsg ("pmPSFtry", 4, "chisq vs flux fit: %f +/- %f\n", stats->sampleMedian, stats->sampleStdev); … … 239 242 // r2rflux = radius^2 * ten(0.4*fitMag); 240 243 psVector *r2rflux = psVectorAlloc (psfTry->sources->n, PS_TYPE_F64); 244 r2rflux->n = psfTry->sources->n; 245 241 246 for (int i = 0; i < psfTry->sources->n; i++) { 242 247 if (psfTry->mask->data.U8[i] & PSFTRY_MASK_ALL) -
trunk/psModules/src/objects/pmPeaks.c
r6872 r6943 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-04- 17 18:01:05$8 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-04-21 21:26:44 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 65 65 tmpVector->data.F32[col] = image->data.F32[row][col]; 66 66 } 67 tmpVector->n = image->numCols; 67 68 psTrace(__func__, 4, "---- %s() end ----\n", __func__); 68 69 return(tmpVector); … … 181 182 tmpVector = psVectorAlloc(1, PS_TYPE_U32); 182 183 tmpVector->data.U32[0] = 0; 184 tmpVector->n = 1; 183 185 } else { 184 186 tmpVector = psVectorAlloc(0, PS_TYPE_U32); … … 220 222 // 221 223 psVector *tmpVector = psVectorAlloc(count, PS_TYPE_U32); 224 tmpVector->n = count; 222 225 count = 0; 223 226 -
trunk/psModules/src/objects/pmSourceContour.c
r6872 r6943 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-04- 17 18:01:05$8 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-04-21 21:27:04 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 323 323 // fprintf (stderr, "done\n"); 324 324 psArray *tmpArray = psArrayAlloc(2); 325 tmpArray->n = 2; 326 325 327 tmpArray->data[0] = (psPtr *) xVec; 326 328 tmpArray->data[1] = (psPtr *) yVec; … … 360 362 psVector *xVec = psVectorAlloc(2 * source->pixels->numRows, PS_TYPE_F32); 361 363 psVector *yVec = psVectorAlloc(2 * source->pixels->numRows, PS_TYPE_F32); 364 xVec->n = yVec->n = 2 * source->pixels->numRows; 362 365 363 366 // … … 440 443 // 441 444 psArray *tmpArray = psArrayAlloc(2); 445 tmpArray->n = 2; 446 442 447 tmpArray->data[0] = (psPtr *) yVec; 443 448 tmpArray->data[1] = (psPtr *) xVec; -
trunk/psModules/src/objects/pmSourceIO_CMF.c
r6872 r6943 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $6 * @date $Date: 2006-04- 17 18:01:05$5 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2006-04-21 21:27:23 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 124 124 125 125 psArray *sources = psArrayAlloc (table->n); 126 sources->n = table->n; 126 127 127 128 // convert the table to the pmSource entries -
trunk/psModules/src/objects/pmSourcePhotometry.c
r6910 r6943 3 3 * @author EAM, IfA; GLG, MHPCC 4 4 * 5 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $6 * @date $Date: 2006-04- 19 20:37:35$5 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2006-04-21 21:28:31 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 237 237 pmModelFunc modelFunc = pmModelFunc_GetFunction (model->type); 238 238 psVector *coord = psVectorAlloc(2, PS_TYPE_F32); 239 coord->n = 2; 240 239 241 psVector *params = model->params; 240 242 -
trunk/psModules/src/pslib/psSparse.c
r6872 r6943 30 30 sparse->Bfj = psVectorAlloc (Nrows, PS_DATA_F32); 31 31 sparse->Qii = psVectorAlloc (Nrows, PS_DATA_F32); 32 sparse->Bfj->n = Nrows; 33 sparse->Qii->n = Nrows; 32 34 33 35 sparse->Nrows = Nrows; … … 109 111 if (output == NULL) { 110 112 output = psVectorAlloc (vector->n, PS_DATA_F32); 113 output->n = vector->n; 111 114 } 112 115 … … 136 139 // temporary storage for intermediate results 137 140 psVector *dQ = psVectorAlloc (guess->n, PS_DATA_F32); 141 dQ->n = guess->n; 138 142 139 143 for (int j = 0; j < Niter; j++) { … … 171 175 psVector *tSi = psVectorAlloc (Nelem, PS_DATA_S32); 172 176 psVector *tSj = psVectorAlloc (Nelem, PS_DATA_S32); 177 tAij->n = tSi->n = tSj->n = Nelem; 178 173 179 for (int i = 0; i < Nelem; i++) { 174 180 int j = index->data.U32[i]; … … 213 219 x->data.F32[1] = 5; 214 220 x->data.F32[2] = 7; 215 fprintf (stderr, "x: %f %f %f\n", x->data.F32[0], x->data.F32[1], x->data.F32[2]); 221 x->n = 3; 222 fprintf (stderr, "x: %f %f %f\n", x->data.F32[0], x->data.F32[1], x->data.F32[2]); 223 216 224 217 225 psVector *B = psSparseMatrixTimesVector (NULL, sparse, x);
Note:
See TracChangeset
for help on using the changeset viewer.
