- Timestamp:
- Mar 5, 2012, 5:19:48 PM (14 years ago)
- Location:
- branches/meh_branches/ppstack_test
- Files:
-
- 4 edited
-
. (modified) (1 prop)
-
psModules (modified) (1 prop)
-
psModules/src/objects (modified) (1 prop)
-
psModules/src/objects/pmPCM_MinimizeChisq.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/meh_branches/ppstack_test
- Property svn:mergeinfo changed
-
branches/meh_branches/ppstack_test/psModules
- Property svn:mergeinfo set to
-
branches/meh_branches/ppstack_test/psModules/src/objects
- Property svn:ignore
-
old new 5 5 *.la 6 6 *.lo 7 pmSourceIO_CMF_PS1_V1.c 8 pmSourceIO_CMF_PS1_V2.c 9 pmSourceIO_CMF_PS1_V3.c 10 pmSourceIO_CMF_PS1_V4.c 11 pmSourceIO_CMF_PS1_V3.v1.c 12 pmSourceIO_CMF_PS1_V1.v1.c 13 pmSourceIO_CMF_PS1_V2.v1.c 14
-
- Property svn:ignore
-
branches/meh_branches/ppstack_test/psModules/src/objects/pmPCM_MinimizeChisq.c
r29012 r33415 45 45 # define USE_FFT 1 46 46 # define PRE_CONVOLVE 1 47 # define TESTCOPY 0 47 48 48 49 bool pmPCM_MinimizeChisq ( … … 93 94 psFree (pcm->psfFFT); 94 95 } 95 pcm->psfFFT = psImageConvolveKernelInit(pcm->modelFlux, pcm->psf); 96 # if (!TESTCOPY) 97 if (!pcm->use1Dgauss) { 98 pcm->psfFFT = psImageConvolveKernelInit(pcm->modelFlux, pcm->psf); 99 } 100 # endif 96 101 # endif 97 102 … … 285 290 286 291 // Convert i/j to image space: 287 coord->data.F32[0] = (psF32) (j + source->pixels->col0);288 coord->data.F32[1] = (psF32) (i + source->pixels->row0);292 coord->data.F32[0] = (psF32) (j + 0.5 + source->pixels->col0); 293 coord->data.F32[1] = (psF32) (i + 0.5 + source->pixels->row0); 289 294 290 295 pcm->modelFlux->data.F32[i][j] = pcm->modelConv->modelFunc (deriv, params, coord); … … 309 314 # if (PRE_CONVOLVE) 310 315 // convolve model image and derivative images with pre-convolved kernel 311 psImageConvolveKernel (pcm->modelConvFlux, pcm->modelFlux, NULL, 0, pcm->psfFFT); 316 317 // XXX for a test, just copy, rather than convolve 318 # if (TESTCOPY) 319 psImageCopy (pcm->modelConvFlux, pcm->modelFlux, pcm->modelFlux->type.type); 320 # else 321 if (pcm->use1Dgauss) { 322 // do not use the threaded, mask-aware version of this code (psImageSmoothMaskPixelsThread): 323 // * the model flux is not masked 324 // * threading takes place above this level 325 pcm->modelConvFlux = psImageCopy (pcm->modelConvFlux, pcm->modelFlux, pcm->modelFlux->type.type); 326 psImageSmooth_PreAlloc_F32 (pcm->modelConvFlux, pcm->smdata); 327 // psImageSmooth (pcm->modelConvFlux, pcm->sigma, pcm->nsigma); 328 } else { 329 psImageConvolveKernel (pcm->modelConvFlux, pcm->modelFlux, NULL, 0, pcm->psfFFT); 330 } 331 # endif 332 312 333 for (int n = 0; n < pcm->dmodelsFlux->n; n++) { 313 334 if (pcm->dmodelsFlux->data[n] == NULL) continue; … … 315 336 psImage *dmodel = pcm->dmodelsFlux->data[n]; 316 337 psImage *dmodelConv = pcm->dmodelsConvFlux->data[n]; 317 psImageConvolveKernel (dmodelConv, dmodel, NULL, 0, pcm->psfFFT); 338 # if (TESTCOPY) 339 psImageCopy (dmodelConv, dmodel, dmodel->type.type); 340 # else 341 if (pcm->use1Dgauss) { 342 // do not use the threaded, mask-aware version of this code (psImageSmoothMaskPixelsThread): 343 // * the model flux is not masked 344 // * threading takes place above this level 345 dmodelConv = psImageCopy (dmodelConv, dmodel, dmodel->type.type); 346 psImageSmooth_PreAlloc_F32 (dmodelConv, pcm->smdata); 347 // psImageSmooth (dmodelConv, pcm->sigma, pcm->nsigma); 348 } else { 349 psImageConvolveKernel (dmodelConv, dmodel, NULL, 0, pcm->psfFFT); 350 } 351 # endif 318 352 } 319 353 # else … … 325 359 psImage *dmodel = pcm->dmodelsFlux->data[n]; 326 360 psImage *dmodelConv = pcm->dmodelsConvFlux->data[n]; 327 psImageConvolveFFT (dmodelConv, dmodel, NULL, 0, pcm->psf); 361 362 if (pcm->use1Dgauss) { 363 // do not use the threaded, mask-aware version of this code (psImageSmoothMaskPixelsThread): 364 // * the model flux is not masked 365 // * threading takes place above this level 366 dmodelConv = psImageCopy (dmodelConv, dmodel, dmodel->type.type); 367 psImageSmooth_PreAlloc_F32 (dmodelConv, pcm->smdata); 368 // psImageSmooth (dmodelConv, pcm->sigma, pcm->nsigma); 369 } else { 370 psImageConvolveFFT (dmodelConv, dmodel, NULL, 0, pcm->psf); 371 } 328 372 } 329 373 # endif // PRE-CONVOLVE
Note:
See TracChangeset
for help on using the changeset viewer.
