IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 9, 2007, 3:09:20 PM (19 years ago)
Author:
eugene
Message:

updating all changes from from eam_branch_20071023

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmPSF.c

    r15089 r15562  
    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.33 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2007-11-10 01:09:20 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    7676}
    7777
     78bool psMemCheckPSFOptions(psPtr ptr)
     79{
     80    PS_ASSERT_PTR(ptr, false);
     81    return ( psMemGetDeallocator(ptr) == (psFreeFunc) pmPSFOptionsFree);
     82}
     83
    7884/*****************************************************************************
    7985pmPSFFree(psf): function to free a pmPSF structure
     
    8187static void pmPSFFree (pmPSF *psf)
    8288{
    83 
    84     if (psf == NULL)
     89    if (psf == NULL) {
    8590        return;
     91    }
    8692
    8793    psFree (psf->ChiTrend);
     
    98104 pmPSFAlloc (type): allocate a pmPSF.
    99105
    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.
    101108
    102109 These are normally:
     
    109116pmPSF *pmPSFAlloc (pmPSFOptions *options)
    110117{
     118    PS_ASSERT_PTR_NON_NULL(options, NULL);
    111119    int Nparams;
    112120
     
    205213}
    206214
     215bool psMemCheckPSF(psPtr ptr)
     216{
     217    PS_ASSERT_PTR(ptr, false);
     218    return ( psMemGetDeallocator(ptr) == (psFreeFunc) pmPSFFree);
     219}
     220
    207221// the PSF models the \sigma_{xy} variation of the elliptical contour as a function of position in the image with a
    208222// polynomial.  an individual object has a contour of the form (x^2/2sx^2) + (y^2/2sy^2) + sxy*x*y
     
    217231double pmPSF_SXYfromModel (psF32 *modelPar)
    218232{
     233    PS_ASSERT_PTR_NON_NULL(modelPar, NAN);
    219234
    220235    double SXX = modelPar[PM_PAR_SXX];
     
    229244double pmPSF_SXYtoModel (psF32 *fittedPar)
    230245{
     246    PS_ASSERT_PTR_NON_NULL(fittedPar, NAN);
    231247
    232248    double SXX = fittedPar[PM_PAR_SXX];
     
    247263bool pmPSF_FitToModel (psF32 *fittedPar, float minMinorAxis)
    248264{
     265    PS_ASSERT_PTR_NON_NULL(fittedPar, false);
     266
    249267    psEllipsePol pol;
    250268
     
    272290psEllipsePol pmPSF_ModelToFit (psF32 *modelPar)
    273291{
     292//   XXX: must assert non-NULL input parameter
     293//    PS_ASSERT_PTR_NON_NULL(modelPar, NAN);
     294
    274295    psEllipseShape shape;
    275296
     
    289310    psEllipseShape shape;
    290311    psEllipseAxes axes;
     312//   XXX: must assert non-NULL input parameter
     313//    PS_ASSERT_PTR_NON_NULL(modelPar, axes);
    291314
    292315    shape.sx  = modelPar[PM_PAR_SXX] / M_SQRT2;
     
    310333bool pmPSF_AxesToModel (psF32 *modelPar, psEllipseAxes axes)
    311334{
     335    PS_ASSERT_PTR_NON_NULL(modelPar, false);
     336
    312337    if ((axes.major <= 0) || (axes.minor <= 0)) {
    313338        modelPar[PM_PAR_SXX] = 0.0;
     
    374399bool pmGrowthCurveGenerate (pmReadout *readout, pmPSF *psf, bool ignore, psMaskType maskVal, psMaskType mark)
    375400{
     401    PS_ASSERT_PTR_NON_NULL(readout, false);
     402    PS_ASSERT_PTR_NON_NULL(readout->image, false);
    376403
    377404    // bool status;
Note: See TracChangeset for help on using the changeset viewer.