Changeset 35644 for branches/eam_branches/ipp-20130509/psModules/src/objects/models/pmModel_RGAUSS.c
- Timestamp:
- Jun 11, 2013, 9:15:36 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130509/psModules/src/objects/models/pmModel_RGAUSS.c
r35560 r35644 210 210 211 211 // set the shape parameters 212 if (!pmModelSetShape(&PAR[PM_PAR_SXX], &PAR[PM_PAR_SXY], &PAR[PM_PAR_SYY], source->moments )) {212 if (!pmModelSetShape(&PAR[PM_PAR_SXX], &PAR[PM_PAR_SXY], &PAR[PM_PAR_SYY], source->moments, false)) { 213 213 return false; 214 214 } … … 234 234 { 235 235 float z, norm; 236 psEllipseShape shape;237 236 238 237 psF32 *PAR = params->data.F32; 239 238 240 shape.sx = PAR[PM_PAR_SXX] / M_SQRT2; 241 shape.sy = PAR[PM_PAR_SYY] / M_SQRT2; 242 shape.sxy = PAR[PM_PAR_SXY]; 243 244 psEllipseAxes axes = psEllipseShapeToAxes (shape, 20.0); 239 psEllipseAxes axes; 240 pmModelParamsToAxes (&axes, PAR[PM_PAR_SXX], PAR[PM_PAR_SXY], PAR[PM_PAR_SYY], false); 245 241 float AspectRatio = axes.minor / axes.major; 246 242 … … 274 270 { 275 271 psF64 z; 276 psEllipseShape shape;277 272 278 273 psF32 *PAR = params->data.F32; … … 285 280 return (1.0); 286 281 287 shape.sx = PAR[PM_PAR_SXX] / M_SQRT2; 288 shape.sy = PAR[PM_PAR_SYY] / M_SQRT2; 289 shape.sxy = PAR[PM_PAR_SXY]; 290 291 psEllipseAxes axes = psEllipseShapeToAxes (shape, 20.0); 282 psEllipseAxes axes; 283 pmModelParamsToAxes (&axes, PAR[PM_PAR_SXX], PAR[PM_PAR_SXY], PAR[PM_PAR_SYY], false); 292 284 psF64 sigma = axes.major; 293 285 … … 357 349 // the 2D PSF model fits polarization terms (E0,E1,E2) 358 350 // convert to shape terms (SXX,SYY,SXY) 359 if (!pmPSF_FitToModel (out, 0.1)) { 351 bool useReff = pmModelUseReff (modelPSF->type); 352 if (!pmPSF_FitToModel (out, 0.1, useReff)) { 360 353 psTrace("psModules.objects", 5, "Failed to fit object at (r,c) = (%.1f,%.1f)", in[PM_PAR_YPOS], in[PM_PAR_XPOS]); 361 354 return false; … … 409 402 // the 2D PSF model fits polarization terms (E0,E1,E2) 410 403 // convert to shape terms (SXX,SYY,SXY) 411 // XXX user-defined value for limit?412 if (!pmPSF_FitToModel (PAR, 0.1 )) {404 bool useReff = pmModelUseReff (model->type); 405 if (!pmPSF_FitToModel (PAR, 0.1, useReff)) { 413 406 psTrace ("psModules.objects", 3, "Failed to fit object at (r,c) = (%.1f,%.1f)", Xo, Yo); 414 407 return false;
Note:
See TracChangeset
for help on using the changeset viewer.
