Changeset 15562 for trunk/psModules/src/objects/pmPSF.c
- Timestamp:
- Nov 9, 2007, 3:09:20 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmPSF.c (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmPSF.c
r15089 r15562 6 6 * @author EAM, IfA 7 7 * 8 * @version $Revision: 1.3 2$ $Name: not supported by cvs2svn $9 * @date $Date: 2007- 09-29 00:15:32$8 * @version $Revision: 1.33 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2007-11-10 01:09:20 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 76 76 } 77 77 78 bool psMemCheckPSFOptions(psPtr ptr) 79 { 80 PS_ASSERT_PTR(ptr, false); 81 return ( psMemGetDeallocator(ptr) == (psFreeFunc) pmPSFOptionsFree); 82 } 83 78 84 /***************************************************************************** 79 85 pmPSFFree(psf): function to free a pmPSF structure … … 81 87 static void pmPSFFree (pmPSF *psf) 82 88 { 83 84 if (psf == NULL) 89 if (psf == NULL) { 85 90 return; 91 } 86 92 87 93 psFree (psf->ChiTrend); … … 98 104 pmPSFAlloc (type): allocate a pmPSF. 99 105 100 NOTE: PSF model parameters which are not modeled on an image are set to NULL in psf->params. 106 NOTE: PSF model parameters which are not modeled on an image are set to NULL 107 in psf->params. 101 108 102 109 These are normally: … … 109 116 pmPSF *pmPSFAlloc (pmPSFOptions *options) 110 117 { 118 PS_ASSERT_PTR_NON_NULL(options, NULL); 111 119 int Nparams; 112 120 … … 205 213 } 206 214 215 bool psMemCheckPSF(psPtr ptr) 216 { 217 PS_ASSERT_PTR(ptr, false); 218 return ( psMemGetDeallocator(ptr) == (psFreeFunc) pmPSFFree); 219 } 220 207 221 // the PSF models the \sigma_{xy} variation of the elliptical contour as a function of position in the image with a 208 222 // polynomial. an individual object has a contour of the form (x^2/2sx^2) + (y^2/2sy^2) + sxy*x*y … … 217 231 double pmPSF_SXYfromModel (psF32 *modelPar) 218 232 { 233 PS_ASSERT_PTR_NON_NULL(modelPar, NAN); 219 234 220 235 double SXX = modelPar[PM_PAR_SXX]; … … 229 244 double pmPSF_SXYtoModel (psF32 *fittedPar) 230 245 { 246 PS_ASSERT_PTR_NON_NULL(fittedPar, NAN); 231 247 232 248 double SXX = fittedPar[PM_PAR_SXX]; … … 247 263 bool pmPSF_FitToModel (psF32 *fittedPar, float minMinorAxis) 248 264 { 265 PS_ASSERT_PTR_NON_NULL(fittedPar, false); 266 249 267 psEllipsePol pol; 250 268 … … 272 290 psEllipsePol pmPSF_ModelToFit (psF32 *modelPar) 273 291 { 292 // XXX: must assert non-NULL input parameter 293 // PS_ASSERT_PTR_NON_NULL(modelPar, NAN); 294 274 295 psEllipseShape shape; 275 296 … … 289 310 psEllipseShape shape; 290 311 psEllipseAxes axes; 312 // XXX: must assert non-NULL input parameter 313 // PS_ASSERT_PTR_NON_NULL(modelPar, axes); 291 314 292 315 shape.sx = modelPar[PM_PAR_SXX] / M_SQRT2; … … 310 333 bool pmPSF_AxesToModel (psF32 *modelPar, psEllipseAxes axes) 311 334 { 335 PS_ASSERT_PTR_NON_NULL(modelPar, false); 336 312 337 if ((axes.major <= 0) || (axes.minor <= 0)) { 313 338 modelPar[PM_PAR_SXX] = 0.0; … … 374 399 bool pmGrowthCurveGenerate (pmReadout *readout, pmPSF *psf, bool ignore, psMaskType maskVal, psMaskType mark) 375 400 { 401 PS_ASSERT_PTR_NON_NULL(readout, false); 402 PS_ASSERT_PTR_NON_NULL(readout->image, false); 376 403 377 404 // bool status;
Note:
See TracChangeset
for help on using the changeset viewer.
