IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 22, 2009, 5:44:48 PM (17 years ago)
Author:
Paul Price
Message:

Don't normalise the sources --- in any case, the peak may not be the centre.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/imcombine/pmPSFEnvelope.c

    r25490 r25491  
    3434
    3535// #define TESTING                         // Enable test output
     36// #define PEAK_NORM                       // Normalise peaks?
    3637#define PEAK_FLUX 1.0e4                 // Peak flux for each source
    3738#define SKY_VALUE 0.0e0                 // Sky value for fake image
     
    170171            float y = source->peak->yf + yOffset->data.S32[j]; // y coordinate of source
    171172
     173#ifdef PEAK_NORM
    172174            // Perhaps I'm being paranoid, but specify a range to check
    173175            int uMax = PS_MIN(x + radius, numCols - 1), uMin = PS_MAX(x - radius, 0);
     
    182184                }
    183185            }
    184 
    185186            if (!isfinite(flux) || flux < 0) {
    186187                continue;
    187188            }
    188189            float norm = PEAK_FLUX / flux; // Normalisation for source
     190#endif
    189191            psRegion region = psRegionSet(x - radius, x + radius, y - radius, y + radius); // PSF region
    190192            psImage *subImage = psImageSubset(fakeRO->image, region); // Subimage of fake PSF
    191193            psImage *subEnv = psImageSubset(envelope, region); // Subimage of envelope
     194#ifdef PEAK_NORM
    192195            psBinaryOp(subImage, subImage, "*", psScalarAlloc(norm, PS_TYPE_F32));
     196#endif
    193197            psBinaryOp(subEnv, subEnv, "MAX", subImage);
    194198            psFree(subImage);
Note: See TracChangeset for help on using the changeset viewer.