IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40810 for trunk


Ignore:
Timestamp:
Jun 20, 2019, 4:15:45 PM (7 years ago)
Author:
eugene
Message:

do not raise an error if psSourceRoughStats does not have enough data to measure the min/max; just print the failure

File:
1 edited

Legend:

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

    r37321 r40810  
    783783
    784784        if (!psVectorStats (stats, starsn_moments, NULL, NULL, 0)) {
    785             psError(PS_ERR_UNKNOWN, false, "failed to measure SN / moments stats");
    786             psFree (stats);
    787             psFree (starsn_peaks);
    788             return false;
     785          psErrorClear(); // XXX it is probably excessive for psVectorStats to raise an error here (no valid values)
     786          fprintf (stderr, "failed to measure SN / moments stats (no valid moments)\n");
     787          // psError(PS_ERR_UNKNOWN, false, "failed to measure SN / moments stats");
     788          // psFree (stats);
     789          // psFree (starsn_peaks);
     790          // return false;
    789791        }
    790792        psLogMsg ("pmObjects", 3, "SN range (moments): %f - %f\n", stats->min, stats->max);
     
    797799        stats = psStatsAlloc (PS_STAT_MIN | PS_STAT_MAX);
    798800        if (!psVectorStats (stats, starsn_peaks, NULL, NULL, 0)) {
    799             psError(PS_ERR_UNKNOWN, false, "failed to measure SN / moments stats");
    800             psFree (stats);
    801             psFree (starsn_peaks);
    802             return false;
    803         }
    804         psLogMsg ("psModules.objects", 3, "SN range (peaks)  : %f - %f (%ld)\n",
    805                   stats->min, stats->max, starsn_peaks->n);
     801          psErrorClear(); // XXX it is probably excessive for psVectorStats to raise an error here (no valid values)
     802          fprintf (stderr, "failed to measure SN / peak stats (no valid peaks)\n");
     803          // psError(PS_ERR_UNKNOWN, false, "failed to measure SN / moments stats");
     804          // psFree (stats);
     805          // psFree (starsn_peaks);
     806          // return false;
     807        }
     808        psLogMsg ("psModules.objects", 3, "SN range (peaks)  : %f - %f (%ld)\n", stats->min, stats->max, starsn_peaks->n);
    806809        psFree (stats);
    807810    }
Note: See TracChangeset for help on using the changeset viewer.