IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 24, 2006, 10:56:20 AM (19 years ago)
Author:
magnier
Message:

guess is off by sqrt(2)

File:
1 edited

Legend:

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

    r10078 r10181  
    1414 * PM_PAR_XPOS 2  - X center of object
    1515 * PM_PAR_YPOS 3  - Y center of object
    16  * PM_PAR_SXX 4   - X^2 term of elliptical contour (sqrt(2) / SigmaX)
    17  * PM_PAR_SYY 5   - Y^2 term of elliptical contour (sqrt(2) / SigmaY)
     16 * PM_PAR_SXX 4   - X^2 term of elliptical contour (sqrt(2) * SigmaX)
     17 * PM_PAR_SYY 5   - Y^2 term of elliptical contour (sqrt(2) * SigmaY)
    1818 * PM_PAR_SXY 6   - X*Y term of elliptical contour
    1919 *****************************************************************************/
     
    9595bool PM_MODEL_GUESS (pmModel *model, pmSource *source)
    9696{
    97 
    9897    pmMoments *moments = source->moments;
    9998    psF32     *PAR  = model->params->data.F32;
     99
     100    # if (0)
     101
     102        psEllipseMoments emoments;
     103    emoments.x2 = moments->Sx;
     104    emoments.y2 = moments->Sx;
     105    emoments.xy = moments->Sxy;
     106
     107    psEllipseAxes axes = psEllipseMomentsToAxes (emoments);
     108    psEllipseShape shape = psEllipseAxesToShape (axes);
     109    # endif
    100110
    101111    PAR[PM_PAR_SKY] = moments->Sky;
     
    103113    PAR[PM_PAR_XPOS] = moments->x;
    104114    PAR[PM_PAR_YPOS] = moments->y;
    105     PAR[PM_PAR_SXX] = PS_MAX(0.5, moments->Sx);
    106     PAR[PM_PAR_SYY] = PS_MAX(0.5, moments->Sy);
     115    PAR[PM_PAR_SXX] = PS_MAX(0.5, M_SQRT2*moments->Sx);
     116    PAR[PM_PAR_SYY] = PS_MAX(0.5, M_SQRT2*moments->Sy);
    107117    PAR[PM_PAR_SXY] = 0.0;
     118    # if (0)
     119
     120        PAR[PM_PAR_SXX] = PS_MAX(0.5, M_SQRT2*shape.sx);
     121    PAR[PM_PAR_SYY] = PS_MAX(0.5, M_SQRT2*shape.sy);
     122    PAR[PM_PAR_SXY] = shape.sxy;
     123    # endif
     124
    108125    return(true);
    109126}
Note: See TracChangeset for help on using the changeset viewer.