IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 13, 2014, 8:47:47 AM (12 years ago)
Author:
eugene
Message:

add psfCore to the outputs structure, assign only for PS1_V1 and QGAUSS models; add apNpixels to source & set with pmSourcePhotometryAper; use new pmModel.class.functions; add AP_NPIX,PSF_CORE,PSF_FWHM_MAJ,PSF_FWHM_MIN to output CMF (PS1_V5+, PS1_DV4+, PS1_SV3+), AP_MAG_RADIUS was S32 on read (how did this work??)

File:
1 edited

Legend:

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

    r36623 r36860  
    2626#include "pmMoments.h"
    2727#include "pmModelFuncs.h"
     28#include "pmModelClass.h"
    2829#include "pmModel.h"
    2930#include "pmModelUtils.h"
    30 #include "pmModelClass.h"
    3131#include "pmSourceMasks.h"
    3232#include "pmSourceExtendedPars.h"
     
    108108        }
    109109        if (isfinite(PAR[PM_PAR_SXX]) && isfinite(PAR[PM_PAR_SXY]) && isfinite(PAR[PM_PAR_SYY])) {
    110             axes = pmPSF_ModelToAxes (PAR, model->type);
     110            axes = pmPSF_ModelToAxes (PAR, model->class->useReff);
    111111            outputs->psfMajor = axes.major;
    112112            outputs->psfMinor = axes.minor;
    113113            outputs->psfTheta = axes.theta*PS_DEG_RAD;
     114
     115            // some models (PS1_V1, QGAUSS) have an extra 'core' parameter
     116            outputs->psfCore = NAN;
     117            if (model->type == pmModelClassGetType ("PS_MODEL_PS1_V1")) {
     118                outputs->psfCore = PAR[PM_PAR_7];
     119            }
     120            if (model->type == pmModelClassGetType ("PS_MODEL_QGAUSS")) {
     121                outputs->psfCore = PAR[PM_PAR_7];
     122            }
     123
     124            outputs->psfMajorFWHM = model->class->modelSetFWHM(model->params, axes.major);
     125            outputs->psfMinorFWHM = model->class->modelSetFWHM(model->params, axes.minor);
    114126        } else {
    115127            outputs->psfMajor = NAN;
    116128            outputs->psfMinor = NAN;
    117129            outputs->psfTheta = NAN;
     130            outputs->psfCore = NAN;
    118131        }
    119132        outputs->chisq = model->chisq;
    120133        outputs->nDOF = model->nDOF;
    121134        outputs->nPix = model->nPix;
    122         outputs->apRadius = source->apRadius;
    123135    } else {
    124136        bool useMoments = pmSourcePositionUseMoments(source);
     
    138150        outputs->psfMinor = NAN;
    139151        outputs->psfTheta = NAN;
     152        outputs->psfCore = NAN;
    140153        outputs->chisq = NAN;
    141154        outputs->nDOF = 0;
    142155        outputs->nPix = 0;
    143         outputs->apRadius = NAN;
    144156    }
    145157
Note: See TracChangeset for help on using the changeset viewer.