Changeset 34308
- Timestamp:
- Aug 14, 2012, 1:26:39 PM (14 years ago)
- Location:
- tags/ipp-20120802
- Files:
-
- 3 edited
-
ippconfig/gpc1/psphot.config (modified) (1 diff)
-
ippconfig/recipes/psphot.config (modified) (1 diff)
-
psphot/src/psphotSourceStats.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-20120802/ippconfig/gpc1/psphot.config
r32187 r34308 19 19 # PSF model parameters : choose the PSF model desired 20 20 PSF_MODEL STR PS_MODEL_PS1_V1 21 # vector of simga values to use in when setting the moments window (this is shorter for gpc1 than 22 # the psphot default) 23 @PSF.SIGMA.VALUES F32 1.0 2.0 3.0 4.5 6.0 9.0 # comment due to ticket #1476 24 21 25 PSPHOT.CR.NSIGMA.SOFTEN F32 0.0025 # Softening parameter for weights in CR stat 22 23 26 PSPHOT.CR.MAX.SIZE F32 0.8 # guess for limit on M_minor in pix^2 24 27 PSPHOT.CR.MAX.MAG F32 -8.0 # guess for limit on Kron Mag -
tags/ipp-20120802/ippconfig/recipes/psphot.config
r34273 r34308 122 122 PSF_MODEL STR PS_MODEL_GAUSS 123 123 # PSF_MODEL STR PS_MODEL_PGAUSS 124 # sigma values used by psphotSetMomentsWindow. Maximum length of this array is 8 125 @PSF.SIGMA.VALUES F32 1.0 2.0 3.0 4.5 6.0 9.0 12.0 18.0 # comment due to ticket #1476 124 126 125 127 # PSF.TREND.MASK must be a 2D polynomial -
tags/ipp-20120802/psphot/src/psphotSourceStats.c
r33840 r34308 521 521 float PSF_SN_LIM = 2.0*psMetadataLookupF32(&status, recipe, "PSF_SN_LIM"); psAssert (status, "missing PSF_SN_LIM"); 522 522 523 // XXX move this to a config file? 523 524 524 # define NSIGMA 8 525 float sigma[NSIGMA] = {1.0, 2.0, 3.0, 4.5, 6.0, 9.0, 12.0, 18.0}; 525 // moved to config file 526 // float sigma[NSIGMA] = {1.0, 2.0, 3.0, 4.5, 6.0, 9.0, 12.0, 18.0}; 527 psVector *sigmavec = psMetadataLookupPtr (&status, recipe, "PSF.SIGMA.VALUES"); psAssert(status, "missing PSF.SIGMA.VALUES"); 528 psAssert(sigmavec->n <= NSIGMA, "too many sigma values in recipe %ld maximum is %d", sigmavec->n, NSIGMA); 529 530 float sigma[NSIGMA]; 526 531 float Sout[NSIGMA]; 527 532 float Rmin[NSIGMA]; 528 533 int Nout[NSIGMA]; // number of stars found in clump : use this to control the number of regions measured by psphotRoughClass 529 534 535 // copy the data from vector to local array to keep the code below easier to read 536 for (int i = 0 ; i < sigmavec->n; i++) { 537 sigma[i] = sigmavec->data.F32[i]; 538 } 539 530 540 // this sorts by peak->rawFlux 531 541 sources = psArraySort (sources, pmSourceSortByFlux); 532 542 533 543 // loop over radii: 534 for (int i = 0; i < NSIGMA; i++) {544 for (int i = 0; i < sigmavec->n; i++) { 535 545 536 546 // XXX move max source number to config … … 589 599 float minS = Sout[0]; 590 600 float maxS = Sout[0]; 591 for (int i = 0; i < NSIGMA; i++) {601 for (int i = 0; i < sigmavec->n; i++) { 592 602 minS = PS_MIN(Sout[i], minS); 593 603 maxS = PS_MAX(Sout[i], maxS); 594 604 } 595 if (minS > 0.65) Sigma = sigma[ NSIGMA-1];605 if (minS > 0.65) Sigma = sigma[sigmavec->n-1]; 596 606 if (maxS < 0.65) Sigma = sigma[0]; 597 607 598 for (int i = 0; i < NSIGMA- 1 && isnan(Sigma); i++) {608 for (int i = 0; i < sigmavec->n - 1 && isnan(Sigma); i++) { 599 609 if (!isfinite(Sout[i]) || !isfinite(Sout[i+1])) continue; 600 610 if ((Sout[i] > 0.65) && (Sout[i+1] > 0.65)) continue;
Note:
See TracChangeset
for help on using the changeset viewer.
