IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 13, 2014, 6:25:48 AM (12 years ago)
Author:
eugene
Message:

I added a new model function class, pmModelSetFHWM; also added a boolean useReff to the model class for use instead of pmModelUseReff everywhere

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/models/pmModel_GAUSS.c

    r36623 r36857  
    3333#include "pmMoments.h"
    3434#include "pmModelFuncs.h"
     35#include "pmModelClass.h"
    3536#include "pmModel.h"
    3637#include "pmModelUtils.h"
    37 #include "pmModelClass.h"
    3838#include "pmSourceMasks.h"
    3939#include "pmSourceExtendedPars.h"
     
    5454# define PM_MODEL_GUESS           pmModelGuess_GAUSS
    5555# define PM_MODEL_LIMITS          pmModelLimits_GAUSS
     56# define PM_MODEL_SET_FWHM        pmModelSetFWHM_GAUSS
    5657# define PM_MODEL_RADIUS          pmModelRadius_GAUSS
    5758# define PM_MODEL_FROM_PSF        pmModelFromPSF_GAUSS
     
    257258}
    258259
     260psF64 PM_MODEL_SET_FWHM (const psVector *params, psF64 sigma) {
     261    return (2.35482004503*sigma);
     262}
     263
    259264// construct the PSF model from the FLT model and the psf
    260265bool PM_MODEL_FROM_PSF (pmModel *modelPSF, pmModel *modelFLT, const pmPSF *psf)
     
    279284    // the 2D PSF model fits polarization terms (E0,E1,E2)
    280285    // convert to shape terms (SXX,SYY,SXY)
    281     bool useReff = pmModelUseReff (modelPSF->type);
     286    bool useReff = modelPSF->class->useReff;
    282287    if (!pmPSF_FitToModel (out, 0.1, useReff)) {
    283288        psTrace ("psModules.objects", 3, "Failed to fit object at (r,c) = (%.1f,%.1f)", in[PM_PAR_YPOS], in[PM_PAR_XPOS]);
     
    331336    // the 2D PSF model fits polarization terms (E0,E1,E2)
    332337    // convert to shape terms (SXX,SYY,SXY)
    333     bool useReff = pmModelUseReff (model->type);
     338    bool useReff = model->class->useReff;
    334339    if (!pmPSF_FitToModel (PAR, 0.1, useReff)) {
    335340        psTrace ("psModules.objects", 3, "Failed to fit object at (r,c) = (%.1f,%.1f)", Xo, Yo);
Note: See TracChangeset for help on using the changeset viewer.