IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 26, 2010, 4:31:49 PM (16 years ago)
Author:
eugene
Message:

add ppSim option to convolve to a PSF rather than generating stars with the specified PSF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSim/src/ppSimLoop.c

    r26900 r28125  
    3030    ppSimType type = ppSimTypeFromString (typeStr); // Type of image to simulate
    3131    int binning = psMetadataLookupS32(NULL, recipe, "BINNING"); // Binning in x and y
     32
     33    bool psfConvolve = psMetadataLookupBool(NULL, recipe, "PSF.CONVOLVE"); // smooth the image with the PSF?
    3234
    3335    ppSimUpdateConceptsFPA (fpa, config);
     
    155157                psFree(expCorr);
    156158
     159                // we have two options for generating images which have a PSF:
     160                // 1) lay down stars with the PSF model applied : in this case, galaxies do NOT have the PSF
     161                // 2) lay down delta functions for stars and smooth the image with a PSF : in this case, the stars land at integer pixel locations
     162                if (psfConvolve) {
     163                    if (!ppSimSmoothReadout(readout, recipe)) ESCAPE (PS_ERR_UNKNOWN, "problem smoothing image");
     164                }
     165
    157166            done:
    158167                if (!ppSimAddNoise(readout->image, readout->variance, cell, config, rng)) ESCAPE (PS_ERR_UNKNOWN, "problem adding noise");
Note: See TracChangeset for help on using the changeset viewer.