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/pmFootprintAssignPeaks.c

    r30621 r31153  
    4646     */
    4747    psImage *ids = pmSetFootprintArrayIDs(footprints, true);
    48     assert (ids != NULL);
    49     assert (ids->type.type == PS_TYPE_S32);
    50     const int row0 = ids->row0;
    51     const int col0 = ids->col0;
    52     const int numRows = ids->numRows;
    53     const int numCols = ids->numCols;
     48    if (ids) { assert (ids->type.type == PS_TYPE_S32); }
     49   
     50    const int row0 = ids ? ids->row0 : 0;
     51    const int col0 = ids ? ids->col0 : 0;
     52    const int numRows = ids ? ids->numRows : -1;
     53    const int numCols = ids ? ids->numCols : -1;
    5454
    5555    for (int i = 0; i < peaks->n; i++) {
     
    5858        const int y = peak->y - row0;
    5959       
    60         assert (x >= 0 && x < numCols && y >= 0 && y < numRows);
    61         int id = ids->data.S32[y][x - col0];
     60        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.
    6263
    6364        if (id == 0) {                  // peak isn't in a footprint, so make one for it
     
    8687        if (fp->peaks->n == 1) continue;
    8788
    88         fp->peaks = psArraySort(fp->peaks, pmPeakSortBySN);
     89        // make sure the peaks are sorted in a way consistent with our cull process
     90        if (PM_PEAKS_CULL_WITH_SMOOTHED_IMAGE) {
     91            fp->peaks = psArraySort(fp->peaks, pmPeaksSortBySmoothFluxDescend);
     92        } else {
     93            fp->peaks = psArraySort(fp->peaks, pmPeaksSortByRawFluxDescend);
     94        }
    8995
    9096        // XXX check for an assert on duplicates (I don't think they can happen, but
Note: See TracChangeset for help on using the changeset viewer.