IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 4, 2011, 1:04:41 PM (15 years ago)
Author:
eugene
Message:

updates to pmPeak to better distinguish peak flux versions; updates to visualization; add bits for substantial suspect masking; consolidate assignment of source position and flux based on peak, moments, etc; improve footprint culling process; fix PSF_QF and PSF_QF_PERFECT calculations; fix source model chisq values

Location:
trunk/psModules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules

    • Property svn:ignore
      •  

        old new  
        2828ChangeLog
        2929psmodules-*.tar.*
         30a.out.dSYM
  • trunk/psModules/src/objects/pmFootprintFindAtPoint.c

    r29004 r31153  
    3131 *
    3232 * This is the guts of pmFootprintsFindAtPoint
     33 *
     34 * This function is/was ill-defined if pixel values are NAN.  we should either treat NAN as >
     35 * threshold or < threshold, but the current (r29004) code is ambiguous.
     36 * EAM : change code so NAN is always > threshold
    3337 */
    3438bool pmFootprintSpansBuild(pmFootprint *fp, // the footprint that we're building
     
    103107        for (int j = x0 - 1; j >= -1; j--) {
    104108            double pixVal = (j < 0) ? threshold - 100 : (F32 ? imgRowF32[j] : imgRowS32[j]);
    105             if ((maskRow[j] & PM_STARTSPAN_DETECTED) || pixVal < threshold) {
     109            bool belowThreshold = (pixVal < threshold) && isfinite(pixVal);
     110            if ((maskRow[j] & PM_STARTSPAN_DETECTED) || belowThreshold)  {
    106111                if (j < x0 - 1) {       // we found some pixels above threshold
    107112                    nx0 = j + 1;
     
    119124            for (int j = nx0 + 1; j <= numCols; j++) {
    120125                double pixVal = (j >= numCols) ? threshold - 100 : (F32 ? imgRowF32[j] : imgRowS32[j]);
    121                 if ((maskRow[j] & PM_STARTSPAN_DETECTED) || pixVal < threshold) {
     126                bool belowThreshold = (pixVal < threshold) && isfinite(pixVal);
     127                if ((maskRow[j] & PM_STARTSPAN_DETECTED) || belowThreshold) {
    122128                    nx1 = j - 1;
    123129                    break;
     
    146152        for (int j = nx1 + 1; j <= x1 + 1; j++) {
    147153            double pixVal = (j >= numCols) ? threshold - 100 : (F32 ? imgRowF32[j] : imgRowS32[j]);
    148             if (!(maskRow[j] & PM_STARTSPAN_DETECTED) && pixVal >= threshold) {
     154            bool aboveThreshold = (pixVal >= threshold) || !isfinite(pixVal);
     155            if (!(maskRow[j] & PM_STARTSPAN_DETECTED) && aboveThreshold) {
    149156                int sx0 = j++;          // span that we're working on is sx0:sx1
    150157                int sx1 = -1;           // We know that if we got here, we'll also set sx1
    151158                for (; j <= numCols; j++) {
    152159                    double pixVal = (j >= numCols) ? threshold - 100 : (F32 ? imgRowF32[j] : imgRowS32[j]);
    153                     if ((maskRow[j] & PM_STARTSPAN_DETECTED) || pixVal < threshold) { // end of span
     160                    bool belowThreshold = (pixVal < threshold) && isfinite(pixVal);
     161                    if ((maskRow[j] & PM_STARTSPAN_DETECTED) || belowThreshold) { // end of span
    154162                        sx1 = j;
    155163                        break;
     
    306314        for (i = col; i >= 0; i--) {
    307315            pixVal = F32 ? imgRowF32[i] : imgRowS32[i];
    308             if ((maskRow[i] & PM_STARTSPAN_DETECTED) || pixVal < threshold) {
     316            bool belowThreshold = (pixVal < threshold) && isfinite(pixVal);
     317            if ((maskRow[i] & PM_STARTSPAN_DETECTED) || belowThreshold) {
    309318                break;
    310319            }
     
    313322        for (i = col; i < numCols; i++) {
    314323            pixVal = F32 ? imgRowF32[i] : imgRowS32[i];
    315             if ((maskRow[i] & PM_STARTSPAN_DETECTED) || pixVal < threshold) {
     324            bool belowThreshold = (pixVal < threshold) && isfinite(pixVal);
     325            if ((maskRow[i] & PM_STARTSPAN_DETECTED) || belowThreshold) {
    316326                break;
    317327            }
Note: See TracChangeset for help on using the changeset viewer.