Changeset 36320 for branches/eam_branches/ipp-20130904/psModules
- Timestamp:
- Nov 28, 2013, 4:12:34 AM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130904/psModules/src/objects
- Files:
-
- 7 edited
-
models/pmModel_DEV.c (modified) (1 diff)
-
pmPCM_MinimizeChisq.c (modified) (1 diff)
-
pmPCMdata.c (modified) (7 diffs)
-
pmPCMdata.h (modified) (1 diff)
-
pmSourceFitModel.c (modified) (1 diff)
-
pmSourceFitModel.h (modified) (1 diff)
-
pmSourceFitPCM.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130904/psModules/src/objects/models/pmModel_DEV.c
r36196 r36320 269 269 270 270 // Mxx, Mxy, Myy define the elliptical shape, but Mrf defines the width 271 float scale = moments->Mrf / axes.major; 271 // the factor of 2.3 comes from Table 1 of Graham and Driver (2005) 272 float scale = moments->Mrf / axes.major / 2.3; 272 273 axes.major *= scale; 273 274 axes.minor *= scale; -
branches/eam_branches/ipp-20130904/psModules/src/objects/pmPCM_MinimizeChisq.c
r36314 r36320 135 135 } 136 136 137 if ( 0) {137 if (1) { 138 138 fprintf (stderr, "%d : ", min->iter); 139 139 for (int ti = 0; ti < params->n; ti++) { -
branches/eam_branches/ipp-20130904/psModules/src/objects/pmPCMdata.c
r36314 r36320 43 43 44 44 # define USE_DELTA_PSF 0 45 # define KERNEL_NSIGMA 5.046 45 47 46 // TEST: factor to increase the convolution sigma. psphot modifies this global variable. … … 108 107 // convolution with a Gaussian approximation to the kernel 109 108 pcm->use1Dgauss = false; 110 pcm->nsigma = KERNEL_NSIGMA;109 pcm->nsigma = NAN; // this is set to something defined by the user 111 110 pcm->sigma = 1.0; // this should be set to something sensible when the psf is known 112 111 … … 414 413 415 414 pcm->poissonErrors = fitOptions->poissonErrors; 415 pcm->nsigma = fitOptions->nsigma; 416 416 417 417 pcm->nPix = nPix; … … 538 538 539 539 // construct a realization of the source model 540 bool pmPCMCacheModel (pmSource *source, psImageMaskType maskVal, int psfSize ) {540 bool pmPCMCacheModel (pmSource *source, psImageMaskType maskVal, int psfSize, float nsigma) { 541 541 542 542 PS_ASSERT_PTR_NON_NULL(source, false); … … 560 560 561 561 if (USE_1D_CACHE) { 562 psImageSmoothCacheData *smdata = psImageSmoothCacheSetKernel (&sigma, &kappa, KERNEL_NSIGMA, source->modelFlux, source->modelPSF);562 psImageSmoothCacheData *smdata = psImageSmoothCacheSetKernel (&sigma, &kappa, nsigma, source->modelFlux, source->modelPSF); 563 563 psImageSmoothCache_F32 (source->modelFlux, smdata); 564 564 psFree (smdata); 565 565 } else { 566 psImageSmooth2dCacheData *smdata = psImageSmooth2dCacheSetKernel (&sigma, &kappa, KERNEL_NSIGMA, source->modelFlux, source->modelPSF);566 psImageSmooth2dCacheData *smdata = psImageSmooth2dCacheSetKernel (&sigma, &kappa, nsigma, source->modelFlux, source->modelPSF); 567 567 psImageSmooth2dCache_F32 (source->modelFlux, smdata); 568 568 psFree (smdata); … … 588 588 589 589 // construct a realization of the source model 590 bool pmPCMMakeModel (pmSource *source, pmModel *model, psImageMaskType maskVal, int psfSize) {590 bool pmPCMMakeModel (pmSource *source, pmModel *model, float Nsigma, psImageMaskType maskVal, int psfSize) { 591 591 592 592 PS_ASSERT_PTR_NON_NULL(source, false); … … 607 607 608 608 if (USE_1D_CACHE) { 609 psImageSmoothCacheData *smdata = psImageSmoothCacheSetKernel (&sigma, &kappa, KERNEL_NSIGMA, source->modelFlux, source->modelPSF);609 psImageSmoothCacheData *smdata = psImageSmoothCacheSetKernel (&sigma, &kappa, Nsigma, source->modelFlux, source->modelPSF); 610 610 psImageSmoothCache_F32 (source->modelFlux, smdata); 611 611 psFree (smdata); 612 612 } else { 613 psImageSmooth2dCacheData *smdata = psImageSmooth2dCacheSetKernel (&sigma, &kappa, KERNEL_NSIGMA, source->modelFlux, source->modelPSF);613 psImageSmooth2dCacheData *smdata = psImageSmooth2dCacheSetKernel (&sigma, &kappa, Nsigma, source->modelFlux, source->modelPSF); 614 614 psImageSmooth2dCache_F32 (source->modelFlux, smdata); 615 615 psFree (smdata); -
branches/eam_branches/ipp-20130904/psModules/src/objects/pmPCMdata.h
r36281 r36320 105 105 bool pmSourceFitPCM (pmPCMdata *pcm, pmSource *source, pmSourceFitOptions *fitOptions, psImageMaskType maskVal, psImageMaskType markVal, int psfSize); 106 106 107 bool pmPCMCacheModel (pmSource *source, psImageMaskType maskVal, int psfSize );107 bool pmPCMCacheModel (pmSource *source, psImageMaskType maskVal, int psfSize, float nsigma); 108 108 109 bool pmPCMMakeModel (pmSource *source, pmModel *model, psImageMaskType maskVal, int psfSize);109 bool pmPCMMakeModel (pmSource *source, pmModel *model, float Nsigma, psImageMaskType maskVal, int psfSize); 110 110 111 111 /// @} -
branches/eam_branches/ipp-20130904/psModules/src/objects/pmSourceFitModel.c
r36085 r36320 59 59 opt->maxTol = 1.00; 60 60 opt->weight = 1.00; 61 opt->nsigma = 5.00; 61 62 opt->maxChisqDOF = NAN; 62 63 opt->poissonErrors = true; -
branches/eam_branches/ipp-20130904/psModules/src/objects/pmSourceFitModel.h
r36085 r36320 34 34 float weight; ///< use this weight for constant-weight fits 35 35 float covarFactor; ///< covariance factor for calculating the chisq 36 float nsigma; ///< how far out to convolve 36 37 bool poissonErrors; ///< use poisson errors for fits? 37 38 bool saveCovariance; -
branches/eam_branches/ipp-20130904/psModules/src/objects/pmSourceFitPCM.c
r36314 r36320 115 115 } else { 116 116 // xxx this is wrong because it does not convolve with the psf 117 pmPCMMakeModel (source, pcm->modelConv, maskVal, psfSize);117 pmPCMMakeModel (source, pcm->modelConv, pcm->nsigma, maskVal, psfSize); 118 118 pmSourceChisqModelFlux (source, pcm->modelConv, maskVal); 119 119 }
Note:
See TracChangeset
for help on using the changeset viewer.
