IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28797


Ignore:
Timestamp:
Jul 30, 2010, 9:39:15 AM (16 years ago)
Author:
eugene
Message:

updates from trunk

Location:
branches/eam_branches/ipp-20100621/psphot
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20100621/psphot

  • branches/eam_branches/ipp-20100621/psphot/src/psphotApResid.c

    r28692 r28797  
    328328    psMetadataAdd (readout->analysis, PS_LIST_TAIL, "DAPMIFIT", PS_DATA_F32 | PS_META_REPLACE, "ap residual scatter", psf->dApResid);
    329329    psMetadataAdd (readout->analysis, PS_LIST_TAIL, "NAPMIFIT", PS_DATA_S32 | PS_META_REPLACE, "number of apresid stars", psf->nApResid);
    330     psMetadataAdd (readout->analysis, PS_LIST_TAIL, "APLOSS",   PS_DATA_F32 | PS_META_REPLACE, "aperture loss (mag)", psf->growth->apLoss);
     330    psMetadataAdd (readout->analysis, PS_LIST_TAIL, "APLOSS",   PS_DATA_F32 | PS_META_REPLACE, "aperture loss (mag)", psf->growth ? psf->growth->apLoss : NAN);
    331331
    332332    psLogMsg ("psphot.apresid", PS_LOG_DETAIL, "aperture residual: %f +/- %f\n", psf->ApResid, psf->dApResid);
  • branches/eam_branches/ipp-20100621/psphot/src/psphotSignificanceImage.c

    r26894 r28797  
    7676    // Calculate correction factor for the covariance produced by the (potentially multiple) smoothing
    7777    psKernel *kernel = psImageSmoothKernel(SIGMA_SMTH, NSIGMA_SMTH); // Kernel used for smoothing
    78     float factor = 1.0 / psImageCovarianceCalculateFactor(kernel, readout->covariance);
     78    double sum2 = 0.0;                                               // Sum of kernel squared
     79    for (int y = kernel->yMin; y <= kernel->yMax; y++) {
     80        for (int x = kernel->xMin; x <= kernel->xMax; x++) {
     81            sum2 += PS_SQR(kernel->kernel[y][x]);
     82        }
     83    }
     84    float factor = 1.0 / (sum2 * psImageCovarianceCalculateFactor(kernel, readout->covariance));
    7985    psFree(kernel);
    8086
Note: See TracChangeset for help on using the changeset viewer.