IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30560


Ignore:
Timestamp:
Feb 10, 2011, 2:51:05 PM (15 years ago)
Author:
eugene
Message:

push the covariance / deteff fix into the trunk; add EFFECTIVE_AREA and SIGNIFICANCE_SCALE_FACTOR to the output header

Location:
trunk/psphot/src
Files:
2 edited

Legend:

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

    r29936 r30560  
    3131    assert(covarFactor);
    3232
     33    // apply the amplitude of kernel^2 to the covarFactor (why?)
     34    // XXX this is simply undoing the scale scalculate in psImageCovarianceCalculateFactor
     35    // if this is the right solution, make this extra calculation optional (and explain...)
    3336    psKernel *kernel = psImageSmoothKernel(smoothSigma, smoothNsigma); // Kernel used for smoothing
    34     *covarFactor = psImageCovarianceCalculateFactor(kernel, ro->covariance);
     37    double sum2 = 0.0;                                               // Sum of kernel squared
     38    for (int y = kernel->yMin; y <= kernel->yMax; y++) {
     39        for (int x = kernel->xMin; x <= kernel->xMax; x++) {
     40            sum2 += PS_SQR(kernel->kernel[y][x]);
     41        }
     42    }
     43    *covarFactor = sum2 * psImageCovarianceCalculateFactor(kernel, ro->covariance);
    3544    psFree(kernel);
    3645
     
    7079    float fluxLim = 2.0 * *norm * peakLim; // Limiting flux in original
    7180    *magLim = -2.5 * log10f(fluxLim);
     81    psTrace("psphot.fake", 1, "Covar Factor:  %f\n", *covarFactor);
    7282    psTrace("psphot.fake", 1, "Limiting peak: %f\n", peakLim);
    7383    psTrace("psphot.fake", 1, "Limiting flux: %f\n", fluxLim);
  • trunk/psphot/src/psphotOutput.c

    r29936 r30560  
    307307    psMetadataItemSupplement (&status, header, analysis, "PSPHOT.CR.MAX.MAG");
    308308
     309    psMetadataItemSupplement (&status, header, analysis, "EFFECTIVE_AREA");
     310    psMetadataItemSupplement (&status, header, analysis, "SIGNIFICANCE_SCALE_FACTOR");
     311
    309312    // sky background model statistics
    310313    psMetadataItemSupplement (&status, header, analysis, "MSKY_MN");
Note: See TracChangeset for help on using the changeset viewer.