IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 5, 2011, 10:11:07 AM (15 years ago)
Author:
eugene
Message:

merging updates from trunk

Location:
branches/eam_branches/ipp-20110404/psModules/src/objects
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110404/psModules/src/objects/pmFootprintAssignPeaks.c

    r31153 r31443  
    3535    assert (peaks->n == 0 || psMemCheckPeak(peaks->data[0]));
    3636   
    37     if (footprints->n == 0) {
    38         if (peaks->n > 0) {
    39             return psError(PS_ERR_BAD_PARAMETER_SIZE, true, "Your list of footprints is empty");
    40         }
     37    if ((footprints->n == 0) && (peaks->n == 0)) {
    4138        return PS_ERR_NONE;
    4239    }
     40
    4341    /*
    4442     * Create an image filled with the object IDs, and use it to assign pmPeaks to the
     
    5957       
    6058        if (ids) { assert (x >= 0 && x < numCols && y >= 0 && y < numRows);}
    61         int id = ids ? ids->data.S32[y][x - col0] : 0;
    62         // XXX I think the '[x - col0]' above is just wrong (should be [x], but never gets triggerd.
     59        int id = ids ? ids->data.S32[y][x] : 0;
    6360
    6461        if (id == 0) {                  // peak isn't in a footprint, so make one for it
  • branches/eam_branches/ipp-20110404/psModules/src/objects/pmFootprintCullPeaks.c

    r31153 r31443  
    102102        float beta = nsigma_delta * ALPHA;
    103103        float beta2 = PS_SQR(beta);
    104         int nBins = sqrt(4.0*(maxFlux - min_threshold)/beta2) + 10; // let's be extra generous
     104        float value = 4.0*(maxFlux - min_threshold)/beta2;
     105        int nBins = (value > 1.0) ? sqrt(value) + 10 : 10; // let's be extra generous
    105106
    106107        // create a vector to store the threshold bins used for each peak
  • branches/eam_branches/ipp-20110404/psModules/src/objects/pmFootprintIDs.c

    r31153 r31443  
    6666
    6767   if (footprints->n == 0) {
    68        // XXX this was an error, but is an allowed condition -- NULL returned image means no footprints for any peaks
    69        // psError(PS_ERR_BAD_PARAMETER_SIZE, true, "You didn't provide any footprints");
    7068       return NULL;
    7169   }
Note: See TracChangeset for help on using the changeset viewer.