IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 6, 2011, 1:02:53 PM (15 years ago)
Author:
eugene
Message:
  • add concept of saddlePoints to peaks (not actually used in the end)
  • add tmp flags to mark sources for analysis or not in psphotStack
  • autocode the pmSourceIO_CMF_PS1_* functions
  • use 1D gauss approx for convolution in PCM fitting
  • added pmSourceExtFitPars (not actually used)
  • in model guess, use 1st radial moments to define size (if it exists)
  • include PSF_INST_MAG, AP_MAG, KRON_MAG in xfit output
  • fix the position for extended source fits (avoid instability)
  • Sersic-like models (incl. Exp and Dev) use Reff, not sigma; conversion tools need to respect this
  • only use a single pass on the centroid (unwindowed, but limited to 1.5 sigma radius) - this avoids moving the centroid because of nearby neighbors
  • use symmetrical averaging (geometric mean) to calculated 1st radial moment (and avoid neighbor biases), do not use symm. averaging for the flux
  • fix the integration of the sersic, pgauss, and related model functions.
  • fix the central pixel to have the full flux for sersic-like models (interpolated value)
Location:
trunk/psModules/src/objects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects

    • Property svn:ignore
      •  

        old new  
        55*.la
        66*.lo
         7pmSourceIO_CMF_PS1_V1.c
         8pmSourceIO_CMF_PS1_V2.c
         9pmSourceIO_CMF_PS1_V3.c
  • trunk/psModules/src/objects/pmPCM_MinimizeChisq.c

    r29012 r32347  
    4545# define USE_FFT 1
    4646# define PRE_CONVOLVE 1
     47# define TESTCOPY 0
    4748
    4849bool pmPCM_MinimizeChisq (
     
    9394        psFree (pcm->psfFFT);
    9495    }
    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
    96101# endif   
    97102
     
    285290
    286291            // 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);
    289294
    290295            pcm->modelFlux->data.F32[i][j] = pcm->modelConv->modelFunc (deriv, params, coord);
     
    309314# if (PRE_CONVOLVE)
    310315    // 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 (pcm->modelConvFlux, pcm->sigma, pcm->nsigma);
     327    } else {
     328        psImageConvolveKernel (pcm->modelConvFlux, pcm->modelFlux, NULL, 0, pcm->psfFFT);
     329    }
     330# endif
     331
    312332    for (int n = 0; n < pcm->dmodelsFlux->n; n++) {
    313333        if (pcm->dmodelsFlux->data[n] == NULL) continue;
     
    315335        psImage *dmodel = pcm->dmodelsFlux->data[n];
    316336        psImage *dmodelConv = pcm->dmodelsConvFlux->data[n];
    317         psImageConvolveKernel (dmodelConv, dmodel, NULL, 0, pcm->psfFFT);
     337# if (TESTCOPY)
     338        psImageCopy (dmodelConv, dmodel, dmodel->type.type);
     339# else
     340        if (pcm->use1Dgauss) {
     341            // do not use the threaded, mask-aware version of this code (psImageSmoothMaskPixelsThread):
     342            // * the model flux is not masked
     343            // * threading takes place above this level
     344            dmodelConv = psImageCopy (dmodelConv, dmodel, dmodel->type.type);
     345            psImageSmooth (dmodelConv, pcm->sigma, pcm->nsigma);
     346        } else {
     347            psImageConvolveKernel (dmodelConv, dmodel, NULL, 0, pcm->psfFFT);
     348        }
     349# endif
    318350    }
    319351# else
     
    325357        psImage *dmodel = pcm->dmodelsFlux->data[n];
    326358        psImage *dmodelConv = pcm->dmodelsConvFlux->data[n];
    327         psImageConvolveFFT (dmodelConv, dmodel, NULL, 0, pcm->psf);
     359
     360        if (pcm->use1Dgauss) {
     361            // do not use the threaded, mask-aware version of this code (psImageSmoothMaskPixelsThread):
     362            // * the model flux is not masked
     363            // * threading takes place above this level
     364            dmodelConv = psImageCopy (dmodelConv, dmodel, dmodel->type.type);
     365            psImageSmooth (dmodelConv, pcm->sigma, pcm->nsigma);
     366        } else {
     367            psImageConvolveFFT (dmodelConv, dmodel, NULL, 0, pcm->psf);
     368        }
    328369    }
    329370# endif // PRE-CONVOLVE
Note: See TracChangeset for help on using the changeset viewer.