IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26705


Ignore:
Timestamp:
Jan 28, 2010, 4:29:36 AM (16 years ago)
Author:
Paul Price
Message:

Use new function to speed up calculation of covariance factor.

Location:
branches/eam_branches/20091201/psphot/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20091201/psphot/src/psphotEfficiency.c

    r26266 r26705  
    3333
    3434    psKernel *kernel = psImageSmoothKernel(smoothSigma, smoothNsigma); // Kernel used for smoothing
    35     psKernel *newCovar = psImageCovarianceCalculate(kernel, ro->covariance); // Covariance matrix
     35    *covarFactor = psImageCovarianceCalculateFactor(kernel, ro->covariance);
    3636    psFree(kernel);
    37     *covarFactor = psImageCovarianceFactor(newCovar); // Variance factor
    38     psFree(newCovar);
    3937
    4038    psStats *stats = psStatsAlloc(PS_STAT_ROBUST_MEDIAN); // Statistics for variance
  • branches/eam_branches/20091201/psphot/src/psphotFake.c

    r26266 r26705  
    2828    float smoothSigma  = 0.5*(FWHM_X + FWHM_Y) / (2.0*sqrtf(2.0*log(2.0)));
    2929    psKernel *kernel = psImageSmoothKernel(smoothSigma, smoothNsigma); // Kernel used for smoothing
    30     psKernel *newCovar = psImageCovarianceCalculate(kernel, readout->covariance); // Covariance matrix
     30    float factor = psImageCovarianceCalculateFactor(kernel, readout->covariance); // Covariance matrix
    3131    psFree(kernel);
    32     float factor = psImageCovarianceFactor(newCovar); // Variance factor
    33     psFree(newCovar);
    3432
    3533    psStats *stats = psStatsAlloc(PS_STAT_ROBUST_MEDIAN); // Statistics for variance
  • branches/eam_branches/20091201/psphot/src/psphotSignificanceImage.c

    r25383 r26705  
    7777    // Calculate correction factor for the covariance produced by the (potentially multiple) smoothing
    7878    psKernel *kernel = psImageSmoothKernel(SIGMA_SMTH, NSIGMA_SMTH); // Kernel used for smoothing
    79     psKernel *covar = psImageCovarianceCalculate(kernel, readout->covariance); // Covariance matrix
     79    float factor = 1.0 / psImageCovarianceCalculateFactor(kernel, readout->covariance);
    8080    psFree(kernel);
    81     float factor = 1.0 / psImageCovarianceFactor(covar);
    82     psFree(covar);
    8381
    8482    // record the effective area and significance scaling factor
Note: See TracChangeset for help on using the changeset viewer.