IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34307


Ignore:
Timestamp:
Aug 14, 2012, 1:08:16 PM (14 years ago)
Author:
bills
Message:

move definition of the vector of sigma values used to set the moments window to the
recipe. Eliminate the two largest values (12 and 18 pixels) for gpc1

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippconfig/gpc1/psphot.config

    r32187 r34307  
    1919# PSF model parameters : choose the PSF model desired
    2020PSF_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
    2125PSPHOT.CR.NSIGMA.SOFTEN             F32   0.0025        # Softening parameter for weights in CR stat
    22 
    2326PSPHOT.CR.MAX.SIZE                  F32   0.8             # guess for limit on M_minor in pix^2
    2427PSPHOT.CR.MAX.MAG                   F32  -8.0             # guess for limit on Kron Mag
  • trunk/ippconfig/recipes/psphot.config

    r34273 r34307  
    122122PSF_MODEL                           STR   PS_MODEL_GAUSS
    123123# 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
    124126
    125127# PSF.TREND.MASK must be a 2D polynomial
  • trunk/psphot/src/psphotSourceStats.c

    r33840 r34307  
    521521    float PSF_SN_LIM = 2.0*psMetadataLookupF32(&status, recipe, "PSF_SN_LIM"); psAssert (status, "missing PSF_SN_LIM");
    522522
    523     // XXX move this to a config file?
     523
    524524    # 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];
    526531    float Sout[NSIGMA];
    527532    float Rmin[NSIGMA];
    528533    int   Nout[NSIGMA]; // number of stars found in clump : use this to control the number of regions measured by psphotRoughClass
    529534
     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
    530540    // this sorts by peak->rawFlux
    531541    sources = psArraySort (sources, pmSourceSortByFlux);
    532542
    533543    // loop over radii:
    534     for (int i = 0; i < NSIGMA; i++) {
     544    for (int i = 0; i < sigmavec->n; i++) {
    535545
    536546        // XXX move max source number to config
     
    589599    float minS = Sout[0];
    590600    float maxS = Sout[0];
    591     for (int i = 0; i < NSIGMA; i++) {
     601    for (int i = 0; i < sigmavec->n; i++) {
    592602        minS = PS_MIN(Sout[i], minS);
    593603        maxS = PS_MAX(Sout[i], maxS);
    594604    }
    595     if (minS > 0.65) Sigma = sigma[NSIGMA-1];
     605    if (minS > 0.65) Sigma = sigma[sigmavec->n-1];
    596606    if (maxS < 0.65) Sigma = sigma[0];
    597607
    598     for (int i = 0; i < NSIGMA - 1 && isnan(Sigma); i++) {
     608    for (int i = 0; i < sigmavec->n - 1 && isnan(Sigma); i++) {
    599609        if (!isfinite(Sout[i]) || !isfinite(Sout[i+1])) continue;
    600610        if ((Sout[i] > 0.65) && (Sout[i+1] > 0.65)) continue;
Note: See TracChangeset for help on using the changeset viewer.