Changeset 32350 for trunk/ppSim/src/ppSimInsertStars.c
- Timestamp:
- Sep 6, 2011, 1:34:52 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ppSim/src/ppSimInsertStars.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSim/src/ppSimInsertStars.c
r31449 r32350 6 6 PTR = NULL; 7 7 8 float imageSum (psImage *image); 8 9 9 10 bool ppSimInsertStars (pmReadout *readout, psImage *expCorr, psArray *stars, pmConfig *config) { … … 111 112 float radius = model->modelRadius (model->params, nSigmaLim * roughNoise); 112 113 radius = PS_MAX (radius, 1.0); 114 radius = 20.0; 113 115 114 116 // construct a source, with model flux pixels set, based on the model … … 117 119 // XXX set the mag & err values (should this be done in pmSourceFromModel?) 118 120 // XXX i should be applying the gain and the correct effective area 119 psEllipseAxes axes = pmPSF_ModelToAxes (model->params->data.F32, 20.0 );121 psEllipseAxes axes = pmPSF_ModelToAxes (model->params->data.F32, 20.0, model->type); 120 122 float Area = 2.0 * M_PI * axes.major * axes.minor; 121 123 … … 127 129 128 130 float par8 = (model->params->n == 8) ? model->params->data.F32[7] : 0.0; 129 f printf (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; 130 132 131 133 // if psfConvolve is TRUE, we will (elsewhere) convolve the image we a PSF … … 135 137 } else { 136 138 // insert the source flux in the image 139 float sum1 = imageSum(source->pixels); 137 140 pmSourceAddWithOffset (source, PM_MODEL_OP_FULL, 0xff, dX, dY); 141 float sum2 = imageSum(source->pixels); 142 starFlux = sum2 - sum1; 138 143 139 144 // insert the source flux in the noise image … … 149 154 RESET(source->blends); 150 155 } 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); 151 157 152 158 // add the sources to the source array
Note:
See TracChangeset
for help on using the changeset viewer.
