Changeset 5058 for trunk/psphot/src/pmPSFtry.c
- Timestamp:
- Sep 15, 2005, 12:12:26 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/pmPSFtry.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/pmPSFtry.c
r4977 r5058 31 31 pmPSFtry *pmPSFtryAlloc (psArray *sources, char *modelName) { 32 32 33 pmModelType type; 34 33 35 pmPSFtry *test = (pmPSFtry *) psAlloc(sizeof(pmPSFtry)); 34 36 35 37 // XXX probably need to increment ref counter 36 test->modelType = pmModelSetType (modelName); 37 test->psf = pmPSFAlloc (test->modelType); 38 test->sources = psMemCopy(sources); 39 test->modelFLT = psArrayAlloc (sources->n); 40 test->modelPSF = psArrayAlloc (sources->n); 41 test->metric = psVectorAlloc (sources->n, PS_TYPE_F64); 42 test->fitMag = psVectorAlloc (sources->n, PS_TYPE_F64); 43 test->mask = psVectorAlloc (sources->n, PS_TYPE_U8); 44 test->ApResid = 0; 45 test->dApResid = 0; 46 test->skyBias = 0; 38 type = pmModelSetType (modelName); 39 test->psf = pmPSFAlloc (type); 40 test->sources = psMemCopy(sources); 41 test->modelFLT = psArrayAlloc (sources->n); 42 test->modelPSF = psArrayAlloc (sources->n); 43 test->metric = psVectorAlloc (sources->n, PS_TYPE_F64); 44 test->fitMag = psVectorAlloc (sources->n, PS_TYPE_F64); 45 test->mask = psVectorAlloc (sources->n, PS_TYPE_U8); 47 46 48 47 for (int i = 0; i < test->modelFLT->n; i++) { … … 84 83 85 84 pmSource *source = try->sources->data[i]; 86 pmModel *model = pmSourceModelGuess (source, try-> modelType);85 pmModel *model = pmSourceModelGuess (source, try->psf->type); 87 86 x = source->peak->x; 88 87 y = source->peak->y; … … 164 163 pmPSFtryMetric (try, RADIUS); 165 164 psLogMsg ("psphot.pspsf", 3, "try model %s, ap-fit: %f +/- %f, sky bias: %f\n", 166 modelName, try-> ApResid, try->dApResid, try->skyBias);165 modelName, try->psf->ApResid, try->psf->dApResid, try->psf->skyBias); 167 166 168 167 return (try); … … 279 278 stats = psVectorStats (stats, daResid, NULL, maskB, 1); 280 279 281 try-> ApResid = poly->coeff[0];282 try-> dApResid = stats->clippedStdev;283 try-> skyBias = poly->coeff[1] / (M_PI * PS_SQR(RADIUS));280 try->psf->ApResid = poly->coeff[0]; 281 try->psf->dApResid = stats->clippedStdev; 282 try->psf->skyBias = poly->coeff[1] / (M_PI * PS_SQR(RADIUS)); 284 283 285 284 psFree (rflux);
Note:
See TracChangeset
for help on using the changeset viewer.
