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_PGAUSS.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"
     
    5555# define PM_MODEL_LIMITS          pmModelLimits_PGAUSS
    5656# define PM_MODEL_RADIUS          pmModelRadius_PGAUSS
     57# define PM_MODEL_SET_FWHM        pmModelSetFWHM_PGAUSS
    5758# define PM_MODEL_FROM_PSF        pmModelFromPSF_PGAUSS
    5859# define PM_MODEL_PARAMS_FROM_PSF pmModelParamsFromPSF_PGAUSS
     
    324325}
    325326
     327// scale factor is constant for PGAUSS, I found it with the fwhm.sh script
     328psF64 PM_MODEL_SET_FWHM (const psVector *params, psF64 sigma) {
     329    return (3.0063103*sigma);
     330}
     331
    326332bool PM_MODEL_FROM_PSF (pmModel *modelPSF, pmModel *modelFLT, const pmPSF *psf)
    327333{
     
    344350    // the 2D PSF model fits polarization terms (E0,E1,E2)
    345351    // convert to shape terms (SXX,SYY,SXY)
    346     bool useReff = pmModelUseReff (modelPSF->type);
     352    bool useReff = modelPSF->class->useReff;
    347353    if (!pmPSF_FitToModel (out, 0.1, useReff)) {
    348354        psTrace("psModules.objects", 5, "Failed to fit object at (r,c) = (%.1f,%.1f)", in[PM_PAR_YPOS], in[PM_PAR_XPOS]);
     
    396402    // the 2D PSF model fits polarization terms (E0,E1,E2)
    397403    // convert to shape terms (SXX,SYY,SXY)
    398     bool useReff = pmModelUseReff (model->type);
     404    bool useReff = model->class->useReff;
    399405    if (!pmPSF_FitToModel (PAR, 0.1, useReff)) {
    400406        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.