IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 2, 2009, 5:00:06 PM (17 years ago)
Author:
Paul Price
Message:

FWHM_X and FWHM_Y don't appear to get set any more. Instead, FWHM_MAJ and FWHM_MIN do. Does this explain the much-reduced limiting magnitudes from the difference images??? Either way, it's required to get the detection efficiency measurements working.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap/psphot/src/psphotFake.c

    r25260 r25261  
    1717                      const pmReadout *ro,     // Readout of interest
    1818                      float thresh,            // Threshold for source identification
    19                       float xFWHM, float yFWHM, // Size of PSF
     19                      float fwhmMajor, float fwhmMinor, // Size of PSF
    2020                      float smoothNsigma,       // Smoothing limit
    2121                      psImageMaskType maskVal   // Value to mask
     
    2525    PM_ASSERT_READOUT_VARIANCE(ro, false);
    2626
    27     float smoothSigma  = 0.5*(xFWHM + yFWHM) / (2.0*sqrtf(2.0*log(2.0)));
     27    float smoothSigma  = 0.5*(fwhmMajor + fwhmMinor) / (2.0*sqrtf(2.0*log(2.0)));
    2828    psKernel *kernel = psImageSmoothKernel(smoothSigma, smoothNsigma); // Kernel used for smoothing
    2929    psKernel *newCovar = psImageCovarianceCalculate(kernel, ro->covariance); // Covariance matrix
     
    131131    // Collect recipe information
    132132    bool mdok;                                                 // Status of MD lookup
    133     float xFWHM = psMetadataLookupF32(NULL, recipe, "FWHM_X"); // PSF size in x
    134     float yFWHM = psMetadataLookupF32(NULL, recipe, "FWHM_Y"); // PSF size in y
    135     if (!isfinite(xFWHM) || !isfinite(yFWHM)) {
    136         psError(PSPHOT_ERR_CONFIG, false, "Unable to find FWHM_X and FWHM_Y in recipe");
     133    float fwhmMajor = psMetadataLookupF32(NULL, recipe, "FWHM_MAJ"); // PSF size in x
     134    float fwhmMinor = psMetadataLookupF32(NULL, recipe, "FWHM_MIN"); // PSF size in y
     135    if (!isfinite(fwhmMajor) || !isfinite(fwhmMinor) || fwhmMajor == 0.0 || fwhmMinor == 0.0) {
     136        psError(PSPHOT_ERR_CONFIG, false, "Unable to find FWHM_MAJ and FWHM_MIN in recipe");
    137137        return false;
    138138    }
     
    170170    float magLim;                       // Guess at limiting magnitude
    171171    float minFlux;                      // Minimum flux for fake image
    172     if (!fakeLimit(&magLim, &minFlux, readout, thresh, xFWHM, yFWHM, smoothNsigma, maskVal)) {
     172    if (!fakeLimit(&magLim, &minFlux, readout, thresh, fwhmMajor, fwhmMinor, smoothNsigma, maskVal)) {
    173173        psError(PS_ERR_UNKNOWN, false, "Unable to determine limits for image");
    174174        return false;
Note: See TracChangeset for help on using the changeset viewer.