IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 29, 2012, 2:15:01 PM (14 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20120905
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120905

  • branches/eam_branches/ipp-20120905/psLib/share/tai_utc.dat

    r22679 r34735  
    1212#          JD           TAI-UTC    Const 1       Const 2
    1313#        (days)          (sec)      (none)       (none)
    14 #          psF64                 psF64      psF64         psF64
     14#         psF64         psF64      psF64         psF64
    1515        2437300.5      1.4228180    37300.0     0.0012960
    1616        2437512.5      1.3728180    37300.0     0.0012960
    … …  
    5151        2453736.5     33.0000000    41317.0     0.0000000
    5252        2454832.5     34.0000000    41317.0     0.0000000
     53        2456109.5     35.0000000    41317.0     0.0000000
  • branches/eam_branches/ipp-20120905/psLib/share/tai_utc.raw

    r22679 r34735  
    3737 2006 JAN  1 =JD 2453736.5  TAI-UTC=  33.0       S + (MJD - 41317.) X 0.0      S
    3838 2009 JAN  1 =JD 2454832.5  TAI-UTC=  34.0       S + (MJD - 41317.) X 0.0      S
     39 2012 JUL  1 =JD 2456109.5  TAI-UTC=  35.0       S + (MJD - 41317.) X 0.0      S
  • branches/eam_branches/ipp-20120905/psLib/src/imageops/psImageConvolve.c

    r33089 r34735  
    605605    PS_ASSERT_IMAGE_NON_NULL(image, false);
    606606
     607    if (sigma < 0.25) {
     608        psTrace("psLib.imageops", 5, "sigma: %f < 0.25 skipping smoothing", sigma);
     609        return true;
     610    }
     611
    607612    // relevant terms
    608613    int Nrange = sigma*Nsigma + 0.5;    // Number of pixels either side for convolution kernel
     614    if (Nrange < 1) {
     615        // using zero will cause an arithmetic exception in the loop
     616        psTrace("psLib.imageops", 5, "Nrange %d for smoothing too small skipping smoothing", Nrange);
     617        return true;
     618    }
    609619    int Nx = image->numCols;            // Number of columns
    610620    int Ny = image->numRows;            // Number of rows
  • branches/eam_branches/ipp-20120905/psLib/src/math/psHistogram.c

    r27553 r34735  
    5858    psTrace("psLib.math", 3, "---- %s() begin  ----\n", __func__);
    5959    psTrace("psLib.math", 5, "(lower, upper, n) is (%f, %f, %d)\n", lower, upper, n);
    60     psAssert(n > 0, "Number of bins must be positive");
     60    psAssert(n > 0, "Number of bins must be positive not %d", n);
    6161    psAssert(upper >= lower, "Bounds must be sensical");
    6262
  • branches/eam_branches/ipp-20120905/psLib/src/math/psStats.c

    r31152 r34735  
    764764            goto escape;
    765765        }
     766        if (!isfinite(max - min)) {
     767            COUNT_WARNING(10, 100, "Range of of the input vector is too large: %lf.\n", (double)max - (double) min);
     768            goto escape;
     769        }
    766770        psTrace(TRACE, 6, "Data min/max is (%.2f, %.2f)\n", min, max);
    767771
    … …  
    802806        psTrace(TRACE, 6, "Numbins is %ld\n", numBins);
    803807        psTrace(TRACE, 6, "Creating a robust histogram from data range (%.2f - %.2f)\n", min, max);
     808
     809        // We are sometimes causing psHistogramAlloc to assert.
     810        // Assert here so we can get more information about what is going wrong.
     811        psAssert(numBins > 0, "Invalid numBins: %ld max: %f min: %f binSize: %f", numBins, max, min, binSize);
     812       
    804813        // Generate the histogram
    805814        histogram = psHistogramAlloc(min - 2.0*binSize, max + 2.0*binSize, numBins);
    … …  
    858867            // if we did not mask anything, give up.
    859868        }
     869
     870        // We were causing psHistogramAlloc to assert.
     871        // Assert here so we can get more information about what is going wrong.
     872        psAssert(numBins > 0, "Invalid numBins %ld max: %f min: %f binSize: %f", numBins, max, min, binSize);
    860873
    861874        // ADD step 1: Convert the specific histogram to a cumulative histogram
Note: See TracChangeset for help on using the changeset viewer.