IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 11, 2013, 11:20:15 AM (13 years ago)
Author:
eugene
Message:

add 2d cached convolution to the convolution concepts (clear this out when I am happy)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130904/psModules/src/objects/pmPCM_MinimizeChisq.c

    r36276 r36281  
    473473# else
    474474    if (pcm->use1Dgauss) {
    475         // do not use the threaded, mask-aware version of this code (psImageSmoothMaskPixelsThread):
    476         // * the model flux is not masked
    477         // * threading takes place above this level
    478         pcm->modelConvFlux = psImageCopy (pcm->modelConvFlux, pcm->modelFlux, pcm->modelFlux->type.type);
    479        
    480         // hard-wire this for now?
    481         psImageSmoothCache_F32 (pcm->modelConvFlux, pcm->smdata1);
    482         psImageSmoothCache_F32 (pcm->modelConvFlux, pcm->smdata2);
     475
     476        if (USE_1D_CACHE) {
     477            // do not use the threaded, mask-aware version of this code (psImageSmoothMaskPixelsThread):
     478            // * the model flux is not masked
     479            // * threading takes place above this level
     480            pcm->modelConvFlux = psImageCopy (pcm->modelConvFlux, pcm->modelFlux, pcm->modelFlux->type.type);
     481            psImageSmoothCache_F32 (pcm->modelConvFlux, pcm->smdata);
     482        } else {
     483            pcm->modelConvFlux = psImageCopy (pcm->modelConvFlux, pcm->modelFlux, pcm->modelFlux->type.type);
     484            psImageSmooth2dCache_F32 (pcm->modelConvFlux, pcm->smdata2d);
     485        }
    483486    } else {
    484487        psImageConvolveKernel (pcm->modelConvFlux, pcm->modelFlux, NULL, 0, pcm->psfFFT);
     
    495498# else
    496499        if (pcm->use1Dgauss) {
    497             // do not use the threaded, mask-aware version of this code (psImageSmoothMaskPixelsThread):
    498             // * the model flux is not masked
    499             // * threading takes place above this level
    500             dmodelConv = psImageCopy (dmodelConv, dmodel, dmodel->type.type);
    501             psImageSmoothCache_F32 (dmodelConv, pcm->smdata1);
    502             psImageSmoothCache_F32 (dmodelConv, pcm->smdata2);
     500            if (USE_1D_GAUSS) {
     501                // do not use the threaded, mask-aware version of this code (psImageSmoothMaskPixelsThread):
     502                // * the model flux is not masked
     503                // * threading takes place above this level
     504                dmodelConv = psImageCopy (dmodelConv, dmodel, dmodel->type.type);
     505                psImageSmoothCache_F32 (dmodelConv, pcm->smdata);
     506            } else {
     507                dmodelConv = psImageCopy (dmodelConv, dmodel, dmodel->type.type);
     508                psImageSmooth2dCache_F32 (dmodelConv, pcm->smdata2d);
     509            }
    503510        } else {
    504511            psImageConvolveKernel (dmodelConv, dmodel, NULL, 0, pcm->psfFFT);
     
    516523
    517524        if (pcm->use1Dgauss) {
    518             // do not use the threaded, mask-aware version of this code (psImageSmoothMaskPixelsThread):
    519             // * the model flux is not masked
    520             // * threading takes place above this level
    521             dmodelConv = psImageCopy (dmodelConv, dmodel, dmodel->type.type);
    522             psImageSmoothCache_F32 (dmodelConv, pcm->smdata1);
    523             psImageSmoothCache_F32 (dmodelConv, pcm->smdata2);
     525            if (USE_1D_GAUSS) {
     526                // do not use the threaded, mask-aware version of this code (psImageSmoothMaskPixelsThread):
     527                // * the model flux is not masked
     528                // * threading takes place above this level
     529                dmodelConv = psImageCopy (dmodelConv, dmodel, dmodel->type.type);
     530                psImageSmoothCache_F32 (dmodelConv, pcm->smdata);
     531            } else {
     532                dmodelConv = psImageCopy (dmodelConv, dmodel, dmodel->type.type);
     533                psImageSmooth2dCache_F32 (dmodelConv, pcm->smdata2d);
     534            }
    524535        } else {
    525536            psImageConvolveFFT (dmodelConv, dmodel, NULL, 0, pcm->psf);
Note: See TracChangeset for help on using the changeset viewer.