IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 22, 2007, 2:55:49 PM (19 years ago)
Author:
magnier
Message:

adjusted pmModel.h to allow pmModel to use functions which use pmModel
as an argument.

adjusted the order of the pmPSF.h entries to allow that as an argument
as well

changed pmPSF I/O functions to load/save the psf on the
chip->analysis, not the readout->analysis

fixed the modelRadius function for PGAUSS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20070817/psModules/src/objects/pmModelUtils.c

    r14544 r14612  
    55 *  @author EAM, IfA
    66 *
    7  *  @version $Revision: 1.1.2.1 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2007-08-17 21:01:59 $
     7 *  @version $Revision: 1.1.2.2 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2007-08-23 00:55:49 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2222#include "pmHDU.h"
    2323#include "pmFPA.h"
     24#include "pmResiduals.h"
    2425#include "pmGrowthCurve.h"
    25 #include "pmResiduals.h"
     26#include "pmPSF.h"
    2627#include "pmModel.h"
    27 #include "pmPSF.h"
    2828#include "pmErrorCodes.h"
    2929#include "pmModelUtils.h"
     30
     31/*****************************************************************************
     32pmModelFromPSF (*modelEXT, *psf):  use the model position parameters to
     33construct a realization of the PSF model at the object coordinates
     34 *****************************************************************************/
     35pmModel *pmModelFromPSF (pmModel *modelEXT, pmPSF *psf)
     36{
     37    // allocate a new pmModel to hold the PSF version
     38    pmModel *modelPSF = pmModelAlloc (psf->type);
     39
     40    // set model parameters for this source based on PSF information
     41    if (!modelEXT->modelFromPSF (modelPSF, modelEXT, psf)) {
     42        psError(PM_ERR_PSF, false, "Failed to set model params from PSF");
     43        psFree(modelPSF);
     44        return NULL;
     45    }
     46    // XXX note that model->residuals is just a reference
     47    modelPSF->residuals = psf->residuals;
     48
     49    return (modelPSF);
     50}
    3051
    3152// instantiate a model for the PSF at this location with peak flux
Note: See TracChangeset for help on using the changeset viewer.