IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 29, 2007, 2:59:23 PM (19 years ago)
Author:
gusciora
Message:

Adding several changes to the objects directory. Most of these changes are
mere additions of PS_ASSERTs to the beginning of psModule functions to ensure
that input parameters are correct.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20071023/psModules/src/objects/pmPSF.c

    r15089 r15418  
    66 *  @author EAM, IfA
    77 *
    8  *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2007-09-29 00:15:32 $
     8 *  @version $Revision: 1.32.2.1 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2007-10-30 00:59:23 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    8181static void pmPSFFree (pmPSF *psf)
    8282{
    83 
    84     if (psf == NULL)
     83    if (psf == NULL) {
    8584        return;
     85    }
    8686
    8787    psFree (psf->ChiTrend);
     
    205205}
    206206
     207bool psMemCheckPSF(psPtr ptr)
     208{
     209    PS_ASSERT_PTR(ptr, false);
     210    return ( psMemGetDeallocator(ptr) == (psFreeFunc) pmPSFFree);
     211}
     212
     213
     214
    207215// the PSF models the \sigma_{xy} variation of the elliptical contour as a function of position in the image with a
    208216// polynomial.  an individual object has a contour of the form (x^2/2sx^2) + (y^2/2sy^2) + sxy*x*y
     
    217225double pmPSF_SXYfromModel (psF32 *modelPar)
    218226{
     227    PS_ASSERT_PTR_NON_NULL(modelPar, NAN);
    219228
    220229    double SXX = modelPar[PM_PAR_SXX];
     
    229238double pmPSF_SXYtoModel (psF32 *fittedPar)
    230239{
     240    PS_ASSERT_PTR_NON_NULL(fittedPar, NAN);
    231241
    232242    double SXX = fittedPar[PM_PAR_SXX];
     
    247257bool pmPSF_FitToModel (psF32 *fittedPar, float minMinorAxis)
    248258{
     259    PS_ASSERT_PTR_NON_NULL(fittedPar, false);
     260
    249261    psEllipsePol pol;
    250262
     
    272284psEllipsePol pmPSF_ModelToFit (psF32 *modelPar)
    273285{
     286//   XXX: must assert non-NULL input parameter
     287//    PS_ASSERT_PTR_NON_NULL(modelPar, NAN);
     288
    274289    psEllipseShape shape;
    275290
     
    289304    psEllipseShape shape;
    290305    psEllipseAxes axes;
     306//   XXX: must assert non-NULL input parameter
     307//    PS_ASSERT_PTR_NON_NULL(modelPar, axes);
    291308
    292309    shape.sx  = modelPar[PM_PAR_SXX] / M_SQRT2;
     
    310327bool pmPSF_AxesToModel (psF32 *modelPar, psEllipseAxes axes)
    311328{
     329    PS_ASSERT_PTR_NON_NULL(modelPar, false);
     330
    312331    if ((axes.major <= 0) || (axes.minor <= 0)) {
    313332        modelPar[PM_PAR_SXX] = 0.0;
     
    374393bool pmGrowthCurveGenerate (pmReadout *readout, pmPSF *psf, bool ignore, psMaskType maskVal, psMaskType mark)
    375394{
     395    PS_ASSERT_PTR_NON_NULL(readout, false);
     396    PS_ASSERT_PTR_NON_NULL(readout->image, false);
    376397
    377398    // bool status;
Note: See TracChangeset for help on using the changeset viewer.