IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 3, 2008, 11:00:18 AM (18 years ago)
Author:
eugene
Message:

converted pmMoments elements to Mxx, Myy, Mxxx, etc; using pmPeak position in most cases instead of moments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotSourceFits.c

    r19869 r19881  
    218218    if (source->type == PM_SOURCE_TYPE_DEFECT) return false;
    219219    if (source->type == PM_SOURCE_TYPE_SATURATED) return false;
    220     if (source->moments->SN < EXT_MIN_SN) return false;
     220    if (source->peak->SN < EXT_MIN_SN) return false;
    221221
    222222    // recalculate the source moments using the larger extended-source moments radius
     
    331331    maskVal |= markVal;
    332332
     333    // XXX this is really poor: if we don't have moments for the source, we have no guess.
     334    // force the measurement?
     335    psAssert (source->moments, "moments are re-calculated for any extended source");
     336       
    333337    // make a guess at the position of the two sources
    334     moments.x2 = source->moments->Sx;
    335     moments.y2 = source->moments->Sy;
    336     moments.xy = source->moments->Sxy;
     338    moments.x2 = source->moments->Mxx;
     339    moments.xy = source->moments->Mxy;
     340    moments.y2 = source->moments->Myy;
    337341    axes = psEllipseMomentsToAxes (moments, 20.0);
    338342
     
    380384    psphotCheckRadiusEXT (readout, source, EXT, markVal);
    381385
    382     if ((source->moments->Sx < 1e-3) || (source->moments->Sx < 1e-3)) {
    383         psTrace ("psphot", 5, "problem source: moments: %f %f\n", source->moments->Sx, source->moments->Sy);
     386    if ((source->moments->Mxx < 1e-3) || (source->moments->Myy < 1e-3)) {
     387        psTrace ("psphot", 5, "problem source: moments: %f %f\n", source->moments->Mxx, source->moments->Myy);
    384388    }
    385389
Note: See TracChangeset for help on using the changeset viewer.