IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 6, 2011, 1:02:53 PM (15 years ago)
Author:
eugene
Message:
  • add concept of saddlePoints to peaks (not actually used in the end)
  • add tmp flags to mark sources for analysis or not in psphotStack
  • autocode the pmSourceIO_CMF_PS1_* functions
  • use 1D gauss approx for convolution in PCM fitting
  • added pmSourceExtFitPars (not actually used)
  • in model guess, use 1st radial moments to define size (if it exists)
  • include PSF_INST_MAG, AP_MAG, KRON_MAG in xfit output
  • fix the position for extended source fits (avoid instability)
  • Sersic-like models (incl. Exp and Dev) use Reff, not sigma; conversion tools need to respect this
  • only use a single pass on the centroid (unwindowed, but limited to 1.5 sigma radius) - this avoids moving the centroid because of nearby neighbors
  • use symmetrical averaging (geometric mean) to calculated 1st radial moment (and avoid neighbor biases), do not use symm. averaging for the flux
  • fix the integration of the sersic, pgauss, and related model functions.
  • fix the central pixel to have the full flux for sersic-like models (interpolated value)
Location:
trunk/psModules/src/objects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects

    • Property svn:ignore
      •  

        old new  
        55*.la
        66*.lo
         7pmSourceIO_CMF_PS1_V1.c
         8pmSourceIO_CMF_PS1_V2.c
         9pmSourceIO_CMF_PS1_V3.c
  • trunk/psModules/src/objects/pmPSF.c

    r31451 r32347  
    281281// convert the parameters used in the fitted source model
    282282// to the parameters used in the 2D PSF model
     283// XXX this function may be invalid for SERSIC, DEV, EXP models (SQRT2 not used?)
    283284bool pmPSF_FitToModel (psF32 *fittedPar, float minMinorAxis)
    284285{
     
    307308// convert the PSF parameters used in the 2D PSF model fit into the
    308309// parameters used in the source model
     310// XXX this function may be invalid for SERSIC, DEV, EXP models (SQRT2 not used?)
    309311psEllipsePol pmPSF_ModelToFit (psF32 *modelPar)
    310312{
     
    329331// convert the parameters used in the fitted source model to the psEllipseAxes representation
    330332// (major,minor,theta)
    331 psEllipseAxes pmPSF_ModelToAxes (psF32 *modelPar, double maxAR)
     333psEllipseAxes pmPSF_ModelToAxes (psF32 *modelPar, double maxAR, pmModelType type)
    332334{
    333335    psEllipseShape shape;
     
    336338    axes.minor = NAN;
    337339    axes.theta = NAN;
    338 //   XXX: must assert non-NULL input parameter
     340    //   XXX: must assert non-NULL input parameter
    339341    PS_ASSERT_PTR_NON_NULL(modelPar, axes);
    340342
    341     shape.sx  = modelPar[PM_PAR_SXX] / M_SQRT2;
    342     shape.sy  = modelPar[PM_PAR_SYY] / M_SQRT2;
    343     shape.sxy = modelPar[PM_PAR_SXY];
     343    bool useReff = true;
     344    useReff |= (type == pmModelClassGetType ("PS_MODEL_SERSIC"));
     345    useReff |= (type == pmModelClassGetType ("PS_MODEL_DEV"));
     346    useReff |= (type == pmModelClassGetType ("PS_MODEL_EXP"));
     347
     348    if (useReff) {
     349        shape.sx  = modelPar[PM_PAR_SXX];
     350        shape.sy  = modelPar[PM_PAR_SYY];
     351        shape.sxy = modelPar[PM_PAR_SXY];
     352    } else {
     353        shape.sx  = modelPar[PM_PAR_SXX] / M_SQRT2;
     354        shape.sy  = modelPar[PM_PAR_SYY] / M_SQRT2;
     355        shape.sxy = modelPar[PM_PAR_SXY];
     356    }
    344357
    345358    if ((shape.sx == 0) || (shape.sy == 0)) {
     
    357370// convert the psEllipseAxes representation (major,minor,theta) to the parameters used in the
    358371// fitted source model
    359 bool pmPSF_AxesToModel (psF32 *modelPar, psEllipseAxes axes)
     372bool pmPSF_AxesToModel (psF32 *modelPar, psEllipseAxes axes, pmModelType type)
    360373{
    361374    PS_ASSERT_PTR_NON_NULL(modelPar, false);
     
    370383    psEllipseShape shape = psEllipseAxesToShape (axes);
    371384
    372     modelPar[PM_PAR_SXX] = shape.sx * M_SQRT2;
    373     modelPar[PM_PAR_SYY] = shape.sy * M_SQRT2;
    374     modelPar[PM_PAR_SXY] = shape.sxy;
    375 
     385    bool useReff = true;
     386    useReff |= pmModelClassGetType ("PS_MODEL_SERSIC");
     387    useReff |= pmModelClassGetType ("PS_MODEL_DEV");
     388    useReff |= pmModelClassGetType ("PS_MODEL_EXP");
     389
     390    if (useReff) {
     391        modelPar[PM_PAR_SXX] = shape.sx;
     392        modelPar[PM_PAR_SYY] = shape.sy;
     393        modelPar[PM_PAR_SXY] = shape.sxy;
     394    } else {
     395        modelPar[PM_PAR_SXX] = shape.sx * M_SQRT2;
     396        modelPar[PM_PAR_SYY] = shape.sy * M_SQRT2;
     397        modelPar[PM_PAR_SXY] = shape.sxy;
     398    }
    376399    return true;
    377400}
     
    438461# if (0)
    439462    psF32 *params = model->params->data.F32; // Model parameters
    440     psEllipseAxes axes = pmPSF_ModelToAxes(params, MAX_AXIS_RATIO); // Ellipse axes
     463    psEllipseAxes axes = pmPSF_ModelToAxes(params, MAX_AXIS_RATIO, model->type); // Ellipse axes
    441464
    442465    // Curiously, the minor axis can be larger than the major axis, so need to check.
Note: See TracChangeset for help on using the changeset viewer.