IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 11, 2012, 11:56:11 AM (14 years ago)
Author:
bills
Message:

Add psphot recipe value PEAKS_NMAX_TOTAL. If non zero and the number of peaks found
in is larger than the value return with failure status from psphotFindDetections
Set value to 50000 for recipe STACKPHOT and default to 0. This allows us to
abort psphotStack in cases where the memory usage is going to become to large.
This allows us to continue processing efficiently while we solve the underlying
problems.

File:
1 edited

Legend:

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

    r32348 r33761  
    44// image must be constructed to represent (S/N)^2.  If nMax is non-zero, only return a maximum
    55// of nMax peaks
    6 psArray *psphotFindPeaks (pmReadout *significance, pmReadout *readout, psMetadata *recipe, const float threshold, const int nMax) {
     6psArray *psphotFindPeaks (pmReadout *significance, pmReadout *readout, psMetadata *recipe, const float threshold, const int nMax, int *totalPeaks) {
    77
    88    bool status = false;
     
    1818        psError(PSPHOT_ERR_DATA, false, "no peaks found in this image");
    1919        return NULL;
     20    }
     21    // return the total number of peaks found before the nMax limit is applied
     22    if (totalPeaks) {
     23        *totalPeaks = peaks->n;
    2024    }
    2125
Note: See TracChangeset for help on using the changeset viewer.