Changeset 36863
- Timestamp:
- Jun 13, 2014, 8:52:06 AM (12 years ago)
- Location:
- trunk/psphot/src
- Files:
-
- 9 edited
-
psphotChoosePSF.c (modified) (1 diff)
-
psphotEfficiency.c (modified) (2 diffs)
-
psphotEvalFLT.c (modified) (1 diff)
-
psphotGalaxyShape.c (modified) (1 diff)
-
psphotMakeFluxScale.c (modified) (1 diff)
-
psphotRadiusChecks.c (modified) (3 diffs)
-
psphotSersicModelClass.c (modified) (1 diff)
-
psphotSourceFits.c (modified) (3 diffs)
-
psphotVisual.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotChoosePSF.c
r36623 r36863 448 448 449 449 // get the model full-width at half-max 450 float FWHM_MAJOR = 2*modelPSF-> modelRadius (modelPSF->params, 0.5);450 float FWHM_MAJOR = 2*modelPSF->class->modelRadius (modelPSF->params, 0.5); 451 451 452 452 // XXX make sure this is consistent with the re-definition of PM_PAR_SXX -
trunk/psphot/src/psphotEfficiency.c
r34353 r36863 71 71 continue; 72 72 } 73 float flux = normModel-> modelFlux(normModel->params); // Total flux for peak of 1.073 float flux = normModel->class->modelFlux(normModel->params); // Total flux for peak of 1.0 74 74 psFree(normModel); 75 75 if (!isfinite(flux)) { … … 424 424 continue; 425 425 } 426 float sourceRadius = PS_MAX(radius, model-> modelRadius(model->params, minFlux)); // Radius for source426 float sourceRadius = PS_MAX(radius, model->class->modelRadius(model->params, minFlux)); // Radius for source 427 427 psFree(model); 428 428 if (!isfinite(sourceRadius)) { -
trunk/psphot/src/psphotEvalFLT.c
r17396 r36863 53 53 } 54 54 55 keep = model-> modelFitStatus(model);55 keep = model->class->modelFitStatus(model); 56 56 if (keep) return true; 57 57 -
trunk/psphot/src/psphotGalaxyShape.c
r36757 r36863 400 400 401 401 pcm->modelConv->params->data.F32[PM_PAR_I0] = Io; 402 float flux = pcm->modelConv-> modelFlux (pcm->modelConv->params);402 float flux = pcm->modelConv->class->modelFlux (pcm->modelConv->params); 403 403 float dflux = flux * (dIo / Io); 404 404 -
trunk/psphot/src/psphotMakeFluxScale.c
r30624 r36863 38 38 } else { 39 39 // measure the fitMag for this model 40 fitSum = model-> modelFlux (model->params);40 fitSum = model->class->modelFlux (model->params); 41 41 } 42 42 if (fitSum < 1.e-6) continue; -
trunk/psphot/src/psphotRadiusChecks.c
r36086 r36863 60 60 if (radiusFit <= 0) { // use fixed radius 61 61 if (moments == NULL) { 62 radiusFit = model-> modelRadius(model->params, PSF_FIT_NSIGMA*moments->dSky);62 radiusFit = model->class->modelRadius(model->params, PSF_FIT_NSIGMA*moments->dSky); 63 63 } else { 64 radiusFit = model-> modelRadius(model->params, 1.0);64 radiusFit = model->class->modelRadius(model->params, 1.0); 65 65 } 66 66 model->fitRadius = (RADIUS_TYPE)(radiusFit + PSF_FIT_PADDING); … … 95 95 if (radiusFit <= 0) { // use fixed radius 96 96 if (moments == NULL) { 97 radiusFit = model-> modelRadius(model->params, PSF_FIT_NSIGMA*moments->dSky);97 radiusFit = model->class->modelRadius(model->params, PSF_FIT_NSIGMA*moments->dSky); 98 98 } else { 99 radiusFit = model-> modelRadius(model->params, 1.0);99 radiusFit = model->class->modelRadius(model->params, 1.0); 100 100 } 101 101 model->fitRadius = (RADIUS_TYPE)(radiusFit + PSF_FIT_PADDING); … … 294 294 float flux = deep ? EXT_FIT_NSIGMA*EXT_FIT_SKY_SIG : 0.1 * model->params->data.F32[PM_PAR_I0]; 295 295 296 float rawRadius = model-> modelRadius (model->params, flux);296 float rawRadius = model->class->modelRadius (model->params, flux); 297 297 if (isnan(rawRadius)) return false; 298 298 -
trunk/psphot/src/psphotSersicModelClass.c
r33410 r36863 586 586 coord->data.F32[1] = (psF32) (i + source->pixels->row0); 587 587 588 pcm->modelConvFlux->data.F32[i][j] = pcm->modelConv-> modelFunc (NULL, params, coord);588 pcm->modelConvFlux->data.F32[i][j] = pcm->modelConv->class->modelFunc (NULL, params, coord); 589 589 } 590 590 } -
trunk/psphot/src/psphotSourceFits.c
r36375 r36863 700 700 model->params->data.F32[PM_PAR_7] = 0.5/indexGuess[i]; 701 701 702 if (!model-> modelGuess(model, source, maskVal, markVal)) {702 if (!model->class->modelGuess(model, source, maskVal, markVal)) { 703 703 model->flags |= PM_MODEL_STATUS_BADARGS; 704 704 return false; … … 723 723 model->flags = PM_MODEL_STATUS_NONE; // do not attempt to handle failures here, let the next iteration deal with it 724 724 model->params->data.F32[PM_PAR_7] = 0.5/indexGuess[iMin]; 725 model-> modelGuess(model, source, maskVal, markVal);725 model->class->modelGuess(model, source, maskVal, markVal); 726 726 727 727 return true; … … 752 752 model->params->data.F32[PM_PAR_7] = indexGuess[i]; 753 753 754 if (!model-> modelGuess(model, source, maskVal, markVal)) {754 if (!model->class->modelGuess(model, source, maskVal, markVal)) { 755 755 model->flags |= PM_MODEL_STATUS_BADARGS; 756 756 return false; -
trunk/psphot/src/psphotVisual.c
r35769 r36863 1444 1444 coord->data.F32[1] = r; 1445 1445 coord->data.F32[0] = 0.0; 1446 fmaj->data.F32[i] = log10(source->modelPSF-> modelFunc (NULL, params, coord));1446 fmaj->data.F32[i] = log10(source->modelPSF->class->modelFunc (NULL, params, coord)); 1447 1447 1448 1448 coord->data.F32[0] = r; 1449 1449 coord->data.F32[1] = 0.0; 1450 fmin->data.F32[i] = log10(source->modelPSF-> modelFunc (NULL, params, coord));1450 fmin->data.F32[i] = log10(source->modelPSF->class->modelFunc (NULL, params, coord)); 1451 1451 } 1452 1452 psFree (coord); 1453 1453 psFree (params); 1454 1454 1455 float FWHM_MAJOR = 2.0*source->modelPSF-> modelRadius (source->modelPSF->params, 0.5*source->modelPSF->params->data.F32[PM_PAR_I0]);1455 float FWHM_MAJOR = 2.0*source->modelPSF->class->modelRadius (source->modelPSF->params, 0.5*source->modelPSF->params->data.F32[PM_PAR_I0]); 1456 1456 float FWHM_MINOR = FWHM_MAJOR * (axes.minor / axes.major); 1457 1457 if (FWHM_MAJOR < FWHM_MINOR) PS_SWAP (FWHM_MAJOR, FWHM_MINOR);
Note:
See TracChangeset
for help on using the changeset viewer.
