Changeset 30196
- Timestamp:
- Dec 28, 2010, 12:49:29 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20101205/psphot/src/psphotReplaceUnfit.c
r30174 r30196 213 213 psAssert (maskVal, "missing mask value?"); 214 214 215 // what fraction of the PSF is used? (radius in pixels : 2 -> 5x5 box) 216 int psfSize = psMetadataLookupS32 (&status, recipe, "PCM_BOX_SIZE"); 217 assert (status); 218 215 219 pmPSF *psf = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.PSF"); 216 220 psAssert (psf, "missing psf?"); … … 254 258 pmSourceCachePSF (source, maskVal); 255 259 256 # if (0)257 260 psKernel *psfKernel = pmPCMkernelFromPSF(source, psfSize); 258 261 if (!psfKernel) { … … 260 263 } 261 264 262 psImage *modelFlux = getmodelflux(model); 263 psImageConvolveFFT (source->modelFlux, modelFlux, NULL, 0, psfKernel); 265 // generate an image of the right size 266 psImage *rawModelFlux = psImageCopy (NULL, source->pixels, PS_TYPE_F32); 267 psImageInit (rawModelFlux, 0.0); 268 269 // insert the model image normalized to 1.0 270 pmModelAdd (rawModelFlux, NULL, model, PM_MODEL_OP_FULL | PM_MODEL_OP_NORM, maskVal); 271 272 psImageConvolveFFT (source->modelFlux, rawModelFlux, NULL, 0, psfKernel); 264 273 265 274 psFree (psfKernel); 266 psFree (modelFlux); 267 # endif 275 psFree (rawModelFlux); 268 276 } 269 277 … … 271 279 } 272 280 273 // psphotSaveImage(NULL, readoutIn->image, "image.in.fits");274 // psphotSaveImage(NULL, readoutOut->image, "image.out.sub.fits");275 // psphotVisualShowImage (readout);276 277 281 psLogMsg ("psphot.replace", PS_LOG_INFO, "subtracted models for %ld objects: %f sec\n", sources->n, psTimerMark ("psphot.replace")); 278 282 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
