- Timestamp:
- Jul 22, 2011, 5:08:37 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110710/psModules/src/objects/pmPCMdata.c
r31451 r31926 41 41 #include "pmPCMdata.h" 42 42 43 # define USE_DELTA_PSF 0 44 # define USE_1D_GAUSS 1 45 43 46 static void pmPCMdataFree (pmPCMdata *pcm) { 44 47 … … 88 91 pcm->constraint = NULL; 89 92 pcm->nDOF = 0; 93 94 // full convolution with the PSF is expensive. if we have to save time, we can do a 1D 95 // convolution with a Gaussian approximation to the kernel 96 pcm->use1Dgauss = false; 97 pcm->nsigma = 3.0; 98 pcm->sigma = 1.0; // this should be set to something sensible when the psf is known 90 99 91 100 return pcm; … … 257 266 pcm->nDOF = nPix - nParams; 258 267 268 # if (USE_1D_GAUSS) 269 pmModel *modelPSF = source->modelPSF; 270 psAssert (modelPSF, "psf model must be defined"); 271 272 psEllipseShape shape; 273 psEllipseAxes axes; 274 275 shape.sx = modelPSF->params->data.F32[PM_PAR_SXX]; 276 shape.sy = modelPSF->params->data.F32[PM_PAR_SYY]; 277 shape.sxy = modelPSF->params->data.F32[PM_PAR_SXY]; 278 axes = psEllipseShapeToAxes (shape, 20.0); 279 280 float FWHM_MAJOR = 2*modelPSF->modelRadius (modelPSF->params, 0.5*modelPSF->params->data.F32[PM_PAR_I0]); 281 float FWHM_MINOR = FWHM_MAJOR * (axes.minor / axes.major); 282 283 pcm->use1Dgauss = true; 284 pcm->sigma = 0.5 * (FWHM_MAJOR + FWHM_MINOR) / 2.35; 285 pcm->nsigma = 2.0; 286 # endif 287 259 288 return pcm; 260 289 }
Note:
See TracChangeset
for help on using the changeset viewer.
