IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 23, 2007, 2:11:02 PM (19 years ago)
Author:
magnier
Message:
  • added function pointers to pmModel to provide class-dependent functions
  • dropped pmModel*_GetFunction functions (use pmModel->func functions instead)
  • added modelParamsFromPSF functions to model classes
  • changed pmModelGroup to pmModelClass
  • added pmSourceFitSet.[ch]
  • updated pmSourceFitSet to allow variable model classes
  • added functions to add/sub and eval models & sources with an offset between image and chip
  • added function to set a pmModel flux
  • added function to instatiate a pmModel from a pmPSF at a coordinate
  • moved pmPSF I/O to chip->analysis from readout->analysis
  • changed pmPSF I/O function names from *ForPSFmodel to pmPSFmodel*
  • changed pmModel.params_NEW back to pmModel.params
  • changed pmFind*Peaks to pmPeaksIn* (* = Image,Vector)
  • dropped pmCullPeaks (deprecated)
  • changed pmModelSetType to pmModelClassGetType
  • changed pmModelGetType to pmModelClassGetName
  • fixed PGAUSS implementation of modelRadius function
File:
1 edited

Legend:

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

    r14529 r14652  
    66 *  @author EAM, IfA: significant modifications.
    77 *
    8  *  @version $Revision: 1.34 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2007-08-16 18:33:00 $
     8 *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2007-08-24 00:11:02 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2727#include "pmMoments.h"
    2828#include "pmResiduals.h"
     29#include "pmGrowthCurve.h"
     30#include "pmPSF.h"
    2931#include "pmModel.h"
    3032#include "pmSource.h"
     
    113115}
    114116
    115 bool pmIsSource(const psPtr ptr)
     117bool pmSourceTest(const psPtr ptr)
    116118{
    117119    return (psMemGetDeallocator(ptr) == (psFreeFunc)sourceFree);
     
    337339            return emptyClump;
    338340        }
    339         peaks = pmFindImagePeaks (splane, stats[0].max / 2);
     341        peaks = pmPeaksInImage (splane, stats[0].max / 2);
    340342        psTrace ("psModules.objects", 2, "clump threshold is %f\n", stats[0].max/2);
    341343
     
    797799
    798800// should we call pmSourceCacheModel if it does not exist?
    799 bool pmSourceOp (pmSource *source, pmModelOpMode mode, bool add, psMaskType maskVal) {
     801bool pmSourceOp (pmSource *source, pmModelOpMode mode, bool add, psMaskType maskVal, int dx, int dy) {
    800802
    801803    bool status;
     
    856858        target = source->weight;
    857859    }
     860
    858861    if (add) {
    859         status = pmModelAdd (target, source->maskObj, model, PM_MODEL_OP_FULL, maskVal);
     862        status = pmModelAddWithOffset (target, source->maskObj, model, PM_MODEL_OP_FULL, maskVal, dx, dy);
    860863    } else {
    861         status = pmModelSub (target, source->maskObj, model, PM_MODEL_OP_FULL, maskVal);
     864        status = pmModelSubWithOffset (target, source->maskObj, model, PM_MODEL_OP_FULL, maskVal, dx, dy);
    862865    }
    863866
     
    866869
    867870bool pmSourceAdd (pmSource *source, pmModelOpMode mode, psMaskType maskVal) {
    868     return pmSourceOp (source, mode, true, maskVal);
     871    return pmSourceOp (source, mode, true, maskVal, 0, 0);
    869872}
    870873
    871874bool pmSourceSub (pmSource *source, pmModelOpMode mode, psMaskType maskVal) {
    872     return pmSourceOp (source, mode, false, maskVal);
     875    return pmSourceOp (source, mode, false, maskVal, 0, 0);
     876}
     877
     878bool pmSourceAddWithOffset (pmSource *source, pmModelOpMode mode, psMaskType maskVal, int dx, int dy) {
     879    return pmSourceOp (source, mode, true, maskVal, dx, dy);
     880}
     881
     882bool pmSourceSubWithOffset (pmSource *source, pmModelOpMode mode, psMaskType maskVal, int dx, int dy) {
     883    return pmSourceOp (source, mode, false, maskVal, dx, dy);
    873884}
    874885
Note: See TracChangeset for help on using the changeset viewer.