IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 20865


Ignore:
Timestamp:
Dec 1, 2008, 4:02:38 PM (17 years ago)
Author:
Paul Price
Message:

Add softening parameter to weights when calculating crNsigma.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotSourceSize.c

    r20831 r20865  
    3434        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "PSPHOT.CR.GROW is not positive.");
    3535        return false;
     36    }
     37
     38    float soft = psMetadataLookupF32(&status, recipe, "PSPHOT.CR.NSIGMA.SOFTEN"); // Softening parameter
     39    if (!status || !isfinite(soft) || soft < 0.0) {
     40        psWarning("PSPHOT.CR.NSIGMA.SOFTEN not set; defaulting to zero.");
     41        soft = 0.0;
    3642    }
    3743
     
    113119        float dcR = 4*weight[yPeak][xPeak] + weight[yPeak+1][xPeak-1] + weight[yPeak-1][xPeak+1];
    114120        float nR = cR / sqrtf(dcR);
     121
     122        // Soften weights (add systematic error)
     123        float softening = 6 * soft * source->peak->flux; // Softening for weights
     124        dCX += softening;
     125        dCY += softening;
     126        dCL += softening;
     127        dCR += softening;
    115128
    116129        // P(chisq > chisq_obs; Ndof) = gamma_Q (Ndof/2, chisq/2)
Note: See TracChangeset for help on using the changeset viewer.