IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 14, 2007, 3:32:16 PM (18 years ago)
Author:
Paul Price
Message:

Using pmPSFEnvelope to generate a target PSF.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackMatch.c

    r15816 r15844  
    1212
    1313bool ppStackMatch(pmReadout *output, const pmReadout *input, const pmReadout *sourcesRO,
    14                   const pmConfig *config)
     14                  const pmPSF *psf, const pmConfig *config)
    1515{
    1616    // Look up appropriate values from the ppSub recipe
     
    4646    // These values are specified specifically for stacking
    4747    const char *stampsName = psMetadataLookupStr(NULL, config->arguments, "STAMPS"); // Filename for stamps
    48     float target = psMetadataLookupF32(NULL, config->arguments, "TARGET"); // Target PSF width
    4948
    5049    psVector *optWidths = NULL;         // Vector with FWHMs for optimum search
     
    6665        }
    6766    }
    68     pmReadout *fake = pmReadoutFakeFromSources(input->image->numCols, input->image->numRows,
    69                                                sources, target, powf(10.0, -0.4 * maxMag));
     67
     68    pmReadout *fake = pmReadoutAlloc(NULL); // Fake readout with target PSF
     69
     70    if (!pmReadoutFakeFromSources(fake, input->image->numCols, input->image->numRows, sources, NULL, NULL,
     71                                  psf, powf(10.0, -0.4 * maxMag), 0, false)) {
     72        psError(PS_ERR_UNKNOWN, false, "Unable to generate fake image with target PSF.");
     73        psFree(fake);
     74        psFree(optWidths);
     75        return false;
     76    }
    7077
    7178#ifdef TESTING
Note: See TracChangeset for help on using the changeset viewer.