IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32287


Ignore:
Timestamp:
Sep 2, 2011, 9:05:35 AM (15 years ago)
Author:
eugene
Message:

measure inserted flux (to test validity of flux model)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110710/ppSim/src/ppSimInsertStars.c

    r32159 r32287  
    66    PTR = NULL;
    77
     8float imageSum (psImage *image);
    89
    910bool ppSimInsertStars (pmReadout *readout, psImage *expCorr, psArray *stars, pmConfig *config) {
     
    111112        float radius = model->modelRadius (model->params, nSigmaLim * roughNoise);
    112113        radius = PS_MAX (radius, 1.0);
     114        radius = 20.0;
    113115
    114116        // construct a source, with model flux pixels set, based on the model
     
    127129
    128130        float par8 = (model->params->n == 8) ? model->params->data.F32[7] : 0.0;
    129         fprintf (outfile, "%8.3f %8.3f %10.2f  %2d  %7.3f %5.3f  %5.3f %5.3f %5.3f %5.3f\n", star->x, star->y, star->flux, 0, source->psfMag, source->psfMagErr, axes.major, axes.minor, axes.theta, par8);
     131        float starFlux = 0.0;
    130132
    131133        // if psfConvolve is TRUE, we will (elsewhere) convolve the image we a PSF
     
    135137        } else {
    136138            // insert the source flux in the image
     139            float sum1 = imageSum(source->pixels);
    137140            pmSourceAddWithOffset (source, PM_MODEL_OP_FULL, 0xff, dX, dY);
     141            float sum2 = imageSum(source->pixels);
     142            starFlux = sum2 - sum1;
    138143           
    139144            // insert the source flux in the noise image
     
    149154            RESET(source->blends);
    150155        }
     156        fprintf (outfile, "%8.3f %8.3f %10.2f  %2d  %7.3f %5.3f  %5.3f %5.3f %5.3f %5.3f  :  %f %f\n", star->x, star->y, starFlux, 0, source->psfMag, source->psfMagErr, axes.major, axes.minor, axes.theta, par8, model->params->data.F32[PM_PAR_I0], radius);
    151157
    152158        // add the sources to the source array
Note: See TracChangeset for help on using the changeset viewer.